diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 176ebb3..937e9b3 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -6,7 +6,7 @@ on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
- branches: [deploy]
+ branches: [deploy, v2]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@@ -41,7 +41,7 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
- run: npm ci # or pnpm install / yarn install
+ run: npm i # or pnpm install / yarn install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build
- name: Upload artifact
diff --git a/.gitignore b/.gitignore
index 321d0ce..ae0a0f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,11 @@
+.github/
node_modules
.DS_STORE
deploy/
dist/
-run.sh
\ No newline at end of file
+.env
+abc.ts
+.vitepress/cache
+docs/.vitepress/cache/
+coverage/
+todo.md
\ No newline at end of file
diff --git a/.npmignore b/.npmignore
index 87b291d..a947c96 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,8 +1,16 @@
+api-docs/
docs/
-settings/
test/
src/
-nodemon.json
-CNAME
-index.html
-index.md
\ No newline at end of file
+test/
+vite.config.ts
+examples/
+coverage/
+tsconfig.json
+build_tricks
+abc.ts
+bin/
+coverage/
+todo.md
+.github
+.vscode
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..25fa621
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "typescript.tsdk": "node_modules/typescript/lib"
+}
diff --git a/CNAME b/CNAME
deleted file mode 100644
index 3cfa6be..0000000
--- a/CNAME
+++ /dev/null
@@ -1 +0,0 @@
-speedybot.js.org
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index a337f74..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,19 +0,0 @@
-## Help take out the 🗑
-
-- [ ] better cli
-
-- [ ] docs, links & resources
-
-- [ ] Zero-config deployment
-
-- [ ] Bulletproof version of: $ npx @vue/cli ui
-
-- [ ] Dream: $ npx cli chat_config_and_handlers.ts ## boots server
-
-- [ ] Intent matching or language models: send to DialogFlow, Lex, GPT3, etc
-
-- [ ] 3rd-party integration-- airtable/smartsheet/ittt/email/etc
-
-- [ ] Slim down dependencies
-
-- [ ] examples: "Swellbot"-- call surf/weather api, "icecream"-- save state on server, show graphs of icecream orders, etc
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 0ff345d..50ec736 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021 Victor Algaze
+Copyright (c) 2024 Victor Algaze
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 24ec99f..3dace45 100644
--- a/README.md
+++ b/README.md
@@ -1,467 +1,128 @@
-## Speedybot
+# SpeedyBot 2.0
-```
-tl:dr; The speedy & easy way to launch a bot
-```
-
-[![sb](https://i.imgur.com/VQoXfHn.gif)](https://share.descript.com/view/ds3UA1kUb9z)
-
----
-
-**Note:** To jump right in, go here: **[quickstart.md](https://github.com/valgaze/speedybot/blob/master/quickstart.md)**
-
-## What's Speedybot?
-
-Speedybot is a tool to take you from zero to a user-valuable bot as quickly as possible w/ a **buttery-smooth developer experience.** Think of it as a *"helper"* library that extends the marvelous **[Node WebEx Bot Framework](https://github.com/WebexSamples/webex-node-bot-framework)** and makes it **fast and easy** for you to create sophisticated conversation agents. In short, Speedybot lets you focus on the stuff that actually matters-- content and powerful integrations.
-
-## Features
-
-🌟 Collect + validate user input-- and reprompt if validation fails (more info **[here](#prompt)**)
-
-🌟 "SpeedyCard" to easily create rich interactive **["Adaptive Cards"](https://developer.webex.com/docs/api/guides/cards)** (more info **[here](#speedycard)**)
-
-🌟 Access encrypted file uploads + attachments (more info **[here](#upload-a-file)**)
-
-🌟 Integrate with 3rd-party services
-
-🌟 Response variation + templating
-
-🌟 Automatic "help" generation
+
+
+
+
+
+
+
+
+
+
+
-🌟 Persist data between conversation runs ("globally" and scoped to an individual user)
+
-🌟 Zero configuration to get up and running (defaults to websockets for webhooks-- no nGrok or tunneling)
+tl;dr: SpeedyBot helps you efficiently design, deploy, and secure rich conversation systems
-🌟 Lots of quality-of-life and convenience features
+## Setup
-🌟 Full sample applications-- just add your token and boot up (more info **[here](#sample-applications)**)
-
-
-## How to use
-
-The best way to see speedybot in action is to jump right in, see here for batteries-included starter: https://github.com/valgaze/speedybot-starter
-
-## Video instructions
-
-- 101: https://share.descript.com/view/ds3UA1kUb9z
-
-- Webhooks/3rd-party integrations: https://share.descript.com/view/bnyupJvNJcx
-
-You can also use the **[CLI Tool "speedyhelper"](#cli)**
-
-```sh
-npx speedyhelper setup
+```
+npm install speedybot
```
-## Special keywords
-
-There are a few "special" keywords you can use to "listen" to special events:
-
-- *<@submit>*: Handler that will run anytime data is submitted from an **[Adaptive Card](https://developer.webex.com/docs/api/guides/cards)**
-
-- *<@nomatch>*: Handler that will run if there are no handlers which will match the input
-
-- *<@catchall>*: Handler that will run on **every** message received (in a real agent you probably will not write hard-coded handlers and instead use this handler to dispatch user messages to natural language processing services like **[DialogFlow](https://cloud.google.com/dialogflow)** or **[Lex](https://aws.amazon.com/lex/)**)
-
-- *<@fileupload>*: Handler that will fire on **every** file-upload or file-attachment sent to the bot
+## Speedy & Easy
-- *<@help>*: There is a built-in help handler by default (it will print out all of your custom handler's helpTexts from settings/handlers.ts), but use this keyword if you want to roll your own help
+- SpeedyBot offers a buttery-smooth developer experience to keep you building your bots rather than scouring the docs. It's written in typescript + built-in type hints with autocomplete, has zero external dependencies, supports ESM + CommonJS, provides lots of other DX goodness that makes building bots a breeze like local development with live-reload (see **[here for details](https://github.com/valgaze/speedybot/tree/deploy/examples/speedybot-local-server)**).
-- *<@spawn>*: Gets called whenever a user adds your bot to a new space-- there are some caveats, however, to its behavior, so if you think you'll need this, see **[here](https://github.com/WebexSamples/webex-node-bot-framework/blob/master/README.md#spawn)**, **[here](https://developer.webex.com/blog/a-deeper-dive-into-the-webex-bot-framework-for-node-js)** or the **[resources page](https://github.com/valgaze/speedybot/blob/master/docs/resources.md)** for all the details
+- SpeedyBot shrinks away all the complexity and makes it a breeze to handle user input regardless of the source/modality-- text, file uploads, form submission from SpeedyCards, etc
-- *<@despawn>*: Opposite of spawn, see **[here](https://github.com/WebexSamples/webex-node-bot-framework/#despawn)** for details
+- SpeedyBot seamlessly operates across diverse severless/container-less platforms (Lambda/Deno/Workers/etc) as well as conventional fixed servers and even within CI/CD scripts. As long you've got internet connectivity, SpeedyBot functions seamlessly
+## SpeedyBot basics
-## CLI
+You can see fleshed-out examples at **[https://speedybot.js.org/examples/](https://speedybot.js.org/examples/)** and see how SpeedyBot has you covered for crafting bots that can do it all-- securely integrate w/ LLMs + content management systems, **[process file-uploads](https://speedybot.js.org/patterns.md#handle-file-uploads)**, **[segment content based on user data + behavior](https://speedybot.js.org/patterns.md#restrict-emails)**, create + manage **[SpeedyCards](https://speedybot.js.org/speedycard)**, ask for a user's location in a privacy-respecting way and lots more.
-| **Command** |**Description** |
-| :-------------------------: | :-------------------------------------------------------------------------------------------------- |
-| `npx speedyhelper setup` | scaffold a starter speedybot project (requires git) |
-| `npx speedyhelper setup -t aaa-bbb-ccc-ddd` | scaffold a speedybot project using the value after setup as the token|
-| `npx speedyhelper help` | show basic CLI help info |
-| `npx speedyhelper web -q` | Kick off a web-based chat interface (use -q flag to interactively add token + roomId) |
-| `npx speedyhelper sendmsg` | Send a message to a room using bot access token |
-| `npx speedyhelper tunnel -p 8000` | Start an nGrok tunnel, defaults to port 8000|
+### Auto-binding
+As a convenience, SpeedyBot's "magic" $ parameter will auto-bind to the incoming message and give you access to all kinds of useful features
+```js
+const Bot = new SpeedyBot();
-(Global install using npm/yarn)
+// You get an incoming messsage
+Bot.addStep(async ($) => {
+ await $.send("Hello the originating person/room");
+ await $.reply("Reply to the originating person/room");
-Rather than using **[npx](https://docs.npmjs.com/cli/v7/commands/npx)**, you can perform a global install which install speedyhelper to your path
+ // The same as the following
+ await Bot.sendTo($.author.email, "my message");
-```sh
-npm i -g speedyhelper
+ const parentMessageID = $.id;
+ await Bot.replyTo(parentMessageID, $.author.email, "my great reply message");
-yarn global add speedyhelper
+ return $.next;
+});
```
-Make sure all worked well by opening a new terminal and entering:
+There's also a lot more you can do
-```sh
-speedyhelper help
-```
+
-
+## SpeedyCards
-# Some Demos
+SpeedyCards make it (yep) speedy and easy to build **[Adaptive Cards](https://adaptivecards.io)** where you can easily collect structured data from users and add colors, "chips", formatting and other visual embellishments.
-## Prompt
+
-ex. When the user says 'prompt', the agent will continue asking the user for a number whose digits sum to 6 (can quit by saying ```$exit```)
+
-![sb](https://raw.githubusercontent.com/valgaze/speedybot/master/docs/assets/prompt_demo.gif)
+## LLM Token Streaming
-```ts
-import { $ } from 'speedybot'
-
-// $(bot).prompt has 3 components
-// - (1) retry (list of message to provide feedback or encourage the user to modify their)
-// - (2) success (handler when validation passes, the final parameter is the value)
-// - (3) validate (function that accepts the user-provided value as a parameter)
-
-export default [
- {
- keyword: 'prompt',
- async handler(bot) {
-
- const $bot = $(bot)
- await bot.say('Sending you a prompt...')
- $bot.prompt('Enter a number whose digits that add up to 6 (ex 51, 60, 33, 501, etc)', {
- retry: [`Sorry, doesn't add up to 6`,
- `Whoops that value doesn't work try again`,
- `That value doesn't work`,
- `Whoops, that input is not valid. You can type '$exit' to abandon this`
- ],
- async success(bot, trigger, answer) {
- bot.say('You did it!!! Good job! <3 <3')
- bot.say(answer)
-
- // Ex. Submit data to a 3rd-party service/integration
- const res = await $bot.post('https://jsonplaceholder.typicode.com/posts', { data: { title: 'my special value that adds to 6', userValue: answer } })
- $(bot).sendSnippet(res.data, 'Posted response to https://jsonplaceholder.typicode.com/posts')
- },
- validate(val=0) {
- // Make sure digits add to 6
- const sum = String(val).split('')
- .map(Number)
- .reduce(function (prev, next) {
- return prev + next;
- }, 0)
- if (sum === 6) {
- return true
- } else {
- return false
- }
- }
- })
- },
- helpText: 'A handler which will ask the user for a number whose digits sum to 6'
- }
-]
-```
+SpeedyBot makes it speedy & easy to build serverless bots for the LLM era. See the **[LLM steam example](https://speedybot.js.org/examples/llm-stream)**
-## SpeedyCard
+
-ex. Tell the bot "sendcard" to get a card, type into the card & tap submit, catch submission using *<@submit>* and echo back to user
+## SpeedyBot "listener"
-![sb](https://raw.githubusercontent.com/valgaze/speedybot/master/docs/assets/send_card.gif)
+You can use SpeedyBot to only send messages + cards and nothing more. But if you have data on those cards you want to capture or if you want to provide an automated conversation experience SpeedyBot takes of all the hassle.
-```ts
-import { SpeedyCard } from 'speedybot'
-export default [{
- keyword: '<@submit>',
- handler(bot, trigger) {
- bot.say(`Submission received! You sent us ${JSON.stringify(trigger.attachmentAction.inputs)}`)
- },
- helpText: 'Special handler that fires when data is submitted'
- },
- {
- keyword: 'sendcard',
- handler(bot, trigger) {
- bot.say('One card on the way...')
- // Adapative Card: https://developer.webex.com/docs/api/guides/cards
- const myCard = new SpeedyCard().setTitle('System is 👍')
- .setSubtitle('If you see this card, everything is working')
- .setImage('https://raw.githubusercontent.com/valgaze/speedybot/master/docs/assets/chocolate_chip_cookies.png')
- .setInput(`What's on your mind?`)
- .setUrl('https://www.youtube.com/watch?v=3GwjfUFyY6M', 'Take a moment to celebrate')
- .setTable([[`Bot's Date`, new Date().toDateString()], ["Bot's Uptime", `${String(process.uptime())}s`]])
- .setData({mySpecialData: {a:1, b:2}})
- bot.sendCard(myCard.render(), 'Your client does not currently support Adaptive Cards')
- },
- helpText: 'Sends an Adaptive Card with an input field to the user'
- }
-]
-```
-
-## Suggestion Chips
-
-![sb](https://raw.githubusercontent.com/valgaze/speedybot/master/docs/assets/chip_tap_persist.gif)
+Ex. Here is a minimal handler that will echo back information if a user transmits data via text, file, and adaptive card. Write "show card" to display a card. You can chain multiple addSteps if you need to, but in this era you probably don't need/want to be doing much logic in code.
-Suggestion "chips" are a shortcut to trigger other handlers as if the user uttered it themselves-- useful for quizzing or providing suggestions of what to say next
-
-ex. When the user enters the text 'chips' or 'chip', they can select an item and trigger another handler
+See full example applications here: **[https://speedybot.js.org/examples](https://speedybot.js.org/examples)**
```ts
-import { $, BotInst, Trigger} from 'speedybot'
-
-// $(bot).prompt has 3 components
-// - (1) retry (list of message to provide feedback or encourage the user to modify their)
-// - (2) success (handler when validation passes, the final parameter is the value)
-// - (3) validate (function that accepts the user-provided value as a parameter)
-
-export default [
- {
- keyword: ['chips', 'chip'],
- async handler(bot) {
- const $bot = $(bot)
- await bot.say('Here are some chips...')
-
- const specialChip = {
- label: 'my special chip',
- handler(bot: BotInst) {
- bot.say('You tapped the special chip!')
- }
- }
- $bot.sendChips(['hey', specialChip, 'ping', { label:`Say the phrase 'pong'`, keyword: 'pong' }], 'Tap an item below')
- },
- helpText: 'Show suggestion chips'
- },
- {
- keyword: ['hi', 'hey', 'yo', 'whatsup'],
- handler(bot, trigger) {
- const reply = `Heya how's it going ${trigger.person.displayName}?`
- bot.say(reply)
- },
- helpText: 'Basic greeting handler'
- },
- {
- keyword: ['ping', 'pong'],
- handler(bot, trigger) {
- const normalized = trigger.text.toLowerCase()
- if (normalized === 'ping') {
- bot.say('pong')
- } else {
- bot.say('ping')
- }
- },
- helpText: 'The ping/pong handler'
+import { SpeedyBot } from "speedybot";
+
+const Bot = new SpeedyBot();
+Bot.addStep(async ($) => {
+ // handle text
+ if ($.text) {
+ await $.send(`You said "${$.text}`);
+
+ if ($.text.toLowerCase() === "showcard") {
+ const card = $.card()
+ .addTitle("Capture data")
+ .addTextarea("Submit data")
+ .addPickerDropdown(["option 1", "option 2", "option 3", "option 4"]);
+ await $.send(card);
}
-]
-```
-
-## Upload a file
-
-ex. When the user uploads a spreadsheet file (*.xlsx), the agent will take the file-data, transform it into an html file, display the HTML file and generate a downloadable file for the user
-
-![sb](https://raw.githubusercontent.com/valgaze/speedybot-superpowers/master/docs/assets/speedybot_xlsx.gif
-)
-
-```ts
-
-// See <@fileupload> handler here: https://github.com/valgaze/speedybot-superpowers/blob/master/settings/handlers.ts#L77
-
+ }
+
+ // file handler
+ if ($.file) {
+ const { name, extension, contentType } = $.file;
+ await $.send(
+ `You uploaded "${name}", a *.${extension} file [${contentType}]`
+ );
+ // Fetch raw bytes (which you can pass onto other systems)
+ // const TheData = await $.file.getData(); // do something w/ the contents/bytes
+ }
+
+ // form/card submissions
+ if ($.data) {
+ const dataSnippet = $.buildDataSnippet($.data);
+ await $.send(`This data was submitted:`);
+ await $.send(dataSnippet);
+ }
+
+ return $.next;
+});
+
+export default Bot;
```
+## 🐍 Speedybot-Python
-## Adding a new chat handler
-
-With Speedybot, all you need to worry about is the **[settings directory](https://github.com/valgaze/speedybot-starter/tree/master/settings)** directory with two files:
-
-**1. config.json:** This is where you'll put your bot access token and the "tunnel" (or webhost) where your bot is reachable from webhooks
-
-**2. handlers.ts:** A list of "handlers" that respond to keywords
-
-Example handler:
-
-A handler has 3 components:
-
-- Keyword: a string, regex, or list of strings or regex's that will match against the user's input (or a **[Special Keyword](#special-keywords)**)
-
-- Handler: A function that takes a ```bot``` and ```trigger```
-
-- helpText: A decription of what the handler does (used by the default <@help> handler to tell users what your bot can do)
-
-```js
-{
- keyword: ['hello', 'hey', 'yo', 'watsup', 'hola'],
- handler(bot, trigger) {
- // bot: https://github.com/WebexSamples/webex-node-bot-framework#bot
- // trigger: https://github.com/WebexSamples/webex-node-bot-framework#trigger
- const reply = `Heya how's it going ${trigger.person.displayName}?`
- bot.say(reply)
- },
- helpText: `**hello** A handler that greets the user`
-}
-```
-
-## $uperpowers
-
-Speedybot can also give your bot $uperpowers-- **[see here for details on $uperpowers](https://github.com/valgaze/speedybot/blob/master/docs/superpowers.md)**
-
-$uperpowers sample
-
-```ts
-import { $ } from 'speedybot'
-
-export default {
- keyword: ['$', '$uperpowers', '$uperpower', '$superpower'],
- async handler(bot, trigger) {
- // ## 0) Wrap the bot object in $ to give it $uperpowers, ex $(bot)
- const $bot = $(bot)
-
- // "counters" (scoped to user)
- const counter = $bot.get
- const counterRef = await $bot.getCounter('myCounter') // Defaults to 0 if does not exist
- $bot.log('current counter value', counterRef)
-
- await $bot.increaseCounter('myCounter') // 1
- const counterMsg = `This handler has been run ${counterRef} times`
- bot.say(counterMsg)
-
-
- // Provide some space
- await $bot.clearScreen()
-
- // ## 1) Contexts: set, remove, and list
- // Contexts persist between "turns" of chat
- // Note: contexts can optionally store data
- // If you just need to stash information attached to a user, see "$(bot).saveData" below
- await $bot.saveContext('mycontext1')
- await $bot.saveContext('mycontext2', { data: new Date().toISOString()})
-
- const mycontext2 = await $bot.getContext('mycontext2')
- $bot.log('# mycontext2', mycontext2) // { data: '2021-11-05T05:03:58.755Z'}
-
- // Contexts: list active contexts
- const allContexts = await $bot.getAllContexts() // ['mycontext1', 'mycontext2']
- bot.say(`Contexts: ${JSON.stringify(allContexts)}`)
-
- // Contexts: check if context is active
- const isActive = await $bot.contextActive('mycontext1')
- $bot.log(`mycontext1 is active, ${isActive}`) // 'mycontext1 is active, true'
-
- // Contexts: remove context
- await $bot.deleteContext('mycontext1')
-
- const isStillActive = await $bot.contextActive('mycontext1')
- $bot.log(`mycontext1 is active, ${isStillActive}`) // 'mycontext1 is active, false'
-
- // ## 2) Helpers to add variation and rich content
-
- // sendRandom: Sends a random string from a list
- $bot.sendRandom(['Hey!','Hello!!','Hiya!'])
-
- // sendTemplate: like sendRandom but replace $[variable_name] with a value
- const utterances = ['Hey how are you $[name]?', `$[name]! How's it going?`, '$[name]']
- const template = { name: 'Joey'}
- $bot.sendTemplate(utterances, template)
-
- // sendURL: Sends a URL in a clickable card
- $bot.sendURL('https://www.youtube.com/watch?v=3GwjfUFyY6M', 'Go Celebrate')
-
- // snippet: Generate a snippet that will render data in markdown-friendly format
- const JSONData = {a: 1, b:2, c:3, d:4}
-
- $bot.sendSnippet(JSONData, `**Here's some JSON, you'll love it**`) // send to room
-
- // Snippet to a specifc room or specific email
- // const snippet = $bot.snippet(JSONData)
- // $bot.send({markdown: snippet, roomId:trigger.message.roomId, text: 'Your client does not render markdown :('}) // send to a specific room
- // $bot.send({markdown: snippet, toPersonEmail:'joe@joe.com', text: 'Your client does not render markdown :('}) // send to a specific person
-
- // ## 3) Conversation "chips"
-
- // Set all chips to disappear after tap (defaults to false)
- $bot.setChipsConfig({disappearOnTap: true})
-
- // Send chip with custom handler
- const customChip = {
- label: 'custom chip',
- handler(bot:BotInst, trigger: Trigger) {
- $bot.sendSnippet(trigger, `**The 'custom chip' was tapped** `)
- $bot.$trigger('chips', trigger) // re-render chips
- }
- }
-
- // Add optional title to chips
- $bot.sendChips(['hey', 'ping', 'pong', '$', {label:`Trigger the 'hey' handler`, keyword: 'hey'}, customChip], 'These chips will disappear on tap')
-
-
- // ## 4) Save data between conversation "runs" (scoped to user, async)
-
- interface SpecialUserData {
- specialValue: string;
- userId: String;
- }
- const specialData:SpecialUserData = {
- specialValue: Math.random().toString(36).slice(2),
- userId: trigger.personId,
- }
-
- // Save the data
- await $bot.saveData('userData', specialData)
-
- // Retrieve the data (returns null if does not exist)
- const dataRes = await $bot.getData('userData')
-
- if (dataRes) {
- // These are now "typed"
- const theValue = dataRes.specialValue
- const id = dataRes.userId
- $bot.log(`Your specal value was ${theValue} and your id is ${id}`)
-
- // destroy data
- $bot.deleteData('userData')
- }
-
- // ## 4a) Stash "global" values between runs (don't use a lot, short snippets like counters or other data)
- // Note: not persistent storage if using default storage provider
- const globalVal = $bot.globalGet('myKey')
-
- if (!globalVal) {
- $bot.globalSave('myKey', { dateAdded: new Date().toISOString() })
- }
-
-
- // ## 5) Integrate with 3rd-parties: $bot.get, $bot.post, etc
-
- // ex. get external data
- // Opts are axios request config (for bearer tokens, proxies, unique config, etc)
- const res = await $bot.get('https://randomuser.me/api/')
- bot.say({markdown: $bot.snippet(res.data)})
-
- // ## 6) Files & attachments
-
- // Send a local file
- // Provide a path/filename, will be attached to message
- // $bot.sendFile(__dirname, 'assets', 'speedybot.pdf')
-
- // Send a publically accessible URL file
- // Supported filetypes: ['doc', 'docx' , 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'jpg', 'jpeg', 'bmp', 'gif', 'png']
- $bot.sendDataFromUrl('https://drive.google.com/uc?export=download&id=1VI4I4pYVVdMnB6YOQuSejVcrSwN0cotd')
-
- // // experimental (fileystem write): send arbitrary JSON back as a file
- // $bot.sendDataAsFile(JSON.stringify({a:1,b:2}), '.json')
-
- // For an example involving parse'able spreadsheets (.xlsx), see here: https://github.com/valgaze/speedybot-superpowers
- },
- helpText: 'A demo of $uperpowers'
-}
-```
-
-
-## Sample Applications
-
-| Item | Remarks | Video |
-| --- | --- | --- |
-| **[Speedybot-starter](https://github.com/valgaze/speedybot-starter)** | "Batteries-included" starter application with few external dependencies-- use this to start | **[https://share.descript.com/view/ds3UA1kUb9z](https://share.descript.com/view/ds3UA1kUb9z)** |
-| **[Speedybot-$uperpowers](https://github.com/valgaze/speedybot-superpowers)** | Application using $uperpowers with suggestion "chips", response variation, and capability to upload a spreadsheet *.xlsx and convert to an htm | **[https://share.descript.com/view/sBU3pk5L8Js](https://share.descript.com/view/sBU3pk5L8Js)** |
-| **[Speedybot-serverless](https://github.com/valgaze/speedybot-serverless-experiment)** | [EXPERIMENTAL/REDUCED FUNCTIONALITY] Proof-of-concept for stateless/serverless chat agent (ex lambda function) | // |
-
-
-## Credits/Attribution
-
-- Cookie image courtesy of Daniel Lopez: https://unsplash.com/photos/aT7CE57EZL8 & https://unsplash.com/@soydanielwolf
-
-- Robot icon (not included in this repo) created by Freepik - Flaticon, https://www.flaticon.com/free-icons/robot
+If you want to build bots with Python rather than Typescript, you can check out [🐍Speedybot-Python🐍](https://pypi.org/project/speedybot)
diff --git a/bin/cli.js b/bin/cli.js
new file mode 100755
index 0000000..b2d9b59
--- /dev/null
+++ b/bin/cli.js
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+
+const { execSync } = require("child_process");
+
+try {
+ execSync(
+ "npx -y create-speedybot@latest " + process.argv.slice(2).join(" "),
+ {
+ stdio: "inherit",
+ }
+ );
+} catch (error) {
+ console.error("Error running create-speedybot:", error.message);
+ process.exit(1);
+}
diff --git a/build_tricks/README.md b/build_tricks/README.md
new file mode 100644
index 0000000..5fc9341
--- /dev/null
+++ b/build_tricks/README.md
@@ -0,0 +1,5 @@
+https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
+
+SpeedyBot needs maximum flexibility, should never be fiddly or annoying to deal with
+
+Might break out into separate libs at some point (speedybot-commonjs) & build automation/rules it'll always be published together
diff --git a/build_tricks/patch_dist.sh b/build_tricks/patch_dist.sh
new file mode 100644
index 0000000..1fb71ba
--- /dev/null
+++ b/build_tricks/patch_dist.sh
@@ -0,0 +1,15 @@
+# All praise to this excellent writeup: https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
+
+## Set cwd to root
+
+cat >dist/cjs/package.json <dist/mjs/package.json < {
- const hit = cache[str];
- return hit || (cache[str] = fn(str));
- };
-}
-var hyphenateRE = /\B([A-Z])/g;
-var hyphenate = cacheStringFunction(
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
-);
-var camelizeRE = /-(\w)/g;
-var camelize = cacheStringFunction((str) => {
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
-});
-function identity(arg) {
- return arg;
-}
-
-// node_modules/@vueuse/core/index.mjs
-var defaultWindow = isClient ? window : void 0;
-var defaultDocument = isClient ? window.document : void 0;
-var defaultNavigator = isClient ? window.navigator : void 0;
-var defaultLocation = isClient ? window.location : void 0;
-function useMounted() {
- const isMounted = ref(false);
- if (getCurrentInstance()) {
- onMounted(() => {
- isMounted.value = true;
- });
- }
- return isMounted;
-}
-function useSupported(callback) {
- const isMounted = useMounted();
- return computed(() => {
- isMounted.value;
- return Boolean(callback());
- });
-}
-function useMediaQuery(query, options = {}) {
- const { window: window2 = defaultWindow } = options;
- const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
- let mediaQuery;
- const matches = ref(false);
- const handler = (event) => {
- matches.value = event.matches;
- };
- const cleanup = () => {
- if (!mediaQuery)
- return;
- if ("removeEventListener" in mediaQuery)
- mediaQuery.removeEventListener("change", handler);
- else
- mediaQuery.removeListener(handler);
- };
- const stopWatch = watchEffect(() => {
- if (!isSupported.value)
- return;
- cleanup();
- mediaQuery = window2.matchMedia(toValue(query));
- if ("addEventListener" in mediaQuery)
- mediaQuery.addEventListener("change", handler);
- else
- mediaQuery.addListener(handler);
- matches.value = mediaQuery.matches;
- });
- tryOnScopeDispose(() => {
- stopWatch();
- cleanup();
- mediaQuery = void 0;
- });
- return matches;
-}
-var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
-var globalKey = "__vueuse_ssr_handlers__";
-var handlers = getHandlers();
-function getHandlers() {
- if (!(globalKey in _global))
- _global[globalKey] = _global[globalKey] || {};
- return _global[globalKey];
-}
-var defaultState = {
- x: 0,
- y: 0,
- pointerId: 0,
- pressure: 0,
- tiltX: 0,
- tiltY: 0,
- width: 0,
- height: 0,
- twist: 0,
- pointerType: null
-};
-var keys = Object.keys(defaultState);
-var DEFAULT_UNITS = [
- { max: 6e4, value: 1e3, name: "second" },
- { max: 276e4, value: 6e4, name: "minute" },
- { max: 72e6, value: 36e5, name: "hour" },
- { max: 5184e5, value: 864e5, name: "day" },
- { max: 24192e5, value: 6048e5, name: "week" },
- { max: 28512e6, value: 2592e6, name: "month" },
- { max: Number.POSITIVE_INFINITY, value: 31536e6, name: "year" }
-];
-var _TransitionPresets = {
- easeInSine: [0.12, 0, 0.39, 0],
- easeOutSine: [0.61, 1, 0.88, 1],
- easeInOutSine: [0.37, 0, 0.63, 1],
- easeInQuad: [0.11, 0, 0.5, 0],
- easeOutQuad: [0.5, 1, 0.89, 1],
- easeInOutQuad: [0.45, 0, 0.55, 1],
- easeInCubic: [0.32, 0, 0.67, 0],
- easeOutCubic: [0.33, 1, 0.68, 1],
- easeInOutCubic: [0.65, 0, 0.35, 1],
- easeInQuart: [0.5, 0, 0.75, 0],
- easeOutQuart: [0.25, 1, 0.5, 1],
- easeInOutQuart: [0.76, 0, 0.24, 1],
- easeInQuint: [0.64, 0, 0.78, 0],
- easeOutQuint: [0.22, 1, 0.36, 1],
- easeInOutQuint: [0.83, 0, 0.17, 1],
- easeInExpo: [0.7, 0, 0.84, 0],
- easeOutExpo: [0.16, 1, 0.3, 1],
- easeInOutExpo: [0.87, 0, 0.13, 1],
- easeInCirc: [0.55, 0, 1, 0.45],
- easeOutCirc: [0, 0.55, 0.45, 1],
- easeInOutCirc: [0.85, 0, 0.15, 1],
- easeInBack: [0.36, 0, 0.66, -0.56],
- easeOutBack: [0.34, 1.56, 0.64, 1],
- easeInOutBack: [0.68, -0.6, 0.32, 1.6]
-};
-var TransitionPresets = Object.assign({}, { linear: identity }, _TransitionPresets);
-
-// node_modules/vitepress/dist/client/shared.js
-var inBrowser = typeof document !== "undefined";
-
-// node_modules/vitepress/dist/client/theme-default/support/utils.js
-import { withBase } from "vitepress";
-
-// node_modules/vitepress/dist/client/theme-default/composables/data.js
-import { useData as useData$ } from "vitepress";
-var useData = useData$;
-
-// node_modules/vitepress/dist/client/theme-default/support/utils.js
-function ensureStartingSlash(path) {
- return /^\//.test(path) ? path : `/${path}`;
-}
-
-// node_modules/vitepress/dist/client/theme-default/support/sidebar.js
-function getSidebar(_sidebar, path) {
- if (Array.isArray(_sidebar))
- return addBase(_sidebar);
- if (_sidebar == null)
- return [];
- path = ensureStartingSlash(path);
- const dir = Object.keys(_sidebar).sort((a, b) => {
- return b.split("/").length - a.split("/").length;
- }).find((dir2) => {
- return path.startsWith(ensureStartingSlash(dir2));
- });
- const sidebar = dir ? _sidebar[dir] : [];
- return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base);
-}
-function getSidebarGroups(sidebar) {
- const groups = [];
- let lastGroupIndex = 0;
- for (const index in sidebar) {
- const item = sidebar[index];
- if (item.items) {
- lastGroupIndex = groups.push(item);
- continue;
- }
- if (!groups[lastGroupIndex]) {
- groups.push({ items: [] });
- }
- groups[lastGroupIndex].items.push(item);
- }
- return groups;
-}
-function addBase(items, _base) {
- return [...items].map((_item) => {
- const item = { ..._item };
- const base = item.base || _base;
- if (base && item.link)
- item.link = base + item.link;
- if (item.items)
- item.items = addBase(item.items, base);
- return item;
- });
-}
-
-// node_modules/vitepress/dist/client/theme-default/composables/sidebar.js
-function useSidebar() {
- const { frontmatter, page, theme: theme2 } = useData();
- const is960 = useMediaQuery("(min-width: 960px)");
- const isOpen = ref(false);
- const sidebar = computed(() => {
- const sidebarConfig = theme2.value.sidebar;
- const relativePath = page.value.relativePath;
- return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];
- });
- const hasSidebar = computed(() => {
- return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home";
- });
- const leftAside = computed(() => {
- if (hasAside)
- return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left";
- return false;
- });
- const hasAside = computed(() => {
- if (frontmatter.value.layout === "home")
- return false;
- if (frontmatter.value.aside != null)
- return !!frontmatter.value.aside;
- return theme2.value.aside !== false;
- });
- const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);
- const sidebarGroups = computed(() => {
- return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];
- });
- function open() {
- isOpen.value = true;
- }
- function close() {
- isOpen.value = false;
- }
- function toggle() {
- isOpen.value ? close() : open();
- }
- return {
- isOpen,
- sidebar,
- sidebarGroups,
- hasSidebar,
- hasAside,
- leftAside,
- isSidebarEnabled,
- open,
- close,
- toggle
- };
-}
-var hashRef = ref(inBrowser ? location.hash : "");
-if (inBrowser) {
- window.addEventListener("hashchange", () => {
- hashRef.value = location.hash;
- });
-}
-
-// node_modules/vitepress/dist/client/theme-default/without-fonts.js
-var theme = {
- Layout,
- enhanceApp: ({ app }) => {
- app.component("Badge", VPBadge);
- }
-};
-var without_fonts_default = theme;
-export {
- default5 as VPDocAsideSponsors,
- default3 as VPHomeFeatures,
- default2 as VPHomeHero,
- default4 as VPHomeSponsors,
- default9 as VPTeamMembers,
- default6 as VPTeamPage,
- default8 as VPTeamPageSection,
- default7 as VPTeamPageTitle,
- without_fonts_default as default,
- useSidebar
-};
-//# sourceMappingURL=@theme_index.js.map
diff --git a/docs/.vitepress/cache/deps/@theme_index.js.map b/docs/.vitepress/cache/deps/@theme_index.js.map
deleted file mode 100644
index 21c6882..0000000
--- a/docs/.vitepress/cache/deps/@theme_index.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../../../node_modules/vitepress/dist/client/theme-default/index.js", "../../../../node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../../node_modules/@vueuse/shared/index.mjs", "../../../../node_modules/@vueuse/core/index.mjs", "../../../../node_modules/vitepress/dist/client/shared.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/sidebar.js"],
- "sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\n// Note: if we add more optional components here, i.e. components that are not\n// used in the theme by default unless the user imports them, make sure to update\n// the `lazyDefaultThemeComponentsRE` regex in src/node/build/bundle.ts.\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { useSidebar } from './composables/sidebar';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$8(__spreadValues$b({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n return Promise.all(Array.from(fns).map((fn) => fn(param)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$a({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(\n () => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0])))\n );\n}\n\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(\n left,\n (newValue) => right.value = transformLTR(newValue),\n { flush, deep, immediate }\n );\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(\n right,\n (newValue) => left.value = transformRTL(newValue),\n { flush, deep, immediate }\n );\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(\n () => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n )\n );\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(\n () => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n )\n );\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(\n () => toValue(list).slice(formIndex).some(\n (element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))\n )\n );\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return __spreadValues$8({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$7({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(\n source,\n cb,\n __spreadProps$6(__spreadValues$6({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n })\n );\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n __spreadProps$5(__spreadValues$5({}, options), {\n deep: true\n })\n );\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n __spreadProps$4(__spreadValues$4({}, watchOptions), { flush: \"sync\" })\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n __spreadProps$3(__spreadValues$3({}, options), {\n immediate: true\n })\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n })\n );\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(\n source,\n cb,\n __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n })\n );\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n", "import { noop, makeDestructurable, camelize, toValue, isClient, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, isObject, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, useIntervalFn, notNullish, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nvar __defProp$q = Object.defineProperty;\nvar __defProps$d = Object.defineProperties;\nvar __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$t = Object.getOwnPropertySymbols;\nvar __hasOwnProp$t = Object.prototype.hasOwnProperty;\nvar __propIsEnum$t = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$q = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$t.call(b, prop))\n __defNormalProp$q(a, prop, b[prop]);\n if (__getOwnPropSymbols$t)\n for (var prop of __getOwnPropSymbols$t(b)) {\n if (__propIsEnum$t.call(b, prop))\n __defNormalProp$q(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, __spreadProps$d(__spreadValues$q({}, keysToCamelKebabCase(attrs)), { $slots: slots }));\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$p = Object.defineProperty;\nvar __defProps$c = Object.defineProperties;\nvar __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$s = Object.getOwnPropertySymbols;\nvar __hasOwnProp$s = Object.prototype.hasOwnProperty;\nvar __propIsEnum$s = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$p = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$s.call(b, prop))\n __defNormalProp$p(a, prop, b[prop]);\n if (__getOwnPropSymbols$s)\n for (var prop of __getOwnPropSymbols$s(b)) {\n if (__propIsEnum$s.call(b, prop))\n __defNormalProp$p(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions);\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options;\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nvar __defProp$o = Object.defineProperty;\nvar __defProps$b = Object.defineProperties;\nvar __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$r = Object.getOwnPropertySymbols;\nvar __hasOwnProp$r = Object.prototype.hasOwnProperty;\nvar __propIsEnum$r = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$o = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$r.call(b, prop))\n __defNormalProp$o(a, prop, b[prop]);\n if (__getOwnPropSymbols$r)\n for (var prop of __getOwnPropSymbols$r(b)) {\n if (__propIsEnum$r.call(b, prop))\n __defNormalProp$o(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return __spreadProps$b(__spreadValues$o({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n });\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __getOwnPropSymbols$q = Object.getOwnPropertySymbols;\nvar __hasOwnProp$q = Object.prototype.hasOwnProperty;\nvar __propIsEnum$q = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$q.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$q)\n for (var prop of __getOwnPropSymbols$q(b)) {\n if (__propIsEnum$q.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive(__spreadValues$n({\n trigger,\n state: state2,\n length,\n origin\n }, refs));\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$m = Object.defineProperty;\nvar __defProps$a = Object.defineProperties;\nvar __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, __spreadProps$a(__spreadValues$m({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$l(__spreadValues$l({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = __spreadValues$k({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(\n () => store.value === \"auto\" ? system.value : store.value\n );\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$3(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\"\n } = options;\n const mode = useColorMode(__spreadProps$9(__spreadValues$j({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (mode.system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$8(__spreadValues$i({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$8(__spreadValues$i({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$7(__spreadValues$h({}, options), { eventFilter: filter }));\n return __spreadValues$h({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const rect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\")\n x = e.clientX - pressedDelta.value.x;\n if (axis === \"y\" || axis === \"both\")\n y = e.clientY - pressedDelta.value.y;\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return __spreadProps$6(__spreadValues$g({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n });\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a;\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_a = _options.onEnter) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(\n () => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]\n );\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$g.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(b)) {\n if (__propIsEnum$g.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return __spreadValues$f({\n isSupported,\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n return {\n width,\n height\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n ([{ isIntersecting }]) => {\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return __spreadValues$e(__spreadValues$e({}, ctx), await callback(ctx));\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = __spreadValues$e(__spreadValues$e({}, ctx), await callback(ctx));\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, fetchOptions), args[0]), {\n headers: __spreadValues$e(__spreadValues$e({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$e(__spreadValues$e({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$e(__spreadValues$e({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$5(__spreadValues$e({}, fetchOptions), {\n signal: controller.signal\n });\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: __spreadValues$e(__spreadValues$e({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(\n context.url,\n __spreadProps$5(__spreadValues$e(__spreadValues$e({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$e(__spreadValues$e({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$d(__spreadValues$d(__spreadValues$d({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$c(__spreadValues$c({}, toValue(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$c(__spreadValues$c({}, options), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$c(__spreadValues$c({}, options), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(\n () => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0\n );\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return __spreadProps$4(__spreadValues$b({}, gamepad), {\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n });\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions)\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n if (!window)\n return;\n const el = target === window ? target.document.documentElement : target === window.document ? target.documentElement : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n if (!window)\n return;\n const eventTarget = e.target === window.document ? e.target.documentElement : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100\n } = options;\n const state = reactive(useScroll(\n element,\n __spreadProps$3(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_a = options.distance) != null ? _a : 0\n }, options.offset)\n })\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n const el = toValue(element);\n if (el instanceof Window)\n return window.document.documentElement;\n if (el instanceof Document)\n return document.documentElement;\n return el;\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value)\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst BuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : BuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction usePerformanceObserver(options, callback) {\n const _a = options, {\n window = defaultWindow,\n immediate = true\n } = _a, performanceOptions = __objRest$1(_a, [\n \"window\",\n \"immediate\"\n ]);\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return __spreadProps$2(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = toValue(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n ele,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = toValue(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, toValue(shareOptions)), toValue(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps$1(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = toRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_b = document.head) == null ? void 0 : _b.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, __spreadProps(__spreadValues({}, options), {\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n }));\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(\n () => props[key],\n (v) => proxy.value = cloneFn(v)\n );\n watch(\n proxy,\n (v) => {\n if (v !== props[key] || deep)\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(defaultOptions = {}) {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(\n window,\n \"scroll\",\n () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n", "export const EXTERNAL_URL_RE = /^[a-z]+:/i;\nexport const PATHNAME_PROTOCOL_RE = /^pathname:\\/\\//;\nexport const APPEARANCE_KEY = 'vitepress-theme-appearance';\nexport const HASH_RE = /#.*$/;\nexport const EXT_RE = /(index)?\\.(md|html)$/;\nexport const inBrowser = typeof document !== 'undefined';\nexport const notFoundPageData = {\n relativePath: '',\n filePath: '',\n title: '404',\n description: 'Not Found',\n headers: [],\n frontmatter: { sidebar: false, layout: 'page' },\n lastUpdated: 0,\n isNotFound: true\n};\nexport function isActive(currentPath, matchPath, asRegex = false) {\n if (matchPath === undefined) {\n return false;\n }\n currentPath = normalize(`/${currentPath}`);\n if (asRegex) {\n return new RegExp(matchPath).test(currentPath);\n }\n if (normalize(matchPath) !== currentPath) {\n return false;\n }\n const hashMatch = matchPath.match(HASH_RE);\n if (hashMatch) {\n return (inBrowser ? location.hash : '') === hashMatch[0];\n }\n return true;\n}\nexport function normalize(path) {\n return decodeURI(path).replace(HASH_RE, '').replace(EXT_RE, '');\n}\nexport function isExternal(path) {\n return EXTERNAL_URL_RE.test(path);\n}\n/**\n * this merges the locales data to the main data by the route\n */\nexport function resolveSiteDataByRoute(siteData, relativePath) {\n const localeIndex = Object.keys(siteData.locales).find((key) => key !== 'root' &&\n !isExternal(key) &&\n isActive(relativePath, `/${key}/`, true)) || 'root';\n return Object.assign({}, siteData, {\n localeIndex,\n lang: siteData.locales[localeIndex]?.lang ?? siteData.lang,\n dir: siteData.locales[localeIndex]?.dir ?? siteData.dir,\n title: siteData.locales[localeIndex]?.title ?? siteData.title,\n titleTemplate: siteData.locales[localeIndex]?.titleTemplate ?? siteData.titleTemplate,\n description: siteData.locales[localeIndex]?.description ?? siteData.description,\n head: mergeHead(siteData.head, siteData.locales[localeIndex]?.head ?? []),\n themeConfig: {\n ...siteData.themeConfig,\n ...siteData.locales[localeIndex]?.themeConfig\n }\n });\n}\n/**\n * Create the page title string based on config.\n */\nexport function createTitle(siteData, pageData) {\n const title = pageData.title || siteData.title;\n const template = pageData.titleTemplate ?? siteData.titleTemplate;\n if (typeof template === 'string' && template.includes(':title')) {\n return template.replace(/:title/g, title);\n }\n const templateString = createTitleTemplate(siteData.title, template);\n return `${title}${templateString}`;\n}\nfunction createTitleTemplate(siteTitle, template) {\n if (template === false) {\n return '';\n }\n if (template === true || template === undefined) {\n return ` | ${siteTitle}`;\n }\n if (siteTitle === template) {\n return '';\n }\n return ` | ${template}`;\n}\nfunction hasTag(head, tag) {\n const [tagType, tagAttrs] = tag;\n if (tagType !== 'meta')\n return false;\n const keyAttr = Object.entries(tagAttrs)[0]; // First key\n if (keyAttr == null)\n return false;\n return head.some(([type, attrs]) => type === tagType && attrs[keyAttr[0]] === keyAttr[1]);\n}\nexport function mergeHead(prev, curr) {\n return [...prev.filter((tagAttrs) => !hasTag(curr, tagAttrs)), ...curr];\n}\n// https://github.com/rollup/rollup/blob/fec513270c6ac350072425cc045db367656c623b/src/utils/sanitizeFileName.ts\nconst INVALID_CHAR_REGEX = /[\\u0000-\\u001F\"#$&*+,:;<=>?[\\]^`{|}\\u007F]/g;\nconst DRIVE_LETTER_REGEX = /^[a-z]:/i;\nexport function sanitizeFileName(name) {\n const match = DRIVE_LETTER_REGEX.exec(name);\n const driveLetter = match ? match[0] : '';\n return (driveLetter +\n name\n .slice(driveLetter.length)\n .replace(INVALID_CHAR_REGEX, '_')\n .replace(/(^|\\/)_+(?=[^/]*$)/, '$1'));\n}\nexport function slash(p) {\n return p.replace(/\\\\/g, '/');\n}\n", "import { withBase } from 'vitepress';\nimport { useData } from '../composables/data';\nimport { isExternal, PATHNAME_PROTOCOL_RE } from '../../shared';\nexport function throttleAndDebounce(fn, delay) {\n let timeoutId;\n let called = false;\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (!called) {\n fn();\n called = true;\n setTimeout(() => {\n called = false;\n }, delay);\n }\n else {\n timeoutId = setTimeout(fn, delay);\n }\n };\n}\nexport function ensureStartingSlash(path) {\n return /^\\//.test(path) ? path : `/${path}`;\n}\nexport function normalizeLink(url) {\n if (isExternal(url)) {\n return url.replace(PATHNAME_PROTOCOL_RE, '');\n }\n const { site } = useData();\n const { pathname, search, hash } = new URL(url, 'http://a.com');\n const normalizedPath = pathname.endsWith('/') || pathname.endsWith('.html')\n ? url\n : url.replace(/(?:(^\\.+)\\/)?.*$/, `$1${pathname.replace(/(\\.md)?$/, site.value.cleanUrls ? '' : '.html')}${search}${hash}`);\n return withBase(normalizedPath);\n}\n", "import { useData as useData$ } from 'vitepress';\nexport const useData = useData$;\n", "import { ensureStartingSlash } from './utils';\nimport { isActive } from '../../shared';\n/**\n * Get the `Sidebar` from sidebar option. This method will ensure to get correct\n * sidebar config from `MultiSideBarConfig` with various path combinations such\n * as matching `guide/` and `/guide/`. If no matching config was found, it will\n * return empty array.\n */\nexport function getSidebar(_sidebar, path) {\n if (Array.isArray(_sidebar))\n return addBase(_sidebar);\n if (_sidebar == null)\n return [];\n path = ensureStartingSlash(path);\n const dir = Object.keys(_sidebar)\n .sort((a, b) => {\n return b.split('/').length - a.split('/').length;\n })\n .find((dir) => {\n // make sure the multi sidebar key starts with slash too\n return path.startsWith(ensureStartingSlash(dir));\n });\n const sidebar = dir ? _sidebar[dir] : [];\n return Array.isArray(sidebar)\n ? addBase(sidebar)\n : addBase(sidebar.items, sidebar.base);\n}\n/**\n * Get or generate sidebar group from the given sidebar items.\n */\nexport function getSidebarGroups(sidebar) {\n const groups = [];\n let lastGroupIndex = 0;\n for (const index in sidebar) {\n const item = sidebar[index];\n if (item.items) {\n lastGroupIndex = groups.push(item);\n continue;\n }\n if (!groups[lastGroupIndex]) {\n groups.push({ items: [] });\n }\n groups[lastGroupIndex].items.push(item);\n }\n return groups;\n}\nexport function getFlatSideBarLinks(sidebar) {\n const links = [];\n function recursivelyExtractLinks(items) {\n for (const item of items) {\n if (item.text && item.link) {\n links.push({\n text: item.text,\n link: item.link,\n docFooterText: item.docFooterText\n });\n }\n if (item.items) {\n recursivelyExtractLinks(item.items);\n }\n }\n }\n recursivelyExtractLinks(sidebar);\n return links;\n}\n/**\n * Check if the given sidebar item contains any active link.\n */\nexport function hasActiveLink(path, items) {\n if (Array.isArray(items)) {\n return items.some((item) => hasActiveLink(path, item));\n }\n return isActive(path, items.link)\n ? true\n : items.items\n ? hasActiveLink(path, items.items)\n : false;\n}\nfunction addBase(items, _base) {\n return [...items].map((_item) => {\n const item = { ..._item };\n const base = item.base || _base;\n if (base && item.link)\n item.link = base + item.link;\n if (item.items)\n item.items = addBase(item.items, base);\n return item;\n });\n}\n", "import { useMediaQuery } from '@vueuse/core';\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect, watchPostEffect } from 'vue';\nimport { inBrowser, isActive } from '../../shared';\nimport { hasActiveLink as containsActiveLink, getSidebar, getSidebarGroups } from '../support/sidebar';\nimport { useData } from './data';\nexport function useSidebar() {\n const { frontmatter, page, theme } = useData();\n const is960 = useMediaQuery('(min-width: 960px)');\n const isOpen = ref(false);\n const sidebar = computed(() => {\n const sidebarConfig = theme.value.sidebar;\n const relativePath = page.value.relativePath;\n return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];\n });\n const hasSidebar = computed(() => {\n return (frontmatter.value.sidebar !== false &&\n sidebar.value.length > 0 &&\n frontmatter.value.layout !== 'home');\n });\n const leftAside = computed(() => {\n if (hasAside)\n return frontmatter.value.aside == null\n ? theme.value.aside === 'left'\n : frontmatter.value.aside === 'left';\n return false;\n });\n const hasAside = computed(() => {\n if (frontmatter.value.layout === 'home')\n return false;\n if (frontmatter.value.aside != null)\n return !!frontmatter.value.aside;\n return theme.value.aside !== false;\n });\n const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);\n const sidebarGroups = computed(() => {\n return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];\n });\n function open() {\n isOpen.value = true;\n }\n function close() {\n isOpen.value = false;\n }\n function toggle() {\n isOpen.value ? close() : open();\n }\n return {\n isOpen,\n sidebar,\n sidebarGroups,\n hasSidebar,\n hasAside,\n leftAside,\n isSidebarEnabled,\n open,\n close,\n toggle\n };\n}\n/**\n * a11y: cache the element that opened the Sidebar (the menu button) then\n * focus that button again when Menu is closed with Escape key.\n */\nexport function useCloseSidebarOnEscape(isOpen, close) {\n let triggerElement;\n watchEffect(() => {\n triggerElement = isOpen.value\n ? document.activeElement\n : undefined;\n });\n onMounted(() => {\n window.addEventListener('keyup', onEscape);\n });\n onUnmounted(() => {\n window.removeEventListener('keyup', onEscape);\n });\n function onEscape(e) {\n if (e.key === 'Escape' && isOpen.value) {\n close();\n triggerElement?.focus();\n }\n }\n}\nconst hashRef = ref(inBrowser ? location.hash : '');\nif (inBrowser) {\n window.addEventListener('hashchange', () => {\n hashRef.value = location.hash;\n });\n}\nexport function useSidebarControl(item) {\n const { page } = useData();\n const collapsed = ref(false);\n const collapsible = computed(() => {\n return item.value.collapsed != null;\n });\n const isLink = computed(() => {\n return !!item.value.link;\n });\n const isActiveLink = ref(false);\n const updateIsActiveLink = () => {\n isActiveLink.value = isActive(page.value.relativePath, item.value.link);\n };\n watch([page, item, hashRef], updateIsActiveLink);\n onMounted(updateIsActiveLink);\n const hasActiveLink = computed(() => {\n if (isActiveLink.value) {\n return true;\n }\n return item.value.items\n ? containsActiveLink(page.value.relativePath, item.value.items)\n : false;\n });\n const hasChildren = computed(() => {\n return !!(item.value.items && item.value.items.length);\n });\n watchEffect(() => {\n collapsed.value = !!(collapsible.value && item.value.collapsed);\n });\n watchPostEffect(() => {\n ;\n (isActiveLink.value || hasActiveLink.value) && (collapsed.value = false);\n });\n function toggle() {\n if (collapsible.value) {\n collapsed.value = !collapsed.value;\n }\n }\n return {\n collapsed,\n collapsible,\n isLink,\n isActiveLink,\n hasActiveLink,\n hasChildren,\n toggle\n };\n}\n"],
- "mappings": ";;;;;;;;;;;;AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;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AiB,cAAc,MAAM;AACxC,YAAQ,QAAQ,SAAS;AAAA,EAC7B,CAAC;AACL;;;APlEA,IAAM,QAAQ;AAAA,EACV;AAAA,EACA,YAAY,CAAC,EAAE,IAAI,MAAM;AACrB,QAAI,UAAU,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;",
- "names": ["default", "window", "dir", "theme"]
-}
diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json
index 5f09c4b..cc3c5bc 100644
--- a/docs/.vitepress/cache/deps/_metadata.json
+++ b/docs/.vitepress/cache/deps/_metadata.json
@@ -1,29 +1,332 @@
{
- "hash": "749f24dd",
- "browserHash": "4c733c79",
+ "hash": "bbf895ba",
+ "browserHash": "e18e21e8",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
- "fileHash": "9d2878f3",
+ "fileHash": "5b5f91d7",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
- "fileHash": "83a41976",
+ "fileHash": "2937291a",
"needsInterop": false
},
- "@theme/index": {
- "src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
- "file": "@theme_index.js",
- "fileHash": "3023f33e",
+ "adaptivecards": {
+ "src": "../../../../node_modules/adaptivecards/lib/adaptivecards.js",
+ "file": "adaptivecards.js",
+ "fileHash": "3b8a82eb",
+ "needsInterop": true
+ },
+ "element-plus": {
+ "src": "../../../../node_modules/element-plus/es/index.mjs",
+ "file": "element-plus.js",
+ "fileHash": "1764f8d9",
+ "needsInterop": false
+ },
+ "vitepress > @vueuse/integrations/useFocusTrap": {
+ "src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
+ "file": "vitepress___@vueuse_integrations_useFocusTrap.js",
+ "fileHash": "38ac76f9",
+ "needsInterop": false
+ },
+ "vitepress > mark.js/src/vanilla.js": {
+ "src": "../../../../node_modules/mark.js/src/vanilla.js",
+ "file": "vitepress___mark__js_src_vanilla__js.js",
+ "fileHash": "6b6e2012",
+ "needsInterop": false
+ },
+ "vitepress > minisearch": {
+ "src": "../../../../node_modules/minisearch/dist/es/index.js",
+ "file": "vitepress___minisearch.js",
+ "fileHash": "e9985c6c",
+ "needsInterop": false
+ },
+ "@element-plus/icons-vue": {
+ "src": "../../../../node_modules/@element-plus/icons-vue/dist/index.js",
+ "file": "@element-plus_icons-vue.js",
+ "fileHash": "f612aa88",
+ "needsInterop": false
+ },
+ "monaco-editor": {
+ "src": "../../../../node_modules/monaco-editor/esm/vs/editor/editor.main.js",
+ "file": "monaco-editor.js",
+ "fileHash": "20679472",
"needsInterop": false
}
},
"chunks": {
- "chunk-V634PGSD": {
- "file": "chunk-V634PGSD.js"
+ "yaml-UB3NIHKF": {
+ "file": "yaml-UB3NIHKF.js"
+ },
+ "cssMode-QE3QLDR2": {
+ "file": "cssMode-QE3QLDR2.js"
+ },
+ "htmlMode-ETVBJ4RH": {
+ "file": "htmlMode-ETVBJ4RH.js"
+ },
+ "jsonMode-KZAAAXO6": {
+ "file": "jsonMode-KZAAAXO6.js"
+ },
+ "tsMode-JVBSARJT": {
+ "file": "tsMode-JVBSARJT.js"
+ },
+ "st-7YHCWAPT": {
+ "file": "st-7YHCWAPT.js"
+ },
+ "swift-Q5TSV75D": {
+ "file": "swift-Q5TSV75D.js"
+ },
+ "systemverilog-ARXOEQTU": {
+ "file": "systemverilog-ARXOEQTU.js"
+ },
+ "tcl-5OENCSEV": {
+ "file": "tcl-5OENCSEV.js"
+ },
+ "twig-RTWS7BE4": {
+ "file": "twig-RTWS7BE4.js"
+ },
+ "vb-GRMCI74J": {
+ "file": "vb-GRMCI74J.js"
+ },
+ "wgsl-FRYNLOZV": {
+ "file": "wgsl-FRYNLOZV.js"
+ },
+ "xml-ME54AW4P": {
+ "file": "xml-ME54AW4P.js"
+ },
+ "scala-5QY3IS6I": {
+ "file": "scala-5QY3IS6I.js"
+ },
+ "scheme-XUJXSTX4": {
+ "file": "scheme-XUJXSTX4.js"
+ },
+ "scss-EANUFQZF": {
+ "file": "scss-EANUFQZF.js"
+ },
+ "shell-FL46RSB5": {
+ "file": "shell-FL46RSB5.js"
+ },
+ "solidity-CQ36NCYM": {
+ "file": "solidity-CQ36NCYM.js"
+ },
+ "sophia-TOOTAE2G": {
+ "file": "sophia-TOOTAE2G.js"
+ },
+ "sparql-MPDK2I5P": {
+ "file": "sparql-MPDK2I5P.js"
+ },
+ "sql-YUWLPR5B": {
+ "file": "sql-YUWLPR5B.js"
+ },
+ "r-TRLFTC42": {
+ "file": "r-TRLFTC42.js"
+ },
+ "razor-SBLZH47B": {
+ "file": "razor-SBLZH47B.js"
+ },
+ "redis-D5KC66ZT": {
+ "file": "redis-D5KC66ZT.js"
+ },
+ "redshift-HP5ANZGP": {
+ "file": "redshift-HP5ANZGP.js"
+ },
+ "restructuredtext-6LCM2G6T": {
+ "file": "restructuredtext-6LCM2G6T.js"
+ },
+ "ruby-ZVMU7DV3": {
+ "file": "ruby-ZVMU7DV3.js"
+ },
+ "rust-3PMSM46W": {
+ "file": "rust-3PMSM46W.js"
+ },
+ "sb-6E454WPU": {
+ "file": "sb-6E454WPU.js"
+ },
+ "pla-OZRPVGRM": {
+ "file": "pla-OZRPVGRM.js"
+ },
+ "postiats-ARIXBF3F": {
+ "file": "postiats-ARIXBF3F.js"
+ },
+ "powerquery-MWU7OL3Y": {
+ "file": "powerquery-MWU7OL3Y.js"
+ },
+ "powershell-ZKC5LBYX": {
+ "file": "powershell-ZKC5LBYX.js"
+ },
+ "protobuf-3EAVHMEA": {
+ "file": "protobuf-3EAVHMEA.js"
+ },
+ "pug-5CJGWCA2": {
+ "file": "pug-5CJGWCA2.js"
+ },
+ "python-WW7TN4Y7": {
+ "file": "python-WW7TN4Y7.js"
+ },
+ "qsharp-RHGSCZ6J": {
+ "file": "qsharp-RHGSCZ6J.js"
+ },
+ "msdax-MRW6NJVX": {
+ "file": "msdax-MRW6NJVX.js"
+ },
+ "mysql-YY275J3W": {
+ "file": "mysql-YY275J3W.js"
+ },
+ "objective-c-NFBM26LU": {
+ "file": "objective-c-NFBM26LU.js"
+ },
+ "pascal-XEJKJVA3": {
+ "file": "pascal-XEJKJVA3.js"
+ },
+ "pascaligo-4QUCTVJS": {
+ "file": "pascaligo-4QUCTVJS.js"
+ },
+ "perl-IJTE67DD": {
+ "file": "perl-IJTE67DD.js"
+ },
+ "pgsql-QZCHR3FH": {
+ "file": "pgsql-QZCHR3FH.js"
+ },
+ "php-ZUHD6MDF": {
+ "file": "php-ZUHD6MDF.js"
+ },
+ "less-3EZF4JWH": {
+ "file": "less-3EZF4JWH.js"
+ },
+ "lexon-H5MT3HFC": {
+ "file": "lexon-H5MT3HFC.js"
+ },
+ "lua-SAN3U2DO": {
+ "file": "lua-SAN3U2DO.js"
+ },
+ "liquid-D7SDHBE2": {
+ "file": "liquid-D7SDHBE2.js"
+ },
+ "m3-JBMBWH73": {
+ "file": "m3-JBMBWH73.js"
+ },
+ "markdown-NHOYTHIG": {
+ "file": "markdown-NHOYTHIG.js"
+ },
+ "mdx-6E32NSOV": {
+ "file": "mdx-6E32NSOV.js"
+ },
+ "mips-VMSX6T5Y": {
+ "file": "mips-VMSX6T5Y.js"
+ },
+ "hcl-2LJKNXTF": {
+ "file": "hcl-2LJKNXTF.js"
+ },
+ "html-F22UOEP3": {
+ "file": "html-F22UOEP3.js"
+ },
+ "ini-2XGVAVDV": {
+ "file": "ini-2XGVAVDV.js"
+ },
+ "java-54IVCUHF": {
+ "file": "java-54IVCUHF.js"
+ },
+ "typescript-RRKVICLF": {
+ "file": "typescript-RRKVICLF.js"
+ },
+ "javascript-PTWEJFGX": {
+ "file": "javascript-PTWEJFGX.js"
+ },
+ "chunk-GHDY2MJ7": {
+ "file": "chunk-GHDY2MJ7.js"
+ },
+ "julia-WOR3BG33": {
+ "file": "julia-WOR3BG33.js"
+ },
+ "kotlin-RAEGD7HS": {
+ "file": "kotlin-RAEGD7HS.js"
+ },
+ "ecl-CHABOUWY": {
+ "file": "ecl-CHABOUWY.js"
+ },
+ "elixir-JWJYFSSW": {
+ "file": "elixir-JWJYFSSW.js"
+ },
+ "flow9-XFKWO6PF": {
+ "file": "flow9-XFKWO6PF.js"
+ },
+ "fsharp-4HR2JBPD": {
+ "file": "fsharp-4HR2JBPD.js"
+ },
+ "freemarker2-6PB63OZP": {
+ "file": "freemarker2-6PB63OZP.js"
+ },
+ "go-ZD4OIVGF": {
+ "file": "go-ZD4OIVGF.js"
+ },
+ "graphql-FBLI5OCC": {
+ "file": "graphql-FBLI5OCC.js"
+ },
+ "handlebars-XJYSPQ6X": {
+ "file": "handlebars-XJYSPQ6X.js"
+ },
+ "coffee-722JKW3F": {
+ "file": "coffee-722JKW3F.js"
+ },
+ "cpp-KZ5NZY3L": {
+ "file": "cpp-KZ5NZY3L.js"
+ },
+ "csharp-IO2RVZAJ": {
+ "file": "csharp-IO2RVZAJ.js"
+ },
+ "csp-PQNU3GFG": {
+ "file": "csp-PQNU3GFG.js"
+ },
+ "css-76SKN4DI": {
+ "file": "css-76SKN4DI.js"
+ },
+ "cypher-6NDKRB7I": {
+ "file": "cypher-6NDKRB7I.js"
+ },
+ "dart-NNYF6LA6": {
+ "file": "dart-NNYF6LA6.js"
+ },
+ "dockerfile-CB4FOHWT": {
+ "file": "dockerfile-CB4FOHWT.js"
+ },
+ "abap-ZJXPBV7D": {
+ "file": "abap-ZJXPBV7D.js"
+ },
+ "apex-QXTPZBD5": {
+ "file": "apex-QXTPZBD5.js"
+ },
+ "azcli-AKNZCCZ4": {
+ "file": "azcli-AKNZCCZ4.js"
+ },
+ "bat-KITOMZVG": {
+ "file": "bat-KITOMZVG.js"
+ },
+ "bicep-ZLZPPZLV": {
+ "file": "bicep-ZLZPPZLV.js"
+ },
+ "cameligo-47AYWHA2": {
+ "file": "cameligo-47AYWHA2.js"
+ },
+ "clojure-2P4KKSXL": {
+ "file": "clojure-2P4KKSXL.js"
+ },
+ "chunk-3OGJZLRW": {
+ "file": "chunk-3OGJZLRW.js"
+ },
+ "chunk-G3JK5JM3": {
+ "file": "chunk-G3JK5JM3.js"
+ },
+ "chunk-IJRRQNDQ": {
+ "file": "chunk-IJRRQNDQ.js"
+ },
+ "chunk-3C4OEVM2": {
+ "file": "chunk-3C4OEVM2.js"
+ },
+ "chunk-6PJEDKO5": {
+ "file": "chunk-6PJEDKO5.js"
}
}
}
\ No newline at end of file
diff --git a/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js b/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js
new file mode 100644
index 0000000..fd372e5
--- /dev/null
+++ b/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js
@@ -0,0 +1,1323 @@
+import "./chunk-6PJEDKO5.js";
+
+// node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js
+var conf = {
+ comments: {
+ lineComment: "*"
+ },
+ brackets: [
+ ["[", "]"],
+ ["(", ")"]
+ ]
+};
+var language = {
+ defaultToken: "invalid",
+ ignoreCase: true,
+ tokenPostfix: ".abap",
+ keywords: [
+ "abap-source",
+ "abbreviated",
+ "abstract",
+ "accept",
+ "accepting",
+ "according",
+ "activation",
+ "actual",
+ "add",
+ "add-corresponding",
+ "adjacent",
+ "after",
+ "alias",
+ "aliases",
+ "align",
+ "all",
+ "allocate",
+ "alpha",
+ "analysis",
+ "analyzer",
+ "and",
+ "append",
+ "appendage",
+ "appending",
+ "application",
+ "archive",
+ "area",
+ "arithmetic",
+ "as",
+ "ascending",
+ "aspect",
+ "assert",
+ "assign",
+ "assigned",
+ "assigning",
+ "association",
+ "asynchronous",
+ "at",
+ "attributes",
+ "authority",
+ "authority-check",
+ "avg",
+ "back",
+ "background",
+ "backup",
+ "backward",
+ "badi",
+ "base",
+ "before",
+ "begin",
+ "between",
+ "big",
+ "binary",
+ "bintohex",
+ "bit",
+ "black",
+ "blank",
+ "blanks",
+ "blob",
+ "block",
+ "blocks",
+ "blue",
+ "bound",
+ "boundaries",
+ "bounds",
+ "boxed",
+ "break-point",
+ "buffer",
+ "by",
+ "bypassing",
+ "byte",
+ "byte-order",
+ "call",
+ "calling",
+ "case",
+ "cast",
+ "casting",
+ "catch",
+ "center",
+ "centered",
+ "chain",
+ "chain-input",
+ "chain-request",
+ "change",
+ "changing",
+ "channels",
+ "character",
+ "char-to-hex",
+ "check",
+ "checkbox",
+ "ci_",
+ "circular",
+ "class",
+ "class-coding",
+ "class-data",
+ "class-events",
+ "class-methods",
+ "class-pool",
+ "cleanup",
+ "clear",
+ "client",
+ "clob",
+ "clock",
+ "close",
+ "coalesce",
+ "code",
+ "coding",
+ "col_background",
+ "col_group",
+ "col_heading",
+ "col_key",
+ "col_negative",
+ "col_normal",
+ "col_positive",
+ "col_total",
+ "collect",
+ "color",
+ "column",
+ "columns",
+ "comment",
+ "comments",
+ "commit",
+ "common",
+ "communication",
+ "comparing",
+ "component",
+ "components",
+ "compression",
+ "compute",
+ "concat",
+ "concat_with_space",
+ "concatenate",
+ "cond",
+ "condense",
+ "condition",
+ "connect",
+ "connection",
+ "constants",
+ "context",
+ "contexts",
+ "continue",
+ "control",
+ "controls",
+ "conv",
+ "conversion",
+ "convert",
+ "copies",
+ "copy",
+ "corresponding",
+ "country",
+ "cover",
+ "cpi",
+ "create",
+ "creating",
+ "critical",
+ "currency",
+ "currency_conversion",
+ "current",
+ "cursor",
+ "cursor-selection",
+ "customer",
+ "customer-function",
+ "dangerous",
+ "data",
+ "database",
+ "datainfo",
+ "dataset",
+ "date",
+ "dats_add_days",
+ "dats_add_months",
+ "dats_days_between",
+ "dats_is_valid",
+ "daylight",
+ "dd/mm/yy",
+ "dd/mm/yyyy",
+ "ddmmyy",
+ "deallocate",
+ "decimal_shift",
+ "decimals",
+ "declarations",
+ "deep",
+ "default",
+ "deferred",
+ "define",
+ "defining",
+ "definition",
+ "delete",
+ "deleting",
+ "demand",
+ "department",
+ "descending",
+ "describe",
+ "destination",
+ "detail",
+ "dialog",
+ "directory",
+ "disconnect",
+ "display",
+ "display-mode",
+ "distinct",
+ "divide",
+ "divide-corresponding",
+ "division",
+ "do",
+ "dummy",
+ "duplicate",
+ "duplicates",
+ "duration",
+ "during",
+ "dynamic",
+ "dynpro",
+ "edit",
+ "editor-call",
+ "else",
+ "elseif",
+ "empty",
+ "enabled",
+ "enabling",
+ "encoding",
+ "end",
+ "endat",
+ "endcase",
+ "endcatch",
+ "endchain",
+ "endclass",
+ "enddo",
+ "endenhancement",
+ "end-enhancement-section",
+ "endexec",
+ "endform",
+ "endfunction",
+ "endian",
+ "endif",
+ "ending",
+ "endinterface",
+ "end-lines",
+ "endloop",
+ "endmethod",
+ "endmodule",
+ "end-of-definition",
+ "end-of-editing",
+ "end-of-file",
+ "end-of-page",
+ "end-of-selection",
+ "endon",
+ "endprovide",
+ "endselect",
+ "end-test-injection",
+ "end-test-seam",
+ "endtry",
+ "endwhile",
+ "endwith",
+ "engineering",
+ "enhancement",
+ "enhancement-point",
+ "enhancements",
+ "enhancement-section",
+ "entries",
+ "entry",
+ "enum",
+ "environment",
+ "equiv",
+ "errormessage",
+ "errors",
+ "escaping",
+ "event",
+ "events",
+ "exact",
+ "except",
+ "exception",
+ "exceptions",
+ "exception-table",
+ "exclude",
+ "excluding",
+ "exec",
+ "execute",
+ "exists",
+ "exit",
+ "exit-command",
+ "expand",
+ "expanding",
+ "expiration",
+ "explicit",
+ "exponent",
+ "export",
+ "exporting",
+ "extend",
+ "extended",
+ "extension",
+ "extract",
+ "fail",
+ "fetch",
+ "field",
+ "field-groups",
+ "fields",
+ "field-symbol",
+ "field-symbols",
+ "file",
+ "filter",
+ "filters",
+ "filter-table",
+ "final",
+ "find",
+ "first",
+ "first-line",
+ "fixed-point",
+ "fkeq",
+ "fkge",
+ "flush",
+ "font",
+ "for",
+ "form",
+ "format",
+ "forward",
+ "found",
+ "frame",
+ "frames",
+ "free",
+ "friends",
+ "from",
+ "function",
+ "functionality",
+ "function-pool",
+ "further",
+ "gaps",
+ "generate",
+ "get",
+ "giving",
+ "gkeq",
+ "gkge",
+ "global",
+ "grant",
+ "green",
+ "group",
+ "groups",
+ "handle",
+ "handler",
+ "harmless",
+ "hashed",
+ "having",
+ "hdb",
+ "header",
+ "headers",
+ "heading",
+ "head-lines",
+ "help-id",
+ "help-request",
+ "hextobin",
+ "hide",
+ "high",
+ "hint",
+ "hold",
+ "hotspot",
+ "icon",
+ "id",
+ "identification",
+ "identifier",
+ "ids",
+ "if",
+ "ignore",
+ "ignoring",
+ "immediately",
+ "implementation",
+ "implementations",
+ "implemented",
+ "implicit",
+ "import",
+ "importing",
+ "in",
+ "inactive",
+ "incl",
+ "include",
+ "includes",
+ "including",
+ "increment",
+ "index",
+ "index-line",
+ "infotypes",
+ "inheriting",
+ "init",
+ "initial",
+ "initialization",
+ "inner",
+ "inout",
+ "input",
+ "insert",
+ "instance",
+ "instances",
+ "instr",
+ "intensified",
+ "interface",
+ "interface-pool",
+ "interfaces",
+ "internal",
+ "intervals",
+ "into",
+ "inverse",
+ "inverted-date",
+ "is",
+ "iso",
+ "job",
+ "join",
+ "keep",
+ "keeping",
+ "kernel",
+ "key",
+ "keys",
+ "keywords",
+ "kind",
+ "language",
+ "last",
+ "late",
+ "layout",
+ "leading",
+ "leave",
+ "left",
+ "left-justified",
+ "leftplus",
+ "leftspace",
+ "legacy",
+ "length",
+ "let",
+ "level",
+ "levels",
+ "like",
+ "line",
+ "lines",
+ "line-count",
+ "linefeed",
+ "line-selection",
+ "line-size",
+ "list",
+ "listbox",
+ "list-processing",
+ "little",
+ "llang",
+ "load",
+ "load-of-program",
+ "lob",
+ "local",
+ "locale",
+ "locator",
+ "logfile",
+ "logical",
+ "log-point",
+ "long",
+ "loop",
+ "low",
+ "lower",
+ "lpad",
+ "lpi",
+ "ltrim",
+ "mail",
+ "main",
+ "major-id",
+ "mapping",
+ "margin",
+ "mark",
+ "mask",
+ "match",
+ "matchcode",
+ "max",
+ "maximum",
+ "medium",
+ "members",
+ "memory",
+ "mesh",
+ "message",
+ "message-id",
+ "messages",
+ "messaging",
+ "method",
+ "methods",
+ "min",
+ "minimum",
+ "minor-id",
+ "mm/dd/yy",
+ "mm/dd/yyyy",
+ "mmddyy",
+ "mode",
+ "modif",
+ "modifier",
+ "modify",
+ "module",
+ "move",
+ "move-corresponding",
+ "multiply",
+ "multiply-corresponding",
+ "name",
+ "nametab",
+ "native",
+ "nested",
+ "nesting",
+ "new",
+ "new-line",
+ "new-page",
+ "new-section",
+ "next",
+ "no",
+ "no-display",
+ "no-extension",
+ "no-gap",
+ "no-gaps",
+ "no-grouping",
+ "no-heading",
+ "no-scrolling",
+ "no-sign",
+ "no-title",
+ "no-topofpage",
+ "no-zero",
+ "node",
+ "nodes",
+ "non-unicode",
+ "non-unique",
+ "not",
+ "null",
+ "number",
+ "object",
+ "objects",
+ "obligatory",
+ "occurrence",
+ "occurrences",
+ "occurs",
+ "of",
+ "off",
+ "offset",
+ "ole",
+ "on",
+ "only",
+ "open",
+ "option",
+ "optional",
+ "options",
+ "or",
+ "order",
+ "other",
+ "others",
+ "out",
+ "outer",
+ "output",
+ "output-length",
+ "overflow",
+ "overlay",
+ "pack",
+ "package",
+ "pad",
+ "padding",
+ "page",
+ "pages",
+ "parameter",
+ "parameters",
+ "parameter-table",
+ "part",
+ "partially",
+ "pattern",
+ "percentage",
+ "perform",
+ "performing",
+ "person",
+ "pf1",
+ "pf10",
+ "pf11",
+ "pf12",
+ "pf13",
+ "pf14",
+ "pf15",
+ "pf2",
+ "pf3",
+ "pf4",
+ "pf5",
+ "pf6",
+ "pf7",
+ "pf8",
+ "pf9",
+ "pf-status",
+ "pink",
+ "places",
+ "pool",
+ "pos_high",
+ "pos_low",
+ "position",
+ "pragmas",
+ "precompiled",
+ "preferred",
+ "preserving",
+ "primary",
+ "print",
+ "print-control",
+ "priority",
+ "private",
+ "procedure",
+ "process",
+ "program",
+ "property",
+ "protected",
+ "provide",
+ "public",
+ "push",
+ "pushbutton",
+ "put",
+ "queue-only",
+ "quickinfo",
+ "radiobutton",
+ "raise",
+ "raising",
+ "range",
+ "ranges",
+ "read",
+ "reader",
+ "read-only",
+ "receive",
+ "received",
+ "receiver",
+ "receiving",
+ "red",
+ "redefinition",
+ "reduce",
+ "reduced",
+ "ref",
+ "reference",
+ "refresh",
+ "regex",
+ "reject",
+ "remote",
+ "renaming",
+ "replace",
+ "replacement",
+ "replacing",
+ "report",
+ "request",
+ "requested",
+ "reserve",
+ "reset",
+ "resolution",
+ "respecting",
+ "responsible",
+ "result",
+ "results",
+ "resumable",
+ "resume",
+ "retry",
+ "return",
+ "returncode",
+ "returning",
+ "returns",
+ "right",
+ "right-justified",
+ "rightplus",
+ "rightspace",
+ "risk",
+ "rmc_communication_failure",
+ "rmc_invalid_status",
+ "rmc_system_failure",
+ "role",
+ "rollback",
+ "rows",
+ "rpad",
+ "rtrim",
+ "run",
+ "sap",
+ "sap-spool",
+ "saving",
+ "scale_preserving",
+ "scale_preserving_scientific",
+ "scan",
+ "scientific",
+ "scientific_with_leading_zero",
+ "scroll",
+ "scroll-boundary",
+ "scrolling",
+ "search",
+ "secondary",
+ "seconds",
+ "section",
+ "select",
+ "selection",
+ "selections",
+ "selection-screen",
+ "selection-set",
+ "selection-sets",
+ "selection-table",
+ "select-options",
+ "send",
+ "separate",
+ "separated",
+ "set",
+ "shared",
+ "shift",
+ "short",
+ "shortdump-id",
+ "sign_as_postfix",
+ "single",
+ "size",
+ "skip",
+ "skipping",
+ "smart",
+ "some",
+ "sort",
+ "sortable",
+ "sorted",
+ "source",
+ "specified",
+ "split",
+ "spool",
+ "spots",
+ "sql",
+ "sqlscript",
+ "stable",
+ "stamp",
+ "standard",
+ "starting",
+ "start-of-editing",
+ "start-of-selection",
+ "state",
+ "statement",
+ "statements",
+ "static",
+ "statics",
+ "statusinfo",
+ "step-loop",
+ "stop",
+ "structure",
+ "structures",
+ "style",
+ "subkey",
+ "submatches",
+ "submit",
+ "subroutine",
+ "subscreen",
+ "subtract",
+ "subtract-corresponding",
+ "suffix",
+ "sum",
+ "summary",
+ "summing",
+ "supplied",
+ "supply",
+ "suppress",
+ "switch",
+ "switchstates",
+ "symbol",
+ "syncpoints",
+ "syntax",
+ "syntax-check",
+ "syntax-trace",
+ "system-call",
+ "system-exceptions",
+ "system-exit",
+ "tab",
+ "tabbed",
+ "table",
+ "tables",
+ "tableview",
+ "tabstrip",
+ "target",
+ "task",
+ "tasks",
+ "test",
+ "testing",
+ "test-injection",
+ "test-seam",
+ "text",
+ "textpool",
+ "then",
+ "throw",
+ "time",
+ "times",
+ "timestamp",
+ "timezone",
+ "tims_is_valid",
+ "title",
+ "titlebar",
+ "title-lines",
+ "to",
+ "tokenization",
+ "tokens",
+ "top-lines",
+ "top-of-page",
+ "trace-file",
+ "trace-table",
+ "trailing",
+ "transaction",
+ "transfer",
+ "transformation",
+ "translate",
+ "transporting",
+ "trmac",
+ "truncate",
+ "truncation",
+ "try",
+ "tstmp_add_seconds",
+ "tstmp_current_utctimestamp",
+ "tstmp_is_valid",
+ "tstmp_seconds_between",
+ "type",
+ "type-pool",
+ "type-pools",
+ "types",
+ "uline",
+ "unassign",
+ "under",
+ "unicode",
+ "union",
+ "unique",
+ "unit_conversion",
+ "unix",
+ "unpack",
+ "until",
+ "unwind",
+ "up",
+ "update",
+ "upper",
+ "user",
+ "user-command",
+ "using",
+ "utf-8",
+ "valid",
+ "value",
+ "value-request",
+ "values",
+ "vary",
+ "varying",
+ "verification-message",
+ "version",
+ "via",
+ "view",
+ "visible",
+ "wait",
+ "warning",
+ "when",
+ "whenever",
+ "where",
+ "while",
+ "width",
+ "window",
+ "windows",
+ "with",
+ "with-heading",
+ "without",
+ "with-title",
+ "word",
+ "work",
+ "write",
+ "writer",
+ "xml",
+ "xsd",
+ "yellow",
+ "yes",
+ "yymmdd",
+ "zero",
+ "zone",
+ "abap_system_timezone",
+ "abap_user_timezone",
+ "access",
+ "action",
+ "adabas",
+ "adjust_numbers",
+ "allow_precision_loss",
+ "allowed",
+ "amdp",
+ "applicationuser",
+ "as_geo_json",
+ "as400",
+ "associations",
+ "balance",
+ "behavior",
+ "breakup",
+ "bulk",
+ "cds",
+ "cds_client",
+ "check_before_save",
+ "child",
+ "clients",
+ "corr",
+ "corr_spearman",
+ "cross",
+ "cycles",
+ "datn_add_days",
+ "datn_add_months",
+ "datn_days_between",
+ "dats_from_datn",
+ "dats_tims_to_tstmp",
+ "dats_to_datn",
+ "db2",
+ "db6",
+ "ddl",
+ "dense_rank",
+ "depth",
+ "deterministic",
+ "discarding",
+ "entities",
+ "entity",
+ "error",
+ "failed",
+ "finalize",
+ "first_value",
+ "fltp_to_dec",
+ "following",
+ "fractional",
+ "full",
+ "graph",
+ "grouping",
+ "hierarchy",
+ "hierarchy_ancestors",
+ "hierarchy_ancestors_aggregate",
+ "hierarchy_descendants",
+ "hierarchy_descendants_aggregate",
+ "hierarchy_siblings",
+ "incremental",
+ "indicators",
+ "lag",
+ "last_value",
+ "lead",
+ "leaves",
+ "like_regexpr",
+ "link",
+ "locale_sap",
+ "lock",
+ "locks",
+ "many",
+ "mapped",
+ "matched",
+ "measures",
+ "median",
+ "mssqlnt",
+ "multiple",
+ "nodetype",
+ "ntile",
+ "nulls",
+ "occurrences_regexpr",
+ "one",
+ "operations",
+ "oracle",
+ "orphans",
+ "over",
+ "parent",
+ "parents",
+ "partition",
+ "pcre",
+ "period",
+ "pfcg_mapping",
+ "preceding",
+ "privileged",
+ "product",
+ "projection",
+ "rank",
+ "redirected",
+ "replace_regexpr",
+ "reported",
+ "response",
+ "responses",
+ "root",
+ "row",
+ "row_number",
+ "sap_system_date",
+ "save",
+ "schema",
+ "session",
+ "sets",
+ "shortdump",
+ "siblings",
+ "spantree",
+ "start",
+ "stddev",
+ "string_agg",
+ "subtotal",
+ "sybase",
+ "tims_from_timn",
+ "tims_to_timn",
+ "to_blob",
+ "to_clob",
+ "total",
+ "trace-entry",
+ "tstmp_to_dats",
+ "tstmp_to_dst",
+ "tstmp_to_tims",
+ "tstmpl_from_utcl",
+ "tstmpl_to_utcl",
+ "unbounded",
+ "utcl_add_seconds",
+ "utcl_current",
+ "utcl_seconds_between",
+ "uuid",
+ "var",
+ "verbatim"
+ ],
+ builtinFunctions: [
+ "abs",
+ "acos",
+ "asin",
+ "atan",
+ "bit-set",
+ "boolc",
+ "boolx",
+ "ceil",
+ "char_off",
+ "charlen",
+ "cmax",
+ "cmin",
+ "concat_lines_of",
+ "contains",
+ "contains_any_not_of",
+ "contains_any_of",
+ "cos",
+ "cosh",
+ "count",
+ "count_any_not_of",
+ "count_any_of",
+ "dbmaxlen",
+ "distance",
+ "escape",
+ "exp",
+ "find_any_not_of",
+ "find_any_of",
+ "find_end",
+ "floor",
+ "frac",
+ "from_mixed",
+ "ipow",
+ "line_exists",
+ "line_index",
+ "log",
+ "log10",
+ "matches",
+ "nmax",
+ "nmin",
+ "numofchar",
+ "repeat",
+ "rescale",
+ "reverse",
+ "round",
+ "segment",
+ "shift_left",
+ "shift_right",
+ "sign",
+ "sin",
+ "sinh",
+ "sqrt",
+ "strlen",
+ "substring",
+ "substring_after",
+ "substring_before",
+ "substring_from",
+ "substring_to",
+ "tan",
+ "tanh",
+ "to_lower",
+ "to_mixed",
+ "to_upper",
+ "trunc",
+ "utclong_add",
+ "utclong_current",
+ "utclong_diff",
+ "xsdbool",
+ "xstrlen"
+ ],
+ typeKeywords: [
+ "b",
+ "c",
+ "d",
+ "decfloat16",
+ "decfloat34",
+ "f",
+ "i",
+ "int8",
+ "n",
+ "p",
+ "s",
+ "string",
+ "t",
+ "utclong",
+ "x",
+ "xstring",
+ "any",
+ "clike",
+ "csequence",
+ "decfloat",
+ "numeric",
+ "simple",
+ "xsequence",
+ "accp",
+ "char",
+ "clnt",
+ "cuky",
+ "curr",
+ "datn",
+ "dats",
+ "d16d",
+ "d16n",
+ "d16r",
+ "d34d",
+ "d34n",
+ "d34r",
+ "dec",
+ "df16_dec",
+ "df16_raw",
+ "df34_dec",
+ "df34_raw",
+ "fltp",
+ "geom_ewkb",
+ "int1",
+ "int2",
+ "int4",
+ "lang",
+ "lchr",
+ "lraw",
+ "numc",
+ "quan",
+ "raw",
+ "rawstring",
+ "sstring",
+ "timn",
+ "tims",
+ "unit",
+ "utcl",
+ "df16_scl",
+ "df34_scl",
+ "prec",
+ "varc",
+ "abap_bool",
+ "abap_false",
+ "abap_true",
+ "abap_undefined",
+ "me",
+ "screen",
+ "space",
+ "super",
+ "sy",
+ "syst",
+ "table_line",
+ "*sys*"
+ ],
+ builtinMethods: ["class_constructor", "constructor"],
+ derivedTypes: [
+ "%CID",
+ "%CID_REF",
+ "%CONTROL",
+ "%DATA",
+ "%ELEMENT",
+ "%FAIL",
+ "%KEY",
+ "%MSG",
+ "%PARAM",
+ "%PID",
+ "%PID_ASSOC",
+ "%PID_PARENT",
+ "%_HINTS"
+ ],
+ cdsLanguage: [
+ "@AbapAnnotation",
+ "@AbapCatalog",
+ "@AccessControl",
+ "@API",
+ "@ClientDependent",
+ "@ClientHandling",
+ "@CompatibilityContract",
+ "@DataAging",
+ "@EndUserText",
+ "@Environment",
+ "@LanguageDependency",
+ "@MappingRole",
+ "@Metadata",
+ "@MetadataExtension",
+ "@ObjectModel",
+ "@Scope",
+ "@Semantics",
+ "$EXTENSION",
+ "$SELF"
+ ],
+ selectors: ["->", "->*", "=>", "~", "~*"],
+ operators: [
+ " +",
+ " -",
+ "/",
+ "*",
+ "**",
+ "div",
+ "mod",
+ "=",
+ "#",
+ "@",
+ "+=",
+ "-=",
+ "*=",
+ "/=",
+ "**=",
+ "&&=",
+ "?=",
+ "&",
+ "&&",
+ "bit-and",
+ "bit-not",
+ "bit-or",
+ "bit-xor",
+ "m",
+ "o",
+ "z",
+ "<",
+ " >",
+ "<=",
+ ">=",
+ "<>",
+ "><",
+ "=<",
+ "=>",
+ "bt",
+ "byte-ca",
+ "byte-cn",
+ "byte-co",
+ "byte-cs",
+ "byte-na",
+ "byte-ns",
+ "ca",
+ "cn",
+ "co",
+ "cp",
+ "cs",
+ "eq",
+ "ge",
+ "gt",
+ "le",
+ "lt",
+ "na",
+ "nb",
+ "ne",
+ "np",
+ "ns",
+ "*/",
+ "*:",
+ "--",
+ "/*",
+ "//"
+ ],
+ symbols: /[=>))*/,
+ {
+ cases: {
+ "@typeKeywords": "type",
+ "@keywords": "keyword",
+ "@cdsLanguage": "annotation",
+ "@derivedTypes": "type",
+ "@builtinFunctions": "type",
+ "@builtinMethods": "type",
+ "@operators": "key",
+ "@default": "identifier"
+ }
+ }
+ ],
+ [/<[\w]+>/, "identifier"],
+ [/##[\w|_]+/, "comment"],
+ { include: "@whitespace" },
+ [/[:,.]/, "delimiter"],
+ [/[{}()\[\]]/, "@brackets"],
+ [
+ /@symbols/,
+ {
+ cases: {
+ "@selectors": "tag",
+ "@operators": "key",
+ "@default": ""
+ }
+ }
+ ],
+ [/'/, { token: "string", bracket: "@open", next: "@stringquote" }],
+ [/`/, { token: "string", bracket: "@open", next: "@stringping" }],
+ [/\|/, { token: "string", bracket: "@open", next: "@stringtemplate" }],
+ [/\d+/, "number"]
+ ],
+ stringtemplate: [
+ [/[^\\\|]+/, "string"],
+ [/\\\|/, "string"],
+ [/\|/, { token: "string", bracket: "@close", next: "@pop" }]
+ ],
+ stringping: [
+ [/[^\\`]+/, "string"],
+ [/`/, { token: "string", bracket: "@close", next: "@pop" }]
+ ],
+ stringquote: [
+ [/[^\\']+/, "string"],
+ [/'/, { token: "string", bracket: "@close", next: "@pop" }]
+ ],
+ whitespace: [
+ [/[ \t\r\n]+/, ""],
+ [/^\*.*$/, "comment"],
+ [/\".*$/, "comment"]
+ ]
+ }
+};
+export {
+ conf,
+ language
+};
+/*! Bundled license information:
+
+monaco-editor/esm/vs/basic-languages/abap/abap.js:
+ (*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*)
+*/
+//# sourceMappingURL=abap-ZJXPBV7D.js.map
diff --git a/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map b/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map
new file mode 100644
index 0000000..a86090d
--- /dev/null
+++ b/docs/.vitepress/cache/deps/abap-ZJXPBV7D.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js"],
+ "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/abap/abap.ts\nvar conf = {\n comments: {\n lineComment: \"*\"\n },\n brackets: [\n [\"[\", \"]\"],\n [\"(\", \")\"]\n ]\n};\nvar language = {\n defaultToken: \"invalid\",\n ignoreCase: true,\n tokenPostfix: \".abap\",\n keywords: [\n \"abap-source\",\n \"abbreviated\",\n \"abstract\",\n \"accept\",\n \"accepting\",\n \"according\",\n \"activation\",\n \"actual\",\n \"add\",\n \"add-corresponding\",\n \"adjacent\",\n \"after\",\n \"alias\",\n \"aliases\",\n \"align\",\n \"all\",\n \"allocate\",\n \"alpha\",\n \"analysis\",\n \"analyzer\",\n \"and\",\n \"append\",\n \"appendage\",\n \"appending\",\n \"application\",\n \"archive\",\n \"area\",\n \"arithmetic\",\n \"as\",\n \"ascending\",\n \"aspect\",\n \"assert\",\n \"assign\",\n \"assigned\",\n \"assigning\",\n \"association\",\n \"asynchronous\",\n \"at\",\n \"attributes\",\n \"authority\",\n \"authority-check\",\n \"avg\",\n \"back\",\n \"background\",\n \"backup\",\n \"backward\",\n \"badi\",\n \"base\",\n \"before\",\n \"begin\",\n \"between\",\n \"big\",\n \"binary\",\n \"bintohex\",\n \"bit\",\n \"black\",\n \"blank\",\n \"blanks\",\n \"blob\",\n \"block\",\n \"blocks\",\n \"blue\",\n \"bound\",\n \"boundaries\",\n \"bounds\",\n \"boxed\",\n \"break-point\",\n \"buffer\",\n \"by\",\n \"bypassing\",\n \"byte\",\n \"byte-order\",\n \"call\",\n \"calling\",\n \"case\",\n \"cast\",\n \"casting\",\n \"catch\",\n \"center\",\n \"centered\",\n \"chain\",\n \"chain-input\",\n \"chain-request\",\n \"change\",\n \"changing\",\n \"channels\",\n \"character\",\n \"char-to-hex\",\n \"check\",\n \"checkbox\",\n \"ci_\",\n \"circular\",\n \"class\",\n \"class-coding\",\n \"class-data\",\n \"class-events\",\n \"class-methods\",\n \"class-pool\",\n \"cleanup\",\n \"clear\",\n \"client\",\n \"clob\",\n \"clock\",\n \"close\",\n \"coalesce\",\n \"code\",\n \"coding\",\n \"col_background\",\n \"col_group\",\n \"col_heading\",\n \"col_key\",\n \"col_negative\",\n \"col_normal\",\n \"col_positive\",\n \"col_total\",\n \"collect\",\n \"color\",\n \"column\",\n \"columns\",\n \"comment\",\n \"comments\",\n \"commit\",\n \"common\",\n \"communication\",\n \"comparing\",\n \"component\",\n \"components\",\n \"compression\",\n \"compute\",\n \"concat\",\n \"concat_with_space\",\n \"concatenate\",\n \"cond\",\n \"condense\",\n \"condition\",\n \"connect\",\n \"connection\",\n \"constants\",\n \"context\",\n \"contexts\",\n \"continue\",\n \"control\",\n \"controls\",\n \"conv\",\n \"conversion\",\n \"convert\",\n \"copies\",\n \"copy\",\n \"corresponding\",\n \"country\",\n \"cover\",\n \"cpi\",\n \"create\",\n \"creating\",\n \"critical\",\n \"currency\",\n \"currency_conversion\",\n \"current\",\n \"cursor\",\n \"cursor-selection\",\n \"customer\",\n \"customer-function\",\n \"dangerous\",\n \"data\",\n \"database\",\n \"datainfo\",\n \"dataset\",\n \"date\",\n \"dats_add_days\",\n \"dats_add_months\",\n \"dats_days_between\",\n \"dats_is_valid\",\n \"daylight\",\n \"dd/mm/yy\",\n \"dd/mm/yyyy\",\n \"ddmmyy\",\n \"deallocate\",\n \"decimal_shift\",\n \"decimals\",\n \"declarations\",\n \"deep\",\n \"default\",\n \"deferred\",\n \"define\",\n \"defining\",\n \"definition\",\n \"delete\",\n \"deleting\",\n \"demand\",\n \"department\",\n \"descending\",\n \"describe\",\n \"destination\",\n \"detail\",\n \"dialog\",\n \"directory\",\n \"disconnect\",\n \"display\",\n \"display-mode\",\n \"distinct\",\n \"divide\",\n \"divide-corresponding\",\n \"division\",\n \"do\",\n \"dummy\",\n \"duplicate\",\n \"duplicates\",\n \"duration\",\n \"during\",\n \"dynamic\",\n \"dynpro\",\n \"edit\",\n \"editor-call\",\n \"else\",\n \"elseif\",\n \"empty\",\n \"enabled\",\n \"enabling\",\n \"encoding\",\n \"end\",\n \"endat\",\n \"endcase\",\n \"endcatch\",\n \"endchain\",\n \"endclass\",\n \"enddo\",\n \"endenhancement\",\n \"end-enhancement-section\",\n \"endexec\",\n \"endform\",\n \"endfunction\",\n \"endian\",\n \"endif\",\n \"ending\",\n \"endinterface\",\n \"end-lines\",\n \"endloop\",\n \"endmethod\",\n \"endmodule\",\n \"end-of-definition\",\n \"end-of-editing\",\n \"end-of-file\",\n \"end-of-page\",\n \"end-of-selection\",\n \"endon\",\n \"endprovide\",\n \"endselect\",\n \"end-test-injection\",\n \"end-test-seam\",\n \"endtry\",\n \"endwhile\",\n \"endwith\",\n \"engineering\",\n \"enhancement\",\n \"enhancement-point\",\n \"enhancements\",\n \"enhancement-section\",\n \"entries\",\n \"entry\",\n \"enum\",\n \"environment\",\n \"equiv\",\n \"errormessage\",\n \"errors\",\n \"escaping\",\n \"event\",\n \"events\",\n \"exact\",\n \"except\",\n \"exception\",\n \"exceptions\",\n \"exception-table\",\n \"exclude\",\n \"excluding\",\n \"exec\",\n \"execute\",\n \"exists\",\n \"exit\",\n \"exit-command\",\n \"expand\",\n \"expanding\",\n \"expiration\",\n \"explicit\",\n \"exponent\",\n \"export\",\n \"exporting\",\n \"extend\",\n \"extended\",\n \"extension\",\n \"extract\",\n \"fail\",\n \"fetch\",\n \"field\",\n \"field-groups\",\n \"fields\",\n \"field-symbol\",\n \"field-symbols\",\n \"file\",\n \"filter\",\n \"filters\",\n \"filter-table\",\n \"final\",\n \"find\",\n \"first\",\n \"first-line\",\n \"fixed-point\",\n \"fkeq\",\n \"fkge\",\n \"flush\",\n \"font\",\n \"for\",\n \"form\",\n \"format\",\n \"forward\",\n \"found\",\n \"frame\",\n \"frames\",\n \"free\",\n \"friends\",\n \"from\",\n \"function\",\n \"functionality\",\n \"function-pool\",\n \"further\",\n \"gaps\",\n \"generate\",\n \"get\",\n \"giving\",\n \"gkeq\",\n \"gkge\",\n \"global\",\n \"grant\",\n \"green\",\n \"group\",\n \"groups\",\n \"handle\",\n \"handler\",\n \"harmless\",\n \"hashed\",\n \"having\",\n \"hdb\",\n \"header\",\n \"headers\",\n \"heading\",\n \"head-lines\",\n \"help-id\",\n \"help-request\",\n \"hextobin\",\n \"hide\",\n \"high\",\n \"hint\",\n \"hold\",\n \"hotspot\",\n \"icon\",\n \"id\",\n \"identification\",\n \"identifier\",\n \"ids\",\n \"if\",\n \"ignore\",\n \"ignoring\",\n \"immediately\",\n \"implementation\",\n \"implementations\",\n \"implemented\",\n \"implicit\",\n \"import\",\n \"importing\",\n \"in\",\n \"inactive\",\n \"incl\",\n \"include\",\n \"includes\",\n \"including\",\n \"increment\",\n \"index\",\n \"index-line\",\n \"infotypes\",\n \"inheriting\",\n \"init\",\n \"initial\",\n \"initialization\",\n \"inner\",\n \"inout\",\n \"input\",\n \"insert\",\n \"instance\",\n \"instances\",\n \"instr\",\n \"intensified\",\n \"interface\",\n \"interface-pool\",\n \"interfaces\",\n \"internal\",\n \"intervals\",\n \"into\",\n \"inverse\",\n \"inverted-date\",\n \"is\",\n \"iso\",\n \"job\",\n \"join\",\n \"keep\",\n \"keeping\",\n \"kernel\",\n \"key\",\n \"keys\",\n \"keywords\",\n \"kind\",\n \"language\",\n \"last\",\n \"late\",\n \"layout\",\n \"leading\",\n \"leave\",\n \"left\",\n \"left-justified\",\n \"leftplus\",\n \"leftspace\",\n \"legacy\",\n \"length\",\n \"let\",\n \"level\",\n \"levels\",\n \"like\",\n \"line\",\n \"lines\",\n \"line-count\",\n \"linefeed\",\n \"line-selection\",\n \"line-size\",\n \"list\",\n \"listbox\",\n \"list-processing\",\n \"little\",\n \"llang\",\n \"load\",\n \"load-of-program\",\n \"lob\",\n \"local\",\n \"locale\",\n \"locator\",\n \"logfile\",\n \"logical\",\n \"log-point\",\n \"long\",\n \"loop\",\n \"low\",\n \"lower\",\n \"lpad\",\n \"lpi\",\n \"ltrim\",\n \"mail\",\n \"main\",\n \"major-id\",\n \"mapping\",\n \"margin\",\n \"mark\",\n \"mask\",\n \"match\",\n \"matchcode\",\n \"max\",\n \"maximum\",\n \"medium\",\n \"members\",\n \"memory\",\n \"mesh\",\n \"message\",\n \"message-id\",\n \"messages\",\n \"messaging\",\n \"method\",\n \"methods\",\n \"min\",\n \"minimum\",\n \"minor-id\",\n \"mm/dd/yy\",\n \"mm/dd/yyyy\",\n \"mmddyy\",\n \"mode\",\n \"modif\",\n \"modifier\",\n \"modify\",\n \"module\",\n \"move\",\n \"move-corresponding\",\n \"multiply\",\n \"multiply-corresponding\",\n \"name\",\n \"nametab\",\n \"native\",\n \"nested\",\n \"nesting\",\n \"new\",\n \"new-line\",\n \"new-page\",\n \"new-section\",\n \"next\",\n \"no\",\n \"no-display\",\n \"no-extension\",\n \"no-gap\",\n \"no-gaps\",\n \"no-grouping\",\n \"no-heading\",\n \"no-scrolling\",\n \"no-sign\",\n \"no-title\",\n \"no-topofpage\",\n \"no-zero\",\n \"node\",\n \"nodes\",\n \"non-unicode\",\n \"non-unique\",\n \"not\",\n \"null\",\n \"number\",\n \"object\",\n \"objects\",\n \"obligatory\",\n \"occurrence\",\n \"occurrences\",\n \"occurs\",\n \"of\",\n \"off\",\n \"offset\",\n \"ole\",\n \"on\",\n \"only\",\n \"open\",\n \"option\",\n \"optional\",\n \"options\",\n \"or\",\n \"order\",\n \"other\",\n \"others\",\n \"out\",\n \"outer\",\n \"output\",\n \"output-length\",\n \"overflow\",\n \"overlay\",\n \"pack\",\n \"package\",\n \"pad\",\n \"padding\",\n \"page\",\n \"pages\",\n \"parameter\",\n \"parameters\",\n \"parameter-table\",\n \"part\",\n \"partially\",\n \"pattern\",\n \"percentage\",\n \"perform\",\n \"performing\",\n \"person\",\n \"pf1\",\n \"pf10\",\n \"pf11\",\n \"pf12\",\n \"pf13\",\n \"pf14\",\n \"pf15\",\n \"pf2\",\n \"pf3\",\n \"pf4\",\n \"pf5\",\n \"pf6\",\n \"pf7\",\n \"pf8\",\n \"pf9\",\n \"pf-status\",\n \"pink\",\n \"places\",\n \"pool\",\n \"pos_high\",\n \"pos_low\",\n \"position\",\n \"pragmas\",\n \"precompiled\",\n \"preferred\",\n \"preserving\",\n \"primary\",\n \"print\",\n \"print-control\",\n \"priority\",\n \"private\",\n \"procedure\",\n \"process\",\n \"program\",\n \"property\",\n \"protected\",\n \"provide\",\n \"public\",\n \"push\",\n \"pushbutton\",\n \"put\",\n \"queue-only\",\n \"quickinfo\",\n \"radiobutton\",\n \"raise\",\n \"raising\",\n \"range\",\n \"ranges\",\n \"read\",\n \"reader\",\n \"read-only\",\n \"receive\",\n \"received\",\n \"receiver\",\n \"receiving\",\n \"red\",\n \"redefinition\",\n \"reduce\",\n \"reduced\",\n \"ref\",\n \"reference\",\n \"refresh\",\n \"regex\",\n \"reject\",\n \"remote\",\n \"renaming\",\n \"replace\",\n \"replacement\",\n \"replacing\",\n \"report\",\n \"request\",\n \"requested\",\n \"reserve\",\n \"reset\",\n \"resolution\",\n \"respecting\",\n \"responsible\",\n \"result\",\n \"results\",\n \"resumable\",\n \"resume\",\n \"retry\",\n \"return\",\n \"returncode\",\n \"returning\",\n \"returns\",\n \"right\",\n \"right-justified\",\n \"rightplus\",\n \"rightspace\",\n \"risk\",\n \"rmc_communication_failure\",\n \"rmc_invalid_status\",\n \"rmc_system_failure\",\n \"role\",\n \"rollback\",\n \"rows\",\n \"rpad\",\n \"rtrim\",\n \"run\",\n \"sap\",\n \"sap-spool\",\n \"saving\",\n \"scale_preserving\",\n \"scale_preserving_scientific\",\n \"scan\",\n \"scientific\",\n \"scientific_with_leading_zero\",\n \"scroll\",\n \"scroll-boundary\",\n \"scrolling\",\n \"search\",\n \"secondary\",\n \"seconds\",\n \"section\",\n \"select\",\n \"selection\",\n \"selections\",\n \"selection-screen\",\n \"selection-set\",\n \"selection-sets\",\n \"selection-table\",\n \"select-options\",\n \"send\",\n \"separate\",\n \"separated\",\n \"set\",\n \"shared\",\n \"shift\",\n \"short\",\n \"shortdump-id\",\n \"sign_as_postfix\",\n \"single\",\n \"size\",\n \"skip\",\n \"skipping\",\n \"smart\",\n \"some\",\n \"sort\",\n \"sortable\",\n \"sorted\",\n \"source\",\n \"specified\",\n \"split\",\n \"spool\",\n \"spots\",\n \"sql\",\n \"sqlscript\",\n \"stable\",\n \"stamp\",\n \"standard\",\n \"starting\",\n \"start-of-editing\",\n \"start-of-selection\",\n \"state\",\n \"statement\",\n \"statements\",\n \"static\",\n \"statics\",\n \"statusinfo\",\n \"step-loop\",\n \"stop\",\n \"structure\",\n \"structures\",\n \"style\",\n \"subkey\",\n \"submatches\",\n \"submit\",\n \"subroutine\",\n \"subscreen\",\n \"subtract\",\n \"subtract-corresponding\",\n \"suffix\",\n \"sum\",\n \"summary\",\n \"summing\",\n \"supplied\",\n \"supply\",\n \"suppress\",\n \"switch\",\n \"switchstates\",\n \"symbol\",\n \"syncpoints\",\n \"syntax\",\n \"syntax-check\",\n \"syntax-trace\",\n \"system-call\",\n \"system-exceptions\",\n \"system-exit\",\n \"tab\",\n \"tabbed\",\n \"table\",\n \"tables\",\n \"tableview\",\n \"tabstrip\",\n \"target\",\n \"task\",\n \"tasks\",\n \"test\",\n \"testing\",\n \"test-injection\",\n \"test-seam\",\n \"text\",\n \"textpool\",\n \"then\",\n \"throw\",\n \"time\",\n \"times\",\n \"timestamp\",\n \"timezone\",\n \"tims_is_valid\",\n \"title\",\n \"titlebar\",\n \"title-lines\",\n \"to\",\n \"tokenization\",\n \"tokens\",\n \"top-lines\",\n \"top-of-page\",\n \"trace-file\",\n \"trace-table\",\n \"trailing\",\n \"transaction\",\n \"transfer\",\n \"transformation\",\n \"translate\",\n \"transporting\",\n \"trmac\",\n \"truncate\",\n \"truncation\",\n \"try\",\n \"tstmp_add_seconds\",\n \"tstmp_current_utctimestamp\",\n \"tstmp_is_valid\",\n \"tstmp_seconds_between\",\n \"type\",\n \"type-pool\",\n \"type-pools\",\n \"types\",\n \"uline\",\n \"unassign\",\n \"under\",\n \"unicode\",\n \"union\",\n \"unique\",\n \"unit_conversion\",\n \"unix\",\n \"unpack\",\n \"until\",\n \"unwind\",\n \"up\",\n \"update\",\n \"upper\",\n \"user\",\n \"user-command\",\n \"using\",\n \"utf-8\",\n \"valid\",\n \"value\",\n \"value-request\",\n \"values\",\n \"vary\",\n \"varying\",\n \"verification-message\",\n \"version\",\n \"via\",\n \"view\",\n \"visible\",\n \"wait\",\n \"warning\",\n \"when\",\n \"whenever\",\n \"where\",\n \"while\",\n \"width\",\n \"window\",\n \"windows\",\n \"with\",\n \"with-heading\",\n \"without\",\n \"with-title\",\n \"word\",\n \"work\",\n \"write\",\n \"writer\",\n \"xml\",\n \"xsd\",\n \"yellow\",\n \"yes\",\n \"yymmdd\",\n \"zero\",\n \"zone\",\n \"abap_system_timezone\",\n \"abap_user_timezone\",\n \"access\",\n \"action\",\n \"adabas\",\n \"adjust_numbers\",\n \"allow_precision_loss\",\n \"allowed\",\n \"amdp\",\n \"applicationuser\",\n \"as_geo_json\",\n \"as400\",\n \"associations\",\n \"balance\",\n \"behavior\",\n \"breakup\",\n \"bulk\",\n \"cds\",\n \"cds_client\",\n \"check_before_save\",\n \"child\",\n \"clients\",\n \"corr\",\n \"corr_spearman\",\n \"cross\",\n \"cycles\",\n \"datn_add_days\",\n \"datn_add_months\",\n \"datn_days_between\",\n \"dats_from_datn\",\n \"dats_tims_to_tstmp\",\n \"dats_to_datn\",\n \"db2\",\n \"db6\",\n \"ddl\",\n \"dense_rank\",\n \"depth\",\n \"deterministic\",\n \"discarding\",\n \"entities\",\n \"entity\",\n \"error\",\n \"failed\",\n \"finalize\",\n \"first_value\",\n \"fltp_to_dec\",\n \"following\",\n \"fractional\",\n \"full\",\n \"graph\",\n \"grouping\",\n \"hierarchy\",\n \"hierarchy_ancestors\",\n \"hierarchy_ancestors_aggregate\",\n \"hierarchy_descendants\",\n \"hierarchy_descendants_aggregate\",\n \"hierarchy_siblings\",\n \"incremental\",\n \"indicators\",\n \"lag\",\n \"last_value\",\n \"lead\",\n \"leaves\",\n \"like_regexpr\",\n \"link\",\n \"locale_sap\",\n \"lock\",\n \"locks\",\n \"many\",\n \"mapped\",\n \"matched\",\n \"measures\",\n \"median\",\n \"mssqlnt\",\n \"multiple\",\n \"nodetype\",\n \"ntile\",\n \"nulls\",\n \"occurrences_regexpr\",\n \"one\",\n \"operations\",\n \"oracle\",\n \"orphans\",\n \"over\",\n \"parent\",\n \"parents\",\n \"partition\",\n \"pcre\",\n \"period\",\n \"pfcg_mapping\",\n \"preceding\",\n \"privileged\",\n \"product\",\n \"projection\",\n \"rank\",\n \"redirected\",\n \"replace_regexpr\",\n \"reported\",\n \"response\",\n \"responses\",\n \"root\",\n \"row\",\n \"row_number\",\n \"sap_system_date\",\n \"save\",\n \"schema\",\n \"session\",\n \"sets\",\n \"shortdump\",\n \"siblings\",\n \"spantree\",\n \"start\",\n \"stddev\",\n \"string_agg\",\n \"subtotal\",\n \"sybase\",\n \"tims_from_timn\",\n \"tims_to_timn\",\n \"to_blob\",\n \"to_clob\",\n \"total\",\n \"trace-entry\",\n \"tstmp_to_dats\",\n \"tstmp_to_dst\",\n \"tstmp_to_tims\",\n \"tstmpl_from_utcl\",\n \"tstmpl_to_utcl\",\n \"unbounded\",\n \"utcl_add_seconds\",\n \"utcl_current\",\n \"utcl_seconds_between\",\n \"uuid\",\n \"var\",\n \"verbatim\"\n ],\n builtinFunctions: [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"bit-set\",\n \"boolc\",\n \"boolx\",\n \"ceil\",\n \"char_off\",\n \"charlen\",\n \"cmax\",\n \"cmin\",\n \"concat_lines_of\",\n \"contains\",\n \"contains_any_not_of\",\n \"contains_any_of\",\n \"cos\",\n \"cosh\",\n \"count\",\n \"count_any_not_of\",\n \"count_any_of\",\n \"dbmaxlen\",\n \"distance\",\n \"escape\",\n \"exp\",\n \"find_any_not_of\",\n \"find_any_of\",\n \"find_end\",\n \"floor\",\n \"frac\",\n \"from_mixed\",\n \"ipow\",\n \"line_exists\",\n \"line_index\",\n \"log\",\n \"log10\",\n \"matches\",\n \"nmax\",\n \"nmin\",\n \"numofchar\",\n \"repeat\",\n \"rescale\",\n \"reverse\",\n \"round\",\n \"segment\",\n \"shift_left\",\n \"shift_right\",\n \"sign\",\n \"sin\",\n \"sinh\",\n \"sqrt\",\n \"strlen\",\n \"substring\",\n \"substring_after\",\n \"substring_before\",\n \"substring_from\",\n \"substring_to\",\n \"tan\",\n \"tanh\",\n \"to_lower\",\n \"to_mixed\",\n \"to_upper\",\n \"trunc\",\n \"utclong_add\",\n \"utclong_current\",\n \"utclong_diff\",\n \"xsdbool\",\n \"xstrlen\"\n ],\n typeKeywords: [\n \"b\",\n \"c\",\n \"d\",\n \"decfloat16\",\n \"decfloat34\",\n \"f\",\n \"i\",\n \"int8\",\n \"n\",\n \"p\",\n \"s\",\n \"string\",\n \"t\",\n \"utclong\",\n \"x\",\n \"xstring\",\n \"any\",\n \"clike\",\n \"csequence\",\n \"decfloat\",\n \"numeric\",\n \"simple\",\n \"xsequence\",\n \"accp\",\n \"char\",\n \"clnt\",\n \"cuky\",\n \"curr\",\n \"datn\",\n \"dats\",\n \"d16d\",\n \"d16n\",\n \"d16r\",\n \"d34d\",\n \"d34n\",\n \"d34r\",\n \"dec\",\n \"df16_dec\",\n \"df16_raw\",\n \"df34_dec\",\n \"df34_raw\",\n \"fltp\",\n \"geom_ewkb\",\n \"int1\",\n \"int2\",\n \"int4\",\n \"lang\",\n \"lchr\",\n \"lraw\",\n \"numc\",\n \"quan\",\n \"raw\",\n \"rawstring\",\n \"sstring\",\n \"timn\",\n \"tims\",\n \"unit\",\n \"utcl\",\n \"df16_scl\",\n \"df34_scl\",\n \"prec\",\n \"varc\",\n \"abap_bool\",\n \"abap_false\",\n \"abap_true\",\n \"abap_undefined\",\n \"me\",\n \"screen\",\n \"space\",\n \"super\",\n \"sy\",\n \"syst\",\n \"table_line\",\n \"*sys*\"\n ],\n builtinMethods: [\"class_constructor\", \"constructor\"],\n derivedTypes: [\n \"%CID\",\n \"%CID_REF\",\n \"%CONTROL\",\n \"%DATA\",\n \"%ELEMENT\",\n \"%FAIL\",\n \"%KEY\",\n \"%MSG\",\n \"%PARAM\",\n \"%PID\",\n \"%PID_ASSOC\",\n \"%PID_PARENT\",\n \"%_HINTS\"\n ],\n cdsLanguage: [\n \"@AbapAnnotation\",\n \"@AbapCatalog\",\n \"@AccessControl\",\n \"@API\",\n \"@ClientDependent\",\n \"@ClientHandling\",\n \"@CompatibilityContract\",\n \"@DataAging\",\n \"@EndUserText\",\n \"@Environment\",\n \"@LanguageDependency\",\n \"@MappingRole\",\n \"@Metadata\",\n \"@MetadataExtension\",\n \"@ObjectModel\",\n \"@Scope\",\n \"@Semantics\",\n \"$EXTENSION\",\n \"$SELF\"\n ],\n selectors: [\"->\", \"->*\", \"=>\", \"~\", \"~*\"],\n operators: [\n \" +\",\n \" -\",\n \"/\",\n \"*\",\n \"**\",\n \"div\",\n \"mod\",\n \"=\",\n \"#\",\n \"@\",\n \"+=\",\n \"-=\",\n \"*=\",\n \"/=\",\n \"**=\",\n \"&&=\",\n \"?=\",\n \"&\",\n \"&&\",\n \"bit-and\",\n \"bit-not\",\n \"bit-or\",\n \"bit-xor\",\n \"m\",\n \"o\",\n \"z\",\n \"<\",\n \" >\",\n \"<=\",\n \">=\",\n \"<>\",\n \"><\",\n \"=<\",\n \"=>\",\n \"bt\",\n \"byte-ca\",\n \"byte-cn\",\n \"byte-co\",\n \"byte-cs\",\n \"byte-na\",\n \"byte-ns\",\n \"ca\",\n \"cn\",\n \"co\",\n \"cp\",\n \"cs\",\n \"eq\",\n \"ge\",\n \"gt\",\n \"le\",\n \"lt\",\n \"na\",\n \"nb\",\n \"ne\",\n \"np\",\n \"ns\",\n \"*/\",\n \"*:\",\n \"--\",\n \"/*\",\n \"//\"\n ],\n symbols: /[=>))*/,\n {\n cases: {\n \"@typeKeywords\": \"type\",\n \"@keywords\": \"keyword\",\n \"@cdsLanguage\": \"annotation\",\n \"@derivedTypes\": \"type\",\n \"@builtinFunctions\": \"type\",\n \"@builtinMethods\": \"type\",\n \"@operators\": \"key\",\n \"@default\": \"identifier\"\n }\n }\n ],\n [/<[\\w]+>/, \"identifier\"],\n [/##[\\w|_]+/, \"comment\"],\n { include: \"@whitespace\" },\n [/[:,.]/, \"delimiter\"],\n [/[{}()\\[\\]]/, \"@brackets\"],\n [\n /@symbols/,\n {\n cases: {\n \"@selectors\": \"tag\",\n \"@operators\": \"key\",\n \"@default\": \"\"\n }\n }\n ],\n [/'/, { token: \"string\", bracket: \"@open\", next: \"@stringquote\" }],\n [/`/, { token: \"string\", bracket: \"@open\", next: \"@stringping\" }],\n [/\\|/, { token: \"string\", bracket: \"@open\", next: \"@stringtemplate\" }],\n [/\\d+/, \"number\"]\n ],\n stringtemplate: [\n [/[^\\\\\\|]+/, \"string\"],\n [/\\\\\\|/, \"string\"],\n [/\\|/, { token: \"string\", bracket: \"@close\", next: \"@pop\" }]\n ],\n stringping: [\n [/[^\\\\`]+/, \"string\"],\n [/`/, { token: \"string\", bracket: \"@close\", next: \"@pop\" }]\n ],\n stringquote: [\n [/[^\\\\']+/, \"string\"],\n [/'/, { token: \"string\", bracket: \"@close\", next: \"@pop\" }]\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, \"\"],\n [/^\\*.*$/, \"comment\"],\n [/\\\".*$/, \"comment\"]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"],
+ "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,UAAU;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,EACX;AACF;AACA,IAAI,WAAW;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,UAAU;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,kBAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,gBAAgB,CAAC,qBAAqB,aAAa;AAAA,EACnD,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,WAAW,CAAC,MAAM,OAAO,MAAM,KAAK,IAAI;AAAA,EACxC,WAAW;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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,CAAC;AAAA,IAC7D;AAAA,IACA,YAAY;AAAA,MACV,CAAC,WAAW,QAAQ;AAAA,MACpB,CAAC,KAAK,EAAE,OAAO,UAAU,SAAS,UAAU,MAAM,OAAO,CAAC;AAAA,IAC5D;AAAA,IACA,aAAa;AAAA,MACX,CAAC,WAAW,QAAQ;AAAA,MACpB,CAAC,KAAK,EAAE,OAAO,UAAU,SAAS,UAAU,MAAM,OAAO,CAAC;AAAA,IAC5D;AAAA,IACA,YAAY;AAAA,MACV,CAAC,cAAc,EAAE;AAAA,MACjB,CAAC,UAAU,SAAS;AAAA,MACpB,CAAC,SAAS,SAAS;AAAA,IACrB;AAAA,EACF;AACF;",
+ "names": []
+}
diff --git a/docs/.vitepress/cache/deps/adaptivecards.js b/docs/.vitepress/cache/deps/adaptivecards.js
new file mode 100644
index 0000000..a3ce1d4
--- /dev/null
+++ b/docs/.vitepress/cache/deps/adaptivecards.js
@@ -0,0 +1,12302 @@
+import {
+ __commonJS
+} from "./chunk-6PJEDKO5.js";
+
+// node_modules/adaptivecards/lib/strings.js
+var require_strings = __commonJS({
+ "node_modules/adaptivecards/lib/strings.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Strings = void 0;
+ var Strings = (
+ /** @class */
+ function() {
+ function Strings2() {
+ }
+ Strings2.errors = {
+ unknownElementType: function(typeName) {
+ return 'Unknown element type "'.concat(typeName, '". Fallback will be used if present.');
+ },
+ unknownActionType: function(typeName) {
+ return 'Unknown action type "'.concat(typeName, '". Fallback will be used if present.');
+ },
+ elementTypeNotAllowed: function(typeName) {
+ return 'Element type "'.concat(typeName, '" is not allowed in this context.');
+ },
+ actionTypeNotAllowed: function(typeName) {
+ return 'Action type "'.concat(typeName, '" is not allowed in this context.');
+ },
+ invalidPropertyValue: function(value, propertyName) {
+ return 'Invalid value "'.concat(value, '" for property "').concat(propertyName, '".');
+ },
+ showCardMustHaveCard: function() {
+ return '"An Action.ShowCard must have its "card" property set to a valid AdaptiveCard object.';
+ },
+ invalidColumnWidth: function(invalidWidth) {
+ return 'Invalid column width "'.concat(invalidWidth, '" - defaulting to "auto".');
+ },
+ invalidCardVersion: function(defaultingToVersion) {
+ return 'Invalid card version. Defaulting to "'.concat(defaultingToVersion, '".');
+ },
+ invalidVersionString: function(versionString) {
+ return 'Invalid version string "'.concat(versionString, '".');
+ },
+ propertyValueNotSupported: function(value, propertyName, supportedInVersion, versionUsed) {
+ return 'Value "'.concat(value, '" for property "').concat(propertyName, '" is supported in version ').concat(supportedInVersion, ", but you are using version ").concat(versionUsed, ".");
+ },
+ propertyNotSupported: function(propertyName, supportedInVersion, versionUsed) {
+ return 'Property "'.concat(propertyName, '" is supported in version ').concat(supportedInVersion, ", but you are using version ").concat(versionUsed, ".");
+ },
+ indexOutOfRange: function(index) {
+ return "Index out of range (".concat(index, ").");
+ },
+ 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(propertyName) {
+ return 'Property "'.concat(propertyName, '" must be set.');
+ },
+ actionHttpHeadersMustHaveNameAndValue: function() {
+ return "All headers of an Action.Http must have their name and value properties set.";
+ },
+ tooManyActions: function(maximumActions) {
+ return "Maximum number of actions exceeded (".concat(maximumActions, ").");
+ },
+ tooLittleTimeDelay: function(minAutoplayDelay) {
+ return "Autoplay Delay is too short (".concat(minAutoplayDelay, ").");
+ },
+ 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(version, maxSupportedVersion) {
+ return "The specified card version (".concat(version, ") is not supported or still in preview. The latest released card version is ").concat(maxSupportedVersion, ".");
+ },
+ duplicateId: function(id) {
+ return 'Duplicate Id "'.concat(id, '".');
+ },
+ 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(typeName) {
+ return "Elements of type ".concat(typeName, " cannot be used as standalone elements.");
+ }
+ };
+ Strings2.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.";
+ }
+ };
+ Strings2.runtime = {
+ automaticRefreshPaused: function() {
+ return "Automatic refresh paused.";
+ },
+ clckToRestartAutomaticRefresh: function() {
+ return "Click to restart.";
+ },
+ refreshThisCard: function() {
+ return "Refresh this card";
+ }
+ };
+ Strings2.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.";
+ }
+ };
+ Strings2.defaults = {
+ inlineActionTitle: function() {
+ return "Inline Action";
+ },
+ overflowButtonText: function() {
+ return "...";
+ },
+ 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";
+ }
+ };
+ return Strings2;
+ }()
+ );
+ exports.Strings = Strings;
+ }
+});
+
+// node_modules/adaptivecards/lib/enums.js
+var require_enums = __commonJS({
+ "node_modules/adaptivecards/lib/enums.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.LogLevel = exports.RefreshMode = exports.TypeErrorType = exports.ContainerFitStatus = exports.ValidationEvent = exports.ValidationPhase = exports.InputTextStyle = exports.ActionIconPlacement = exports.FillMode = exports.Orientation = exports.ShowCardActionMode = exports.ImageStyle = exports.ActionAlignment = exports.VerticalAlignment = exports.HorizontalAlignment = exports.TextColor = exports.Spacing = exports.FontType = exports.TextWeight = exports.TextSize = exports.SizeUnit = exports.ImageSize = exports.Size = exports.ActionMode = exports.ActionStyle = exports.ContainerStyle = void 0;
+ var ContainerStyle = (
+ /** @class */
+ function() {
+ function ContainerStyle2() {
+ }
+ ContainerStyle2.Default = "default";
+ ContainerStyle2.Emphasis = "emphasis";
+ ContainerStyle2.Accent = "accent";
+ ContainerStyle2.Good = "good";
+ ContainerStyle2.Attention = "attention";
+ ContainerStyle2.Warning = "warning";
+ return ContainerStyle2;
+ }()
+ );
+ exports.ContainerStyle = ContainerStyle;
+ var ActionStyle = (
+ /** @class */
+ function() {
+ function ActionStyle2() {
+ }
+ ActionStyle2.Default = "default";
+ ActionStyle2.Positive = "positive";
+ ActionStyle2.Destructive = "destructive";
+ return ActionStyle2;
+ }()
+ );
+ exports.ActionStyle = ActionStyle;
+ var ActionMode = (
+ /** @class */
+ function() {
+ function ActionMode2() {
+ }
+ ActionMode2.Primary = "primary";
+ ActionMode2.Secondary = "secondary";
+ return ActionMode2;
+ }()
+ );
+ exports.ActionMode = ActionMode;
+ var Size;
+ (function(Size2) {
+ Size2[Size2["Auto"] = 0] = "Auto";
+ Size2[Size2["Stretch"] = 1] = "Stretch";
+ Size2[Size2["Small"] = 2] = "Small";
+ Size2[Size2["Medium"] = 3] = "Medium";
+ Size2[Size2["Large"] = 4] = "Large";
+ })(Size = exports.Size || (exports.Size = {}));
+ var ImageSize;
+ (function(ImageSize2) {
+ ImageSize2[ImageSize2["Small"] = 0] = "Small";
+ ImageSize2[ImageSize2["Medium"] = 1] = "Medium";
+ ImageSize2[ImageSize2["Large"] = 2] = "Large";
+ })(ImageSize = exports.ImageSize || (exports.ImageSize = {}));
+ var SizeUnit;
+ (function(SizeUnit2) {
+ SizeUnit2[SizeUnit2["Weight"] = 0] = "Weight";
+ SizeUnit2[SizeUnit2["Pixel"] = 1] = "Pixel";
+ })(SizeUnit = exports.SizeUnit || (exports.SizeUnit = {}));
+ var TextSize;
+ (function(TextSize2) {
+ TextSize2[TextSize2["Small"] = 0] = "Small";
+ TextSize2[TextSize2["Default"] = 1] = "Default";
+ TextSize2[TextSize2["Medium"] = 2] = "Medium";
+ TextSize2[TextSize2["Large"] = 3] = "Large";
+ TextSize2[TextSize2["ExtraLarge"] = 4] = "ExtraLarge";
+ })(TextSize = exports.TextSize || (exports.TextSize = {}));
+ var TextWeight;
+ (function(TextWeight2) {
+ TextWeight2[TextWeight2["Lighter"] = 0] = "Lighter";
+ TextWeight2[TextWeight2["Default"] = 1] = "Default";
+ TextWeight2[TextWeight2["Bolder"] = 2] = "Bolder";
+ })(TextWeight = exports.TextWeight || (exports.TextWeight = {}));
+ var FontType;
+ (function(FontType2) {
+ FontType2[FontType2["Default"] = 0] = "Default";
+ FontType2[FontType2["Monospace"] = 1] = "Monospace";
+ })(FontType = exports.FontType || (exports.FontType = {}));
+ var Spacing;
+ (function(Spacing2) {
+ Spacing2[Spacing2["None"] = 0] = "None";
+ Spacing2[Spacing2["Small"] = 1] = "Small";
+ Spacing2[Spacing2["Default"] = 2] = "Default";
+ Spacing2[Spacing2["Medium"] = 3] = "Medium";
+ Spacing2[Spacing2["Large"] = 4] = "Large";
+ Spacing2[Spacing2["ExtraLarge"] = 5] = "ExtraLarge";
+ Spacing2[Spacing2["Padding"] = 6] = "Padding";
+ })(Spacing = exports.Spacing || (exports.Spacing = {}));
+ var TextColor;
+ (function(TextColor2) {
+ TextColor2[TextColor2["Default"] = 0] = "Default";
+ TextColor2[TextColor2["Dark"] = 1] = "Dark";
+ TextColor2[TextColor2["Light"] = 2] = "Light";
+ TextColor2[TextColor2["Accent"] = 3] = "Accent";
+ TextColor2[TextColor2["Good"] = 4] = "Good";
+ TextColor2[TextColor2["Warning"] = 5] = "Warning";
+ TextColor2[TextColor2["Attention"] = 6] = "Attention";
+ })(TextColor = exports.TextColor || (exports.TextColor = {}));
+ var HorizontalAlignment;
+ (function(HorizontalAlignment2) {
+ HorizontalAlignment2[HorizontalAlignment2["Left"] = 0] = "Left";
+ HorizontalAlignment2[HorizontalAlignment2["Center"] = 1] = "Center";
+ HorizontalAlignment2[HorizontalAlignment2["Right"] = 2] = "Right";
+ })(HorizontalAlignment = exports.HorizontalAlignment || (exports.HorizontalAlignment = {}));
+ var VerticalAlignment;
+ (function(VerticalAlignment2) {
+ VerticalAlignment2[VerticalAlignment2["Top"] = 0] = "Top";
+ VerticalAlignment2[VerticalAlignment2["Center"] = 1] = "Center";
+ VerticalAlignment2[VerticalAlignment2["Bottom"] = 2] = "Bottom";
+ })(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {}));
+ var ActionAlignment;
+ (function(ActionAlignment2) {
+ ActionAlignment2[ActionAlignment2["Left"] = 0] = "Left";
+ ActionAlignment2[ActionAlignment2["Center"] = 1] = "Center";
+ ActionAlignment2[ActionAlignment2["Right"] = 2] = "Right";
+ ActionAlignment2[ActionAlignment2["Stretch"] = 3] = "Stretch";
+ })(ActionAlignment = exports.ActionAlignment || (exports.ActionAlignment = {}));
+ var ImageStyle;
+ (function(ImageStyle2) {
+ ImageStyle2[ImageStyle2["Default"] = 0] = "Default";
+ ImageStyle2[ImageStyle2["Person"] = 1] = "Person";
+ })(ImageStyle = exports.ImageStyle || (exports.ImageStyle = {}));
+ var ShowCardActionMode;
+ (function(ShowCardActionMode2) {
+ ShowCardActionMode2[ShowCardActionMode2["Inline"] = 0] = "Inline";
+ ShowCardActionMode2[ShowCardActionMode2["Popup"] = 1] = "Popup";
+ })(ShowCardActionMode = exports.ShowCardActionMode || (exports.ShowCardActionMode = {}));
+ var Orientation;
+ (function(Orientation2) {
+ Orientation2[Orientation2["Horizontal"] = 0] = "Horizontal";
+ Orientation2[Orientation2["Vertical"] = 1] = "Vertical";
+ })(Orientation = exports.Orientation || (exports.Orientation = {}));
+ var FillMode;
+ (function(FillMode2) {
+ FillMode2[FillMode2["Cover"] = 0] = "Cover";
+ FillMode2[FillMode2["RepeatHorizontally"] = 1] = "RepeatHorizontally";
+ FillMode2[FillMode2["RepeatVertically"] = 2] = "RepeatVertically";
+ FillMode2[FillMode2["Repeat"] = 3] = "Repeat";
+ })(FillMode = exports.FillMode || (exports.FillMode = {}));
+ var ActionIconPlacement;
+ (function(ActionIconPlacement2) {
+ ActionIconPlacement2[ActionIconPlacement2["LeftOfTitle"] = 0] = "LeftOfTitle";
+ ActionIconPlacement2[ActionIconPlacement2["AboveTitle"] = 1] = "AboveTitle";
+ })(ActionIconPlacement = exports.ActionIconPlacement || (exports.ActionIconPlacement = {}));
+ var InputTextStyle;
+ (function(InputTextStyle2) {
+ InputTextStyle2[InputTextStyle2["Text"] = 0] = "Text";
+ InputTextStyle2[InputTextStyle2["Tel"] = 1] = "Tel";
+ InputTextStyle2[InputTextStyle2["Url"] = 2] = "Url";
+ InputTextStyle2[InputTextStyle2["Email"] = 3] = "Email";
+ InputTextStyle2[InputTextStyle2["Password"] = 4] = "Password";
+ })(InputTextStyle = exports.InputTextStyle || (exports.InputTextStyle = {}));
+ var ValidationPhase;
+ (function(ValidationPhase2) {
+ ValidationPhase2[ValidationPhase2["Parse"] = 0] = "Parse";
+ ValidationPhase2[ValidationPhase2["ToJSON"] = 1] = "ToJSON";
+ ValidationPhase2[ValidationPhase2["Validation"] = 2] = "Validation";
+ })(ValidationPhase = exports.ValidationPhase || (exports.ValidationPhase = {}));
+ var ValidationEvent;
+ (function(ValidationEvent2) {
+ ValidationEvent2[ValidationEvent2["Hint"] = 0] = "Hint";
+ ValidationEvent2[ValidationEvent2["ActionTypeNotAllowed"] = 1] = "ActionTypeNotAllowed";
+ ValidationEvent2[ValidationEvent2["CollectionCantBeEmpty"] = 2] = "CollectionCantBeEmpty";
+ ValidationEvent2[ValidationEvent2["Deprecated"] = 3] = "Deprecated";
+ ValidationEvent2[ValidationEvent2["ElementTypeNotAllowed"] = 4] = "ElementTypeNotAllowed";
+ ValidationEvent2[ValidationEvent2["InteractivityNotAllowed"] = 5] = "InteractivityNotAllowed";
+ ValidationEvent2[ValidationEvent2["InvalidPropertyValue"] = 6] = "InvalidPropertyValue";
+ ValidationEvent2[ValidationEvent2["MissingCardType"] = 7] = "MissingCardType";
+ ValidationEvent2[ValidationEvent2["PropertyCantBeNull"] = 8] = "PropertyCantBeNull";
+ ValidationEvent2[ValidationEvent2["TooManyActions"] = 9] = "TooManyActions";
+ ValidationEvent2[ValidationEvent2["UnknownActionType"] = 10] = "UnknownActionType";
+ ValidationEvent2[ValidationEvent2["UnknownElementType"] = 11] = "UnknownElementType";
+ ValidationEvent2[ValidationEvent2["UnsupportedCardVersion"] = 12] = "UnsupportedCardVersion";
+ ValidationEvent2[ValidationEvent2["DuplicateId"] = 13] = "DuplicateId";
+ ValidationEvent2[ValidationEvent2["UnsupportedProperty"] = 14] = "UnsupportedProperty";
+ ValidationEvent2[ValidationEvent2["RequiredInputsShouldHaveLabel"] = 15] = "RequiredInputsShouldHaveLabel";
+ ValidationEvent2[ValidationEvent2["RequiredInputsShouldHaveErrorMessage"] = 16] = "RequiredInputsShouldHaveErrorMessage";
+ ValidationEvent2[ValidationEvent2["Other"] = 17] = "Other";
+ })(ValidationEvent = exports.ValidationEvent || (exports.ValidationEvent = {}));
+ var ContainerFitStatus;
+ (function(ContainerFitStatus2) {
+ ContainerFitStatus2[ContainerFitStatus2["FullyInContainer"] = 0] = "FullyInContainer";
+ ContainerFitStatus2[ContainerFitStatus2["Overflowing"] = 1] = "Overflowing";
+ ContainerFitStatus2[ContainerFitStatus2["FullyOutOfContainer"] = 2] = "FullyOutOfContainer";
+ })(ContainerFitStatus = exports.ContainerFitStatus || (exports.ContainerFitStatus = {}));
+ var TypeErrorType;
+ (function(TypeErrorType2) {
+ TypeErrorType2[TypeErrorType2["UnknownType"] = 0] = "UnknownType";
+ TypeErrorType2[TypeErrorType2["ForbiddenType"] = 1] = "ForbiddenType";
+ })(TypeErrorType = exports.TypeErrorType || (exports.TypeErrorType = {}));
+ var RefreshMode;
+ (function(RefreshMode2) {
+ RefreshMode2[RefreshMode2["Disabled"] = 0] = "Disabled";
+ RefreshMode2[RefreshMode2["Manual"] = 1] = "Manual";
+ RefreshMode2[RefreshMode2["Automatic"] = 2] = "Automatic";
+ })(RefreshMode = exports.RefreshMode || (exports.RefreshMode = {}));
+ var LogLevel;
+ (function(LogLevel2) {
+ LogLevel2[LogLevel2["Info"] = 0] = "Info";
+ LogLevel2[LogLevel2["Warning"] = 1] = "Warning";
+ LogLevel2[LogLevel2["Error"] = 2] = "Error";
+ })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
+ }
+});
+
+// node_modules/adaptivecards/lib/shared.js
+var require_shared = __commonJS({
+ "node_modules/adaptivecards/lib/shared.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.UUID = exports.SizeAndUnit = exports.PaddingDefinition = exports.SpacingDefinition = exports.StringWithSubstitutions = exports.ContentTypes = exports.GlobalSettings = void 0;
+ var Enums = require_enums();
+ var GlobalSettings = (
+ /** @class */
+ function() {
+ function GlobalSettings2() {
+ }
+ GlobalSettings2.useAdvancedTextBlockTruncation = true;
+ GlobalSettings2.useAdvancedCardBottomTruncation = false;
+ GlobalSettings2.useMarkdownInRadioButtonAndCheckbox = true;
+ GlobalSettings2.allowMarkForTextHighlighting = false;
+ GlobalSettings2.alwaysBleedSeparators = false;
+ GlobalSettings2.enableFullJsonRoundTrip = false;
+ GlobalSettings2.displayInputValidationErrors = true;
+ GlobalSettings2.allowPreProcessingPropertyValues = false;
+ GlobalSettings2.setTabIndexAtCardRoot = true;
+ GlobalSettings2.enableFallback = true;
+ GlobalSettings2.useWebkitLineClamp = true;
+ GlobalSettings2.allowMoreThanMaxActionsInOverflowMenu = false;
+ GlobalSettings2.removePaddingFromContainersWithBackgroundImage = false;
+ GlobalSettings2.resetInputsDirtyStateAfterActionExecution = true;
+ GlobalSettings2.applets = {
+ logEnabled: true,
+ logLevel: Enums.LogLevel.Error,
+ maximumRetryAttempts: 3,
+ defaultTimeBetweenRetryAttempts: 3e3,
+ authPromptWidth: 400,
+ authPromptHeight: 600,
+ refresh: {
+ mode: Enums.RefreshMode.Manual,
+ timeBetweenAutomaticRefreshes: 3e3,
+ maximumConsecutiveAutomaticRefreshes: 3,
+ allowManualRefreshesAfterAutomaticRefreshes: true
+ }
+ };
+ return GlobalSettings2;
+ }()
+ );
+ exports.GlobalSettings = GlobalSettings;
+ exports.ContentTypes = {
+ applicationJson: "application/json",
+ applicationXWwwFormUrlencoded: "application/x-www-form-urlencoded"
+ };
+ var StringWithSubstitutions = (
+ /** @class */
+ function() {
+ function StringWithSubstitutions2() {
+ this._isProcessed = false;
+ }
+ StringWithSubstitutions2.prototype.getReferencedInputs = function(inputs, referencedInputs) {
+ if (!referencedInputs) {
+ throw new Error("The referencedInputs parameter cannot be null.");
+ }
+ if (this._original) {
+ for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {
+ var input = inputs_1[_i];
+ var matches = new RegExp("\\{{2}(" + input.id + ").value\\}{2}", "gi").exec(this._original);
+ if (matches != null && input.id) {
+ referencedInputs[input.id] = input;
+ }
+ }
+ }
+ };
+ StringWithSubstitutions2.prototype.substituteInputValues = function(inputs, contentType) {
+ this._processed = this._original;
+ if (this._original) {
+ var regEx = /\{{2}([a-z0-9_$@]+).value\}{2}/gi;
+ var matches = void 0;
+ while ((matches = regEx.exec(this._original)) !== null && this._processed) {
+ for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {
+ var key = _a[_i];
+ if (key.toLowerCase() === matches[1].toLowerCase()) {
+ var matchedInput = inputs[key];
+ var valueForReplace = "";
+ if (matchedInput.value) {
+ valueForReplace = matchedInput.value;
+ }
+ if (contentType === exports.ContentTypes.applicationJson) {
+ valueForReplace = JSON.stringify(valueForReplace);
+ valueForReplace = valueForReplace.slice(1, -1);
+ } else if (contentType === exports.ContentTypes.applicationXWwwFormUrlencoded) {
+ valueForReplace = encodeURIComponent(valueForReplace);
+ }
+ this._processed = this._processed.replace(matches[0], valueForReplace);
+ break;
+ }
+ }
+ }
+ }
+ this._isProcessed = true;
+ };
+ StringWithSubstitutions2.prototype.getOriginal = function() {
+ return this._original;
+ };
+ StringWithSubstitutions2.prototype.get = function() {
+ if (!this._isProcessed) {
+ return this._original;
+ } else {
+ return this._processed;
+ }
+ };
+ StringWithSubstitutions2.prototype.set = function(value) {
+ this._original = value;
+ this._isProcessed = false;
+ };
+ return StringWithSubstitutions2;
+ }()
+ );
+ exports.StringWithSubstitutions = StringWithSubstitutions;
+ var SpacingDefinition = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function SpacingDefinition2(top, right, bottom, left) {
+ if (top === void 0) {
+ top = 0;
+ }
+ if (right === void 0) {
+ right = 0;
+ }
+ if (bottom === void 0) {
+ bottom = 0;
+ }
+ if (left === void 0) {
+ left = 0;
+ }
+ this.left = 0;
+ this.top = 0;
+ this.right = 0;
+ this.bottom = 0;
+ this.top = top;
+ this.right = right;
+ this.bottom = bottom;
+ this.left = left;
+ }
+ return SpacingDefinition2;
+ }()
+ );
+ exports.SpacingDefinition = SpacingDefinition;
+ var PaddingDefinition = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function PaddingDefinition2(top, right, bottom, left) {
+ if (top === void 0) {
+ top = Enums.Spacing.None;
+ }
+ if (right === void 0) {
+ right = Enums.Spacing.None;
+ }
+ if (bottom === void 0) {
+ bottom = Enums.Spacing.None;
+ }
+ if (left === void 0) {
+ left = Enums.Spacing.None;
+ }
+ this.top = Enums.Spacing.None;
+ this.right = Enums.Spacing.None;
+ this.bottom = Enums.Spacing.None;
+ this.left = Enums.Spacing.None;
+ this.top = top;
+ this.right = right;
+ this.bottom = bottom;
+ this.left = left;
+ }
+ return PaddingDefinition2;
+ }()
+ );
+ exports.PaddingDefinition = PaddingDefinition;
+ var SizeAndUnit = (
+ /** @class */
+ function() {
+ function SizeAndUnit2(physicalSize, unit) {
+ this.physicalSize = physicalSize;
+ this.unit = unit;
+ }
+ SizeAndUnit2.parse = function(input, requireUnitSpecifier) {
+ if (requireUnitSpecifier === void 0) {
+ requireUnitSpecifier = false;
+ }
+ var result = new SizeAndUnit2(0, Enums.SizeUnit.Weight);
+ if (typeof input === "number") {
+ result.physicalSize = input;
+ return result;
+ } else if (typeof input === "string") {
+ var regExp = /^([0-9]+)(px|\*)?$/g;
+ var matches = regExp.exec(input);
+ var expectedMatchCount = requireUnitSpecifier ? 3 : 2;
+ if (matches && matches.length >= expectedMatchCount) {
+ result.physicalSize = parseInt(matches[1]);
+ if (matches.length === 3) {
+ if (matches[2] === "px") {
+ result.unit = Enums.SizeUnit.Pixel;
+ }
+ }
+ return result;
+ }
+ }
+ throw new Error("Invalid size: " + input);
+ };
+ return SizeAndUnit2;
+ }()
+ );
+ exports.SizeAndUnit = SizeAndUnit;
+ var UUID = (
+ /** @class */
+ function() {
+ function UUID2() {
+ }
+ UUID2.generate = function() {
+ var d0 = Math.random() * 4294967295 | 0;
+ var d1 = Math.random() * 4294967295 | 0;
+ var d2 = Math.random() * 4294967295 | 0;
+ var d3 = Math.random() * 4294967295 | 0;
+ return UUID2.lut[d0 & 255] + UUID2.lut[d0 >> 8 & 255] + UUID2.lut[d0 >> 16 & 255] + UUID2.lut[d0 >> 24 & 255] + "-" + UUID2.lut[d1 & 255] + UUID2.lut[d1 >> 8 & 255] + "-" + UUID2.lut[d1 >> 16 & 15 | 64] + UUID2.lut[d1 >> 24 & 255] + "-" + UUID2.lut[d2 & 63 | 128] + UUID2.lut[d2 >> 8 & 255] + "-" + UUID2.lut[d2 >> 16 & 255] + UUID2.lut[d2 >> 24 & 255] + UUID2.lut[d3 & 255] + UUID2.lut[d3 >> 8 & 255] + UUID2.lut[d3 >> 16 & 255] + UUID2.lut[d3 >> 24 & 255];
+ };
+ UUID2.initialize = function() {
+ for (var i = 0; i < 256; i++) {
+ UUID2.lut[i] = (i < 16 ? "0" : "") + i.toString(16);
+ }
+ };
+ UUID2.lut = [];
+ return UUID2;
+ }()
+ );
+ exports.UUID = UUID;
+ UUID.initialize();
+ }
+});
+
+// node_modules/adaptivecards/lib/utils.js
+var require_utils = __commonJS({
+ "node_modules/adaptivecards/lib/utils.js"(exports) {
+ "use strict";
+ var _a;
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.clearElementChildren = exports.getScrollY = exports.getScrollX = exports.getFitStatus = exports.truncate = exports.truncateText = exports.stringToCssColor = exports.parseEnum = exports.getEnumValueByName = exports.parseBool = exports.parseNumber = exports.parseString = exports.appendChild = exports.generateUniqueId = exports.isMobileOS = exports.isInternetExplorer = void 0;
+ var Enums = require_enums();
+ var Shared = require_shared();
+ function isInternetExplorer() {
+ return window.document.documentMode !== void 0;
+ }
+ exports.isInternetExplorer = isInternetExplorer;
+ function isMobileOS() {
+ var userAgent = window.navigator.userAgent;
+ return !!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i);
+ }
+ exports.isMobileOS = isMobileOS;
+ function generateUniqueId() {
+ return "__ac-" + Shared.UUID.generate();
+ }
+ exports.generateUniqueId = generateUniqueId;
+ function appendChild(node, child) {
+ if (child) {
+ node.appendChild(child);
+ }
+ }
+ exports.appendChild = appendChild;
+ function parseString(obj, defaultValue) {
+ return typeof obj === "string" ? obj : defaultValue;
+ }
+ exports.parseString = parseString;
+ function parseNumber(obj, defaultValue) {
+ return typeof obj === "number" ? obj : defaultValue;
+ }
+ exports.parseNumber = parseNumber;
+ function parseBool(value, defaultValue) {
+ if (typeof value === "boolean") {
+ return value;
+ } else if (typeof value === "string") {
+ switch (value.toLowerCase()) {
+ case "true":
+ return true;
+ case "false":
+ return false;
+ default:
+ return defaultValue;
+ }
+ }
+ return defaultValue;
+ }
+ exports.parseBool = parseBool;
+ function getEnumValueByName(enumType, name) {
+ for (var key in enumType) {
+ var keyAsNumber = parseInt(key, 10);
+ if (keyAsNumber >= 0) {
+ var value = enumType[key];
+ if (value && typeof value === "string" && value.toLowerCase() === name.toLowerCase()) {
+ return keyAsNumber;
+ }
+ }
+ }
+ return void 0;
+ }
+ exports.getEnumValueByName = getEnumValueByName;
+ function parseEnum(enumType, name, defaultValue) {
+ if (!name) {
+ return defaultValue;
+ }
+ var enumValue = getEnumValueByName(enumType, name);
+ return enumValue !== void 0 ? enumValue : defaultValue;
+ }
+ exports.parseEnum = parseEnum;
+ function stringToCssColor(color) {
+ if (color) {
+ var regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;
+ var matches = regEx.exec(color);
+ if (matches && matches[4]) {
+ var a = parseInt(matches[1], 16) / 255;
+ var r = parseInt(matches[2], 16);
+ var g = parseInt(matches[3], 16);
+ var b = parseInt(matches[4], 16);
+ return "rgba(" + r + "," + g + "," + b + "," + a + ")";
+ }
+ }
+ return color;
+ }
+ exports.stringToCssColor = stringToCssColor;
+ function truncateWorker(element, maxHeight, fullText, truncateAt, lineHeight) {
+ var fits = function() {
+ return maxHeight - element.scrollHeight >= -1;
+ };
+ if (fits()) {
+ return;
+ }
+ var breakableIndices = findBreakableIndices(fullText);
+ var lo = 0;
+ var hi = breakableIndices.length;
+ var bestBreakIdx = 0;
+ while (lo < hi) {
+ var mid = Math.floor((lo + hi) / 2);
+ truncateAt(fullText, breakableIndices[mid]);
+ if (fits()) {
+ bestBreakIdx = breakableIndices[mid];
+ lo = mid + 1;
+ } else {
+ hi = mid;
+ }
+ }
+ truncateAt(fullText, bestBreakIdx);
+ if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1) {
+ var idx = findNextCharacter(fullText, bestBreakIdx);
+ while (idx < fullText.length) {
+ truncateAt(fullText, idx);
+ if (fits()) {
+ bestBreakIdx = idx;
+ idx = findNextCharacter(fullText, idx);
+ } else {
+ break;
+ }
+ }
+ truncateAt(fullText, bestBreakIdx);
+ }
+ }
+ function truncateText(element, maxHeight, lineHeight) {
+ truncateWorker(element, maxHeight, element.innerText, function(text, idx) {
+ element.innerText = text.substring(0, idx) + "...";
+ }, lineHeight);
+ }
+ exports.truncateText = truncateText;
+ var ttDeprecatedPolicy = typeof window === "undefined" ? void 0 : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy("adaptivecards#deprecatedExportedFunctionPolicy", {
+ createHTML: function(value) {
+ return value;
+ }
+ });
+ function truncate(element, maxHeight, lineHeight) {
+ truncateWorker(element, maxHeight, element.innerHTML, function(text, idx) {
+ var _a2;
+ var truncatedString = text.substring(0, idx) + "...";
+ var truncatedHTML = (_a2 = ttDeprecatedPolicy === null || ttDeprecatedPolicy === void 0 ? void 0 : ttDeprecatedPolicy.createHTML(truncatedString)) !== null && _a2 !== void 0 ? _a2 : truncatedString;
+ element.innerHTML = truncatedHTML;
+ }, lineHeight);
+ }
+ exports.truncate = truncate;
+ function findBreakableIndices(html) {
+ var results = [];
+ var idx = findNextCharacter(html, -1);
+ while (idx < html.length) {
+ if (html[idx] === " ") {
+ results.push(idx);
+ }
+ idx = findNextCharacter(html, idx);
+ }
+ return results;
+ }
+ function findNextCharacter(html, currIdx) {
+ currIdx += 1;
+ while (currIdx < html.length && html[currIdx] === "<") {
+ while (currIdx < html.length && html[currIdx++] !== ">") {
+ continue;
+ }
+ }
+ return currIdx;
+ }
+ function getFitStatus(element, containerEnd) {
+ var start = element.offsetTop;
+ var end = start + element.clientHeight;
+ if (end <= containerEnd) {
+ return Enums.ContainerFitStatus.FullyInContainer;
+ } else if (start < containerEnd) {
+ return Enums.ContainerFitStatus.Overflowing;
+ } else {
+ return Enums.ContainerFitStatus.FullyOutOfContainer;
+ }
+ }
+ exports.getFitStatus = getFitStatus;
+ function getScrollX() {
+ return window.pageXOffset;
+ }
+ exports.getScrollX = getScrollX;
+ function getScrollY() {
+ return window.pageYOffset;
+ }
+ exports.getScrollY = getScrollY;
+ function clearElementChildren(element) {
+ while (element.firstChild) {
+ element.removeChild(element.firstChild);
+ }
+ }
+ exports.clearElementChildren = clearElementChildren;
+ }
+});
+
+// node_modules/adaptivecards/lib/serialization.js
+var require_serialization = __commonJS({
+ "node_modules/adaptivecards/lib/serialization.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.SerializableObject = exports.property = exports.SerializableObjectSchema = exports.CustomProperty = exports.SerializableObjectCollectionProperty = exports.SerializableObjectProperty = exports.EnumProperty = exports.ValueSetProperty = exports.StringArrayProperty = exports.PixelSizeProperty = exports.NumProperty = exports.BoolProperty = exports.StringProperty = exports.PropertyDefinition = exports.BaseSerializationContext = exports.isVersionLessOrEqual = exports.Versions = exports.Version = void 0;
+ var shared_1 = require_shared();
+ var Utils = require_utils();
+ var Enums = require_enums();
+ var strings_1 = require_strings();
+ var Version = (
+ /** @class */
+ function() {
+ function Version2(major, minor, label) {
+ if (major === void 0) {
+ major = 1;
+ }
+ if (minor === void 0) {
+ minor = 1;
+ }
+ this._isValid = true;
+ this._major = major;
+ this._minor = minor;
+ this._label = label;
+ }
+ Version2.parse = function(versionString, context) {
+ if (!versionString) {
+ return void 0;
+ }
+ var result = new Version2();
+ result._versionString = versionString;
+ var regEx = /(\d+).(\d+)/gi;
+ var matches = regEx.exec(versionString);
+ if (matches != null && matches.length === 3) {
+ result._major = parseInt(matches[1]);
+ result._minor = parseInt(matches[2]);
+ } else {
+ result._isValid = false;
+ }
+ if (!result._isValid) {
+ context.logParseEvent(void 0, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidVersionString(result._versionString));
+ }
+ return result;
+ };
+ Version2.prototype.toString = function() {
+ return !this._isValid ? this._versionString : this._major + "." + this._minor;
+ };
+ Version2.prototype.toJSON = function() {
+ return this.toString();
+ };
+ Version2.prototype.compareTo = function(otherVersion) {
+ if (!this.isValid || !otherVersion.isValid) {
+ throw new Error("Cannot compare invalid version.");
+ }
+ if (this.major > otherVersion.major) {
+ return 1;
+ } else if (this.major < otherVersion.major) {
+ return -1;
+ } else if (this.minor > otherVersion.minor) {
+ return 1;
+ } else if (this.minor < otherVersion.minor) {
+ return -1;
+ }
+ return 0;
+ };
+ Object.defineProperty(Version2.prototype, "label", {
+ get: function() {
+ return this._label ? this._label : this.toString();
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Version2.prototype, "major", {
+ get: function() {
+ return this._major;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Version2.prototype, "minor", {
+ get: function() {
+ return this._minor;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Version2.prototype, "isValid", {
+ get: function() {
+ return this._isValid;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return Version2;
+ }()
+ );
+ exports.Version = Version;
+ var Versions = (
+ /** @class */
+ function() {
+ function Versions2() {
+ }
+ Versions2.getAllDeclaredVersions = function() {
+ var ctor = Versions2;
+ var properties = [];
+ for (var propertyName in ctor) {
+ if (propertyName.match(/^v[0-9_]*$/)) {
+ try {
+ var propertyValue = ctor[propertyName];
+ if (propertyValue instanceof Version) {
+ properties.push(propertyValue);
+ }
+ } catch (_a) {
+ }
+ }
+ }
+ return properties.sort(function(v1, v2) {
+ return v1.compareTo(v2);
+ });
+ };
+ Versions2.v1_0 = new Version(1, 0);
+ Versions2.v1_1 = new Version(1, 1);
+ Versions2.v1_2 = new Version(1, 2);
+ Versions2.v1_3 = new Version(1, 3);
+ Versions2.v1_4 = new Version(1, 4);
+ Versions2.v1_5 = new Version(1, 5);
+ Versions2.v1_6 = new Version(1, 6, "1.6 Preview");
+ Versions2.latest = Versions2.v1_5;
+ return Versions2;
+ }()
+ );
+ exports.Versions = Versions;
+ function isVersionLessOrEqual(version, targetVersion) {
+ if (version instanceof Version) {
+ if (targetVersion instanceof Version) {
+ return targetVersion.compareTo(version) >= 0;
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ }
+ exports.isVersionLessOrEqual = isVersionLessOrEqual;
+ var BaseSerializationContext = (
+ /** @class */
+ function() {
+ function BaseSerializationContext2(targetVersion) {
+ if (targetVersion === void 0) {
+ targetVersion = Versions.latest;
+ }
+ this._validationEvents = [];
+ this.targetVersion = targetVersion;
+ }
+ BaseSerializationContext2.prototype.serializeValue = function(target, propertyName, propertyValue, defaultValue, forceDeleteIfNullOrDefault) {
+ if (defaultValue === void 0) {
+ defaultValue = void 0;
+ }
+ if (forceDeleteIfNullOrDefault === void 0) {
+ forceDeleteIfNullOrDefault = false;
+ }
+ if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) {
+ if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {
+ delete target[propertyName];
+ }
+ } else if (propertyValue === defaultValue) {
+ delete target[propertyName];
+ } else {
+ target[propertyName] = propertyValue;
+ }
+ };
+ BaseSerializationContext2.prototype.serializeString = function(target, propertyName, propertyValue, defaultValue) {
+ if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) {
+ if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) {
+ delete target[propertyName];
+ }
+ } else {
+ target[propertyName] = propertyValue;
+ }
+ };
+ BaseSerializationContext2.prototype.serializeBool = function(target, propertyName, propertyValue, defaultValue) {
+ if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) {
+ if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) {
+ delete target[propertyName];
+ }
+ } else {
+ target[propertyName] = propertyValue;
+ }
+ };
+ BaseSerializationContext2.prototype.serializeNumber = function(target, propertyName, propertyValue, defaultValue) {
+ if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue || isNaN(propertyValue)) {
+ if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) {
+ delete target[propertyName];
+ }
+ } else {
+ target[propertyName] = propertyValue;
+ }
+ };
+ BaseSerializationContext2.prototype.serializeEnum = function(enumType, target, propertyName, propertyValue, defaultValue) {
+ if (defaultValue === void 0) {
+ defaultValue = void 0;
+ }
+ if (propertyValue === null || propertyValue === void 0 || propertyValue === defaultValue) {
+ if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) {
+ delete target[propertyName];
+ }
+ } else {
+ target[propertyName] = enumType[propertyValue];
+ }
+ };
+ BaseSerializationContext2.prototype.serializeArray = function(target, propertyName, propertyValue) {
+ var items = [];
+ if (propertyValue) {
+ for (var _i = 0, propertyValue_1 = propertyValue; _i < propertyValue_1.length; _i++) {
+ var item = propertyValue_1[_i];
+ var serializedItem = void 0;
+ if (item instanceof SerializableObject) {
+ serializedItem = item.toJSON(this);
+ } else if (item.toJSON) {
+ serializedItem = item.toJSON();
+ } else {
+ serializedItem = item;
+ }
+ if (serializedItem !== void 0) {
+ items.push(serializedItem);
+ }
+ }
+ }
+ if (items.length === 0) {
+ if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {
+ delete target[propertyName];
+ }
+ } else {
+ this.serializeValue(target, propertyName, items);
+ }
+ };
+ BaseSerializationContext2.prototype.clearEvents = function() {
+ this._validationEvents = [];
+ };
+ BaseSerializationContext2.prototype.logEvent = function(source, phase, event, message) {
+ this._validationEvents.push({
+ source,
+ phase,
+ event,
+ message
+ });
+ };
+ BaseSerializationContext2.prototype.logParseEvent = function(source, event, message) {
+ this.logEvent(source, Enums.ValidationPhase.Parse, event, message);
+ };
+ BaseSerializationContext2.prototype.getEventAt = function(index) {
+ return this._validationEvents[index];
+ };
+ Object.defineProperty(BaseSerializationContext2.prototype, "eventCount", {
+ get: function() {
+ return this._validationEvents.length;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return BaseSerializationContext2;
+ }()
+ );
+ exports.BaseSerializationContext = BaseSerializationContext;
+ var SimpleSerializationContext = (
+ /** @class */
+ function(_super) {
+ __extends(SimpleSerializationContext2, _super);
+ function SimpleSerializationContext2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ return SimpleSerializationContext2;
+ }(BaseSerializationContext)
+ );
+ var PropertyDefinition = (
+ /** @class */
+ function() {
+ function PropertyDefinition2(targetVersion, name, defaultValue, onGetInitialValue) {
+ this.targetVersion = targetVersion;
+ this.name = name;
+ this.defaultValue = defaultValue;
+ this.onGetInitialValue = onGetInitialValue;
+ this.isSerializationEnabled = true;
+ this.sequentialNumber = PropertyDefinition2._sequentialNumber;
+ PropertyDefinition2._sequentialNumber++;
+ }
+ PropertyDefinition2.prototype.getInternalName = function() {
+ return this.name;
+ };
+ PropertyDefinition2.prototype.parse = function(sender, source, context) {
+ return source[this.name];
+ };
+ PropertyDefinition2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeValue(target, this.name, value, this.defaultValue);
+ };
+ PropertyDefinition2._sequentialNumber = 0;
+ return PropertyDefinition2;
+ }()
+ );
+ exports.PropertyDefinition = PropertyDefinition;
+ var StringProperty = (
+ /** @class */
+ function(_super) {
+ __extends(StringProperty2, _super);
+ function StringProperty2(targetVersion, name, treatEmptyAsUndefined, regEx, defaultValue, onGetInitialValue) {
+ if (treatEmptyAsUndefined === void 0) {
+ treatEmptyAsUndefined = true;
+ }
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.treatEmptyAsUndefined = treatEmptyAsUndefined;
+ _this.regEx = regEx;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ return _this;
+ }
+ StringProperty2.prototype.parse = function(sender, source, context) {
+ var parsedValue = Utils.parseString(source[this.name], this.defaultValue);
+ var isUndefined = parsedValue === void 0 || parsedValue === "" && this.treatEmptyAsUndefined;
+ if (!isUndefined && this.regEx !== void 0) {
+ var matches = this.regEx.exec(parsedValue);
+ if (!matches) {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(parsedValue, this.name));
+ return void 0;
+ }
+ }
+ return parsedValue;
+ };
+ StringProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeString(target, this.name, value === "" && this.treatEmptyAsUndefined ? void 0 : value, this.defaultValue);
+ };
+ return StringProperty2;
+ }(PropertyDefinition)
+ );
+ exports.StringProperty = StringProperty;
+ var BoolProperty = (
+ /** @class */
+ function(_super) {
+ __extends(BoolProperty2, _super);
+ function BoolProperty2(targetVersion, name, defaultValue, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ return _this;
+ }
+ BoolProperty2.prototype.parse = function(sender, source, context) {
+ return Utils.parseBool(source[this.name], this.defaultValue);
+ };
+ BoolProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeBool(target, this.name, value, this.defaultValue);
+ };
+ return BoolProperty2;
+ }(PropertyDefinition)
+ );
+ exports.BoolProperty = BoolProperty;
+ var NumProperty = (
+ /** @class */
+ function(_super) {
+ __extends(NumProperty2, _super);
+ function NumProperty2(targetVersion, name, defaultValue, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ return _this;
+ }
+ NumProperty2.prototype.parse = function(sender, source, context) {
+ return Utils.parseNumber(source[this.name], this.defaultValue);
+ };
+ NumProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeNumber(target, this.name, value, this.defaultValue);
+ };
+ return NumProperty2;
+ }(PropertyDefinition)
+ );
+ exports.NumProperty = NumProperty;
+ var PixelSizeProperty = (
+ /** @class */
+ function(_super) {
+ __extends(PixelSizeProperty2, _super);
+ function PixelSizeProperty2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ PixelSizeProperty2.prototype.parse = function(sender, source, context) {
+ var result = void 0;
+ var value = source[this.name];
+ if (typeof value === "string") {
+ var isValid = false;
+ try {
+ var size = shared_1.SizeAndUnit.parse(value, true);
+ if (size.unit === Enums.SizeUnit.Pixel) {
+ result = size.physicalSize;
+ isValid = true;
+ }
+ } catch (_a) {
+ }
+ if (!isValid) {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(source[this.name], "minHeight"));
+ }
+ }
+ return result;
+ };
+ PixelSizeProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeValue(target, this.name, typeof value === "number" && !isNaN(value) ? value + "px" : void 0);
+ };
+ return PixelSizeProperty2;
+ }(PropertyDefinition)
+ );
+ exports.PixelSizeProperty = PixelSizeProperty;
+ var StringArrayProperty = (
+ /** @class */
+ function(_super) {
+ __extends(StringArrayProperty2, _super);
+ function StringArrayProperty2(targetVersion, name, defaultValue, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ return _this;
+ }
+ StringArrayProperty2.prototype.parse = function(sender, source, context) {
+ var sourceValue = source[this.name];
+ if (sourceValue === void 0 || !Array.isArray(sourceValue)) {
+ return this.defaultValue;
+ }
+ var result = [];
+ for (var _i = 0, sourceValue_1 = sourceValue; _i < sourceValue_1.length; _i++) {
+ var value = sourceValue_1[_i];
+ if (typeof value === "string") {
+ result.push(value);
+ } else {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, 'Invalid array value "'.concat(JSON.stringify(value), '" of type "').concat(typeof value, '" ignored for "').concat(this.name, '".'));
+ }
+ }
+ return result;
+ };
+ StringArrayProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeArray(target, this.name, value);
+ };
+ return StringArrayProperty2;
+ }(PropertyDefinition)
+ );
+ exports.StringArrayProperty = StringArrayProperty;
+ var ValueSetProperty = (
+ /** @class */
+ function(_super) {
+ __extends(ValueSetProperty2, _super);
+ function ValueSetProperty2(targetVersion, name, values, defaultValue, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.values = values;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ return _this;
+ }
+ ValueSetProperty2.prototype.isValidValue = function(value, context) {
+ for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
+ var versionedValue = _a[_i];
+ if (value.toLowerCase() === versionedValue.value.toLowerCase()) {
+ var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;
+ return targetVersion.compareTo(context.targetVersion) <= 0;
+ }
+ }
+ return false;
+ };
+ ValueSetProperty2.prototype.parse = function(sender, source, context) {
+ var sourceValue = source[this.name];
+ if (sourceValue === void 0) {
+ return this.defaultValue;
+ }
+ if (typeof sourceValue === "string") {
+ for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
+ var versionedValue = _a[_i];
+ if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {
+ var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;
+ if (targetVersion.compareTo(context.targetVersion) <= 0) {
+ return versionedValue.value;
+ } else {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));
+ return this.defaultValue;
+ }
+ }
+ }
+ }
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));
+ return this.defaultValue;
+ };
+ ValueSetProperty2.prototype.toJSON = function(sender, target, value, context) {
+ var invalidValue = false;
+ if (value !== void 0) {
+ invalidValue = true;
+ for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
+ var versionedValue = _a[_i];
+ if (versionedValue.value === value) {
+ var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;
+ if (targetVersion.compareTo(context.targetVersion) <= 0) {
+ invalidValue = false;
+ break;
+ } else {
+ context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(value, this.name, targetVersion.toString(), context.targetVersion.toString()));
+ }
+ }
+ }
+ }
+ if (!invalidValue) {
+ context.serializeValue(target, this.name, value, this.defaultValue, true);
+ }
+ };
+ return ValueSetProperty2;
+ }(PropertyDefinition)
+ );
+ exports.ValueSetProperty = ValueSetProperty;
+ var EnumProperty = (
+ /** @class */
+ function(_super) {
+ __extends(EnumProperty2, _super);
+ function EnumProperty2(targetVersion, name, enumType, defaultValue, values, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.enumType = enumType;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ _this._values = [];
+ if (!values) {
+ for (var key in enumType) {
+ var keyAsNumber = parseInt(key, 10);
+ if (keyAsNumber >= 0) {
+ _this._values.push({ value: keyAsNumber });
+ }
+ }
+ } else {
+ _this._values = values;
+ }
+ return _this;
+ }
+ EnumProperty2.prototype.parse = function(sender, source, context) {
+ var sourceValue = source[this.name];
+ if (typeof sourceValue !== "string") {
+ return this.defaultValue;
+ }
+ var enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);
+ if (enumValue !== void 0) {
+ for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
+ var versionedValue = _a[_i];
+ if (versionedValue.value === enumValue) {
+ var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;
+ if (targetVersion.compareTo(context.targetVersion) <= 0) {
+ return enumValue;
+ } else {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));
+ return this.defaultValue;
+ }
+ }
+ }
+ }
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));
+ return this.defaultValue;
+ };
+ EnumProperty2.prototype.toJSON = function(sender, target, value, context) {
+ var invalidValue = false;
+ if (value !== void 0) {
+ invalidValue = true;
+ for (var _i = 0, _a = this.values; _i < _a.length; _i++) {
+ var versionedValue = _a[_i];
+ if (versionedValue.value === value) {
+ var targetVersion = versionedValue.targetVersion ? versionedValue.targetVersion : this.targetVersion;
+ if (targetVersion.compareTo(context.targetVersion) <= 0) {
+ invalidValue = false;
+ break;
+ } else {
+ context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(value, this.name));
+ }
+ }
+ }
+ }
+ if (!invalidValue) {
+ context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);
+ }
+ };
+ Object.defineProperty(EnumProperty2.prototype, "values", {
+ get: function() {
+ return this._values;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return EnumProperty2;
+ }(PropertyDefinition)
+ );
+ exports.EnumProperty = EnumProperty;
+ var SerializableObjectProperty = (
+ /** @class */
+ function(_super) {
+ __extends(SerializableObjectProperty2, _super);
+ function SerializableObjectProperty2(targetVersion, name, objectType, nullable, defaultValue) {
+ if (nullable === void 0) {
+ nullable = false;
+ }
+ var _this = _super.call(this, targetVersion, name, defaultValue, function(sender) {
+ return _this.nullable ? void 0 : new _this.objectType();
+ }) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.objectType = objectType;
+ _this.nullable = nullable;
+ return _this;
+ }
+ SerializableObjectProperty2.prototype.parse = function(sender, source, context) {
+ var sourceValue = source[this.name];
+ if (sourceValue === void 0) {
+ return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;
+ }
+ var result = new this.objectType();
+ result.parse(sourceValue, context);
+ return result;
+ };
+ SerializableObjectProperty2.prototype.toJSON = function(sender, target, value, context) {
+ var serializedValue = void 0;
+ if (value !== void 0 && !value.hasAllDefaultValues()) {
+ serializedValue = value.toJSON(context);
+ }
+ if (typeof serializedValue === "object" && Object.keys(serializedValue).length === 0) {
+ serializedValue = void 0;
+ }
+ context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);
+ };
+ return SerializableObjectProperty2;
+ }(PropertyDefinition)
+ );
+ exports.SerializableObjectProperty = SerializableObjectProperty;
+ var SerializableObjectCollectionProperty = (
+ /** @class */
+ function(_super) {
+ __extends(SerializableObjectCollectionProperty2, _super);
+ function SerializableObjectCollectionProperty2(targetVersion, name, objectType, onItemAdded) {
+ var _this = _super.call(this, targetVersion, name, void 0, function(sender) {
+ return [];
+ }) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.objectType = objectType;
+ _this.onItemAdded = onItemAdded;
+ return _this;
+ }
+ SerializableObjectCollectionProperty2.prototype.parse = function(sender, source, context) {
+ var result = [];
+ var sourceCollection = source[this.name];
+ if (Array.isArray(sourceCollection)) {
+ for (var _i = 0, sourceCollection_1 = sourceCollection; _i < sourceCollection_1.length; _i++) {
+ var sourceItem = sourceCollection_1[_i];
+ var item = new this.objectType();
+ item.parse(sourceItem, context);
+ result.push(item);
+ if (this.onItemAdded) {
+ this.onItemAdded(sender, item);
+ }
+ }
+ }
+ return result.length > 0 ? result : this.onGetInitialValue ? this.onGetInitialValue(sender) : void 0;
+ };
+ SerializableObjectCollectionProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeArray(target, this.name, value);
+ };
+ return SerializableObjectCollectionProperty2;
+ }(PropertyDefinition)
+ );
+ exports.SerializableObjectCollectionProperty = SerializableObjectCollectionProperty;
+ var CustomProperty = (
+ /** @class */
+ function(_super) {
+ __extends(CustomProperty2, _super);
+ function CustomProperty2(targetVersion, name, onParse, onToJSON, defaultValue, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.onParse = onParse;
+ _this.onToJSON = onToJSON;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ if (!_this.onParse) {
+ throw new Error("CustomPropertyDefinition instances must have an onParse handler.");
+ }
+ if (!_this.onToJSON) {
+ throw new Error("CustomPropertyDefinition instances must have an onToJSON handler.");
+ }
+ return _this;
+ }
+ CustomProperty2.prototype.parse = function(sender, source, context) {
+ return this.onParse(sender, this, source, context);
+ };
+ CustomProperty2.prototype.toJSON = function(sender, target, value, context) {
+ this.onToJSON(sender, this, target, value, context);
+ };
+ return CustomProperty2;
+ }(PropertyDefinition)
+ );
+ exports.CustomProperty = CustomProperty;
+ var SerializableObjectSchema = (
+ /** @class */
+ function() {
+ function SerializableObjectSchema2() {
+ this._properties = [];
+ }
+ SerializableObjectSchema2.prototype.indexOf = function(prop) {
+ for (var i = 0; i < this._properties.length; i++) {
+ if (this._properties[i] === prop) {
+ return i;
+ }
+ }
+ return -1;
+ };
+ SerializableObjectSchema2.prototype.add = function() {
+ var properties = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ properties[_i] = arguments[_i];
+ }
+ for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {
+ var prop = properties_1[_a];
+ if (this.indexOf(prop) === -1) {
+ this._properties.push(prop);
+ }
+ }
+ };
+ SerializableObjectSchema2.prototype.remove = function() {
+ var properties = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ properties[_i] = arguments[_i];
+ }
+ for (var _a = 0, properties_2 = properties; _a < properties_2.length; _a++) {
+ var prop = properties_2[_a];
+ while (true) {
+ var index = this.indexOf(prop);
+ if (index >= 0) {
+ this._properties.splice(index, 1);
+ } else {
+ break;
+ }
+ }
+ }
+ };
+ SerializableObjectSchema2.prototype.getItemAt = function(index) {
+ return this._properties[index];
+ };
+ SerializableObjectSchema2.prototype.getCount = function() {
+ return this._properties.length;
+ };
+ return SerializableObjectSchema2;
+ }()
+ );
+ exports.SerializableObjectSchema = SerializableObjectSchema;
+ function property(prop) {
+ return function(target, propertyKey) {
+ var descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};
+ if (!descriptor.get && !descriptor.set) {
+ descriptor.get = function() {
+ return this.getValue(prop);
+ };
+ descriptor.set = function(value) {
+ this.setValue(prop, value);
+ };
+ Object.defineProperty(target, propertyKey, descriptor);
+ }
+ };
+ }
+ exports.property = property;
+ var SerializableObject = (
+ /** @class */
+ function() {
+ function SerializableObject2() {
+ this._propertyBag = {};
+ this._rawProperties = {};
+ this.maxVersion = SerializableObject2.defaultMaxVersion;
+ var s = this.getSchema();
+ for (var i = 0; i < s.getCount(); i++) {
+ var prop = s.getItemAt(i);
+ if (prop.onGetInitialValue) {
+ this.setValue(prop, prop.onGetInitialValue(this));
+ }
+ }
+ }
+ SerializableObject2.prototype.getDefaultSerializationContext = function() {
+ return new SimpleSerializationContext();
+ };
+ SerializableObject2.prototype.populateSchema = function(schema) {
+ var ctor = this.constructor;
+ var properties = [];
+ for (var propertyName in ctor) {
+ try {
+ var propertyValue = ctor[propertyName];
+ if (propertyValue instanceof PropertyDefinition) {
+ properties.push(propertyValue);
+ }
+ } catch (_a) {
+ }
+ }
+ if (properties.length > 0) {
+ var sortedProperties = properties.sort(function(p1, p2) {
+ if (p1.sequentialNumber > p2.sequentialNumber) {
+ return 1;
+ } else if (p1.sequentialNumber < p2.sequentialNumber) {
+ return -1;
+ }
+ return 0;
+ });
+ schema.add.apply(schema, sortedProperties);
+ }
+ if (SerializableObject2.onRegisterCustomProperties) {
+ SerializableObject2.onRegisterCustomProperties(this, schema);
+ }
+ };
+ SerializableObject2.prototype.getValue = function(prop) {
+ return this._propertyBag.hasOwnProperty(prop.getInternalName()) ? this._propertyBag[prop.getInternalName()] : prop.defaultValue;
+ };
+ SerializableObject2.prototype.setValue = function(prop, value) {
+ if (value === void 0 || value === null) {
+ delete this._propertyBag[prop.getInternalName()];
+ } else {
+ this._propertyBag[prop.getInternalName()] = value;
+ }
+ };
+ SerializableObject2.prototype.internalParse = function(source, context) {
+ this._propertyBag = {};
+ this._rawProperties = shared_1.GlobalSettings.enableFullJsonRoundTrip ? source ? source : {} : {};
+ if (source) {
+ var s = this.getSchema();
+ for (var i = 0; i < s.getCount(); i++) {
+ var prop = s.getItemAt(i);
+ if (prop.isSerializationEnabled) {
+ var propertyValue = prop.onGetInitialValue ? prop.onGetInitialValue(this) : void 0;
+ if (source.hasOwnProperty(prop.name)) {
+ if (prop.targetVersion.compareTo(context.targetVersion) <= 0) {
+ propertyValue = prop.parse(this, source, context);
+ } else {
+ context.logParseEvent(this, Enums.ValidationEvent.UnsupportedProperty, strings_1.Strings.errors.propertyNotSupported(prop.name, prop.targetVersion.toString(), context.targetVersion.toString()));
+ }
+ }
+ this.setValue(prop, propertyValue);
+ }
+ }
+ } else {
+ this.resetDefaultValues();
+ }
+ };
+ SerializableObject2.prototype.internalToJSON = function(target, context) {
+ var s = this.getSchema();
+ var serializedProperties = [];
+ for (var i = 0; i < s.getCount(); i++) {
+ var prop = s.getItemAt(i);
+ if (prop.isSerializationEnabled && prop.targetVersion.compareTo(context.targetVersion) <= 0 && serializedProperties.indexOf(prop.name) === -1) {
+ prop.toJSON(this, target, this.getValue(prop), context);
+ serializedProperties.push(prop.name);
+ }
+ }
+ };
+ SerializableObject2.prototype.shouldSerialize = function(_context) {
+ return true;
+ };
+ SerializableObject2.prototype.parse = function(source, context) {
+ this.internalParse(source, context ? context : new SimpleSerializationContext());
+ };
+ SerializableObject2.prototype.toJSON = function(context) {
+ var effectiveContext;
+ if (context && context instanceof BaseSerializationContext) {
+ effectiveContext = context;
+ } else {
+ effectiveContext = this.getDefaultSerializationContext();
+ effectiveContext.toJSONOriginalParam = context;
+ }
+ if (this.shouldSerialize(effectiveContext)) {
+ var result = void 0;
+ if (shared_1.GlobalSettings.enableFullJsonRoundTrip && this._rawProperties && typeof this._rawProperties === "object") {
+ result = this._rawProperties;
+ } else {
+ result = {};
+ }
+ this.internalToJSON(result, effectiveContext);
+ return result;
+ } else {
+ return void 0;
+ }
+ };
+ SerializableObject2.prototype.hasDefaultValue = function(prop) {
+ return this.getValue(prop) === prop.defaultValue;
+ };
+ SerializableObject2.prototype.hasAllDefaultValues = function() {
+ var s = this.getSchema();
+ for (var i = 0; i < s.getCount(); i++) {
+ var prop = s.getItemAt(i);
+ if (!this.hasDefaultValue(prop)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ SerializableObject2.prototype.resetDefaultValues = function() {
+ var s = this.getSchema();
+ for (var i = 0; i < s.getCount(); i++) {
+ var prop = s.getItemAt(i);
+ this.setValue(prop, prop.defaultValue);
+ }
+ };
+ SerializableObject2.prototype.setCustomProperty = function(name, value) {
+ var shouldDeleteProperty = typeof value === "string" && !value || value === void 0 || value === null;
+ if (shouldDeleteProperty) {
+ delete this._rawProperties[name];
+ } else {
+ this._rawProperties[name] = value;
+ }
+ };
+ SerializableObject2.prototype.getCustomProperty = function(name) {
+ return this._rawProperties[name];
+ };
+ SerializableObject2.prototype.getSchema = function() {
+ var schema = SerializableObject2._schemaCache[this.getSchemaKey()];
+ if (!schema) {
+ schema = new SerializableObjectSchema();
+ this.populateSchema(schema);
+ SerializableObject2._schemaCache[this.getSchemaKey()] = schema;
+ }
+ return schema;
+ };
+ SerializableObject2.defaultMaxVersion = Versions.latest;
+ SerializableObject2._schemaCache = {};
+ return SerializableObject2;
+ }()
+ );
+ exports.SerializableObject = SerializableObject;
+ }
+});
+
+// node_modules/adaptivecards/lib/host-capabilities.js
+var require_host_capabilities = __commonJS({
+ "node_modules/adaptivecards/lib/host-capabilities.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.HostCapabilities = void 0;
+ var serialization_1 = require_serialization();
+ var HostCapabilities = (
+ /** @class */
+ function(_super) {
+ __extends(HostCapabilities2, _super);
+ function HostCapabilities2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._capabilities = {};
+ return _this;
+ }
+ HostCapabilities2.prototype.getSchemaKey = function() {
+ return "HostCapabilities";
+ };
+ HostCapabilities2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ if (source) {
+ for (var name_1 in source) {
+ var jsonVersion = source[name_1];
+ if (typeof jsonVersion === "string") {
+ if (jsonVersion === "*") {
+ this.addCapability(name_1, "*");
+ } else {
+ var version = serialization_1.Version.parse(jsonVersion, context);
+ if (version === null || version === void 0 ? void 0 : version.isValid) {
+ this.addCapability(name_1, version);
+ }
+ }
+ }
+ }
+ }
+ };
+ HostCapabilities2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ for (var key in this._capabilities) {
+ target[key] = this._capabilities[key];
+ }
+ };
+ HostCapabilities2.prototype.addCapability = function(name, version) {
+ this._capabilities[name] = version;
+ };
+ HostCapabilities2.prototype.removeCapability = function(name) {
+ delete this._capabilities[name];
+ };
+ HostCapabilities2.prototype.clear = function() {
+ this._capabilities = {};
+ };
+ HostCapabilities2.prototype.hasCapability = function(name, version) {
+ if (this._capabilities.hasOwnProperty(name)) {
+ if (version === "*" || this._capabilities[name] === "*") {
+ return true;
+ }
+ return version.compareTo(this._capabilities[name]) <= 0;
+ }
+ return false;
+ };
+ HostCapabilities2.prototype.areAllMet = function(hostCapabilities) {
+ for (var capabilityName in this._capabilities) {
+ if (!hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])) {
+ return false;
+ }
+ }
+ return true;
+ };
+ return HostCapabilities2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.HostCapabilities = HostCapabilities;
+ }
+});
+
+// node_modules/adaptivecards/lib/host-config.js
+var require_host_config = __commonJS({
+ "node_modules/adaptivecards/lib/host-config.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.defaultHostConfig = exports.HostConfig = exports.FontTypeSet = exports.FontTypeDefinition = exports.ContainerStyleSet = exports.ContainerStyleDefinition = exports.ColorSetDefinition = exports.ActionsConfig = exports.ShowCardActionConfig = exports.FactSetConfig = exports.FactTitleDefinition = exports.FactTextDefinition = exports.InputConfig = exports.InputLabelConfig = exports.RequiredInputLabelTextDefinition = exports.TextBlockConfig = exports.TextStyleSet = exports.TextStyleDefinition = exports.BaseTextDefinition = exports.TableConfig = exports.MediaConfig = exports.ImageSetConfig = exports.AdaptiveCardConfig = exports.TextColorDefinition = exports.ColorDefinition = void 0;
+ var Enums = require_enums();
+ var Utils = require_utils();
+ var Shared = require_shared();
+ var host_capabilities_1 = require_host_capabilities();
+ function parseHostConfigEnum(targetEnum, value, defaultValue) {
+ if (typeof value === "string") {
+ var parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);
+ return parsedValue !== void 0 ? parsedValue : defaultValue;
+ } else if (typeof value === "number") {
+ return value;
+ } else {
+ return defaultValue;
+ }
+ }
+ var ColorDefinition = (
+ /** @class */
+ function() {
+ function ColorDefinition2(defaultColor, subtleColor) {
+ this.default = "#000000";
+ this.subtle = "#666666";
+ if (defaultColor) {
+ this.default = defaultColor;
+ }
+ if (subtleColor) {
+ this.subtle = subtleColor;
+ }
+ }
+ ColorDefinition2.prototype.parse = function(obj) {
+ if (obj) {
+ this.default = obj["default"] || this.default;
+ this.subtle = obj["subtle"] || this.subtle;
+ }
+ };
+ return ColorDefinition2;
+ }()
+ );
+ exports.ColorDefinition = ColorDefinition;
+ var TextColorDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(TextColorDefinition2, _super);
+ function TextColorDefinition2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.highlightColors = new ColorDefinition("#22000000", "#11000000");
+ return _this;
+ }
+ TextColorDefinition2.prototype.parse = function(obj) {
+ _super.prototype.parse.call(this, obj);
+ if (obj) {
+ this.highlightColors.parse(obj["highlightColors"]);
+ }
+ };
+ return TextColorDefinition2;
+ }(ColorDefinition)
+ );
+ exports.TextColorDefinition = TextColorDefinition;
+ var AdaptiveCardConfig = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function AdaptiveCardConfig2(obj) {
+ this.allowCustomStyle = false;
+ if (obj) {
+ this.allowCustomStyle = obj["allowCustomStyle"] || this.allowCustomStyle;
+ }
+ }
+ return AdaptiveCardConfig2;
+ }()
+ );
+ exports.AdaptiveCardConfig = AdaptiveCardConfig;
+ var ImageSetConfig = (
+ /** @class */
+ function() {
+ function ImageSetConfig2(obj) {
+ this.imageSize = Enums.Size.Medium;
+ this.maxImageHeight = 100;
+ if (obj) {
+ this.imageSize = obj["imageSize"] != null ? obj["imageSize"] : this.imageSize;
+ this.maxImageHeight = Utils.parseNumber(obj["maxImageHeight"], 100);
+ }
+ }
+ ImageSetConfig2.prototype.toJSON = function() {
+ return {
+ imageSize: Enums.Size[this.imageSize],
+ maxImageHeight: this.maxImageHeight
+ };
+ };
+ return ImageSetConfig2;
+ }()
+ );
+ exports.ImageSetConfig = ImageSetConfig;
+ var MediaConfig = (
+ /** @class */
+ function() {
+ function MediaConfig2(obj) {
+ this.allowInlinePlayback = true;
+ if (obj) {
+ this.defaultPoster = obj["defaultPoster"];
+ this.allowInlinePlayback = obj["allowInlinePlayback"] || this.allowInlinePlayback;
+ }
+ }
+ MediaConfig2.prototype.toJSON = function() {
+ return {
+ defaultPoster: this.defaultPoster,
+ allowInlinePlayback: this.allowInlinePlayback
+ };
+ };
+ return MediaConfig2;
+ }()
+ );
+ exports.MediaConfig = MediaConfig;
+ var TableConfig = (
+ /** @class */
+ function() {
+ function TableConfig2(obj) {
+ this.cellSpacing = 8;
+ if (obj) {
+ this.cellSpacing = obj.cellSpacing && typeof obj.cellSpacing === "number" ? obj.cellSpacing : this.cellSpacing;
+ }
+ }
+ TableConfig2.prototype.toJSON = function() {
+ return {
+ cellSpacing: this.cellSpacing
+ };
+ };
+ return TableConfig2;
+ }()
+ );
+ exports.TableConfig = TableConfig;
+ var BaseTextDefinition = (
+ /** @class */
+ function() {
+ function BaseTextDefinition2(obj) {
+ this.size = Enums.TextSize.Default;
+ this.color = Enums.TextColor.Default;
+ this.isSubtle = false;
+ this.weight = Enums.TextWeight.Default;
+ this.parse(obj);
+ }
+ BaseTextDefinition2.prototype.parse = function(obj) {
+ if (obj) {
+ this.size = parseHostConfigEnum(Enums.TextSize, obj["size"], this.size);
+ this.color = parseHostConfigEnum(Enums.TextColor, obj["color"], this.color);
+ this.isSubtle = obj.isSubtle !== void 0 && typeof obj.isSubtle === "boolean" ? obj.isSubtle : this.isSubtle;
+ this.weight = parseHostConfigEnum(Enums.TextWeight, obj["weight"], this.getDefaultWeight());
+ }
+ };
+ BaseTextDefinition2.prototype.getDefaultWeight = function() {
+ return Enums.TextWeight.Default;
+ };
+ BaseTextDefinition2.prototype.toJSON = function() {
+ return {
+ size: Enums.TextSize[this.size],
+ color: Enums.TextColor[this.color],
+ isSubtle: this.isSubtle,
+ weight: Enums.TextWeight[this.weight]
+ };
+ };
+ return BaseTextDefinition2;
+ }()
+ );
+ exports.BaseTextDefinition = BaseTextDefinition;
+ var TextStyleDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(TextStyleDefinition2, _super);
+ function TextStyleDefinition2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.fontType = Enums.FontType.Default;
+ return _this;
+ }
+ TextStyleDefinition2.prototype.parse = function(obj) {
+ _super.prototype.parse.call(this, obj);
+ if (obj) {
+ this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);
+ }
+ };
+ return TextStyleDefinition2;
+ }(BaseTextDefinition)
+ );
+ exports.TextStyleDefinition = TextStyleDefinition;
+ var TextStyleSet = (
+ /** @class */
+ function() {
+ function TextStyleSet2(obj) {
+ this.default = new TextStyleDefinition();
+ this.heading = new TextStyleDefinition({
+ size: "Large",
+ weight: "Bolder"
+ });
+ this.columnHeader = new TextStyleDefinition({
+ weight: "Bolder"
+ });
+ if (obj) {
+ this.heading.parse(obj.heading);
+ this.columnHeader.parse(obj.columnHeader);
+ }
+ }
+ TextStyleSet2.prototype.getStyleByName = function(name) {
+ switch (name.toLowerCase()) {
+ case "heading":
+ return this.heading;
+ case "columnHeader":
+ return this.columnHeader;
+ default:
+ return this.default;
+ }
+ };
+ return TextStyleSet2;
+ }()
+ );
+ exports.TextStyleSet = TextStyleSet;
+ var TextBlockConfig = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function TextBlockConfig2(obj) {
+ if (obj) {
+ this.headingLevel = Utils.parseNumber(obj.headingLevel);
+ }
+ }
+ return TextBlockConfig2;
+ }()
+ );
+ exports.TextBlockConfig = TextBlockConfig;
+ var RequiredInputLabelTextDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(RequiredInputLabelTextDefinition2, _super);
+ function RequiredInputLabelTextDefinition2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.suffix = " *";
+ _this.suffixColor = Enums.TextColor.Attention;
+ return _this;
+ }
+ RequiredInputLabelTextDefinition2.prototype.parse = function(obj) {
+ _super.prototype.parse.call(this, obj);
+ if (obj) {
+ this.suffix = obj["suffix"] || this.suffix;
+ this.suffixColor = parseHostConfigEnum(Enums.TextColor, obj["suffixColor"], this.suffixColor);
+ }
+ };
+ RequiredInputLabelTextDefinition2.prototype.toJSON = function() {
+ var result = _super.prototype.toJSON.call(this);
+ result["suffix"] = this.suffix;
+ result["suffixColor"] = Enums.TextColor[this.suffixColor];
+ return result;
+ };
+ return RequiredInputLabelTextDefinition2;
+ }(BaseTextDefinition)
+ );
+ exports.RequiredInputLabelTextDefinition = RequiredInputLabelTextDefinition;
+ var InputLabelConfig = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function InputLabelConfig2(obj) {
+ this.inputSpacing = Enums.Spacing.Small;
+ this.requiredInputs = new RequiredInputLabelTextDefinition();
+ this.optionalInputs = new BaseTextDefinition();
+ if (obj) {
+ this.inputSpacing = parseHostConfigEnum(Enums.Spacing, obj["inputSpacing"], this.inputSpacing);
+ this.requiredInputs = new RequiredInputLabelTextDefinition(obj["requiredInputs"]);
+ this.optionalInputs = new BaseTextDefinition(obj["optionalInputs"]);
+ }
+ }
+ return InputLabelConfig2;
+ }()
+ );
+ exports.InputLabelConfig = InputLabelConfig;
+ var InputConfig = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function InputConfig2(obj) {
+ this.label = new InputLabelConfig();
+ this.errorMessage = new BaseTextDefinition({
+ color: Enums.TextColor.Attention
+ });
+ if (obj) {
+ this.label = new InputLabelConfig(obj["label"]);
+ this.errorMessage = new BaseTextDefinition(obj["errorMessage"]);
+ }
+ }
+ return InputConfig2;
+ }()
+ );
+ exports.InputConfig = InputConfig;
+ var FactTextDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(FactTextDefinition2, _super);
+ function FactTextDefinition2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.wrap = true;
+ return _this;
+ }
+ FactTextDefinition2.prototype.parse = function(obj) {
+ _super.prototype.parse.call(this, obj);
+ if (obj) {
+ this.wrap = obj["wrap"] != null ? obj["wrap"] : this.wrap;
+ }
+ };
+ FactTextDefinition2.prototype.toJSON = function() {
+ var result = _super.prototype.toJSON.call(this);
+ result["wrap"] = this.wrap;
+ return result;
+ };
+ return FactTextDefinition2;
+ }(BaseTextDefinition)
+ );
+ exports.FactTextDefinition = FactTextDefinition;
+ var FactTitleDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(FactTitleDefinition2, _super);
+ function FactTitleDefinition2(obj) {
+ var _this = _super.call(this, obj) || this;
+ _this.maxWidth = 150;
+ _this.weight = Enums.TextWeight.Bolder;
+ if (obj) {
+ _this.maxWidth = obj["maxWidth"] != null ? obj["maxWidth"] : _this.maxWidth;
+ _this.weight = parseHostConfigEnum(Enums.TextWeight, obj["weight"], Enums.TextWeight.Bolder);
+ }
+ return _this;
+ }
+ FactTitleDefinition2.prototype.getDefaultWeight = function() {
+ return Enums.TextWeight.Bolder;
+ };
+ return FactTitleDefinition2;
+ }(FactTextDefinition)
+ );
+ exports.FactTitleDefinition = FactTitleDefinition;
+ var FactSetConfig = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function FactSetConfig2(obj) {
+ this.title = new FactTitleDefinition();
+ this.value = new FactTextDefinition();
+ this.spacing = 10;
+ if (obj) {
+ this.title = new FactTitleDefinition(obj["title"]);
+ this.value = new FactTextDefinition(obj["value"]);
+ this.spacing = obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;
+ }
+ }
+ return FactSetConfig2;
+ }()
+ );
+ exports.FactSetConfig = FactSetConfig;
+ var ShowCardActionConfig = (
+ /** @class */
+ function() {
+ function ShowCardActionConfig2(obj) {
+ this.actionMode = Enums.ShowCardActionMode.Inline;
+ this.inlineTopMargin = 16;
+ this.style = Enums.ContainerStyle.Emphasis;
+ if (obj) {
+ this.actionMode = parseHostConfigEnum(Enums.ShowCardActionMode, obj["actionMode"], Enums.ShowCardActionMode.Inline);
+ this.inlineTopMargin = obj["inlineTopMargin"] != null ? obj["inlineTopMargin"] : this.inlineTopMargin;
+ this.style = obj["style"] && typeof obj["style"] === "string" ? obj["style"] : Enums.ContainerStyle.Emphasis;
+ }
+ }
+ ShowCardActionConfig2.prototype.toJSON = function() {
+ return {
+ actionMode: Enums.ShowCardActionMode[this.actionMode],
+ inlineTopMargin: this.inlineTopMargin,
+ style: this.style
+ };
+ };
+ return ShowCardActionConfig2;
+ }()
+ );
+ exports.ShowCardActionConfig = ShowCardActionConfig;
+ var ActionsConfig = (
+ /** @class */
+ function() {
+ function ActionsConfig2(obj) {
+ this.maxActions = 5;
+ this.spacing = Enums.Spacing.Default;
+ this.buttonSpacing = 20;
+ this.showCard = new ShowCardActionConfig();
+ this.preExpandSingleShowCardAction = false;
+ this.actionsOrientation = Enums.Orientation.Horizontal;
+ this.actionAlignment = Enums.ActionAlignment.Left;
+ this.iconPlacement = Enums.ActionIconPlacement.LeftOfTitle;
+ this.allowTitleToWrap = false;
+ this.iconSize = 16;
+ if (obj) {
+ this.maxActions = obj["maxActions"] != null ? obj["maxActions"] : this.maxActions;
+ this.spacing = parseHostConfigEnum(Enums.Spacing, obj.spacing && obj.spacing, Enums.Spacing.Default);
+ this.buttonSpacing = obj["buttonSpacing"] != null ? obj["buttonSpacing"] : this.buttonSpacing;
+ this.showCard = new ShowCardActionConfig(obj["showCard"]);
+ this.preExpandSingleShowCardAction = Utils.parseBool(obj["preExpandSingleShowCardAction"], false);
+ this.actionsOrientation = parseHostConfigEnum(Enums.Orientation, obj["actionsOrientation"], Enums.Orientation.Horizontal);
+ this.actionAlignment = parseHostConfigEnum(Enums.ActionAlignment, obj["actionAlignment"], Enums.ActionAlignment.Left);
+ this.iconPlacement = parseHostConfigEnum(Enums.ActionIconPlacement, obj["iconPlacement"], Enums.ActionIconPlacement.LeftOfTitle);
+ this.allowTitleToWrap = obj["allowTitleToWrap"] != null ? obj["allowTitleToWrap"] : this.allowTitleToWrap;
+ try {
+ var sizeAndUnit = Shared.SizeAndUnit.parse(obj["iconSize"]);
+ if (sizeAndUnit.unit === Enums.SizeUnit.Pixel) {
+ this.iconSize = sizeAndUnit.physicalSize;
+ }
+ } catch (e) {
+ }
+ }
+ }
+ ActionsConfig2.prototype.toJSON = function() {
+ return {
+ maxActions: this.maxActions,
+ spacing: Enums.Spacing[this.spacing],
+ buttonSpacing: this.buttonSpacing,
+ showCard: this.showCard,
+ preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,
+ actionsOrientation: Enums.Orientation[this.actionsOrientation],
+ actionAlignment: Enums.ActionAlignment[this.actionAlignment]
+ };
+ };
+ return ActionsConfig2;
+ }()
+ );
+ exports.ActionsConfig = ActionsConfig;
+ var ColorSetDefinition = (
+ /** @class */
+ function() {
+ function ColorSetDefinition2(obj) {
+ this.default = new TextColorDefinition();
+ this.dark = new TextColorDefinition();
+ this.light = new TextColorDefinition();
+ this.accent = new TextColorDefinition();
+ this.good = new TextColorDefinition();
+ this.warning = new TextColorDefinition();
+ this.attention = new TextColorDefinition();
+ this.parse(obj);
+ }
+ ColorSetDefinition2.prototype.parseSingleColor = function(obj, propertyName) {
+ if (obj) {
+ this[propertyName].parse(obj[propertyName]);
+ }
+ };
+ ColorSetDefinition2.prototype.parse = function(obj) {
+ if (obj) {
+ this.parseSingleColor(obj, "default");
+ this.parseSingleColor(obj, "dark");
+ this.parseSingleColor(obj, "light");
+ this.parseSingleColor(obj, "accent");
+ this.parseSingleColor(obj, "good");
+ this.parseSingleColor(obj, "warning");
+ this.parseSingleColor(obj, "attention");
+ }
+ };
+ return ColorSetDefinition2;
+ }()
+ );
+ exports.ColorSetDefinition = ColorSetDefinition;
+ var ContainerStyleDefinition = (
+ /** @class */
+ function() {
+ function ContainerStyleDefinition2(obj) {
+ this.foregroundColors = new ColorSetDefinition({
+ "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(obj);
+ }
+ ContainerStyleDefinition2.prototype.parse = function(obj) {
+ if (obj) {
+ this.backgroundColor = obj["backgroundColor"];
+ this.foregroundColors.parse(obj["foregroundColors"]);
+ this.highlightBackgroundColor = obj["highlightBackgroundColor"];
+ this.highlightForegroundColor = obj["highlightForegroundColor"];
+ this.borderColor = obj["borderColor"];
+ }
+ };
+ Object.defineProperty(ContainerStyleDefinition2.prototype, "isBuiltIn", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return ContainerStyleDefinition2;
+ }()
+ );
+ exports.ContainerStyleDefinition = ContainerStyleDefinition;
+ var BuiltInContainerStyleDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(BuiltInContainerStyleDefinition2, _super);
+ function BuiltInContainerStyleDefinition2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ Object.defineProperty(BuiltInContainerStyleDefinition2.prototype, "isBuiltIn", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return BuiltInContainerStyleDefinition2;
+ }(ContainerStyleDefinition)
+ );
+ var ContainerStyleSet = (
+ /** @class */
+ function() {
+ function ContainerStyleSet2(obj) {
+ this._allStyles = {};
+ this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();
+ this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();
+ this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();
+ this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();
+ this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();
+ this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();
+ if (obj) {
+ this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);
+ this._allStyles[Enums.ContainerStyle.Emphasis].parse(obj[Enums.ContainerStyle.Emphasis]);
+ this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);
+ this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);
+ this._allStyles[Enums.ContainerStyle.Attention].parse(obj[Enums.ContainerStyle.Attention]);
+ this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);
+ var customStyleArray = obj["customStyles"];
+ if (customStyleArray && Array.isArray(customStyleArray)) {
+ for (var _i = 0, customStyleArray_1 = customStyleArray; _i < customStyleArray_1.length; _i++) {
+ var customStyle = customStyleArray_1[_i];
+ if (customStyle) {
+ var styleName = customStyle["name"];
+ if (styleName && typeof styleName === "string") {
+ if (this._allStyles.hasOwnProperty(styleName)) {
+ this._allStyles[styleName].parse(customStyle["style"]);
+ } else {
+ this._allStyles[styleName] = new ContainerStyleDefinition(customStyle["style"]);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ContainerStyleSet2.prototype.toJSON = function() {
+ var _this = this;
+ var customStyleArray = [];
+ Object.keys(this._allStyles).forEach(function(key) {
+ if (!_this._allStyles[key].isBuiltIn) {
+ customStyleArray.push({
+ name: key,
+ style: _this._allStyles[key]
+ });
+ }
+ });
+ var result = {
+ default: this.default,
+ emphasis: this.emphasis
+ };
+ if (customStyleArray.length > 0) {
+ result.customStyles = customStyleArray;
+ }
+ return result;
+ };
+ ContainerStyleSet2.prototype.getStyleByName = function(name, defaultValue) {
+ if (name && this._allStyles.hasOwnProperty(name)) {
+ return this._allStyles[name];
+ } else {
+ return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];
+ }
+ };
+ Object.defineProperty(ContainerStyleSet2.prototype, "default", {
+ get: function() {
+ return this._allStyles[Enums.ContainerStyle.Default];
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(ContainerStyleSet2.prototype, "emphasis", {
+ get: function() {
+ return this._allStyles[Enums.ContainerStyle.Emphasis];
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return ContainerStyleSet2;
+ }()
+ );
+ exports.ContainerStyleSet = ContainerStyleSet;
+ var FontTypeDefinition = (
+ /** @class */
+ function() {
+ function FontTypeDefinition2(fontFamily) {
+ 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
+ };
+ if (fontFamily) {
+ this.fontFamily = fontFamily;
+ }
+ }
+ FontTypeDefinition2.prototype.parse = function(obj) {
+ this.fontFamily = obj["fontFamily"] || this.fontFamily;
+ this.fontSizes = {
+ small: obj.fontSizes && obj.fontSizes["small"] || this.fontSizes.small,
+ default: obj.fontSizes && obj.fontSizes["default"] || this.fontSizes.default,
+ medium: obj.fontSizes && obj.fontSizes["medium"] || this.fontSizes.medium,
+ large: obj.fontSizes && obj.fontSizes["large"] || this.fontSizes.large,
+ extraLarge: obj.fontSizes && obj.fontSizes["extraLarge"] || this.fontSizes.extraLarge
+ };
+ this.fontWeights = {
+ lighter: obj.fontWeights && obj.fontWeights["lighter"] || this.fontWeights.lighter,
+ default: obj.fontWeights && obj.fontWeights["default"] || this.fontWeights.default,
+ bolder: obj.fontWeights && obj.fontWeights["bolder"] || this.fontWeights.bolder
+ };
+ };
+ FontTypeDefinition2.monospace = new FontTypeDefinition2("'Courier New', Courier, monospace");
+ return FontTypeDefinition2;
+ }()
+ );
+ exports.FontTypeDefinition = FontTypeDefinition;
+ var FontTypeSet = (
+ /** @class */
+ function() {
+ function FontTypeSet2(obj) {
+ this.default = new FontTypeDefinition();
+ this.monospace = new FontTypeDefinition("'Courier New', Courier, monospace");
+ if (obj) {
+ this.default.parse(obj["default"]);
+ this.monospace.parse(obj["monospace"]);
+ }
+ }
+ FontTypeSet2.prototype.getStyleDefinition = function(style) {
+ switch (style) {
+ case Enums.FontType.Monospace:
+ return this.monospace;
+ case Enums.FontType.Default:
+ default:
+ return this.default;
+ }
+ };
+ return FontTypeSet2;
+ }()
+ );
+ exports.FontTypeSet = FontTypeSet;
+ var HostConfig = (
+ /** @class */
+ function() {
+ function HostConfig2(obj) {
+ this.hostCapabilities = new host_capabilities_1.HostCapabilities();
+ this.choiceSetInputValueSeparator = ",";
+ this.supportsInteractivity = true;
+ 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 ContainerStyleSet();
+ this.inputs = new InputConfig();
+ this.actions = new ActionsConfig();
+ this.adaptiveCard = new AdaptiveCardConfig();
+ this.imageSet = new ImageSetConfig();
+ this.media = new MediaConfig();
+ this.factSet = new FactSetConfig();
+ this.table = new TableConfig();
+ this.textStyles = new TextStyleSet();
+ this.textBlock = new TextBlockConfig();
+ this.alwaysAllowBleed = false;
+ if (obj) {
+ if (typeof obj === "string" || obj instanceof String) {
+ obj = JSON.parse(obj);
+ }
+ this.choiceSetInputValueSeparator = obj && typeof obj["choiceSetInputValueSeparator"] === "string" ? obj["choiceSetInputValueSeparator"] : this.choiceSetInputValueSeparator;
+ this.supportsInteractivity = obj && typeof obj["supportsInteractivity"] === "boolean" ? obj["supportsInteractivity"] : this.supportsInteractivity;
+ this._legacyFontType = new FontTypeDefinition();
+ this._legacyFontType.parse(obj);
+ if (obj.fontTypes) {
+ this.fontTypes = new FontTypeSet(obj.fontTypes);
+ }
+ if (obj.lineHeights) {
+ this.lineHeights = {
+ small: obj.lineHeights["small"],
+ default: obj.lineHeights["default"],
+ medium: obj.lineHeights["medium"],
+ large: obj.lineHeights["large"],
+ extraLarge: obj.lineHeights["extraLarge"]
+ };
+ }
+ this.imageSizes = {
+ small: obj.imageSizes && obj.imageSizes["small"] || this.imageSizes.small,
+ medium: obj.imageSizes && obj.imageSizes["medium"] || this.imageSizes.medium,
+ large: obj.imageSizes && obj.imageSizes["large"] || this.imageSizes.large
+ };
+ this.containerStyles = new ContainerStyleSet(obj["containerStyles"]);
+ this.spacing = {
+ small: obj.spacing && obj.spacing["small"] || this.spacing.small,
+ default: obj.spacing && obj.spacing["default"] || this.spacing.default,
+ medium: obj.spacing && obj.spacing["medium"] || this.spacing.medium,
+ large: obj.spacing && obj.spacing["large"] || this.spacing.large,
+ extraLarge: obj.spacing && obj.spacing["extraLarge"] || this.spacing.extraLarge,
+ padding: obj.spacing && obj.spacing["padding"] || this.spacing.padding
+ };
+ this.separator = {
+ lineThickness: obj.separator && obj.separator["lineThickness"] || this.separator.lineThickness,
+ lineColor: obj.separator && obj.separator["lineColor"] || this.separator.lineColor
+ };
+ this.inputs = new InputConfig(obj.inputs || this.inputs);
+ this.actions = new ActionsConfig(obj.actions || this.actions);
+ this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);
+ this.imageSet = new ImageSetConfig(obj["imageSet"]);
+ this.factSet = new FactSetConfig(obj["factSet"]);
+ this.textStyles = new TextStyleSet(obj["textStyles"]);
+ this.textBlock = new TextBlockConfig(obj["textBlock"]);
+ }
+ }
+ HostConfig2.prototype.getFontTypeDefinition = function(style) {
+ if (this.fontTypes) {
+ return this.fontTypes.getStyleDefinition(style);
+ } else {
+ return style === Enums.FontType.Monospace ? FontTypeDefinition.monospace : this._legacyFontType;
+ }
+ };
+ HostConfig2.prototype.getEffectiveSpacing = function(spacing) {
+ switch (spacing) {
+ case Enums.Spacing.Small:
+ return this.spacing.small;
+ case Enums.Spacing.Default:
+ return this.spacing.default;
+ case Enums.Spacing.Medium:
+ return this.spacing.medium;
+ case Enums.Spacing.Large:
+ return this.spacing.large;
+ case Enums.Spacing.ExtraLarge:
+ return this.spacing.extraLarge;
+ case Enums.Spacing.Padding:
+ return this.spacing.padding;
+ default:
+ return 0;
+ }
+ };
+ HostConfig2.prototype.paddingDefinitionToSpacingDefinition = function(paddingDefinition) {
+ return new Shared.SpacingDefinition(this.getEffectiveSpacing(paddingDefinition.top), this.getEffectiveSpacing(paddingDefinition.right), this.getEffectiveSpacing(paddingDefinition.bottom), this.getEffectiveSpacing(paddingDefinition.left));
+ };
+ HostConfig2.prototype.makeCssClassNames = function() {
+ var classNames = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ classNames[_i] = arguments[_i];
+ }
+ var result = [];
+ for (var _a = 0, classNames_1 = classNames; _a < classNames_1.length; _a++) {
+ var className = classNames_1[_a];
+ result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + "-" : "") + className);
+ }
+ return result;
+ };
+ HostConfig2.prototype.makeCssClassName = function() {
+ var classNames = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ classNames[_i] = arguments[_i];
+ }
+ var result = this.makeCssClassNames.apply(this, classNames).join(" ");
+ return result ? result : "";
+ };
+ Object.defineProperty(HostConfig2.prototype, "fontFamily", {
+ get: function() {
+ return this._legacyFontType.fontFamily;
+ },
+ set: function(value) {
+ this._legacyFontType.fontFamily = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(HostConfig2.prototype, "fontSizes", {
+ get: function() {
+ return this._legacyFontType.fontSizes;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(HostConfig2.prototype, "fontWeights", {
+ get: function() {
+ return this._legacyFontType.fontWeights;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return HostConfig2;
+ }()
+ );
+ exports.HostConfig = HostConfig;
+ exports.defaultHostConfig = new HostConfig({
+ supportsInteractivity: true,
+ 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: Enums.TextWeight.Bolder,
+ suffix: " *",
+ suffixColor: Enums.TextColor.Attention
+ },
+ optionalInputs: {
+ weight: Enums.TextWeight.Bolder
+ }
+ },
+ errorMessage: {
+ color: Enums.TextColor.Attention,
+ weight: Enums.TextWeight.Bolder
+ }
+ },
+ actions: {
+ maxActions: 5,
+ spacing: Enums.Spacing.Default,
+ buttonSpacing: 10,
+ showCard: {
+ actionMode: Enums.ShowCardActionMode.Inline,
+ inlineTopMargin: 16
+ },
+ actionsOrientation: Enums.Orientation.Horizontal,
+ actionAlignment: Enums.ActionAlignment.Left
+ },
+ adaptiveCard: {
+ allowCustomStyle: false
+ },
+ imageSet: {
+ imageSize: Enums.Size.Medium,
+ maxImageHeight: 100
+ },
+ factSet: {
+ title: {
+ color: Enums.TextColor.Default,
+ size: Enums.TextSize.Default,
+ isSubtle: false,
+ weight: Enums.TextWeight.Bolder,
+ wrap: true,
+ maxWidth: 150
+ },
+ value: {
+ color: Enums.TextColor.Default,
+ size: Enums.TextSize.Default,
+ isSubtle: false,
+ weight: Enums.TextWeight.Default,
+ wrap: true
+ },
+ spacing: 10
+ }
+ });
+ }
+});
+
+// node_modules/adaptivecards/lib/registry.js
+var require_registry = __commonJS({
+ "node_modules/adaptivecards/lib/registry.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.GlobalRegistry = exports.CardObjectRegistry = exports.ElementSingletonBehavior = void 0;
+ var serialization_1 = require_serialization();
+ var ElementSingletonBehavior;
+ (function(ElementSingletonBehavior2) {
+ ElementSingletonBehavior2[ElementSingletonBehavior2["Only"] = 0] = "Only";
+ ElementSingletonBehavior2[ElementSingletonBehavior2["Allowed"] = 1] = "Allowed";
+ ElementSingletonBehavior2[ElementSingletonBehavior2["NotAllowed"] = 2] = "NotAllowed";
+ })(ElementSingletonBehavior = exports.ElementSingletonBehavior || (exports.ElementSingletonBehavior = {}));
+ var CardObjectRegistry = (
+ /** @class */
+ function() {
+ function CardObjectRegistry2() {
+ this._items = {};
+ }
+ CardObjectRegistry2.prototype.findByName = function(typeName) {
+ return this._items.hasOwnProperty(typeName) ? this._items[typeName] : void 0;
+ };
+ CardObjectRegistry2.prototype.clear = function() {
+ this._items = {};
+ };
+ CardObjectRegistry2.prototype.copyTo = function(target) {
+ var keys = Object.keys(this._items);
+ for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
+ var key = keys_1[_i];
+ var typeRegistration = this._items[key];
+ target.register(typeRegistration.typeName, typeRegistration.objectType, typeRegistration.schemaVersion, typeRegistration.singletonBehavior);
+ }
+ };
+ CardObjectRegistry2.prototype.register = function(typeName, objectType, schemaVersion, singletonBehavior) {
+ if (schemaVersion === void 0) {
+ schemaVersion = serialization_1.Versions.v1_0;
+ }
+ if (singletonBehavior === void 0) {
+ singletonBehavior = ElementSingletonBehavior.NotAllowed;
+ }
+ var registrationInfo = this.findByName(typeName);
+ if (registrationInfo !== void 0) {
+ registrationInfo.objectType = objectType;
+ } else {
+ registrationInfo = {
+ typeName,
+ objectType,
+ schemaVersion,
+ singletonBehavior
+ };
+ }
+ this._items[typeName] = registrationInfo;
+ };
+ CardObjectRegistry2.prototype.unregister = function(typeName) {
+ delete this._items[typeName];
+ };
+ CardObjectRegistry2.prototype.createInstance = function(typeName, targetVersion) {
+ var registrationInfo = this.findByName(typeName);
+ return registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0 ? new registrationInfo.objectType() : void 0;
+ };
+ CardObjectRegistry2.prototype.getItemCount = function() {
+ return Object.keys(this._items).length;
+ };
+ CardObjectRegistry2.prototype.getItemAt = function(index) {
+ var _this = this;
+ return Object.keys(this._items).map(function(e) {
+ return _this._items[e];
+ })[index];
+ };
+ return CardObjectRegistry2;
+ }()
+ );
+ exports.CardObjectRegistry = CardObjectRegistry;
+ var GlobalRegistry = (
+ /** @class */
+ function() {
+ function GlobalRegistry2() {
+ }
+ GlobalRegistry2.populateWithDefaultElements = function(registry) {
+ registry.clear();
+ GlobalRegistry2.defaultElements.copyTo(registry);
+ };
+ GlobalRegistry2.populateWithDefaultActions = function(registry) {
+ registry.clear();
+ GlobalRegistry2.defaultActions.copyTo(registry);
+ };
+ Object.defineProperty(GlobalRegistry2, "elements", {
+ get: function() {
+ if (!GlobalRegistry2._elements) {
+ GlobalRegistry2._elements = new CardObjectRegistry();
+ GlobalRegistry2.populateWithDefaultElements(GlobalRegistry2._elements);
+ }
+ return GlobalRegistry2._elements;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(GlobalRegistry2, "actions", {
+ get: function() {
+ if (!GlobalRegistry2._actions) {
+ GlobalRegistry2._actions = new CardObjectRegistry();
+ GlobalRegistry2.populateWithDefaultActions(GlobalRegistry2._actions);
+ }
+ return GlobalRegistry2._actions;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ GlobalRegistry2.reset = function() {
+ GlobalRegistry2._elements = void 0;
+ GlobalRegistry2._actions = void 0;
+ };
+ GlobalRegistry2.defaultElements = new CardObjectRegistry();
+ GlobalRegistry2.defaultActions = new CardObjectRegistry();
+ return GlobalRegistry2;
+ }()
+ );
+ exports.GlobalRegistry = GlobalRegistry;
+ }
+});
+
+// node_modules/adaptivecards/lib/card-object.js
+var require_card_object = __commonJS({
+ "node_modules/adaptivecards/lib/card-object.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
+ r = Reflect.decorate(decorators, target, key, desc);
+ else
+ for (var i = decorators.length - 1; i >= 0; i--)
+ if (d = decorators[i])
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.CardObject = exports.ValidationResults = void 0;
+ var Enums = require_enums();
+ var strings_1 = require_strings();
+ var shared_1 = require_shared();
+ var host_capabilities_1 = require_host_capabilities();
+ var serialization_1 = require_serialization();
+ var ValidationResults = (
+ /** @class */
+ function() {
+ function ValidationResults2() {
+ this.allIds = {};
+ this.validationEvents = [];
+ }
+ ValidationResults2.prototype.addFailure = function(cardObject, event, message) {
+ this.validationEvents.push({
+ phase: Enums.ValidationPhase.Validation,
+ source: cardObject,
+ event,
+ message
+ });
+ };
+ return ValidationResults2;
+ }()
+ );
+ exports.ValidationResults = ValidationResults;
+ var CardObject = (
+ /** @class */
+ function(_super) {
+ __extends(CardObject2, _super);
+ function CardObject2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._shouldFallback = false;
+ return _this;
+ }
+ CardObject2.prototype.getSchemaKey = function() {
+ return this.getJsonTypeName();
+ };
+ Object.defineProperty(CardObject2.prototype, "requires", {
+ get: function() {
+ return this.getValue(CardObject2.requiresProperty);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CardObject2.prototype.contains = function(node) {
+ if (this._renderedElement) {
+ return this._renderedElement.contains(node);
+ }
+ return false;
+ };
+ CardObject2.prototype.preProcessPropertyValue = function(prop, propertyValue) {
+ var value = propertyValue === void 0 ? this.getValue(prop) : propertyValue;
+ if (shared_1.GlobalSettings.allowPreProcessingPropertyValues) {
+ var currentObject = this;
+ while (currentObject && !currentObject.onPreProcessPropertyValue) {
+ currentObject = currentObject.parent;
+ }
+ if (currentObject && currentObject.onPreProcessPropertyValue) {
+ return currentObject.onPreProcessPropertyValue(this, prop, value);
+ }
+ }
+ return value;
+ };
+ CardObject2.prototype.setParent = function(value) {
+ this._parent = value;
+ };
+ CardObject2.prototype.setShouldFallback = function(value) {
+ this._shouldFallback = value;
+ };
+ CardObject2.prototype.shouldFallback = function() {
+ return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);
+ };
+ CardObject2.prototype.getRootObject = function() {
+ var currentObject = this;
+ while (currentObject.parent) {
+ currentObject = currentObject.parent;
+ }
+ return currentObject;
+ };
+ CardObject2.prototype.internalValidateProperties = function(context) {
+ if (this.id) {
+ if (context.allIds.hasOwnProperty(this.id)) {
+ if (context.allIds[this.id] === 1) {
+ context.addFailure(this, Enums.ValidationEvent.DuplicateId, strings_1.Strings.errors.duplicateId(this.id));
+ }
+ context.allIds[this.id] += 1;
+ } else {
+ context.allIds[this.id] = 1;
+ }
+ }
+ };
+ CardObject2.prototype.validateProperties = function() {
+ var result = new ValidationResults();
+ this.internalValidateProperties(result);
+ return result;
+ };
+ CardObject2.prototype.findDOMNodeOwner = function(node) {
+ return this.contains(node) ? this : void 0;
+ };
+ CardObject2.prototype.releaseDOMResources = function() {
+ };
+ Object.defineProperty(CardObject2.prototype, "parent", {
+ get: function() {
+ return this._parent;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardObject2.prototype, "renderedElement", {
+ get: function() {
+ return this._renderedElement;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CardObject2.typeNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "type", void 0, void 0, void 0, function(sender) {
+ return sender.getJsonTypeName();
+ });
+ CardObject2.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "id");
+ CardObject2.requiresProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_2, "requires", host_capabilities_1.HostCapabilities, false, new host_capabilities_1.HostCapabilities());
+ __decorate([
+ (0, serialization_1.property)(CardObject2.idProperty)
+ ], CardObject2.prototype, "id", void 0);
+ __decorate([
+ (0, serialization_1.property)(CardObject2.requiresProperty)
+ ], CardObject2.prototype, "requires", null);
+ return CardObject2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.CardObject = CardObject;
+ }
+});
+
+// node_modules/adaptivecards/lib/text-formatters.js
+var require_text_formatters = __commonJS({
+ "node_modules/adaptivecards/lib/text-formatters.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.formatText = void 0;
+ var AbstractTextFormatter = (
+ /** @class */
+ function() {
+ function AbstractTextFormatter2(regularExpression) {
+ this._regularExpression = regularExpression;
+ }
+ AbstractTextFormatter2.prototype.format = function(lang, input) {
+ var matches;
+ if (input) {
+ var result = input;
+ while ((matches = this._regularExpression.exec(input)) != null) {
+ result = result.replace(matches[0], this.internalFormat(lang, matches));
+ }
+ return result;
+ } else {
+ return input;
+ }
+ };
+ return AbstractTextFormatter2;
+ }()
+ );
+ var DateFormatter = (
+ /** @class */
+ function(_super) {
+ __extends(DateFormatter2, _super);
+ function DateFormatter2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ DateFormatter2.prototype.internalFormat = function(lang, matches) {
+ var date = new Date(Date.parse(matches[1]));
+ var format = matches[2] !== void 0 ? matches[2].toLowerCase() : "compact";
+ if (format !== "compact") {
+ return date.toLocaleDateString(lang, {
+ day: "numeric",
+ weekday: format,
+ month: format,
+ year: "numeric"
+ });
+ } else {
+ return date.toLocaleDateString();
+ }
+ };
+ return DateFormatter2;
+ }(AbstractTextFormatter)
+ );
+ var TimeFormatter = (
+ /** @class */
+ function(_super) {
+ __extends(TimeFormatter2, _super);
+ function TimeFormatter2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ TimeFormatter2.prototype.internalFormat = function(lang, matches) {
+ var date = new Date(Date.parse(matches[1]));
+ return date.toLocaleTimeString(lang, { hour: "numeric", minute: "2-digit" });
+ };
+ return TimeFormatter2;
+ }(AbstractTextFormatter)
+ );
+ function formatText(lang, text) {
+ var formatters = [
+ new DateFormatter(/\{{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 TimeFormatter(/\{{2}TIME\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))\)\}{2}/g)
+ ];
+ var result = text;
+ for (var _i = 0, formatters_1 = formatters; _i < formatters_1.length; _i++) {
+ var formatter = formatters_1[_i];
+ result = formatter.format(lang, result);
+ }
+ return result;
+ }
+ exports.formatText = formatText;
+ }
+});
+
+// node_modules/adaptivecards/lib/controls/constants.js
+var require_constants = __commonJS({
+ "node_modules/adaptivecards/lib/controls/constants.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Constants = void 0;
+ var Constants = (
+ /** @class */
+ function() {
+ function Constants2() {
+ }
+ Constants2.keys = {
+ tab: "Tab",
+ enter: "Enter",
+ escape: "Escape",
+ space: " ",
+ up: "ArrowUp",
+ down: "ArrowDown",
+ delete: "Delete"
+ };
+ return Constants2;
+ }()
+ );
+ exports.Constants = Constants;
+ }
+});
+
+// node_modules/adaptivecards/lib/controls/menu-item.js
+var require_menu_item = __commonJS({
+ "node_modules/adaptivecards/lib/controls/menu-item.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.MenuItem = void 0;
+ var host_config_1 = require_host_config();
+ var constants_1 = require_constants();
+ var MenuItem = (
+ /** @class */
+ function() {
+ function MenuItem2(key, value) {
+ this._isEnabled = true;
+ this.key = key;
+ this._value = value;
+ }
+ MenuItem2.prototype.click = function() {
+ if (this.isEnabled && this.onClick) {
+ this.onClick(this);
+ }
+ };
+ MenuItem2.prototype.updateCssClasses = function() {
+ if (this._element) {
+ var effectiveHostConfig = this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;
+ this._element.className = effectiveHostConfig.makeCssClassName("ac-ctrl");
+ this._element.classList.add(effectiveHostConfig.makeCssClassName(this.isEnabled ? "ac-ctrl-dropdown-item" : "ac-ctrl-dropdown-item-disabled"));
+ if (!this.isEnabled) {
+ this._element.classList.add(effectiveHostConfig.makeCssClassName("ac-disabled"));
+ }
+ }
+ };
+ MenuItem2.prototype.toString = function() {
+ return this.value;
+ };
+ MenuItem2.prototype.render = function(hostConfig) {
+ var _this = this;
+ this._hostConfig = hostConfig;
+ if (!this._element) {
+ this._element = document.createElement("span");
+ this._element.innerText = this.value;
+ this._element.setAttribute("role", "menuitem");
+ if (!this.isEnabled) {
+ this._element.setAttribute("aria-disabled", "true");
+ }
+ this._element.setAttribute("aria-current", "false");
+ this._element.onmouseup = function(_e) {
+ _this.click();
+ };
+ this._element.onkeydown = function(e) {
+ if (e.key === constants_1.Constants.keys.enter) {
+ e.cancelBubble = true;
+ _this.click();
+ }
+ };
+ this.updateCssClasses();
+ }
+ return this._element;
+ };
+ Object.defineProperty(MenuItem2.prototype, "value", {
+ get: function() {
+ return this._value;
+ },
+ set: function(newValue) {
+ this._value = newValue;
+ if (this._element) {
+ this._element.innerText = newValue;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MenuItem2.prototype, "isEnabled", {
+ get: function() {
+ return this._isEnabled;
+ },
+ set: function(value) {
+ if (this._isEnabled !== value) {
+ this._isEnabled = value;
+ this.updateCssClasses();
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return MenuItem2;
+ }()
+ );
+ exports.MenuItem = MenuItem;
+ }
+});
+
+// node_modules/adaptivecards/lib/controls/collection.js
+var require_collection = __commonJS({
+ "node_modules/adaptivecards/lib/controls/collection.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Collection = void 0;
+ var Collection = (
+ /** @class */
+ function() {
+ function Collection2() {
+ this._items = [];
+ }
+ Collection2.prototype.get = function(index) {
+ return this._items[index];
+ };
+ Collection2.prototype.add = function(item) {
+ this._items.push(item);
+ if (this.onItemAdded) {
+ this.onItemAdded(item);
+ }
+ };
+ Collection2.prototype.remove = function(item) {
+ var i = this._items.indexOf(item);
+ if (i >= 0) {
+ this._items = this._items.splice(i, 1);
+ if (this.onItemRemoved) {
+ this.onItemRemoved(item);
+ }
+ }
+ };
+ Collection2.prototype.indexOf = function(item) {
+ return this._items.indexOf(item);
+ };
+ Object.defineProperty(Collection2.prototype, "length", {
+ get: function() {
+ return this._items.length;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return Collection2;
+ }()
+ );
+ exports.Collection = Collection;
+ }
+});
+
+// node_modules/adaptivecards/lib/controls/popup-control.js
+var require_popup_control = __commonJS({
+ "node_modules/adaptivecards/lib/controls/popup-control.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.PopupControl = void 0;
+ var constants_1 = require_constants();
+ var Utils = require_utils();
+ var host_config_1 = require_host_config();
+ var PopupControl = (
+ /** @class */
+ function() {
+ function PopupControl2() {
+ this._isOpen = false;
+ }
+ PopupControl2.prototype.keyDown = function(e) {
+ switch (e.key) {
+ case constants_1.Constants.keys.escape:
+ this.closePopup(true);
+ break;
+ }
+ };
+ PopupControl2.prototype.render = function(_rootElementBounds) {
+ var _this = this;
+ var element = document.createElement("div");
+ element.tabIndex = 0;
+ element.className = this.hostConfig.makeCssClassName("ac-ctrl", "ac-ctrl-popup-container");
+ element.setAttribute("role", "dialog");
+ element.setAttribute("aria-modal", "true");
+ element.onkeydown = function(e) {
+ _this.keyDown(e);
+ return !e.cancelBubble;
+ };
+ element.appendChild(this.renderContent());
+ return element;
+ };
+ PopupControl2.prototype.focus = function() {
+ if (this._popupElement) {
+ this._popupElement.firstElementChild.focus();
+ }
+ };
+ PopupControl2.prototype.popup = function(rootElement) {
+ var _a, _b, _c, _d, _f;
+ var _this = 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) {
+ _this.closePopup(true);
+ };
+ document.body.appendChild(this._overlayElement);
+ var rootElementBounds = rootElement.getBoundingClientRect();
+ this._popupElement = this.render(rootElementBounds);
+ (_a = this._popupElement.classList).remove.apply(_a, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideLeftToRight", "ac-ctrl-slideRightToLeft", "ac-ctrl-slideTopToBottom", "ac-ctrl-slideRightToLeft"));
+ window.addEventListener("resize", function(_e) {
+ _this.closePopup(true);
+ });
+ var rootElementLabel = rootElement.getAttribute("aria-label");
+ if (rootElementLabel) {
+ this._popupElement.setAttribute("aria-label", rootElementLabel);
+ }
+ this._overlayElement.appendChild(this._popupElement);
+ var popupElementBounds = this._popupElement.getBoundingClientRect();
+ var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;
+ var availableSpaceAbove = rootElementBounds.top;
+ var availableSpaceRight = window.innerWidth - rootElementBounds.right;
+ var availableSpaceLeft = rootElementBounds.left;
+ var left = rootElementBounds.left + Utils.getScrollX();
+ var top_1;
+ if (availableSpaceAbove < popupElementBounds.height && availableSpaceBelow < popupElementBounds.height) {
+ var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);
+ this._popupElement.style.maxHeight = actualPopupHeight + "px";
+ if (actualPopupHeight < popupElementBounds.height) {
+ top_1 = Utils.getScrollY();
+ } else {
+ top_1 = Utils.getScrollY() + rootElementBounds.top + (rootElementBounds.height - actualPopupHeight) / 2;
+ }
+ if (availableSpaceLeft < popupElementBounds.width && availableSpaceRight < popupElementBounds.width) {
+ var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);
+ this._popupElement.style.maxWidth = actualPopupWidth + "px";
+ if (actualPopupWidth < popupElementBounds.width) {
+ left = Utils.getScrollX();
+ } else {
+ left = Utils.getScrollX() + rootElementBounds.left + (rootElementBounds.width - actualPopupWidth) / 2;
+ }
+ } else {
+ if (availableSpaceRight >= popupElementBounds.width) {
+ left = Utils.getScrollX() + rootElementBounds.right;
+ (_b = this._popupElement.classList).add.apply(_b, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideLeftToRight"));
+ } else {
+ left = Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;
+ (_c = this._popupElement.classList).add.apply(_c, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideRightToLeft"));
+ }
+ }
+ } else {
+ if (availableSpaceBelow >= popupElementBounds.height) {
+ top_1 = Utils.getScrollY() + rootElementBounds.bottom;
+ (_d = this._popupElement.classList).add.apply(_d, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideTopToBottom"));
+ } else {
+ top_1 = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;
+ (_f = this._popupElement.classList).add.apply(_f, this.hostConfig.makeCssClassNames("ac-ctrl-slide", "ac-ctrl-slideBottomToTop"));
+ }
+ if (availableSpaceRight < popupElementBounds.width) {
+ left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;
+ }
+ }
+ this._popupElement.style.left = left + "px";
+ this._popupElement.style.top = top_1 + "px";
+ this._popupElement.focus();
+ this._isOpen = true;
+ }
+ };
+ PopupControl2.prototype.closePopup = function(wasCancelled) {
+ if (this._isOpen) {
+ document.body.removeChild(this._overlayElement);
+ this._isOpen = false;
+ if (this.onClose) {
+ this.onClose(this, wasCancelled);
+ }
+ }
+ };
+ Object.defineProperty(PopupControl2.prototype, "hostConfig", {
+ get: function() {
+ return this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;
+ },
+ set: function(value) {
+ this._hostConfig = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(PopupControl2.prototype, "isOpen", {
+ get: function() {
+ return this._isOpen;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return PopupControl2;
+ }()
+ );
+ exports.PopupControl = PopupControl;
+ }
+});
+
+// node_modules/adaptivecards/lib/controls/popup-menu.js
+var require_popup_menu = __commonJS({
+ "node_modules/adaptivecards/lib/controls/popup-menu.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.PopupMenu = void 0;
+ var constants_1 = require_constants();
+ var collection_1 = require_collection();
+ var popup_control_1 = require_popup_control();
+ var PopupMenu = (
+ /** @class */
+ function(_super) {
+ __extends(PopupMenu2, _super);
+ function PopupMenu2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._items = new collection_1.Collection();
+ _this._renderedItems = [];
+ _this._selectedIndex = -1;
+ return _this;
+ }
+ PopupMenu2.prototype.renderContent = function() {
+ var element = document.createElement("div");
+ element.className = this.hostConfig.makeCssClassName("ac-ctrl ac-popup");
+ element.setAttribute("role", "listbox");
+ for (var i = 0; i < this._items.length; i++) {
+ var renderedItem = this._items.get(i).render(this.hostConfig);
+ renderedItem.tabIndex = 0;
+ element.appendChild(renderedItem);
+ if (i === this.selectedIndex) {
+ renderedItem.focus();
+ }
+ this._renderedItems.push(renderedItem);
+ }
+ return element;
+ };
+ PopupMenu2.prototype.keyDown = function(e) {
+ _super.prototype.keyDown.call(this, e);
+ var selectedItemIndex = this._selectedIndex;
+ switch (e.key) {
+ case constants_1.Constants.keys.tab:
+ this.closePopup(true);
+ break;
+ case constants_1.Constants.keys.up:
+ if (selectedItemIndex <= 0) {
+ selectedItemIndex = this._renderedItems.length - 1;
+ } else {
+ selectedItemIndex--;
+ if (selectedItemIndex < 0) {
+ selectedItemIndex = this._renderedItems.length - 1;
+ }
+ }
+ this.selectedIndex = selectedItemIndex;
+ e.cancelBubble = true;
+ break;
+ case constants_1.Constants.keys.down:
+ if (selectedItemIndex < 0) {
+ selectedItemIndex = 0;
+ } else {
+ selectedItemIndex++;
+ if (selectedItemIndex >= this._renderedItems.length) {
+ selectedItemIndex = 0;
+ }
+ }
+ this.selectedIndex = selectedItemIndex;
+ e.cancelBubble = true;
+ break;
+ }
+ };
+ Object.defineProperty(PopupMenu2.prototype, "items", {
+ get: function() {
+ return this._items;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(PopupMenu2.prototype, "selectedIndex", {
+ get: function() {
+ return this._selectedIndex;
+ },
+ set: function(index) {
+ if (index >= 0 && index < this._renderedItems.length) {
+ this._renderedItems[index].focus();
+ this._selectedIndex = index;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return PopupMenu2;
+ }(popup_control_1.PopupControl)
+ );
+ exports.PopupMenu = PopupMenu;
+ }
+});
+
+// node_modules/adaptivecards/lib/controls/index.js
+var require_controls = __commonJS({
+ "node_modules/adaptivecards/lib/controls/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() {
+ return m[k];
+ } };
+ }
+ Object.defineProperty(o, k2, desc);
+ } : function(o, m, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m[k];
+ });
+ var __exportStar = exports && exports.__exportStar || function(m, exports2) {
+ for (var p in m)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m, p);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ __exportStar(require_menu_item(), exports);
+ __exportStar(require_popup_menu(), exports);
+ }
+});
+
+// node_modules/adaptivecards/lib/card-elements.js
+var require_card_elements = __commonJS({
+ "node_modules/adaptivecards/lib/card-elements.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
+ r = Reflect.decorate(decorators, target, key, desc);
+ else
+ for (var i = decorators.length - 1; i >= 0; i--)
+ if (d = decorators[i])
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
+ function adopt(value) {
+ return value instanceof P ? value : new P(function(resolve) {
+ resolve(value);
+ });
+ }
+ return new (P || (P = Promise))(function(resolve, reject) {
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e) {
+ reject(e);
+ }
+ }
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e) {
+ reject(e);
+ }
+ }
+ function step(result) {
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ };
+ var __generator = exports && exports.__generator || function(thisArg, body) {
+ var _ = { label: 0, sent: function() {
+ if (t[0] & 1)
+ throw t[1];
+ return t[1];
+ }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
+ return this;
+ }), g;
+ function verb(n) {
+ return function(v) {
+ return step([n, v]);
+ };
+ }
+ function step(op) {
+ if (f)
+ throw new TypeError("Generator is already executing.");
+ while (_)
+ try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
+ return t;
+ if (y = 0, t)
+ op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0:
+ case 1:
+ t = op;
+ break;
+ case 4:
+ _.label++;
+ return { value: op[1], done: false };
+ case 5:
+ _.label++;
+ y = op[1];
+ op = [0];
+ continue;
+ case 7:
+ op = _.ops.pop();
+ _.trys.pop();
+ continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
+ _ = 0;
+ continue;
+ }
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
+ _.label = op[1];
+ break;
+ }
+ if (op[0] === 6 && _.label < t[1]) {
+ _.label = t[1];
+ t = op;
+ break;
+ }
+ if (t && _.label < t[2]) {
+ _.label = t[2];
+ _.ops.push(op);
+ break;
+ }
+ if (t[2])
+ _.ops.pop();
+ _.trys.pop();
+ continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) {
+ op = [6, e];
+ y = 0;
+ } finally {
+ f = t = 0;
+ }
+ if (op[0] & 5)
+ throw op[1];
+ return { value: op[0] ? op[1] : void 0, done: true };
+ }
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ContainerWithActions = exports.ColumnSet = exports.Column = exports.Container = exports.BackgroundImage = exports.ContainerBase = exports.StylableCardElementContainer = exports.ContainerStyleProperty = exports.ActionSet = exports.ShowCardAction = exports.HttpAction = exports.HttpHeader = exports.ToggleVisibilityAction = exports.OpenUrlAction = exports.ExecuteAction = exports.SubmitAction = exports.SubmitActionBase = exports.Action = exports.TimeInput = exports.TimeProperty = exports.DateInput = exports.NumberInput = exports.ChoiceSetInput = exports.Choice = exports.ToggleInput = exports.TextInput = exports.Input = exports.Media = exports.YouTubePlayer = exports.DailymotionPlayer = exports.VimeoPlayer = exports.IFrameMediaMediaPlayer = exports.CustomMediaPlayer = exports.HTML5MediaPlayer = exports.MediaPlayer = exports.MediaSource = exports.CaptionSource = exports.ContentSource = exports.ImageSet = exports.CardElementContainer = exports.Image = exports.FactSet = exports.Fact = exports.RichTextBlock = exports.TextRun = exports.TextBlock = exports.BaseTextBlock = exports.ActionProperty = exports.CardElement = exports.renderSeparation = void 0;
+ exports.SerializationContext = exports.AdaptiveCard = exports.Authentication = exports.TokenExchangeResource = exports.AuthCardButton = exports.RefreshDefinition = exports.RefreshActionProperty = void 0;
+ var Enums = require_enums();
+ var shared_1 = require_shared();
+ var Utils = require_utils();
+ var host_config_1 = require_host_config();
+ var TextFormatters = require_text_formatters();
+ var card_object_1 = require_card_object();
+ var serialization_1 = require_serialization();
+ var registry_1 = require_registry();
+ var strings_1 = require_strings();
+ var controls_1 = require_controls();
+ function clearElement(element) {
+ var _a, _b;
+ var trustedHtml = typeof window === "undefined" ? "" : (_b = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.emptyHTML) !== null && _b !== void 0 ? _b : "";
+ element.innerHTML = trustedHtml;
+ }
+ function renderSeparation(hostConfig, separationDefinition, orientation) {
+ if (separationDefinition.spacing > 0 || separationDefinition.lineThickness && separationDefinition.lineThickness > 0) {
+ var separator = document.createElement("div");
+ separator.className = hostConfig.makeCssClassName("ac-" + (orientation === Enums.Orientation.Horizontal ? "horizontal" : "vertical") + "-separator");
+ separator.setAttribute("aria-hidden", "true");
+ var color = separationDefinition.lineColor ? Utils.stringToCssColor(separationDefinition.lineColor) : "";
+ if (orientation === Enums.Orientation.Horizontal) {
+ if (separationDefinition.lineThickness) {
+ separator.style.paddingTop = separationDefinition.spacing / 2 + "px";
+ separator.style.marginBottom = separationDefinition.spacing / 2 + "px";
+ separator.style.borderBottom = separationDefinition.lineThickness + "px solid " + color;
+ } else {
+ separator.style.height = separationDefinition.spacing + "px";
+ }
+ } else {
+ if (separationDefinition.lineThickness) {
+ separator.style.paddingLeft = separationDefinition.spacing / 2 + "px";
+ separator.style.marginRight = separationDefinition.spacing / 2 + "px";
+ separator.style.borderRight = separationDefinition.lineThickness + "px solid " + color;
+ } else {
+ separator.style.width = separationDefinition.spacing + "px";
+ }
+ }
+ separator.style.overflow = "hidden";
+ separator.style.flex = "0 0 auto";
+ return separator;
+ } else {
+ return void 0;
+ }
+ }
+ exports.renderSeparation = renderSeparation;
+ var CardElement = (
+ /** @class */
+ function(_super) {
+ __extends(CardElement2, _super);
+ function CardElement2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._truncatedDueToOverflow = false;
+ return _this;
+ }
+ Object.defineProperty(CardElement2.prototype, "lang", {
+ get: function() {
+ var lang = this.getValue(CardElement2.langProperty);
+ if (lang) {
+ return lang;
+ } else {
+ if (this.parent) {
+ return this.parent.lang;
+ } else {
+ return void 0;
+ }
+ }
+ },
+ set: function(value) {
+ this.setValue(CardElement2.langProperty, value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "isVisible", {
+ get: function() {
+ return this.getValue(CardElement2.isVisibleProperty);
+ },
+ set: function(value) {
+ if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && !value) {
+ this.undoOverflowTruncation();
+ }
+ if (this.isVisible !== value) {
+ this.setValue(CardElement2.isVisibleProperty, value);
+ this.updateRenderedElementVisibility();
+ if (this._renderedElement) {
+ raiseElementVisibilityChangedEvent(this);
+ }
+ }
+ if (this._renderedElement) {
+ this._renderedElement.setAttribute("aria-expanded", value.toString());
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CardElement2.prototype.internalRenderSeparator = function() {
+ var renderedSeparator = 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 (shared_1.GlobalSettings.alwaysBleedSeparators && renderedSeparator && this.separatorOrientation === Enums.Orientation.Horizontal) {
+ var parentContainer = this.getParentContainer();
+ if (parentContainer && parentContainer.getEffectivePadding()) {
+ var parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(parentContainer.getEffectivePadding());
+ renderedSeparator.style.marginLeft = "-" + parentPhysicalPadding.left + "px";
+ renderedSeparator.style.marginRight = "-" + parentPhysicalPadding.right + "px";
+ }
+ }
+ return renderedSeparator;
+ };
+ CardElement2.prototype.updateRenderedElementVisibility = function() {
+ var displayMode = this.isDesignMode() || this.isVisible ? this._defaultRenderedElementDisplayMode : "none";
+ if (this._renderedElement) {
+ if (displayMode) {
+ this._renderedElement.style.display = displayMode;
+ } else {
+ this._renderedElement.style.removeProperty("display");
+ }
+ }
+ if (this._separatorElement) {
+ if (this.parent && this.parent.isFirstElement(this)) {
+ this._separatorElement.style.display = "none";
+ } else {
+ if (displayMode) {
+ this._separatorElement.style.display = displayMode;
+ } else {
+ this._separatorElement.style.removeProperty("display");
+ }
+ }
+ }
+ };
+ CardElement2.prototype.hideElementDueToOverflow = function() {
+ if (this._renderedElement && this.isVisible) {
+ this._renderedElement.style.visibility = "hidden";
+ this.isVisible = false;
+ raiseElementVisibilityChangedEvent(this, false);
+ }
+ };
+ CardElement2.prototype.showElementHiddenDueToOverflow = function() {
+ if (this._renderedElement && !this.isVisible) {
+ this._renderedElement.style.removeProperty("visibility");
+ this.isVisible = true;
+ raiseElementVisibilityChangedEvent(this, false);
+ }
+ };
+ CardElement2.prototype.handleOverflow = function(maxHeight) {
+ if (this.isVisible || this.isHiddenDueToOverflow()) {
+ var handled = this.truncateOverflow(maxHeight);
+ this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;
+ if (!handled) {
+ this.hideElementDueToOverflow();
+ } else if (handled && !this.isVisible) {
+ this.showElementHiddenDueToOverflow();
+ }
+ }
+ };
+ CardElement2.prototype.resetOverflow = function() {
+ var sizeChanged = false;
+ if (this._truncatedDueToOverflow) {
+ this.undoOverflowTruncation();
+ this._truncatedDueToOverflow = false;
+ sizeChanged = true;
+ }
+ if (this.isHiddenDueToOverflow()) {
+ this.showElementHiddenDueToOverflow();
+ }
+ return sizeChanged;
+ };
+ CardElement2.prototype.getDefaultSerializationContext = function() {
+ return new SerializationContext();
+ };
+ CardElement2.prototype.createPlaceholderElement = function() {
+ var styleDefinition = this.getEffectiveStyleDefinition();
+ var foregroundCssColor = Utils.stringToCssColor(styleDefinition.foregroundColors.default.subtle);
+ var element = document.createElement("div");
+ element.style.border = "1px dashed " + foregroundCssColor;
+ element.style.padding = "4px";
+ element.style.minHeight = "32px";
+ element.style.fontSize = "10px";
+ if (foregroundCssColor) {
+ element.style.color = foregroundCssColor;
+ }
+ element.innerText = "Empty " + this.getJsonTypeName();
+ return element;
+ };
+ CardElement2.prototype.adjustRenderedElementSize = function(renderedElement) {
+ if (this.height === "auto") {
+ renderedElement.style.flex = "0 0 auto";
+ } else {
+ renderedElement.style.flex = "1 1 auto";
+ }
+ };
+ CardElement2.prototype.isDisplayed = function() {
+ return this._renderedElement !== void 0 && this.isVisible && this._renderedElement.offsetHeight > 0;
+ };
+ CardElement2.prototype.overrideInternalRender = function() {
+ return this.internalRender();
+ };
+ CardElement2.prototype.applyPadding = function() {
+ if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {
+ if (shared_1.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {
+ var padding = new shared_1.PaddingDefinition();
+ this.getImmediateSurroundingPadding(padding);
+ var physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);
+ this.separatorElement.style.marginLeft = "-" + physicalPadding.left + "px";
+ this.separatorElement.style.marginRight = "-" + physicalPadding.right + "px";
+ } else {
+ this.separatorElement.style.marginRight = "0";
+ this.separatorElement.style.marginLeft = "0";
+ }
+ }
+ };
+ CardElement2.prototype.truncateOverflow = function(_maxHeight) {
+ return false;
+ };
+ CardElement2.prototype.undoOverflowTruncation = function() {
+ return;
+ };
+ CardElement2.prototype.getDefaultPadding = function() {
+ return new shared_1.PaddingDefinition();
+ };
+ CardElement2.prototype.getHasBackground = function(ignoreBackgroundImages) {
+ if (ignoreBackgroundImages === void 0) {
+ ignoreBackgroundImages = false;
+ }
+ return false;
+ };
+ CardElement2.prototype.getHasBorder = function() {
+ return false;
+ };
+ CardElement2.prototype.getPadding = function() {
+ return this._padding;
+ };
+ CardElement2.prototype.setPadding = function(value) {
+ this._padding = value;
+ };
+ CardElement2.prototype.shouldSerialize = function(context) {
+ return context.elementRegistry.findByName(this.getJsonTypeName()) !== void 0;
+ };
+ Object.defineProperty(CardElement2.prototype, "useDefaultSizing", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "separatorOrientation", {
+ get: function() {
+ return Enums.Orientation.Horizontal;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "defaultStyle", {
+ get: function() {
+ return Enums.ContainerStyle.Default;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CardElement2.prototype.parse = function(source, context) {
+ _super.prototype.parse.call(this, source, context ? context : new SerializationContext());
+ };
+ CardElement2.prototype.asString = function() {
+ return "";
+ };
+ CardElement2.prototype.isBleeding = function() {
+ return false;
+ };
+ CardElement2.prototype.getEffectiveStyle = function() {
+ if (this.parent) {
+ return this.parent.getEffectiveStyle();
+ }
+ return this.defaultStyle;
+ };
+ CardElement2.prototype.getEffectiveStyleDefinition = function() {
+ return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());
+ };
+ CardElement2.prototype.getEffectiveTextStyleDefinition = function() {
+ if (this.parent) {
+ return this.parent.getEffectiveTextStyleDefinition();
+ }
+ return this.hostConfig.textStyles.default;
+ };
+ CardElement2.prototype.getForbiddenActionTypes = function() {
+ return [];
+ };
+ CardElement2.prototype.getImmediateSurroundingPadding = function(result, processTop, processRight, processBottom, processLeft) {
+ if (processTop === void 0) {
+ processTop = true;
+ }
+ if (processRight === void 0) {
+ processRight = true;
+ }
+ if (processBottom === void 0) {
+ processBottom = true;
+ }
+ if (processLeft === void 0) {
+ processLeft = true;
+ }
+ if (this.parent) {
+ var doProcessTop = processTop && this.parent.isTopElement(this);
+ var doProcessRight = processRight && this.parent.isRightMostElement(this);
+ var doProcessBottom = processBottom && this.parent.isBottomElement(this);
+ var doProcessLeft = processLeft && this.parent.isLeftMostElement(this);
+ var effectivePadding = this.parent.getEffectivePadding();
+ if (effectivePadding) {
+ if (doProcessTop && effectivePadding.top !== Enums.Spacing.None) {
+ result.top = effectivePadding.top;
+ doProcessTop = false;
+ }
+ if (doProcessRight && effectivePadding.right !== Enums.Spacing.None) {
+ result.right = effectivePadding.right;
+ doProcessRight = false;
+ }
+ if (doProcessBottom && effectivePadding.bottom !== Enums.Spacing.None) {
+ result.bottom = effectivePadding.bottom;
+ doProcessBottom = false;
+ }
+ if (doProcessLeft && effectivePadding.left !== Enums.Spacing.None) {
+ result.left = effectivePadding.left;
+ doProcessLeft = false;
+ }
+ }
+ if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {
+ this.parent.getImmediateSurroundingPadding(result, doProcessTop, doProcessRight, doProcessBottom, doProcessLeft);
+ }
+ }
+ };
+ CardElement2.prototype.getActionCount = function() {
+ return 0;
+ };
+ CardElement2.prototype.getActionAt = function(index) {
+ throw new Error(strings_1.Strings.errors.indexOutOfRange(index));
+ };
+ CardElement2.prototype.indexOfAction = function(action) {
+ for (var i = 0; i < this.getActionCount(); i++) {
+ if (this.getActionAt(i) === action) {
+ return i;
+ }
+ }
+ return -1;
+ };
+ CardElement2.prototype.remove = function() {
+ if (this.parent && this.parent instanceof CardElementContainer) {
+ return this.parent.removeItem(this);
+ }
+ return false;
+ };
+ CardElement2.prototype.render = function() {
+ this._renderedElement = this.overrideInternalRender();
+ this._separatorElement = this.internalRenderSeparator();
+ if (this._renderedElement) {
+ if (this.id) {
+ this._renderedElement.id = this.id;
+ }
+ if (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(false);
+ } else if (this.isDesignMode()) {
+ this._renderedElement = this.createPlaceholderElement();
+ }
+ this.getRootElement().updateActionsEnabledState();
+ return this._renderedElement;
+ };
+ CardElement2.prototype.updateLayout = function(_processChildren) {
+ if (_processChildren === void 0) {
+ _processChildren = true;
+ }
+ this.updateRenderedElementVisibility();
+ this.applyPadding();
+ };
+ CardElement2.prototype.updateActionsEnabledState = function() {
+ var allActions = this.getRootElement().getAllActions();
+ for (var _i = 0, allActions_1 = allActions; _i < allActions_1.length; _i++) {
+ var action = allActions_1[_i];
+ action.updateEnabledState();
+ }
+ };
+ CardElement2.prototype.indexOf = function(_cardElement) {
+ return -1;
+ };
+ CardElement2.prototype.isDesignMode = function() {
+ var rootElement = this.getRootElement();
+ return rootElement instanceof AdaptiveCard && rootElement.designMode;
+ };
+ CardElement2.prototype.isFirstElement = function(_element) {
+ return true;
+ };
+ CardElement2.prototype.isLastElement = function(_element) {
+ return true;
+ };
+ CardElement2.prototype.isAtTheVeryLeft = function() {
+ return this.parent ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft() : true;
+ };
+ CardElement2.prototype.isAtTheVeryRight = function() {
+ return this.parent ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight() : true;
+ };
+ CardElement2.prototype.isAtTheVeryTop = function() {
+ return this.parent ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop() : true;
+ };
+ CardElement2.prototype.isAtTheVeryBottom = function() {
+ return this.parent ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom() : true;
+ };
+ CardElement2.prototype.isBleedingAtTop = function() {
+ return false;
+ };
+ CardElement2.prototype.isBleedingAtBottom = function() {
+ return false;
+ };
+ CardElement2.prototype.isLeftMostElement = function(_element) {
+ return true;
+ };
+ CardElement2.prototype.isRightMostElement = function(_element) {
+ return true;
+ };
+ CardElement2.prototype.isTopElement = function(element) {
+ return this.isFirstElement(element);
+ };
+ CardElement2.prototype.isBottomElement = function(element) {
+ return this.isLastElement(element);
+ };
+ CardElement2.prototype.isHiddenDueToOverflow = function() {
+ return this._renderedElement !== void 0 && this._renderedElement.style.visibility === "hidden";
+ };
+ CardElement2.prototype.getRootElement = function() {
+ return this.getRootObject();
+ };
+ CardElement2.prototype.getParentContainer = function() {
+ var currentElement = this.parent;
+ while (currentElement) {
+ if (currentElement instanceof Container) {
+ return currentElement;
+ }
+ currentElement = currentElement.parent;
+ }
+ return void 0;
+ };
+ CardElement2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ return [];
+ };
+ CardElement2.prototype.getAllActions = function() {
+ var result = [];
+ for (var i = 0; i < this.getActionCount(); i++) {
+ var action = this.getActionAt(i);
+ if (action) {
+ result.push(action);
+ }
+ }
+ return result;
+ };
+ CardElement2.prototype.getResourceInformation = function() {
+ return [];
+ };
+ CardElement2.prototype.getElementById = function(id) {
+ return this.id === id ? this : void 0;
+ };
+ CardElement2.prototype.getActionById = function(_id) {
+ return void 0;
+ };
+ CardElement2.prototype.getEffectivePadding = function() {
+ var padding = this.getPadding();
+ return padding ? padding : this.getDefaultPadding();
+ };
+ CardElement2.prototype.getEffectiveHorizontalAlignment = function() {
+ if (this.horizontalAlignment !== void 0) {
+ return this.horizontalAlignment;
+ }
+ if (this.parent) {
+ return this.parent.getEffectiveHorizontalAlignment();
+ }
+ return Enums.HorizontalAlignment.Left;
+ };
+ Object.defineProperty(CardElement2.prototype, "hostConfig", {
+ get: function() {
+ if (this._hostConfig) {
+ return this._hostConfig;
+ } else {
+ if (this.parent) {
+ return this.parent.hostConfig;
+ } else {
+ return host_config_1.defaultHostConfig;
+ }
+ }
+ },
+ set: function(value) {
+ this._hostConfig = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "index", {
+ get: function() {
+ if (this.parent) {
+ return this.parent.indexOf(this);
+ } else {
+ return 0;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "isInteractive", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "isStandalone", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "isInline", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "hasVisibleSeparator", {
+ get: function() {
+ if (this.parent && this.separatorElement) {
+ return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());
+ } else {
+ return false;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "separatorElement", {
+ get: function() {
+ return this._separatorElement;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(CardElement2.prototype, "parent", {
+ get: function() {
+ return this._parent;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CardElement2.prototype.getElementSingletonBehavior = function() {
+ return registry_1.ElementSingletonBehavior.NotAllowed;
+ };
+ CardElement2.langProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "lang", true, /^[a-z]{2,3}$/gi);
+ CardElement2.isVisibleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "isVisible", true);
+ CardElement2.separatorProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "separator", false);
+ CardElement2.heightProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_1, "height", [{ value: "auto" }, { value: "stretch" }], "auto");
+ CardElement2.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "horizontalAlignment", Enums.HorizontalAlignment);
+ CardElement2.spacingProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "spacing", Enums.Spacing, Enums.Spacing.Default);
+ __decorate([
+ (0, serialization_1.property)(CardElement2.horizontalAlignmentProperty)
+ ], CardElement2.prototype, "horizontalAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(CardElement2.spacingProperty)
+ ], CardElement2.prototype, "spacing", void 0);
+ __decorate([
+ (0, serialization_1.property)(CardElement2.separatorProperty)
+ ], CardElement2.prototype, "separator", void 0);
+ __decorate([
+ (0, serialization_1.property)(CardElement2.heightProperty)
+ ], CardElement2.prototype, "height", void 0);
+ __decorate([
+ (0, serialization_1.property)(CardElement2.langProperty)
+ ], CardElement2.prototype, "lang", null);
+ __decorate([
+ (0, serialization_1.property)(CardElement2.isVisibleProperty)
+ ], CardElement2.prototype, "isVisible", null);
+ return CardElement2;
+ }(card_object_1.CardObject)
+ );
+ exports.CardElement = CardElement;
+ var ActionProperty = (
+ /** @class */
+ function(_super) {
+ __extends(ActionProperty2, _super);
+ function ActionProperty2(targetVersion, name, forbiddenActionTypes) {
+ if (forbiddenActionTypes === void 0) {
+ forbiddenActionTypes = [];
+ }
+ var _this = _super.call(this, targetVersion, name, void 0) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.forbiddenActionTypes = forbiddenActionTypes;
+ return _this;
+ }
+ ActionProperty2.prototype.parse = function(sender, source, context) {
+ var parent = sender;
+ return context.parseAction(parent, source[this.name], this.forbiddenActionTypes, parent.isDesignMode());
+ };
+ ActionProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeValue(target, this.name, value ? value.toJSON(context) : void 0, void 0, true);
+ };
+ return ActionProperty2;
+ }(serialization_1.PropertyDefinition)
+ );
+ exports.ActionProperty = ActionProperty;
+ var BaseTextBlock = (
+ /** @class */
+ function(_super) {
+ __extends(BaseTextBlock2, _super);
+ function BaseTextBlock2(text) {
+ var _this = _super.call(this) || this;
+ _this.ariaHidden = false;
+ if (text) {
+ _this.text = text;
+ }
+ return _this;
+ }
+ BaseTextBlock2.prototype.populateSchema = function(schema) {
+ _super.prototype.populateSchema.call(this, schema);
+ schema.remove(BaseTextBlock2.selectActionProperty);
+ };
+ Object.defineProperty(BaseTextBlock2.prototype, "text", {
+ get: function() {
+ return this.getValue(BaseTextBlock2.textProperty);
+ },
+ set: function(value) {
+ this.setText(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ BaseTextBlock2.prototype.getFontSize = function(fontType) {
+ switch (this.effectiveSize) {
+ case Enums.TextSize.Small:
+ return fontType.fontSizes.small;
+ case Enums.TextSize.Medium:
+ return fontType.fontSizes.medium;
+ case Enums.TextSize.Large:
+ return fontType.fontSizes.large;
+ case Enums.TextSize.ExtraLarge:
+ return fontType.fontSizes.extraLarge;
+ default:
+ return fontType.fontSizes.default;
+ }
+ };
+ BaseTextBlock2.prototype.getColorDefinition = function(colorSet, color) {
+ switch (color) {
+ case Enums.TextColor.Accent:
+ return colorSet.accent;
+ case Enums.TextColor.Dark:
+ return colorSet.dark;
+ case Enums.TextColor.Light:
+ return colorSet.light;
+ case Enums.TextColor.Good:
+ return colorSet.good;
+ case Enums.TextColor.Warning:
+ return colorSet.warning;
+ case Enums.TextColor.Attention:
+ return colorSet.attention;
+ default:
+ return colorSet.default;
+ }
+ };
+ BaseTextBlock2.prototype.setText = function(value) {
+ this.setValue(BaseTextBlock2.textProperty, value);
+ };
+ BaseTextBlock2.prototype.init = function(textDefinition) {
+ this.size = textDefinition.size;
+ this.weight = textDefinition.weight;
+ this.color = textDefinition.color;
+ this.isSubtle = textDefinition.isSubtle;
+ };
+ BaseTextBlock2.prototype.asString = function() {
+ return this.text;
+ };
+ BaseTextBlock2.prototype.applyStylesTo = function(targetElement) {
+ var fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);
+ if (fontType.fontFamily) {
+ targetElement.style.fontFamily = fontType.fontFamily;
+ }
+ var fontSize;
+ switch (this.effectiveSize) {
+ case Enums.TextSize.Small:
+ fontSize = fontType.fontSizes.small;
+ break;
+ case Enums.TextSize.Medium:
+ fontSize = fontType.fontSizes.medium;
+ break;
+ case Enums.TextSize.Large:
+ fontSize = fontType.fontSizes.large;
+ break;
+ case Enums.TextSize.ExtraLarge:
+ fontSize = fontType.fontSizes.extraLarge;
+ break;
+ default:
+ fontSize = fontType.fontSizes.default;
+ break;
+ }
+ targetElement.style.fontSize = fontSize + "px";
+ var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);
+ var targetColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default);
+ if (targetColor) {
+ targetElement.style.color = targetColor;
+ }
+ var fontWeight;
+ switch (this.effectiveWeight) {
+ case Enums.TextWeight.Lighter:
+ fontWeight = fontType.fontWeights.lighter;
+ break;
+ case Enums.TextWeight.Bolder:
+ fontWeight = fontType.fontWeights.bolder;
+ break;
+ default:
+ fontWeight = fontType.fontWeights.default;
+ break;
+ }
+ targetElement.style.fontWeight = fontWeight.toString();
+ if (this.ariaHidden) {
+ targetElement.setAttribute("aria-hidden", "true");
+ }
+ };
+ BaseTextBlock2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ if (this.selectAction) {
+ result.push(this.selectAction);
+ }
+ return result;
+ };
+ Object.defineProperty(BaseTextBlock2.prototype, "effectiveColor", {
+ get: function() {
+ return this.color !== void 0 ? this.color : this.getEffectiveTextStyleDefinition().color;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(BaseTextBlock2.prototype, "effectiveFontType", {
+ get: function() {
+ return this.fontType !== void 0 ? this.fontType : this.getEffectiveTextStyleDefinition().fontType;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(BaseTextBlock2.prototype, "effectiveIsSubtle", {
+ get: function() {
+ return this.isSubtle !== void 0 ? this.isSubtle : this.getEffectiveTextStyleDefinition().isSubtle;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(BaseTextBlock2.prototype, "effectiveSize", {
+ get: function() {
+ return this.size !== void 0 ? this.size : this.getEffectiveTextStyleDefinition().size;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(BaseTextBlock2.prototype, "effectiveWeight", {
+ get: function() {
+ return this.weight !== void 0 ? this.weight : this.getEffectiveTextStyleDefinition().weight;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ BaseTextBlock2.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "text", true);
+ BaseTextBlock2.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "size", Enums.TextSize);
+ BaseTextBlock2.weightProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "weight", Enums.TextWeight);
+ BaseTextBlock2.colorProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "color", Enums.TextColor);
+ BaseTextBlock2.isSubtleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "isSubtle");
+ BaseTextBlock2.fontTypeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "fontType", Enums.FontType);
+ BaseTextBlock2.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, "selectAction", [
+ "Action.ShowCard"
+ ]);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.sizeProperty)
+ ], BaseTextBlock2.prototype, "size", void 0);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.weightProperty)
+ ], BaseTextBlock2.prototype, "weight", void 0);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.colorProperty)
+ ], BaseTextBlock2.prototype, "color", void 0);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.fontTypeProperty)
+ ], BaseTextBlock2.prototype, "fontType", void 0);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.isSubtleProperty)
+ ], BaseTextBlock2.prototype, "isSubtle", void 0);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.textProperty)
+ ], BaseTextBlock2.prototype, "text", null);
+ __decorate([
+ (0, serialization_1.property)(BaseTextBlock2.selectActionProperty)
+ ], BaseTextBlock2.prototype, "selectAction", void 0);
+ return BaseTextBlock2;
+ }(CardElement)
+ );
+ exports.BaseTextBlock = BaseTextBlock;
+ var TextBlock = (
+ /** @class */
+ function(_super) {
+ __extends(TextBlock2, _super);
+ function TextBlock2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.wrap = false;
+ _this._treatAsPlainText = true;
+ _this.useMarkdown = true;
+ return _this;
+ }
+ TextBlock2.prototype.restoreOriginalContent = function() {
+ var _a2, _b2;
+ if (this.renderedElement !== void 0) {
+ if (this.maxLines && this.maxLines > 0) {
+ this.renderedElement.style.maxHeight = this._computedLineHeight * this.maxLines + "px";
+ }
+ var originalHtml = (_b2 = (_a2 = TextBlock2._ttRoundtripPolicy) === null || _a2 === void 0 ? void 0 : _a2.createHTML(this._originalInnerHtml)) !== null && _b2 !== void 0 ? _b2 : this._originalInnerHtml;
+ this.renderedElement.innerHTML = originalHtml;
+ }
+ };
+ TextBlock2.prototype.truncateIfSupported = function(maxHeight) {
+ if (this.renderedElement !== void 0) {
+ var children = this.renderedElement.children;
+ var isTextOnly = !children.length;
+ var truncationSupported = isTextOnly || children.length === 1 && children[0].tagName.toLowerCase() === "p" && !children[0].children.length;
+ if (truncationSupported) {
+ var element = isTextOnly ? this.renderedElement : children[0];
+ Utils.truncateText(element, maxHeight, this._computedLineHeight);
+ return true;
+ }
+ }
+ return false;
+ };
+ TextBlock2.prototype.setText = function(value) {
+ _super.prototype.setText.call(this, value);
+ this._processedText = void 0;
+ };
+ TextBlock2.prototype.internalRender = function() {
+ var _this = this;
+ var _a2, _b2;
+ this._processedText = void 0;
+ if (this.text) {
+ var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);
+ var hostConfig = this.hostConfig;
+ var element = void 0;
+ if (this.forElementId) {
+ var labelElement = document.createElement("label");
+ labelElement.htmlFor = this.forElementId;
+ element = labelElement;
+ } else {
+ element = document.createElement("div");
+ }
+ element.classList.add(hostConfig.makeCssClassName("ac-textBlock"));
+ element.style.overflow = "hidden";
+ this.applyStylesTo(element);
+ if (this.style === "heading") {
+ element.setAttribute("role", "heading");
+ var headingLevel = this.hostConfig.textBlock.headingLevel;
+ if (headingLevel !== void 0 && headingLevel > 0) {
+ element.setAttribute("aria-level", headingLevel.toString());
+ }
+ }
+ if (this.selectAction && hostConfig.supportsInteractivity) {
+ element.onclick = function(e) {
+ if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this.selectAction.execute();
+ }
+ };
+ this.selectAction.setupElementForAccessibility(element);
+ if (this.selectAction.isEffectivelyEnabled()) {
+ element.classList.add(hostConfig.makeCssClassName("ac-selectable"));
+ }
+ }
+ if (!this._processedText) {
+ this._treatAsPlainText = true;
+ var formattedText = TextFormatters.formatText(this.lang, preProcessedText);
+ if (this.useMarkdown && formattedText) {
+ if (shared_1.GlobalSettings.allowMarkForTextHighlighting) {
+ formattedText = formattedText.replace(//g, "===").replace(/<\/mark>/g, "/==/");
+ }
+ var markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);
+ if (markdownProcessingResult.didProcess && markdownProcessingResult.outputHtml) {
+ this._processedText = markdownProcessingResult.outputHtml;
+ this._treatAsPlainText = false;
+ if (shared_1.GlobalSettings.allowMarkForTextHighlighting && this._processedText) {
+ var markStyle = "";
+ var effectiveStyle = this.getEffectiveStyleDefinition();
+ if (effectiveStyle.highlightBackgroundColor) {
+ markStyle += "background-color: " + effectiveStyle.highlightBackgroundColor + ";";
+ }
+ if (effectiveStyle.highlightForegroundColor) {
+ markStyle += "color: " + effectiveStyle.highlightForegroundColor + ";";
+ }
+ if (markStyle) {
+ markStyle = 'style="' + markStyle + '"';
+ }
+ this._processedText = this._processedText.replace(/===/g, "").replace(/\/==\//g, " ");
+ }
+ } else {
+ this._processedText = formattedText;
+ this._treatAsPlainText = true;
+ }
+ } else {
+ this._processedText = formattedText;
+ this._treatAsPlainText = true;
+ }
+ }
+ if (!this._processedText) {
+ this._processedText = "";
+ }
+ if (this._treatAsPlainText) {
+ element.innerText = this._processedText;
+ } else {
+ var processedHtml = (_b2 = (_a2 = TextBlock2._ttMarkdownPolicy) === null || _a2 === void 0 ? void 0 : _a2.createHTML(this._processedText)) !== null && _b2 !== void 0 ? _b2 : this._processedText;
+ element.innerHTML = processedHtml;
+ }
+ if (element.firstElementChild instanceof HTMLElement) {
+ var firstElementChild = element.firstElementChild;
+ firstElementChild.style.marginTop = "0px";
+ firstElementChild.style.width = "100%";
+ if (!this.wrap) {
+ firstElementChild.style.overflow = "hidden";
+ firstElementChild.style.textOverflow = "ellipsis";
+ }
+ }
+ if (element.lastElementChild instanceof HTMLElement) {
+ element.lastElementChild.style.marginBottom = "0px";
+ }
+ var anchors = element.getElementsByTagName("a");
+ var _loop_1 = function(anchor2) {
+ anchor2.classList.add(hostConfig.makeCssClassName("ac-anchor"));
+ anchor2.target = "_blank";
+ anchor2.onclick = function(e) {
+ if (raiseAnchorClickedEvent(_this, anchor2, e)) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ }
+ };
+ anchor2.oncontextmenu = function(e) {
+ if (raiseAnchorClickedEvent(_this, anchor2, e)) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ return false;
+ }
+ return true;
+ };
+ };
+ for (var _i = 0, _c = Array.from(anchors); _i < _c.length; _i++) {
+ var anchor = _c[_i];
+ _loop_1(anchor);
+ }
+ if (this.wrap) {
+ element.style.wordWrap = "break-word";
+ if (this.maxLines && this.maxLines > 0) {
+ element.style.overflow = "hidden";
+ if (Utils.isInternetExplorer() || !shared_1.GlobalSettings.useWebkitLineClamp) {
+ element.style.maxHeight = this._computedLineHeight * this.maxLines + "px";
+ } else {
+ element.style.removeProperty("line-height");
+ element.style.display = "-webkit-box";
+ element.style.webkitBoxOrient = "vertical";
+ element.style.webkitLineClamp = this.maxLines.toString();
+ }
+ }
+ } else {
+ element.style.whiteSpace = "nowrap";
+ element.style.textOverflow = "ellipsis";
+ }
+ if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation || shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {
+ this._originalInnerHtml = element.innerHTML;
+ }
+ return element;
+ } else {
+ return void 0;
+ }
+ };
+ TextBlock2.prototype.truncateOverflow = function(maxHeight) {
+ if (maxHeight >= this._computedLineHeight) {
+ return this.truncateIfSupported(maxHeight);
+ }
+ return false;
+ };
+ TextBlock2.prototype.undoOverflowTruncation = function() {
+ this.restoreOriginalContent();
+ if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {
+ var maxHeight = this._computedLineHeight * this.maxLines;
+ this.truncateIfSupported(maxHeight);
+ }
+ };
+ TextBlock2.prototype.applyStylesTo = function(targetElement) {
+ _super.prototype.applyStylesTo.call(this, targetElement);
+ switch (this.getEffectiveHorizontalAlignment()) {
+ case Enums.HorizontalAlignment.Center:
+ targetElement.style.textAlign = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ targetElement.style.textAlign = "end";
+ break;
+ default:
+ targetElement.style.textAlign = "start";
+ break;
+ }
+ var lineHeights = this.hostConfig.lineHeights;
+ if (lineHeights) {
+ switch (this.effectiveSize) {
+ case Enums.TextSize.Small:
+ this._computedLineHeight = lineHeights.small;
+ break;
+ case Enums.TextSize.Medium:
+ this._computedLineHeight = lineHeights.medium;
+ break;
+ case Enums.TextSize.Large:
+ this._computedLineHeight = lineHeights.large;
+ break;
+ case Enums.TextSize.ExtraLarge:
+ this._computedLineHeight = lineHeights.extraLarge;
+ break;
+ default:
+ this._computedLineHeight = lineHeights.default;
+ break;
+ }
+ } else {
+ this._computedLineHeight = this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) * 1.33;
+ }
+ targetElement.style.lineHeight = this._computedLineHeight + "px";
+ };
+ TextBlock2.prototype.getJsonTypeName = function() {
+ return "TextBlock";
+ };
+ TextBlock2.prototype.getEffectiveTextStyleDefinition = function() {
+ if (this.style) {
+ return this.hostConfig.textStyles.getStyleByName(this.style);
+ }
+ return _super.prototype.getEffectiveTextStyleDefinition.call(this);
+ };
+ TextBlock2.prototype.updateLayout = function(processChildren) {
+ if (processChildren === void 0) {
+ processChildren = false;
+ }
+ _super.prototype.updateLayout.call(this, processChildren);
+ if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {
+ this.restoreOriginalContent();
+ this.truncateIfSupported(this._computedLineHeight * this.maxLines);
+ }
+ };
+ var _a, _b;
+ TextBlock2.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "wrap", false);
+ TextBlock2.maxLinesProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "maxLines");
+ TextBlock2.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, "style", [
+ { value: "default" },
+ { value: "columnHeader" },
+ { value: "heading" }
+ ]);
+ TextBlock2._ttMarkdownPolicy = typeof window === "undefined" ? void 0 : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy("adaptivecards#markdownPassthroughPolicy", { createHTML: function(value) {
+ return value;
+ } });
+ TextBlock2._ttRoundtripPolicy = typeof window === "undefined" ? void 0 : (_b = window.trustedTypes) === null || _b === void 0 ? void 0 : _b.createPolicy("adaptivecards#restoreContentsPolicy", { createHTML: function(value) {
+ return value;
+ } });
+ __decorate([
+ (0, serialization_1.property)(TextBlock2.wrapProperty)
+ ], TextBlock2.prototype, "wrap", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextBlock2.maxLinesProperty)
+ ], TextBlock2.prototype, "maxLines", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextBlock2.styleProperty)
+ ], TextBlock2.prototype, "style", void 0);
+ return TextBlock2;
+ }(BaseTextBlock)
+ );
+ exports.TextBlock = TextBlock;
+ var TextRun = (
+ /** @class */
+ function(_super) {
+ __extends(TextRun2, _super);
+ function TextRun2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.italic = false;
+ _this.strikethrough = false;
+ _this.highlight = false;
+ _this.underline = false;
+ return _this;
+ }
+ TextRun2.prototype.populateSchema = function(schema) {
+ _super.prototype.populateSchema.call(this, schema);
+ schema.add(BaseTextBlock.selectActionProperty);
+ };
+ TextRun2.prototype.internalRender = function() {
+ var _this = this;
+ if (this.text) {
+ var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);
+ var hostConfig = this.hostConfig;
+ var formattedText = TextFormatters.formatText(this.lang, preProcessedText);
+ if (!formattedText) {
+ formattedText = "";
+ }
+ var element = document.createElement("span");
+ element.classList.add(hostConfig.makeCssClassName("ac-textRun"));
+ this.applyStylesTo(element);
+ if (this.selectAction && hostConfig.supportsInteractivity) {
+ var anchor = document.createElement("a");
+ anchor.classList.add(hostConfig.makeCssClassName("ac-anchor"));
+ var href = this.selectAction.getHref();
+ anchor.href = href ? href : "";
+ anchor.target = "_blank";
+ anchor.onclick = function(e) {
+ if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this.selectAction.execute();
+ }
+ };
+ this.selectAction.setupElementForAccessibility(anchor);
+ anchor.innerText = formattedText;
+ element.appendChild(anchor);
+ } else {
+ element.innerText = formattedText;
+ }
+ return element;
+ } else {
+ return void 0;
+ }
+ };
+ TextRun2.prototype.applyStylesTo = function(targetElement) {
+ _super.prototype.applyStylesTo.call(this, targetElement);
+ if (this.italic) {
+ targetElement.style.fontStyle = "italic";
+ }
+ if (this.strikethrough) {
+ targetElement.style.textDecoration = "line-through";
+ }
+ if (this.highlight) {
+ var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);
+ var backgroundColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.highlightColors.subtle : colorDefinition.highlightColors.default);
+ if (backgroundColor) {
+ targetElement.style.backgroundColor = backgroundColor;
+ }
+ }
+ if (this.underline) {
+ targetElement.style.textDecoration = "underline";
+ }
+ };
+ TextRun2.prototype.getJsonTypeName = function() {
+ return "TextRun";
+ };
+ Object.defineProperty(TextRun2.prototype, "isStandalone", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(TextRun2.prototype, "isInline", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ TextRun2.italicProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "italic", false);
+ TextRun2.strikethroughProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "strikethrough", false);
+ TextRun2.highlightProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "highlight", false);
+ TextRun2.underlineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, "underline", false);
+ __decorate([
+ (0, serialization_1.property)(TextRun2.italicProperty)
+ ], TextRun2.prototype, "italic", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextRun2.strikethroughProperty)
+ ], TextRun2.prototype, "strikethrough", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextRun2.highlightProperty)
+ ], TextRun2.prototype, "highlight", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextRun2.underlineProperty)
+ ], TextRun2.prototype, "underline", void 0);
+ return TextRun2;
+ }(BaseTextBlock)
+ );
+ exports.TextRun = TextRun;
+ var RichTextBlock = (
+ /** @class */
+ function(_super) {
+ __extends(RichTextBlock2, _super);
+ function RichTextBlock2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._inlines = [];
+ return _this;
+ }
+ RichTextBlock2.prototype.internalAddInline = function(inline, forceAdd) {
+ if (forceAdd === void 0) {
+ forceAdd = false;
+ }
+ if (!inline.isInline) {
+ throw new Error(strings_1.Strings.errors.elementCannotBeUsedAsInline());
+ }
+ var doAdd = inline.parent === void 0 || forceAdd;
+ if (!doAdd && inline.parent !== this) {
+ throw new Error(strings_1.Strings.errors.inlineAlreadyParented());
+ } else {
+ inline.setParent(this);
+ this._inlines.push(inline);
+ }
+ };
+ RichTextBlock2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this._inlines = [];
+ if (Array.isArray(source["inlines"])) {
+ for (var _i = 0, _a = source["inlines"]; _i < _a.length; _i++) {
+ var jsonInline = _a[_i];
+ var inline = void 0;
+ if (typeof jsonInline === "string") {
+ var textRun = new TextRun();
+ textRun.text = jsonInline;
+ inline = textRun;
+ } else {
+ inline = context.parseElement(this, jsonInline, [], false);
+ }
+ if (inline) {
+ this.internalAddInline(inline, true);
+ }
+ }
+ }
+ };
+ RichTextBlock2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ if (this._inlines.length > 0) {
+ var jsonInlines = [];
+ for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {
+ var inline = _a[_i];
+ jsonInlines.push(inline.toJSON(context));
+ }
+ context.serializeValue(target, "inlines", jsonInlines);
+ }
+ };
+ RichTextBlock2.prototype.internalRender = function() {
+ if (this._inlines.length > 0) {
+ var element = void 0;
+ if (this.forElementId) {
+ var labelElement = document.createElement("label");
+ labelElement.htmlFor = this.forElementId;
+ element = labelElement;
+ } else {
+ element = document.createElement("div");
+ }
+ element.className = this.hostConfig.makeCssClassName("ac-richTextBlock");
+ switch (this.getEffectiveHorizontalAlignment()) {
+ case Enums.HorizontalAlignment.Center:
+ element.style.textAlign = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ element.style.textAlign = "end";
+ break;
+ default:
+ element.style.textAlign = "start";
+ break;
+ }
+ var renderedInlines = 0;
+ for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {
+ var inline = _a[_i];
+ var renderedInline = inline.render();
+ if (renderedInline) {
+ element.appendChild(renderedInline);
+ renderedInlines++;
+ }
+ }
+ if (renderedInlines > 0) {
+ return element;
+ }
+ }
+ return void 0;
+ };
+ RichTextBlock2.prototype.asString = function() {
+ var result = "";
+ for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {
+ var inline = _a[_i];
+ result += inline.asString();
+ }
+ return result;
+ };
+ RichTextBlock2.prototype.getJsonTypeName = function() {
+ return "RichTextBlock";
+ };
+ RichTextBlock2.prototype.getInlineCount = function() {
+ return this._inlines.length;
+ };
+ RichTextBlock2.prototype.getInlineAt = function(index) {
+ if (index >= 0 && index < this._inlines.length) {
+ return this._inlines[index];
+ } else {
+ throw new Error(strings_1.Strings.errors.indexOutOfRange(index));
+ }
+ };
+ RichTextBlock2.prototype.addInline = function(inline) {
+ if (typeof inline === "string") {
+ this.internalAddInline(new TextRun(inline));
+ } else {
+ this.internalAddInline(inline);
+ }
+ };
+ RichTextBlock2.prototype.removeInline = function(inline) {
+ var index = this._inlines.indexOf(inline);
+ if (index >= 0) {
+ this._inlines[index].setParent(void 0);
+ this._inlines.splice(index, 1);
+ return true;
+ }
+ return false;
+ };
+ return RichTextBlock2;
+ }(CardElement)
+ );
+ exports.RichTextBlock = RichTextBlock;
+ var Fact = (
+ /** @class */
+ function(_super) {
+ __extends(Fact2, _super);
+ function Fact2(name, value) {
+ var _this = _super.call(this) || this;
+ _this.name = name;
+ _this.value = value;
+ return _this;
+ }
+ Fact2.prototype.getSchemaKey = function() {
+ return "Fact";
+ };
+ Fact2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title");
+ Fact2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value");
+ __decorate([
+ (0, serialization_1.property)(Fact2.titleProperty)
+ ], Fact2.prototype, "name", void 0);
+ __decorate([
+ (0, serialization_1.property)(Fact2.valueProperty)
+ ], Fact2.prototype, "value", void 0);
+ return Fact2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.Fact = Fact;
+ var FactSet = (
+ /** @class */
+ function(_super) {
+ __extends(FactSet2, _super);
+ function FactSet2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ Object.defineProperty(FactSet2.prototype, "useDefaultSizing", {
+ //#endregion
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ FactSet2.prototype.internalRender = function() {
+ var element = void 0;
+ var hostConfig = this.hostConfig;
+ if (this.facts.length > 0) {
+ element = document.createElement("table");
+ element.style.borderWidth = "0px";
+ element.style.borderSpacing = "0px";
+ element.style.borderStyle = "none";
+ element.style.borderCollapse = "collapse";
+ element.style.display = "block";
+ element.style.overflow = "hidden";
+ element.classList.add(hostConfig.makeCssClassName("ac-factset"));
+ element.setAttribute("role", "presentation");
+ for (var i = 0; i < this.facts.length; i++) {
+ var trElement = document.createElement("tr");
+ if (i > 0) {
+ trElement.style.marginTop = hostConfig.factSet.spacing + "px";
+ }
+ var tdElement = document.createElement("td");
+ tdElement.style.padding = "0";
+ tdElement.classList.add(hostConfig.makeCssClassName("ac-fact-title"));
+ if (hostConfig.factSet.title.maxWidth) {
+ tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + "px";
+ }
+ tdElement.style.verticalAlign = "top";
+ var textBlock = new TextBlock();
+ textBlock.setParent(this);
+ textBlock.text = !this.facts[i].name && this.isDesignMode() ? "Title" : this.facts[i].name;
+ textBlock.size = hostConfig.factSet.title.size;
+ textBlock.color = hostConfig.factSet.title.color;
+ textBlock.isSubtle = hostConfig.factSet.title.isSubtle;
+ textBlock.weight = hostConfig.factSet.title.weight;
+ textBlock.wrap = hostConfig.factSet.title.wrap;
+ textBlock.spacing = Enums.Spacing.None;
+ Utils.appendChild(tdElement, textBlock.render());
+ Utils.appendChild(trElement, tdElement);
+ tdElement = document.createElement("td");
+ tdElement.style.width = "10px";
+ Utils.appendChild(trElement, tdElement);
+ tdElement = document.createElement("td");
+ tdElement.style.padding = "0";
+ tdElement.style.verticalAlign = "top";
+ tdElement.classList.add(hostConfig.makeCssClassName("ac-fact-value"));
+ textBlock = new TextBlock();
+ textBlock.setParent(this);
+ textBlock.text = this.facts[i].value;
+ textBlock.size = hostConfig.factSet.value.size;
+ textBlock.color = hostConfig.factSet.value.color;
+ textBlock.isSubtle = hostConfig.factSet.value.isSubtle;
+ textBlock.weight = hostConfig.factSet.value.weight;
+ textBlock.wrap = hostConfig.factSet.value.wrap;
+ textBlock.spacing = Enums.Spacing.None;
+ Utils.appendChild(tdElement, textBlock.render());
+ Utils.appendChild(trElement, tdElement);
+ Utils.appendChild(element, trElement);
+ }
+ }
+ return element;
+ };
+ FactSet2.prototype.getJsonTypeName = function() {
+ return "FactSet";
+ };
+ FactSet2.factsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "facts", Fact);
+ __decorate([
+ (0, serialization_1.property)(FactSet2.factsProperty)
+ ], FactSet2.prototype, "facts", void 0);
+ return FactSet2;
+ }(CardElement)
+ );
+ exports.FactSet = FactSet;
+ var ImageDimensionProperty = (
+ /** @class */
+ function(_super) {
+ __extends(ImageDimensionProperty2, _super);
+ function ImageDimensionProperty2(targetVersion, name, internalName, fallbackProperty) {
+ var _this = _super.call(this, targetVersion, name) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.internalName = internalName;
+ _this.fallbackProperty = fallbackProperty;
+ return _this;
+ }
+ ImageDimensionProperty2.prototype.getInternalName = function() {
+ return this.internalName;
+ };
+ ImageDimensionProperty2.prototype.parse = function(sender, source, context) {
+ var result = void 0;
+ var sourceValue = source[this.name];
+ if (sourceValue === void 0) {
+ return this.defaultValue;
+ }
+ var isValid = false;
+ if (typeof sourceValue === "string") {
+ try {
+ var size = shared_1.SizeAndUnit.parse(sourceValue, true);
+ if (size.unit === Enums.SizeUnit.Pixel) {
+ result = size.physicalSize;
+ isValid = true;
+ }
+ } catch (_a) {
+ }
+ if (!isValid && this.fallbackProperty) {
+ isValid = this.fallbackProperty.isValidValue(sourceValue, context);
+ }
+ }
+ if (!isValid) {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));
+ }
+ return result;
+ };
+ ImageDimensionProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeValue(target, this.name, typeof value === "number" && !isNaN(value) ? value + "px" : void 0);
+ };
+ return ImageDimensionProperty2;
+ }(serialization_1.PropertyDefinition)
+ );
+ var Image = (
+ /** @class */
+ function(_super) {
+ __extends(Image2, _super);
+ function Image2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.size = Enums.Size.Auto;
+ _this.style = Enums.ImageStyle.Default;
+ return _this;
+ }
+ Image2.prototype.populateSchema = function(schema) {
+ _super.prototype.populateSchema.call(this, schema);
+ schema.remove(CardElement.heightProperty);
+ };
+ Image2.prototype.applySize = function(element) {
+ if (this.pixelWidth || this.pixelHeight) {
+ if (this.pixelWidth) {
+ element.style.width = this.pixelWidth + "px";
+ }
+ if (this.pixelHeight) {
+ element.style.height = this.pixelHeight + "px";
+ }
+ } else {
+ if (this.maxHeight) {
+ switch (this.size) {
+ case Enums.Size.Small:
+ element.style.height = this.hostConfig.imageSizes.small + "px";
+ break;
+ case Enums.Size.Large:
+ element.style.height = this.hostConfig.imageSizes.large + "px";
+ break;
+ default:
+ element.style.height = this.hostConfig.imageSizes.medium + "px";
+ break;
+ }
+ element.style.maxHeight = this.maxHeight + "px";
+ } else {
+ switch (this.size) {
+ case Enums.Size.Stretch:
+ element.style.width = "100%";
+ break;
+ case Enums.Size.Auto:
+ element.style.maxWidth = "100%";
+ break;
+ case Enums.Size.Small:
+ element.style.width = this.hostConfig.imageSizes.small + "px";
+ break;
+ case Enums.Size.Large:
+ element.style.width = this.hostConfig.imageSizes.large + "px";
+ break;
+ case Enums.Size.Medium:
+ element.style.width = this.hostConfig.imageSizes.medium + "px";
+ break;
+ }
+ element.style.maxHeight = "100%";
+ }
+ }
+ };
+ Object.defineProperty(Image2.prototype, "useDefaultSizing", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Image2.prototype.internalRender = function() {
+ var _this = this;
+ var element = void 0;
+ if (this.url) {
+ element = document.createElement("div");
+ element.style.display = "flex";
+ element.style.alignItems = "flex-start";
+ var hostConfig = this.hostConfig;
+ switch (this.getEffectiveHorizontalAlignment()) {
+ case Enums.HorizontalAlignment.Center:
+ element.style.justifyContent = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ element.style.justifyContent = "flex-end";
+ break;
+ default:
+ element.style.justifyContent = "flex-start";
+ break;
+ }
+ var imageElement = document.createElement("img");
+ imageElement.onload = function(_e) {
+ raiseImageLoadedEvent(_this);
+ };
+ imageElement.onerror = function(_e) {
+ if (_this.renderedElement) {
+ var card = _this.getRootElement();
+ _this.renderedElement;
+ if (card && card.designMode) {
+ var errorElement = document.createElement("div");
+ errorElement.style.display = "flex";
+ errorElement.style.alignItems = "center";
+ errorElement.style.justifyContent = "center";
+ errorElement.style.backgroundColor = "#EEEEEE";
+ errorElement.style.color = "black";
+ errorElement.innerText = ":-(";
+ errorElement.style.padding = "10px";
+ _this.applySize(errorElement);
+ _this.renderedElement.appendChild(errorElement);
+ }
+ }
+ raiseImageLoadedEvent(_this);
+ };
+ imageElement.style.minWidth = "0";
+ imageElement.classList.add(hostConfig.makeCssClassName("ac-image"));
+ if (this.selectAction && hostConfig.supportsInteractivity) {
+ imageElement.onkeypress = function(e) {
+ if (_this.selectAction && _this.selectAction.isEffectivelyEnabled() && (e.code === "Enter" || e.code === "Space")) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this.selectAction.execute();
+ }
+ };
+ imageElement.onclick = function(e) {
+ if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this.selectAction.execute();
+ }
+ };
+ this.selectAction.setupElementForAccessibility(imageElement);
+ if (this.selectAction.isEffectivelyEnabled()) {
+ imageElement.classList.add(hostConfig.makeCssClassName("ac-selectable"));
+ }
+ }
+ this.applySize(imageElement);
+ if (this.style === Enums.ImageStyle.Person) {
+ imageElement.style.borderRadius = "50%";
+ imageElement.style.backgroundPosition = "50% 50%";
+ imageElement.style.backgroundRepeat = "no-repeat";
+ }
+ var backgroundColor = Utils.stringToCssColor(this.backgroundColor);
+ if (backgroundColor) {
+ imageElement.style.backgroundColor = backgroundColor;
+ }
+ imageElement.src = this.preProcessPropertyValue(Image2.urlProperty);
+ var altTextProperty = this.preProcessPropertyValue(Image2.altTextProperty);
+ if (altTextProperty) {
+ imageElement.alt = altTextProperty;
+ }
+ element.appendChild(imageElement);
+ }
+ return element;
+ };
+ Image2.prototype.getJsonTypeName = function() {
+ return "Image";
+ };
+ Image2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ if (this.selectAction) {
+ result.push(this.selectAction);
+ }
+ return result;
+ };
+ Image2.prototype.getActionById = function(id) {
+ var result = _super.prototype.getActionById.call(this, id);
+ if (!result && this.selectAction) {
+ result = this.selectAction.getActionById(id);
+ }
+ return result;
+ };
+ Image2.prototype.getResourceInformation = function() {
+ return this.url ? [{ url: this.url, mimeType: "image" }] : [];
+ };
+ Image2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "url");
+ Image2.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "altText");
+ Image2.backgroundColorProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "backgroundColor");
+ Image2.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "style", Enums.ImageStyle, Enums.ImageStyle.Default);
+ Image2.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "size", Enums.Size, Enums.Size.Auto);
+ Image2.pixelWidthProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, "width", "pixelWidth");
+ Image2.pixelHeightProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, "height", "pixelHeight", CardElement.heightProperty);
+ Image2.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, "selectAction", [
+ "Action.ShowCard"
+ ]);
+ __decorate([
+ (0, serialization_1.property)(Image2.urlProperty)
+ ], Image2.prototype, "url", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.altTextProperty)
+ ], Image2.prototype, "altText", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.backgroundColorProperty)
+ ], Image2.prototype, "backgroundColor", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.sizeProperty)
+ ], Image2.prototype, "size", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.styleProperty)
+ ], Image2.prototype, "style", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.pixelWidthProperty)
+ ], Image2.prototype, "pixelWidth", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.pixelHeightProperty)
+ ], Image2.prototype, "pixelHeight", void 0);
+ __decorate([
+ (0, serialization_1.property)(Image2.selectActionProperty)
+ ], Image2.prototype, "selectAction", void 0);
+ return Image2;
+ }(CardElement)
+ );
+ exports.Image = Image;
+ var CardElementContainer = (
+ /** @class */
+ function(_super) {
+ __extends(CardElementContainer2, _super);
+ function CardElementContainer2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.allowVerticalOverflow = false;
+ return _this;
+ }
+ CardElementContainer2.prototype.populateSchema = function(schema) {
+ _super.prototype.populateSchema.call(this, schema);
+ if (!this.isSelectable) {
+ schema.remove(CardElementContainer2.selectActionProperty);
+ }
+ };
+ CardElementContainer2.prototype.isElementAllowed = function(element) {
+ return this.hostConfig.supportsInteractivity || !element.isInteractive;
+ };
+ CardElementContainer2.prototype.applyPadding = function() {
+ _super.prototype.applyPadding.call(this);
+ if (!this.renderedElement) {
+ return;
+ }
+ var physicalPadding = new shared_1.SpacingDefinition();
+ if (this.getEffectivePadding()) {
+ physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());
+ }
+ this.renderedElement.style.paddingTop = physicalPadding.top + "px";
+ this.renderedElement.style.paddingRight = physicalPadding.right + "px";
+ this.renderedElement.style.paddingBottom = physicalPadding.bottom + "px";
+ this.renderedElement.style.paddingLeft = physicalPadding.left + "px";
+ this.renderedElement.style.marginRight = "0";
+ this.renderedElement.style.marginLeft = "0";
+ };
+ Object.defineProperty(CardElementContainer2.prototype, "isSelectable", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ CardElementContainer2.prototype.forbiddenChildElements = function() {
+ return [];
+ };
+ CardElementContainer2.prototype.releaseDOMResources = function() {
+ _super.prototype.releaseDOMResources.call(this);
+ for (var i = 0; i < this.getItemCount(); i++) {
+ this.getItemAt(i).releaseDOMResources();
+ }
+ };
+ CardElementContainer2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ for (var i = 0; i < this.getItemCount(); i++) {
+ var item = this.getItemAt(i);
+ if (!this.hostConfig.supportsInteractivity && item.isInteractive) {
+ context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());
+ }
+ if (!this.isElementAllowed(item)) {
+ context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(item.getJsonTypeName()));
+ }
+ item.internalValidateProperties(context);
+ }
+ if (this._selectAction) {
+ this._selectAction.internalValidateProperties(context);
+ }
+ };
+ CardElementContainer2.prototype.render = function() {
+ var _this = this;
+ var element = _super.prototype.render.call(this);
+ if (element) {
+ var hostConfig = this.hostConfig;
+ if (this.allowVerticalOverflow) {
+ element.style.overflowX = "hidden";
+ element.style.overflowY = "auto";
+ }
+ if (element && this.isSelectable && this._selectAction && hostConfig.supportsInteractivity) {
+ element.onclick = function(e) {
+ if (_this._selectAction && _this._selectAction.isEffectivelyEnabled()) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this._selectAction.execute();
+ }
+ };
+ element.onkeypress = function(e) {
+ if (_this._selectAction && _this._selectAction.isEffectivelyEnabled() && (e.code === "Enter" || e.code === "Space")) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this._selectAction.execute();
+ }
+ };
+ this._selectAction.setupElementForAccessibility(element);
+ if (this._selectAction.isEffectivelyEnabled()) {
+ element.classList.add(hostConfig.makeCssClassName("ac-selectable"));
+ }
+ }
+ }
+ return element;
+ };
+ CardElementContainer2.prototype.updateLayout = function(processChildren) {
+ if (processChildren === void 0) {
+ processChildren = true;
+ }
+ _super.prototype.updateLayout.call(this, processChildren);
+ if (processChildren) {
+ for (var i = 0; i < this.getItemCount(); i++) {
+ this.getItemAt(i).updateLayout();
+ }
+ }
+ };
+ CardElementContainer2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ var result = [];
+ for (var i = 0; i < this.getItemCount(); i++) {
+ result.push.apply(result, this.getItemAt(i).getAllInputs(processActions));
+ }
+ return result;
+ };
+ CardElementContainer2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ for (var i = 0; i < this.getItemCount(); i++) {
+ result.push.apply(result, this.getItemAt(i).getAllActions());
+ }
+ if (this._selectAction) {
+ result.push(this._selectAction);
+ }
+ return result;
+ };
+ CardElementContainer2.prototype.getResourceInformation = function() {
+ var result = [];
+ for (var i = 0; i < this.getItemCount(); i++) {
+ result.push.apply(result, this.getItemAt(i).getResourceInformation());
+ }
+ return result;
+ };
+ CardElementContainer2.prototype.getElementById = function(id) {
+ var result = _super.prototype.getElementById.call(this, id);
+ if (!result) {
+ for (var i = 0; i < this.getItemCount(); i++) {
+ result = this.getItemAt(i).getElementById(id);
+ if (result) {
+ break;
+ }
+ }
+ }
+ return result;
+ };
+ CardElementContainer2.prototype.findDOMNodeOwner = function(node) {
+ var _a;
+ var target = void 0;
+ for (var i = 0; i < this.getItemCount(); i++) {
+ target = this.getItemAt(i).findDOMNodeOwner(node);
+ if (target) {
+ return target;
+ }
+ }
+ for (var i = 0; i < this.getActionCount(); i++) {
+ target = (_a = this.getActionAt(i)) === null || _a === void 0 ? void 0 : _a.findDOMNodeOwner(node);
+ if (target) {
+ return target;
+ }
+ }
+ return _super.prototype.findDOMNodeOwner.call(this, node);
+ };
+ CardElementContainer2.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, "selectAction", [
+ "Action.ShowCard"
+ ]);
+ __decorate([
+ (0, serialization_1.property)(CardElementContainer2.selectActionProperty)
+ ], CardElementContainer2.prototype, "_selectAction", void 0);
+ return CardElementContainer2;
+ }(CardElement)
+ );
+ exports.CardElementContainer = CardElementContainer;
+ var ImageSet = (
+ /** @class */
+ function(_super) {
+ __extends(ImageSet2, _super);
+ function ImageSet2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._images = [];
+ _this.imageSize = Enums.ImageSize.Medium;
+ return _this;
+ }
+ ImageSet2.prototype.internalRender = function() {
+ var element = void 0;
+ if (this._images.length > 0) {
+ element = document.createElement("div");
+ element.style.display = "flex";
+ element.style.flexWrap = "wrap";
+ for (var _i = 0, _a = this._images; _i < _a.length; _i++) {
+ var image = _a[_i];
+ switch (this.imageSize) {
+ case Enums.ImageSize.Small:
+ image.size = Enums.Size.Small;
+ break;
+ case Enums.ImageSize.Large:
+ image.size = Enums.Size.Large;
+ break;
+ default:
+ image.size = Enums.Size.Medium;
+ break;
+ }
+ image.maxHeight = this.hostConfig.imageSet.maxImageHeight;
+ var renderedImage = image.render();
+ if (renderedImage) {
+ renderedImage.style.display = "inline-flex";
+ renderedImage.style.margin = "0px";
+ renderedImage.style.marginRight = "10px";
+ Utils.appendChild(element, renderedImage);
+ }
+ }
+ }
+ return element;
+ };
+ ImageSet2.prototype.getItemCount = function() {
+ return this._images.length;
+ };
+ ImageSet2.prototype.getItemAt = function(index) {
+ return this._images[index];
+ };
+ ImageSet2.prototype.getFirstVisibleRenderedItem = function() {
+ return this._images && this._images.length > 0 ? this._images[0] : void 0;
+ };
+ ImageSet2.prototype.getLastVisibleRenderedItem = function() {
+ return this._images && this._images.length > 0 ? this._images[this._images.length - 1] : void 0;
+ };
+ ImageSet2.prototype.removeItem = function(item) {
+ if (item instanceof Image) {
+ var itemIndex = this._images.indexOf(item);
+ if (itemIndex >= 0) {
+ this._images.splice(itemIndex, 1);
+ item.setParent(void 0);
+ this.updateLayout();
+ return true;
+ }
+ }
+ return false;
+ };
+ ImageSet2.prototype.getJsonTypeName = function() {
+ return "ImageSet";
+ };
+ ImageSet2.prototype.addImage = function(image) {
+ if (!image.parent) {
+ this._images.push(image);
+ image.setParent(this);
+ } else {
+ throw new Error("This image already belongs to another ImageSet");
+ }
+ };
+ ImageSet2.prototype.indexOf = function(cardElement) {
+ return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;
+ };
+ ImageSet2.imagesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "images", Image, function(sender, item) {
+ item.setParent(sender);
+ });
+ ImageSet2.imageSizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "imageSize", Enums.ImageSize, Enums.ImageSize.Medium);
+ __decorate([
+ (0, serialization_1.property)(ImageSet2.imagesProperty)
+ ], ImageSet2.prototype, "_images", void 0);
+ __decorate([
+ (0, serialization_1.property)(ImageSet2.imageSizeProperty)
+ ], ImageSet2.prototype, "imageSize", void 0);
+ return ImageSet2;
+ }(CardElementContainer)
+ );
+ exports.ImageSet = ImageSet;
+ var ContentSource = (
+ /** @class */
+ function(_super) {
+ __extends(ContentSource2, _super);
+ function ContentSource2(url, mimeType) {
+ var _this = _super.call(this) || this;
+ _this.url = url;
+ _this.mimeType = mimeType;
+ return _this;
+ }
+ ContentSource2.prototype.isValid = function() {
+ return this.mimeType && this.url ? true : false;
+ };
+ ContentSource2.mimeTypeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "mimeType");
+ ContentSource2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "url");
+ __decorate([
+ (0, serialization_1.property)(ContentSource2.mimeTypeProperty)
+ ], ContentSource2.prototype, "mimeType", void 0);
+ __decorate([
+ (0, serialization_1.property)(ContentSource2.urlProperty)
+ ], ContentSource2.prototype, "url", void 0);
+ return ContentSource2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.ContentSource = ContentSource;
+ var CaptionSource = (
+ /** @class */
+ function(_super) {
+ __extends(CaptionSource2, _super);
+ function CaptionSource2(url, mimeType, label) {
+ var _this = _super.call(this, url, mimeType) || this;
+ _this.label = label;
+ return _this;
+ }
+ CaptionSource2.prototype.getSchemaKey = function() {
+ return "CaptionSource";
+ };
+ CaptionSource2.prototype.render = function() {
+ var result = void 0;
+ if (this.isValid()) {
+ result = document.createElement("track");
+ result.src = this.url;
+ result.kind = "captions";
+ result.label = this.label;
+ }
+ return result;
+ };
+ CaptionSource2.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, "label");
+ __decorate([
+ (0, serialization_1.property)(CaptionSource2.labelProperty)
+ ], CaptionSource2.prototype, "label", void 0);
+ return CaptionSource2;
+ }(ContentSource)
+ );
+ exports.CaptionSource = CaptionSource;
+ var MediaSource = (
+ /** @class */
+ function(_super) {
+ __extends(MediaSource2, _super);
+ function MediaSource2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ MediaSource2.prototype.getSchemaKey = function() {
+ return "MediaSource";
+ };
+ MediaSource2.prototype.render = function() {
+ var result = void 0;
+ if (this.isValid()) {
+ result = document.createElement("source");
+ result.src = this.url;
+ result.type = this.mimeType;
+ }
+ return result;
+ };
+ return MediaSource2;
+ }(ContentSource)
+ );
+ exports.MediaSource = MediaSource;
+ var MediaPlayer = (
+ /** @class */
+ function() {
+ function MediaPlayer2() {
+ }
+ MediaPlayer2.prototype.play = function() {
+ };
+ Object.defineProperty(MediaPlayer2.prototype, "posterUrl", {
+ get: function() {
+ return this._posterUrl;
+ },
+ set: function(value) {
+ this._posterUrl = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MediaPlayer2.prototype, "selectedMediaType", {
+ get: function() {
+ return void 0;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return MediaPlayer2;
+ }()
+ );
+ exports.MediaPlayer = MediaPlayer;
+ var HTML5MediaPlayer = (
+ /** @class */
+ function(_super) {
+ __extends(HTML5MediaPlayer2, _super);
+ function HTML5MediaPlayer2(owner) {
+ var _this = _super.call(this) || this;
+ _this.owner = owner;
+ _this._selectedSources = [];
+ _this._captionSources = [];
+ _this.processSources();
+ return _this;
+ }
+ HTML5MediaPlayer2.prototype.processSources = function() {
+ var _a;
+ this._selectedSources = [];
+ this._captionSources = [];
+ this._selectedMediaType = void 0;
+ for (var _i = 0, _b = this.owner.sources; _i < _b.length; _i++) {
+ var source = _b[_i];
+ var mimeComponents = source.mimeType ? source.mimeType.split("/") : [];
+ if (mimeComponents.length === 2) {
+ if (!this._selectedMediaType) {
+ var index = HTML5MediaPlayer2.supportedMediaTypes.indexOf(mimeComponents[0]);
+ if (index >= 0) {
+ this._selectedMediaType = HTML5MediaPlayer2.supportedMediaTypes[index];
+ }
+ }
+ if (mimeComponents[0] === this._selectedMediaType) {
+ this._selectedSources.push(source);
+ }
+ }
+ }
+ (_a = this._captionSources).push.apply(_a, this.owner.captionSources);
+ };
+ HTML5MediaPlayer2.prototype.canPlay = function() {
+ return this._selectedSources.length > 0;
+ };
+ HTML5MediaPlayer2.prototype.fetchVideoDetails = function() {
+ return __awaiter(this, void 0, void 0, function() {
+ return __generator(this, function(_a) {
+ return [
+ 2
+ /*return*/
+ ];
+ });
+ });
+ };
+ HTML5MediaPlayer2.prototype.render = function() {
+ if (this._selectedMediaType === "video") {
+ this._mediaElement = document.createElement("video");
+ } else {
+ this._mediaElement = document.createElement("audio");
+ }
+ this._mediaElement.setAttribute("aria-label", this.owner.altText ? this.owner.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());
+ this._mediaElement.setAttribute("webkit-playsinline", "");
+ this._mediaElement.setAttribute("playsinline", "");
+ this._mediaElement.setAttribute("crossorigin", "");
+ this._mediaElement.autoplay = true;
+ this._mediaElement.controls = true;
+ if (Utils.isMobileOS()) {
+ this._mediaElement.muted = true;
+ }
+ this._mediaElement.preload = "none";
+ this._mediaElement.style.width = "100%";
+ for (var _i = 0, _a = this.owner.sources; _i < _a.length; _i++) {
+ var source = _a[_i];
+ var renderedSource = source.render();
+ Utils.appendChild(this._mediaElement, renderedSource);
+ }
+ for (var _b = 0, _c = this.owner.captionSources; _b < _c.length; _b++) {
+ var captionSource = _c[_b];
+ if (captionSource.mimeType == "vtt") {
+ var renderedCaptionSource = captionSource.render();
+ Utils.appendChild(this._mediaElement, renderedCaptionSource);
+ }
+ }
+ return this._mediaElement;
+ };
+ HTML5MediaPlayer2.prototype.play = function() {
+ if (this._mediaElement) {
+ this._mediaElement.play();
+ }
+ };
+ Object.defineProperty(HTML5MediaPlayer2.prototype, "selectedMediaType", {
+ get: function() {
+ return this._selectedMediaType;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ HTML5MediaPlayer2.supportedMediaTypes = ["audio", "video"];
+ return HTML5MediaPlayer2;
+ }(MediaPlayer)
+ );
+ exports.HTML5MediaPlayer = HTML5MediaPlayer;
+ var CustomMediaPlayer = (
+ /** @class */
+ function(_super) {
+ __extends(CustomMediaPlayer2, _super);
+ function CustomMediaPlayer2(matches) {
+ return _super.call(this) || this;
+ }
+ return CustomMediaPlayer2;
+ }(MediaPlayer)
+ );
+ exports.CustomMediaPlayer = CustomMediaPlayer;
+ var IFrameMediaMediaPlayer = (
+ /** @class */
+ function(_super) {
+ __extends(IFrameMediaMediaPlayer2, _super);
+ function IFrameMediaMediaPlayer2(matches, iFrameTitle) {
+ var _this = _super.call(this, matches) || this;
+ _this.iFrameTitle = iFrameTitle;
+ if (matches.length >= 2) {
+ _this._videoId = matches[1];
+ }
+ return _this;
+ }
+ IFrameMediaMediaPlayer2.prototype.canPlay = function() {
+ return this._videoId !== void 0;
+ };
+ IFrameMediaMediaPlayer2.prototype.render = function() {
+ var container = document.createElement("div");
+ container.style.position = "relative";
+ container.style.width = "100%";
+ container.style.height = "0";
+ container.style.paddingBottom = "56.25%";
+ var iFrame = document.createElement("iframe");
+ iFrame.style.position = "absolute";
+ iFrame.style.top = "0";
+ iFrame.style.left = "0";
+ iFrame.style.width = "100%";
+ iFrame.style.height = "100%";
+ iFrame.src = this.getEmbedVideoUrl();
+ iFrame.frameBorder = "0";
+ if (this.iFrameTitle) {
+ iFrame.title = this.iFrameTitle;
+ }
+ iFrame.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture";
+ iFrame.allowFullscreen = true;
+ container.appendChild(iFrame);
+ return container;
+ };
+ Object.defineProperty(IFrameMediaMediaPlayer2.prototype, "videoId", {
+ get: function() {
+ return this._videoId;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return IFrameMediaMediaPlayer2;
+ }(CustomMediaPlayer)
+ );
+ exports.IFrameMediaMediaPlayer = IFrameMediaMediaPlayer;
+ var VimeoPlayer = (
+ /** @class */
+ function(_super) {
+ __extends(VimeoPlayer2, _super);
+ function VimeoPlayer2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ VimeoPlayer2.prototype.fetchVideoDetails = function() {
+ return __awaiter(this, void 0, void 0, function() {
+ var oEmbedUrl, response, json;
+ return __generator(this, function(_a) {
+ switch (_a.label) {
+ case 0:
+ oEmbedUrl = "https://vimeo.com/api/oembed.json?url=".concat(this.getEmbedVideoUrl());
+ return [4, fetch(oEmbedUrl)];
+ case 1:
+ response = _a.sent();
+ if (!response.ok)
+ return [3, 3];
+ return [4, response.json()];
+ case 2:
+ json = _a.sent();
+ this.posterUrl = json["thumbnail_url"];
+ _a.label = 3;
+ case 3:
+ return [
+ 2
+ /*return*/
+ ];
+ }
+ });
+ });
+ };
+ VimeoPlayer2.prototype.getEmbedVideoUrl = function() {
+ return "https://player.vimeo.com/video/".concat(this.videoId, "?autoplay=1");
+ };
+ return VimeoPlayer2;
+ }(IFrameMediaMediaPlayer)
+ );
+ exports.VimeoPlayer = VimeoPlayer;
+ var DailymotionPlayer = (
+ /** @class */
+ function(_super) {
+ __extends(DailymotionPlayer2, _super);
+ function DailymotionPlayer2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ DailymotionPlayer2.prototype.fetchVideoDetails = function() {
+ return __awaiter(this, void 0, void 0, function() {
+ var apiUrl, response, json;
+ return __generator(this, function(_a) {
+ switch (_a.label) {
+ case 0:
+ apiUrl = "https://api.dailymotion.com/video/".concat(this.videoId, "?fields=thumbnail_720_url");
+ return [4, fetch(apiUrl)];
+ case 1:
+ response = _a.sent();
+ if (!response.ok)
+ return [3, 3];
+ return [4, response.json()];
+ case 2:
+ json = _a.sent();
+ this.posterUrl = json["thumbnail_720_url"];
+ _a.label = 3;
+ case 3:
+ return [
+ 2
+ /*return*/
+ ];
+ }
+ });
+ });
+ };
+ DailymotionPlayer2.prototype.getEmbedVideoUrl = function() {
+ return "https://www.dailymotion.com/embed/video/".concat(this.videoId, "?autoplay=1");
+ };
+ return DailymotionPlayer2;
+ }(IFrameMediaMediaPlayer)
+ );
+ exports.DailymotionPlayer = DailymotionPlayer;
+ var YouTubePlayer = (
+ /** @class */
+ function(_super) {
+ __extends(YouTubePlayer2, _super);
+ function YouTubePlayer2(matches, iFrameTitle) {
+ var _this = _super.call(this, matches, iFrameTitle) || this;
+ _this.iFrameTitle = iFrameTitle;
+ if (matches.length >= 3 && matches[2] !== void 0) {
+ _this._startTimeIndex = parseInt(matches[2]);
+ }
+ return _this;
+ }
+ YouTubePlayer2.prototype.fetchVideoDetails = function() {
+ return __awaiter(this, void 0, void 0, function() {
+ return __generator(this, function(_a) {
+ this.posterUrl = this.videoId ? "https://img.youtube.com/vi/".concat(this.videoId, "/maxresdefault.jpg") : void 0;
+ return [
+ 2
+ /*return*/
+ ];
+ });
+ });
+ };
+ YouTubePlayer2.prototype.getEmbedVideoUrl = function() {
+ var url = "https://www.youtube.com/embed/".concat(this.videoId, "?autoplay=1");
+ if (this._startTimeIndex !== void 0) {
+ url += "&start=".concat(this._startTimeIndex);
+ }
+ return url;
+ };
+ return YouTubePlayer2;
+ }(IFrameMediaMediaPlayer)
+ );
+ exports.YouTubePlayer = YouTubePlayer;
+ var Media = (
+ /** @class */
+ function(_super) {
+ __extends(Media2, _super);
+ function Media2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.sources = [];
+ _this.captionSources = [];
+ return _this;
+ }
+ Media2.prototype.createMediaPlayer = function() {
+ for (var _i = 0, _a = Media2.customMediaPlayers; _i < _a.length; _i++) {
+ var provider = _a[_i];
+ for (var _b = 0, _c = this.sources; _b < _c.length; _b++) {
+ var source = _c[_b];
+ if (source.url) {
+ for (var _d = 0, _f = provider.urlPatterns; _d < _f.length; _d++) {
+ var pattern = _f[_d];
+ var matches = pattern.exec(source.url);
+ if (matches !== null) {
+ return provider.createMediaPlayer(matches);
+ }
+ }
+ }
+ }
+ }
+ return new HTML5MediaPlayer(this);
+ };
+ Media2.prototype.handlePlayButtonInvoke = function(event) {
+ if (this.hostConfig.media.allowInlinePlayback) {
+ event.preventDefault();
+ event.cancelBubble = true;
+ if (this.renderedElement) {
+ var mediaPlayerElement = this._mediaPlayer.render();
+ clearElement(this.renderedElement);
+ this.renderedElement.appendChild(mediaPlayerElement);
+ this._mediaPlayer.play();
+ mediaPlayerElement.focus();
+ }
+ } else {
+ if (Media2.onPlay) {
+ event.preventDefault();
+ event.cancelBubble = true;
+ Media2.onPlay(this);
+ }
+ }
+ };
+ Media2.prototype.displayPoster = function() {
+ return __awaiter(this, void 0, void 0, function() {
+ var playButtonArrowWidth, playButtonArrowHeight, posterRootElement_1, posterUrl, posterImageElement_1, playButtonOuterElement, playButtonInnerElement, playButtonContainer;
+ var _this = this;
+ return __generator(this, function(_a) {
+ if (this.renderedElement) {
+ playButtonArrowWidth = 12;
+ playButtonArrowHeight = 15;
+ posterRootElement_1 = document.createElement("div");
+ posterRootElement_1.className = this.hostConfig.makeCssClassName("ac-media-poster");
+ posterRootElement_1.setAttribute("role", "contentinfo");
+ posterRootElement_1.setAttribute("aria-label", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());
+ posterRootElement_1.style.position = "relative";
+ posterRootElement_1.style.display = "flex";
+ posterUrl = this.poster ? this.poster : this._mediaPlayer.posterUrl;
+ if (!posterUrl) {
+ posterUrl = this.hostConfig.media.defaultPoster;
+ }
+ if (posterUrl) {
+ posterImageElement_1 = document.createElement("img");
+ posterImageElement_1.style.width = "100%";
+ posterImageElement_1.style.height = "100%";
+ posterImageElement_1.setAttribute("role", "presentation");
+ posterImageElement_1.onerror = function(_e) {
+ if (posterImageElement_1.parentNode) {
+ posterImageElement_1.parentNode.removeChild(posterImageElement_1);
+ }
+ posterRootElement_1.classList.add("empty");
+ posterRootElement_1.style.minHeight = "150px";
+ };
+ posterImageElement_1.src = posterUrl;
+ posterRootElement_1.appendChild(posterImageElement_1);
+ } else {
+ posterRootElement_1.classList.add("empty");
+ posterRootElement_1.style.minHeight = "150px";
+ }
+ if (this.hostConfig.supportsInteractivity && this._mediaPlayer.canPlay()) {
+ playButtonOuterElement = document.createElement("div");
+ playButtonOuterElement.tabIndex = 0;
+ playButtonOuterElement.setAttribute("role", "button");
+ playButtonOuterElement.setAttribute("aria-label", strings_1.Strings.defaults.mediaPlayerPlayMedia());
+ playButtonOuterElement.className = this.hostConfig.makeCssClassName("ac-media-playButton");
+ playButtonOuterElement.style.display = "flex";
+ playButtonOuterElement.style.alignItems = "center";
+ playButtonOuterElement.style.justifyContent = "center";
+ playButtonOuterElement.onclick = function(e) {
+ _this.handlePlayButtonInvoke(e);
+ };
+ playButtonOuterElement.onkeypress = function(e) {
+ if (e.code === "Enter" || e.code === "Space") {
+ _this.handlePlayButtonInvoke(e);
+ }
+ };
+ playButtonInnerElement = document.createElement("div");
+ playButtonInnerElement.className = this.hostConfig.makeCssClassName("ac-media-playButton-arrow");
+ playButtonInnerElement.style.width = playButtonArrowWidth + "px";
+ playButtonInnerElement.style.height = playButtonArrowHeight + "px";
+ playButtonInnerElement.style.borderTopWidth = playButtonArrowHeight / 2 + "px";
+ playButtonInnerElement.style.borderBottomWidth = playButtonArrowHeight / 2 + "px";
+ playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + "px";
+ playButtonInnerElement.style.borderRightWidth = "0";
+ playButtonInnerElement.style.borderStyle = "solid";
+ playButtonInnerElement.style.borderTopColor = "transparent";
+ playButtonInnerElement.style.borderRightColor = "transparent";
+ playButtonInnerElement.style.borderBottomColor = "transparent";
+ playButtonInnerElement.style.transform = "translate(" + playButtonArrowWidth / 10 + "px,0px)";
+ playButtonOuterElement.appendChild(playButtonInnerElement);
+ playButtonContainer = document.createElement("div");
+ playButtonContainer.style.position = "absolute";
+ playButtonContainer.style.left = "0";
+ playButtonContainer.style.top = "0";
+ playButtonContainer.style.width = "100%";
+ playButtonContainer.style.height = "100%";
+ playButtonContainer.style.display = "flex";
+ playButtonContainer.style.justifyContent = "center";
+ playButtonContainer.style.alignItems = "center";
+ playButtonContainer.appendChild(playButtonOuterElement);
+ posterRootElement_1.appendChild(playButtonContainer);
+ }
+ clearElement(this.renderedElement);
+ this.renderedElement.appendChild(posterRootElement_1);
+ }
+ return [
+ 2
+ /*return*/
+ ];
+ });
+ });
+ };
+ Media2.prototype.internalRender = function() {
+ var element = document.createElement("div");
+ element.className = this.hostConfig.makeCssClassName("ac-media");
+ return element;
+ };
+ Media2.prototype.render = function() {
+ var _this = this;
+ var result = _super.prototype.render.call(this);
+ if (result) {
+ this._mediaPlayer = this.createMediaPlayer();
+ this._mediaPlayer.fetchVideoDetails().then(function() {
+ return _this.displayPoster();
+ });
+ }
+ return result;
+ };
+ Media2.prototype.releaseDOMResources = function() {
+ _super.prototype.releaseDOMResources.call(this);
+ this.displayPoster();
+ };
+ Media2.prototype.getJsonTypeName = function() {
+ return "Media";
+ };
+ Media2.prototype.getResourceInformation = function() {
+ var result = [];
+ if (this._mediaPlayer) {
+ var posterUrl = this.poster ? this.poster : this.hostConfig.media.defaultPoster;
+ if (posterUrl) {
+ result.push({ url: posterUrl, mimeType: "image" });
+ }
+ }
+ for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {
+ var mediaSource = _a[_i];
+ if (mediaSource.isValid()) {
+ result.push({
+ /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `mediaSource.url` is of type `string | undefined`, but is validated by `isValid()` call */
+ url: mediaSource.url,
+ mimeType: mediaSource.mimeType
+ /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */
+ });
+ }
+ }
+ for (var _b = 0, _c = this.captionSources; _b < _c.length; _b++) {
+ var captionSource = _c[_b];
+ if (captionSource.isValid()) {
+ result.push({
+ /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `captionSource.url` is of type `string | undefined`, but is validated by `isValid()` call */
+ url: captionSource.url,
+ mimeType: captionSource.mimeType
+ /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */
+ });
+ }
+ }
+ return result;
+ };
+ Object.defineProperty(Media2.prototype, "selectedMediaType", {
+ get: function() {
+ return this._mediaPlayer.selectedMediaType;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Media2.customMediaPlayers = [
+ {
+ urlPatterns: [
+ /^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/gi,
+ /^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/gi
+ ],
+ createMediaPlayer: function(matches) {
+ return new YouTubePlayer(matches, strings_1.Strings.defaults.youTubeVideoPlayer());
+ }
+ },
+ {
+ urlPatterns: [/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/gi],
+ createMediaPlayer: function(matches) {
+ return new VimeoPlayer(matches, strings_1.Strings.defaults.vimeoVideoPlayer());
+ }
+ },
+ {
+ urlPatterns: [/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/gi],
+ createMediaPlayer: function(matches) {
+ return new DailymotionPlayer(matches, strings_1.Strings.defaults.dailymotionVideoPlayer());
+ }
+ }
+ ];
+ Media2.sourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_1, "sources", MediaSource);
+ Media2.captionSourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_6, "captionSources", CaptionSource);
+ Media2.posterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "poster");
+ Media2.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "altText");
+ __decorate([
+ (0, serialization_1.property)(Media2.sourcesProperty)
+ ], Media2.prototype, "sources", void 0);
+ __decorate([
+ (0, serialization_1.property)(Media2.captionSourcesProperty)
+ ], Media2.prototype, "captionSources", void 0);
+ __decorate([
+ (0, serialization_1.property)(Media2.posterProperty)
+ ], Media2.prototype, "poster", void 0);
+ __decorate([
+ (0, serialization_1.property)(Media2.altTextProperty)
+ ], Media2.prototype, "altText", void 0);
+ return Media2;
+ }(CardElement)
+ );
+ exports.Media = Media;
+ var Input = (
+ /** @class */
+ function(_super) {
+ __extends(Input2, _super);
+ function Input2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ Input2.prototype.getAllLabelIds = function() {
+ var labelIds = [];
+ if (this.labelledBy) {
+ labelIds.push(this.labelledBy);
+ }
+ if (this._renderedLabelElement) {
+ labelIds.push(this._renderedLabelElement.id);
+ }
+ if (this._renderedErrorMessageElement) {
+ labelIds.push(this._renderedErrorMessageElement.id);
+ }
+ return labelIds;
+ };
+ Input2.prototype.updateInputControlAriaLabelledBy = function() {
+ if (this._renderedInputControlElement) {
+ var labelIds = this.getAllLabelIds();
+ if (labelIds.length > 0) {
+ this._renderedInputControlElement.setAttribute("aria-labelledby", labelIds.join(" "));
+ } else {
+ this._renderedInputControlElement.removeAttribute("aria-labelledby");
+ }
+ }
+ };
+ Object.defineProperty(Input2.prototype, "isNullable", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Input2.prototype, "renderedInputControlElement", {
+ get: function() {
+ return this._renderedInputControlElement;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Input2.prototype, "inputControlContainerElement", {
+ get: function() {
+ return this._inputControlContainerElement;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Input2.prototype.overrideInternalRender = function() {
+ var hostConfig = this.hostConfig;
+ this._outerContainerElement = document.createElement("div");
+ this._outerContainerElement.style.display = "flex";
+ this._outerContainerElement.style.flexDirection = "column";
+ var renderedInputControlId = Utils.generateUniqueId();
+ if (this.label) {
+ var labelRichTextBlock = new RichTextBlock();
+ labelRichTextBlock.setParent(this);
+ labelRichTextBlock.forElementId = renderedInputControlId;
+ var labelInline = new TextRun(this.label);
+ labelRichTextBlock.addInline(labelInline);
+ if (this.isRequired) {
+ labelInline.init(hostConfig.inputs.label.requiredInputs);
+ var isRequiredCueInline = new TextRun(hostConfig.inputs.label.requiredInputs.suffix);
+ isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;
+ isRequiredCueInline.ariaHidden = true;
+ labelRichTextBlock.addInline(isRequiredCueInline);
+ } else {
+ labelInline.init(hostConfig.inputs.label.optionalInputs);
+ }
+ this._renderedLabelElement = labelRichTextBlock.render();
+ if (this._renderedLabelElement) {
+ this._renderedLabelElement.id = Utils.generateUniqueId();
+ this._renderedLabelElement.style.marginBottom = hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + "px";
+ this._outerContainerElement.appendChild(this._renderedLabelElement);
+ }
+ }
+ this._inputControlContainerElement = document.createElement("div");
+ this._inputControlContainerElement.className = hostConfig.makeCssClassName("ac-input-container");
+ this._inputControlContainerElement.style.display = "flex";
+ if (this.height === "stretch") {
+ this._inputControlContainerElement.style.alignItems = "stretch";
+ this._inputControlContainerElement.style.flex = "1 1 auto";
+ }
+ this._renderedInputControlElement = this.internalRender();
+ if (this._renderedInputControlElement) {
+ this._renderedInputControlElement.id = renderedInputControlId;
+ this._renderedInputControlElement.style.minWidth = "0px";
+ if (this.isNullable && this.isRequired) {
+ this._renderedInputControlElement.setAttribute("aria-required", "true");
+ this._renderedInputControlElement.classList.add(hostConfig.makeCssClassName("ac-input-required"));
+ }
+ this._inputControlContainerElement.appendChild(this._renderedInputControlElement);
+ this._outerContainerElement.appendChild(this._inputControlContainerElement);
+ this.updateInputControlAriaLabelledBy();
+ return this._outerContainerElement;
+ }
+ this.resetDirtyState();
+ return void 0;
+ };
+ Input2.prototype.valueChanged = function() {
+ this.getRootElement().updateActionsEnabledState();
+ if (this.isValid()) {
+ this.resetValidationFailureCue();
+ }
+ if (this.onValueChanged) {
+ this.onValueChanged(this);
+ }
+ raiseInputValueChangedEvent(this);
+ };
+ Input2.prototype.resetValidationFailureCue = function() {
+ if (this.renderedInputControlElement) {
+ this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-input-validation-failed"));
+ this.updateInputControlAriaLabelledBy();
+ if (this._renderedErrorMessageElement) {
+ this._outerContainerElement.removeChild(this._renderedErrorMessageElement);
+ this._renderedErrorMessageElement = void 0;
+ }
+ }
+ };
+ Input2.prototype.showValidationErrorMessage = function() {
+ if (this.renderedElement && this.errorMessage && shared_1.GlobalSettings.displayInputValidationErrors) {
+ var errorMessageTextBlock = new TextBlock();
+ errorMessageTextBlock.setParent(this);
+ errorMessageTextBlock.text = this.errorMessage;
+ errorMessageTextBlock.wrap = true;
+ errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);
+ this._renderedErrorMessageElement = errorMessageTextBlock.render();
+ if (this._renderedErrorMessageElement) {
+ this._renderedErrorMessageElement.id = Utils.generateUniqueId();
+ this._outerContainerElement.appendChild(this._renderedErrorMessageElement);
+ this.updateInputControlAriaLabelledBy();
+ }
+ }
+ };
+ Input2.prototype.focus = function() {
+ if (this._renderedInputControlElement) {
+ this._renderedInputControlElement.focus();
+ }
+ };
+ Input2.prototype.isValid = function() {
+ return true;
+ };
+ Input2.prototype.isDirty = function() {
+ return this.value !== this._oldValue;
+ };
+ Input2.prototype.resetDirtyState = function() {
+ this._oldValue = this.value;
+ };
+ Input2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (!this.id) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.inputsMustHaveUniqueId());
+ }
+ if (this.isRequired) {
+ if (!this.label) {
+ context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveLabel, "Required inputs should have a label");
+ }
+ if (!this.errorMessage) {
+ context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage, "Required inputs should have an error message");
+ }
+ }
+ };
+ Input2.prototype.validateValue = function() {
+ this.resetValidationFailureCue();
+ var result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();
+ if (!result && this.renderedInputControlElement) {
+ this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-input-validation-failed"));
+ this.showValidationErrorMessage();
+ }
+ return result;
+ };
+ Input2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ return [this];
+ };
+ Input2.prototype.render = function() {
+ var result = _super.prototype.render.call(this);
+ this.resetDirtyState();
+ return result;
+ };
+ Object.defineProperty(Input2.prototype, "isInteractive", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Input2.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, "label", true);
+ Input2.isRequiredProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, "isRequired", false);
+ Input2.errorMessageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, "errorMessage", true);
+ __decorate([
+ (0, serialization_1.property)(Input2.labelProperty)
+ ], Input2.prototype, "label", void 0);
+ __decorate([
+ (0, serialization_1.property)(Input2.isRequiredProperty)
+ ], Input2.prototype, "isRequired", void 0);
+ __decorate([
+ (0, serialization_1.property)(Input2.errorMessageProperty)
+ ], Input2.prototype, "errorMessage", void 0);
+ return Input2;
+ }(CardElement)
+ );
+ exports.Input = Input;
+ var TextInput = (
+ /** @class */
+ function(_super) {
+ __extends(TextInput2, _super);
+ function TextInput2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.isMultiline = false;
+ _this.style = Enums.InputTextStyle.Text;
+ return _this;
+ }
+ TextInput2.prototype.setupInput = function(input) {
+ var _this = this;
+ input.style.flex = "1 1 auto";
+ input.tabIndex = this.isDesignMode() ? -1 : 0;
+ if (this.placeholder) {
+ input.placeholder = this.placeholder;
+ input.setAttribute("aria-label", this.placeholder);
+ }
+ if (this.defaultValue) {
+ input.value = this.defaultValue;
+ }
+ if (this.maxLength && this.maxLength > 0) {
+ input.maxLength = this.maxLength;
+ }
+ input.oninput = function() {
+ _this.valueChanged();
+ };
+ input.onkeypress = function(e) {
+ if (e.ctrlKey && e.code === "Enter" && _this.inlineAction && _this.inlineAction.isEffectivelyEnabled()) {
+ _this.inlineAction.execute();
+ }
+ };
+ };
+ TextInput2.prototype.internalRender = function() {
+ var result;
+ if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {
+ result = document.createElement("textarea");
+ result.className = this.hostConfig.makeCssClassName("ac-input", "ac-textInput", "ac-multiline");
+ if (this.height === "stretch") {
+ result.style.height = "initial";
+ }
+ } else {
+ result = document.createElement("input");
+ result.className = this.hostConfig.makeCssClassName("ac-input", "ac-textInput");
+ result.type = Enums.InputTextStyle[this.style].toLowerCase();
+ }
+ this.setupInput(result);
+ return result;
+ };
+ TextInput2.prototype.overrideInternalRender = function() {
+ var _this = this;
+ var renderedInputControl = _super.prototype.overrideInternalRender.call(this);
+ if (this.inlineAction) {
+ var button_1 = document.createElement("button");
+ button_1.className = this.hostConfig.makeCssClassName(this.inlineAction.isEffectivelyEnabled() ? "ac-inlineActionButton" : "ac-inlineActionButton-disabled");
+ button_1.onclick = function(e) {
+ if (_this.inlineAction && _this.inlineAction.isEffectivelyEnabled()) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this.inlineAction.execute();
+ }
+ };
+ if (this.inlineAction.iconUrl) {
+ button_1.classList.add("iconOnly");
+ var icon_1 = document.createElement("img");
+ icon_1.style.height = "100%";
+ icon_1.setAttribute("role", "presentation");
+ icon_1.style.display = "none";
+ icon_1.onload = function() {
+ icon_1.style.removeProperty("display");
+ };
+ icon_1.onerror = function() {
+ button_1.removeChild(icon_1);
+ button_1.classList.remove("iconOnly");
+ button_1.classList.add("textOnly");
+ button_1.textContent = _this.inlineAction && _this.inlineAction.title ? _this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();
+ };
+ icon_1.src = this.inlineAction.iconUrl;
+ button_1.appendChild(icon_1);
+ button_1.title = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();
+ } else {
+ button_1.classList.add("textOnly");
+ button_1.textContent = this.inlineAction.title ? this.inlineAction.title : strings_1.Strings.defaults.inlineActionTitle();
+ }
+ this.inlineAction.setupElementForAccessibility(button_1, true);
+ button_1.style.marginLeft = "8px";
+ this.inputControlContainerElement.appendChild(button_1);
+ }
+ return renderedInputControl;
+ };
+ TextInput2.prototype.getJsonTypeName = function() {
+ return "Input.Text";
+ };
+ TextInput2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ if (this.inlineAction) {
+ result.push(this.inlineAction);
+ }
+ return result;
+ };
+ TextInput2.prototype.getActionById = function(id) {
+ var result = _super.prototype.getActionById.call(this, id);
+ if (!result && this.inlineAction) {
+ result = this.inlineAction.getActionById(id);
+ }
+ return result;
+ };
+ TextInput2.prototype.isSet = function() {
+ return this.value ? true : false;
+ };
+ TextInput2.prototype.isValid = function() {
+ if (!this.value) {
+ return true;
+ }
+ if (this.regex) {
+ return new RegExp(this.regex, "g").test(this.value);
+ }
+ return true;
+ };
+ Object.defineProperty(TextInput2.prototype, "value", {
+ get: function() {
+ if (this.renderedInputControlElement) {
+ if (this.isMultiline) {
+ return this.renderedInputControlElement.value;
+ } else {
+ return this.renderedInputControlElement.value;
+ }
+ } else {
+ return void 0;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ TextInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value");
+ TextInput2.maxLengthProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "maxLength");
+ TextInput2.isMultilineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "isMultiline", false);
+ TextInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder");
+ TextInput2.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, "style", Enums.InputTextStyle, Enums.InputTextStyle.Text, [
+ { value: Enums.InputTextStyle.Text },
+ { value: Enums.InputTextStyle.Tel },
+ { value: Enums.InputTextStyle.Url },
+ { value: Enums.InputTextStyle.Email },
+ { value: Enums.InputTextStyle.Password, targetVersion: serialization_1.Versions.v1_5 }
+ ]);
+ TextInput2.inlineActionProperty = new ActionProperty(serialization_1.Versions.v1_0, "inlineAction", [
+ "Action.ShowCard"
+ ]);
+ TextInput2.regexProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, "regex", true);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.valueProperty)
+ ], TextInput2.prototype, "defaultValue", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.maxLengthProperty)
+ ], TextInput2.prototype, "maxLength", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.isMultilineProperty)
+ ], TextInput2.prototype, "isMultiline", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.placeholderProperty)
+ ], TextInput2.prototype, "placeholder", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.styleProperty)
+ ], TextInput2.prototype, "style", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.inlineActionProperty)
+ ], TextInput2.prototype, "inlineAction", void 0);
+ __decorate([
+ (0, serialization_1.property)(TextInput2.regexProperty)
+ ], TextInput2.prototype, "regex", void 0);
+ return TextInput2;
+ }(Input)
+ );
+ exports.TextInput = TextInput;
+ var ToggleInput = (
+ /** @class */
+ function(_super) {
+ __extends(ToggleInput2, _super);
+ function ToggleInput2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.valueOn = "true";
+ _this.valueOff = "false";
+ _this.wrap = false;
+ return _this;
+ }
+ ToggleInput2.prototype.updateInputControlAriaLabelledBy = function() {
+ if (this._checkboxInputElement) {
+ var joinedLabelIds = this.getAllLabelIds().join(" ");
+ if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {
+ joinedLabelIds += " " + this._checkboxInputLabelElement.id;
+ }
+ if (joinedLabelIds) {
+ this._checkboxInputElement.setAttribute("aria-labelledby", joinedLabelIds);
+ } else {
+ this._checkboxInputElement.removeAttribute("aria-labelledby");
+ }
+ }
+ };
+ ToggleInput2.prototype.internalRender = function() {
+ var _this = this;
+ var element = document.createElement("div");
+ element.className = this.hostConfig.makeCssClassName("ac-input", "ac-toggleInput");
+ element.style.width = "100%";
+ element.style.display = "flex";
+ element.style.alignItems = "center";
+ this._checkboxInputElement = document.createElement("input");
+ this._checkboxInputElement.id = Utils.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";
+ if (this.title) {
+ this._checkboxInputElement.setAttribute("aria-label", this.title);
+ }
+ if (this.isRequired) {
+ this._checkboxInputElement.setAttribute("aria-required", "true");
+ }
+ this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0;
+ if (this.defaultValue === this.valueOn) {
+ this._checkboxInputElement.checked = true;
+ }
+ this._oldCheckboxValue = this._checkboxInputElement.checked;
+ this._checkboxInputElement.onchange = function() {
+ _this.valueChanged();
+ };
+ Utils.appendChild(element, this._checkboxInputElement);
+ if (this.title || this.isDesignMode()) {
+ var label = new TextBlock();
+ label.setParent(this);
+ label.forElementId = this._checkboxInputElement.id;
+ label.hostConfig = this.hostConfig;
+ label.text = !this.title ? this.getJsonTypeName() : this.title;
+ label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;
+ label.wrap = this.wrap;
+ this._checkboxInputLabelElement = label.render();
+ if (this._checkboxInputLabelElement) {
+ this._checkboxInputLabelElement.id = Utils.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 spacerElement = document.createElement("div");
+ spacerElement.style.width = "6px";
+ Utils.appendChild(element, spacerElement);
+ Utils.appendChild(element, this._checkboxInputLabelElement);
+ }
+ }
+ return element;
+ };
+ Object.defineProperty(ToggleInput2.prototype, "isNullable", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ToggleInput2.prototype.getJsonTypeName = function() {
+ return "Input.Toggle";
+ };
+ ToggleInput2.prototype.focus = function() {
+ if (this._checkboxInputElement) {
+ this._checkboxInputElement.focus();
+ }
+ };
+ ToggleInput2.prototype.isSet = function() {
+ if (this.isRequired) {
+ return this.value === this.valueOn;
+ }
+ return this.value ? true : false;
+ };
+ ToggleInput2.prototype.isDirty = function() {
+ return this._checkboxInputElement ? this._checkboxInputElement.checked !== this._oldCheckboxValue : false;
+ };
+ Object.defineProperty(ToggleInput2.prototype, "value", {
+ get: function() {
+ if (this._checkboxInputElement) {
+ return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;
+ } else {
+ return void 0;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ToggleInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value");
+ ToggleInput2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title");
+ ToggleInput2.valueOnProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "valueOn", true, void 0, "true", function(sender) {
+ return "true";
+ });
+ ToggleInput2.valueOffProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "valueOff", true, void 0, "false", function(sender) {
+ return "false";
+ });
+ ToggleInput2.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "wrap", false);
+ __decorate([
+ (0, serialization_1.property)(ToggleInput2.valueProperty)
+ ], ToggleInput2.prototype, "defaultValue", void 0);
+ __decorate([
+ (0, serialization_1.property)(ToggleInput2.titleProperty)
+ ], ToggleInput2.prototype, "title", void 0);
+ __decorate([
+ (0, serialization_1.property)(ToggleInput2.valueOnProperty)
+ ], ToggleInput2.prototype, "valueOn", void 0);
+ __decorate([
+ (0, serialization_1.property)(ToggleInput2.valueOffProperty)
+ ], ToggleInput2.prototype, "valueOff", void 0);
+ __decorate([
+ (0, serialization_1.property)(ToggleInput2.wrapProperty)
+ ], ToggleInput2.prototype, "wrap", void 0);
+ return ToggleInput2;
+ }(Input)
+ );
+ exports.ToggleInput = ToggleInput;
+ var Choice = (
+ /** @class */
+ function(_super) {
+ __extends(Choice2, _super);
+ function Choice2(title, value) {
+ var _this = _super.call(this) || this;
+ _this.title = title;
+ _this.value = value;
+ return _this;
+ }
+ Choice2.prototype.getSchemaKey = function() {
+ return "Choice";
+ };
+ Choice2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title");
+ Choice2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value");
+ __decorate([
+ (0, serialization_1.property)(Choice2.titleProperty)
+ ], Choice2.prototype, "title", void 0);
+ __decorate([
+ (0, serialization_1.property)(Choice2.valueProperty)
+ ], Choice2.prototype, "value", void 0);
+ return Choice2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.Choice = Choice;
+ var ChoiceSetInput = (
+ /** @class */
+ function(_super) {
+ __extends(ChoiceSetInput2, _super);
+ function ChoiceSetInput2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.isMultiSelect = false;
+ _this.wrap = false;
+ _this.choices = [];
+ return _this;
+ }
+ Object.defineProperty(ChoiceSetInput2.prototype, "isCompact", {
+ get: function() {
+ return !this.style || this.style === "compact";
+ },
+ set: function(value) {
+ this.style = value ? void 0 : "expanded";
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ChoiceSetInput2.getUniqueCategoryName = function() {
+ var uniqueCategoryName = "__ac-category" + ChoiceSetInput2._uniqueCategoryCounter;
+ ChoiceSetInput2._uniqueCategoryCounter++;
+ return uniqueCategoryName;
+ };
+ ChoiceSetInput2.prototype.internalApplyAriaCurrent = function() {
+ if (this._selectElement) {
+ var options = this._selectElement.options;
+ if (options) {
+ for (var _i = 0, _a = Array.from(options); _i < _a.length; _i++) {
+ var option = _a[_i];
+ if (option.selected) {
+ option.setAttribute("aria-current", "true");
+ } else {
+ option.removeAttribute("aria-current");
+ }
+ }
+ }
+ }
+ };
+ ChoiceSetInput2.prototype.renderCompoundInput = function(cssClassName, type, defaultValues) {
+ var _this = this;
+ var element = document.createElement("div");
+ element.className = this.hostConfig.makeCssClassName("ac-input", cssClassName);
+ element.style.width = "100%";
+ element.tabIndex = this.isDesignMode() ? -1 : 0;
+ this._toggleInputs = [];
+ this._labels = [];
+ for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {
+ var choice = _a[_i];
+ var input = document.createElement("input");
+ input.id = Utils.generateUniqueId();
+ input.type = type;
+ input.style.margin = "0";
+ input.style.display = "inline-block";
+ input.style.verticalAlign = "middle";
+ input.style.flex = "0 0 auto";
+ input.name = this.id ? this.id : this._uniqueCategoryName;
+ if (this.isRequired) {
+ input.setAttribute("aria-required", "true");
+ }
+ input.tabIndex = this.isDesignMode() ? -1 : 0;
+ if (choice.value) {
+ input.value = choice.value;
+ }
+ if (choice.title) {
+ input.setAttribute("aria-label", choice.title);
+ }
+ if (defaultValues && choice.value) {
+ if (defaultValues.indexOf(choice.value) >= 0) {
+ input.checked = true;
+ }
+ }
+ input.onchange = function() {
+ _this.valueChanged();
+ };
+ this._toggleInputs.push(input);
+ var compoundInput = document.createElement("div");
+ compoundInput.style.display = "flex";
+ compoundInput.style.alignItems = "center";
+ Utils.appendChild(compoundInput, input);
+ var label = new TextBlock();
+ label.setParent(this);
+ label.forElementId = input.id;
+ label.hostConfig = this.hostConfig;
+ label.text = choice.title ? choice.title : "Choice " + this._toggleInputs.length;
+ label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;
+ label.wrap = this.wrap;
+ var labelElement = label.render();
+ this._labels.push(labelElement);
+ if (labelElement) {
+ labelElement.id = Utils.generateUniqueId();
+ labelElement.style.display = "inline-block";
+ labelElement.style.flex = "1 1 auto";
+ labelElement.style.marginLeft = "6px";
+ labelElement.style.verticalAlign = "middle";
+ var spacerElement = document.createElement("div");
+ spacerElement.style.width = "6px";
+ Utils.appendChild(compoundInput, spacerElement);
+ Utils.appendChild(compoundInput, labelElement);
+ }
+ Utils.appendChild(element, compoundInput);
+ }
+ return element;
+ };
+ ChoiceSetInput2.prototype.updateInputControlAriaLabelledBy = function() {
+ if ((this.isMultiSelect || this.style === "expanded") && this._toggleInputs && this._labels) {
+ var labelIds = this.getAllLabelIds();
+ for (var i = 0; i < this._toggleInputs.length; i++) {
+ var joinedLabelIds = labelIds.join(" ");
+ var label = this._labels[i];
+ if (label && label.id) {
+ joinedLabelIds += " " + label.id;
+ }
+ if (joinedLabelIds) {
+ this._toggleInputs[i].setAttribute("aria-labelledby", joinedLabelIds);
+ } else {
+ this._toggleInputs[i].removeAttribute("aria-labelledby");
+ }
+ }
+ } else {
+ _super.prototype.updateInputControlAriaLabelledBy.call(this);
+ }
+ };
+ ChoiceSetInput2.prototype.internalRender = function() {
+ var _this = this;
+ this._uniqueCategoryName = ChoiceSetInput2.getUniqueCategoryName();
+ if (this.isMultiSelect) {
+ return this.renderCompoundInput("ac-choiceSetInput-multiSelect", "checkbox", this.defaultValue ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator) : void 0);
+ } else {
+ if (this.style === "expanded") {
+ return this.renderCompoundInput("ac-choiceSetInput-expanded", "radio", this.defaultValue ? [this.defaultValue] : void 0);
+ } else if (this.style === "filtered") {
+ var inputContainer = document.createElement("div");
+ inputContainer.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() {
+ _this.valueChanged();
+ if (_this._textInput) {
+ if (_this.value) {
+ _this._textInput.removeAttribute("placeholder");
+ _this._textInput.removeAttribute("aria-label");
+ } else if (_this.placeholder) {
+ _this._textInput.placeholder = _this.placeholder;
+ _this._textInput.setAttribute("aria-label", _this.placeholder);
+ }
+ }
+ };
+ if (this.defaultValue) {
+ this._textInput.value = this.defaultValue;
+ }
+ if (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 dataList = document.createElement("datalist");
+ dataList.id = Utils.generateUniqueId();
+ for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {
+ var choice = _a[_i];
+ var option = document.createElement("option");
+ if (choice.title) {
+ option.value = choice.title;
+ option.setAttribute("aria-label", choice.title);
+ }
+ option.tabIndex = this.isDesignMode() ? -1 : 0;
+ dataList.appendChild(option);
+ }
+ this._textInput.setAttribute("list", dataList.id);
+ inputContainer.append(this._textInput, dataList);
+ return inputContainer;
+ } else {
+ 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 placeholderOption = document.createElement("option");
+ placeholderOption.selected = true;
+ placeholderOption.disabled = true;
+ placeholderOption.hidden = true;
+ placeholderOption.value = "";
+ if (this.placeholder) {
+ placeholderOption.text = this.placeholder;
+ }
+ Utils.appendChild(this._selectElement, placeholderOption);
+ for (var _b = 0, _c = this.choices; _b < _c.length; _b++) {
+ var choice = _c[_b];
+ var option = document.createElement("option");
+ option.value = choice.value;
+ if (choice.title) {
+ option.text = choice.title;
+ option.setAttribute("aria-label", choice.title);
+ }
+ option.tabIndex = this.isDesignMode() ? -1 : 0;
+ if (choice.value === this.defaultValue) {
+ option.selected = true;
+ }
+ Utils.appendChild(this._selectElement, option);
+ }
+ this._selectElement.onchange = function() {
+ _this.internalApplyAriaCurrent();
+ _this.valueChanged();
+ };
+ this.internalApplyAriaCurrent();
+ return this._selectElement;
+ }
+ }
+ };
+ ChoiceSetInput2.prototype.getJsonTypeName = function() {
+ return "Input.ChoiceSet";
+ };
+ ChoiceSetInput2.prototype.focus = function() {
+ if (this._toggleInputs && (this.isMultiSelect || this.style === "expanded")) {
+ if (this._toggleInputs.length > 0) {
+ this._toggleInputs[0].focus();
+ }
+ } else if (this._textInput) {
+ this._textInput.focus();
+ } else {
+ _super.prototype.focus.call(this);
+ }
+ };
+ ChoiceSetInput2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (this.choices.length === 0) {
+ context.addFailure(this, Enums.ValidationEvent.CollectionCantBeEmpty, strings_1.Strings.errors.choiceSetMustHaveAtLeastOneChoice());
+ }
+ for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {
+ var choice = _a[_i];
+ if (!choice.title || !choice.value) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.choiceSetChoicesMustHaveTitleAndValue());
+ }
+ }
+ };
+ ChoiceSetInput2.prototype.isSet = function() {
+ return this.value ? true : false;
+ };
+ ChoiceSetInput2.prototype.isValid = function() {
+ if (this._textInput) {
+ if (this.value === "" || this.value === this.placeholder) {
+ return true;
+ }
+ for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {
+ var choice = _a[_i];
+ if (this.value === choice.value) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return _super.prototype.isValid.call(this);
+ };
+ Object.defineProperty(ChoiceSetInput2.prototype, "value", {
+ get: function() {
+ if (!this.isMultiSelect) {
+ if (this._selectElement) {
+ return this._selectElement.selectedIndex > 0 ? this._selectElement.value : void 0;
+ } else if (this._textInput) {
+ for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {
+ var choice = _a[_i];
+ if (choice.title && this._textInput.value === choice.title) {
+ return choice.value;
+ }
+ }
+ return this._textInput.value;
+ } else if (this._toggleInputs && this._toggleInputs.length > 0) {
+ for (var _b = 0, _c = this._toggleInputs; _b < _c.length; _b++) {
+ var toggleInput = _c[_b];
+ if (toggleInput.checked) {
+ return toggleInput.value;
+ }
+ }
+ }
+ return void 0;
+ } else {
+ if (!this._toggleInputs || this._toggleInputs.length === 0) {
+ return void 0;
+ }
+ var result = "";
+ for (var _d = 0, _f = this._toggleInputs; _d < _f.length; _d++) {
+ var toggleInput = _f[_d];
+ if (toggleInput.checked) {
+ if (result !== "") {
+ result += this.hostConfig.choiceSetInputValueSeparator;
+ }
+ result += toggleInput.value;
+ }
+ }
+ return result ? result : void 0;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ChoiceSetInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value");
+ ChoiceSetInput2.choicesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "choices", Choice);
+ ChoiceSetInput2.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_0, "style", [
+ { value: "compact" },
+ { value: "expanded" },
+ { value: "filtered", targetVersion: serialization_1.Versions.v1_5 }
+ ], "compact");
+ ChoiceSetInput2.isMultiSelectProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "isMultiSelect", false);
+ ChoiceSetInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder");
+ ChoiceSetInput2.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "wrap", false);
+ ChoiceSetInput2._uniqueCategoryCounter = 0;
+ __decorate([
+ (0, serialization_1.property)(ChoiceSetInput2.valueProperty)
+ ], ChoiceSetInput2.prototype, "defaultValue", void 0);
+ __decorate([
+ (0, serialization_1.property)(ChoiceSetInput2.styleProperty)
+ ], ChoiceSetInput2.prototype, "style", void 0);
+ __decorate([
+ (0, serialization_1.property)(ChoiceSetInput2.isMultiSelectProperty)
+ ], ChoiceSetInput2.prototype, "isMultiSelect", void 0);
+ __decorate([
+ (0, serialization_1.property)(ChoiceSetInput2.placeholderProperty)
+ ], ChoiceSetInput2.prototype, "placeholder", void 0);
+ __decorate([
+ (0, serialization_1.property)(ChoiceSetInput2.wrapProperty)
+ ], ChoiceSetInput2.prototype, "wrap", void 0);
+ __decorate([
+ (0, serialization_1.property)(ChoiceSetInput2.choicesProperty)
+ ], ChoiceSetInput2.prototype, "choices", void 0);
+ return ChoiceSetInput2;
+ }(Input)
+ );
+ exports.ChoiceSetInput = ChoiceSetInput;
+ var NumberInput = (
+ /** @class */
+ function(_super) {
+ __extends(NumberInput2, _super);
+ function NumberInput2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ NumberInput2.prototype.internalRender = function() {
+ var _this = this;
+ this._numberInputElement = document.createElement("input");
+ this._numberInputElement.setAttribute("type", "number");
+ if (this.min !== void 0) {
+ this._numberInputElement.setAttribute("min", this.min.toString());
+ }
+ if (this.max !== void 0) {
+ 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;
+ if (this.defaultValue !== void 0) {
+ this._numberInputElement.valueAsNumber = this.defaultValue;
+ }
+ if (this.placeholder) {
+ this._numberInputElement.placeholder = this.placeholder;
+ this._numberInputElement.setAttribute("aria-label", this.placeholder);
+ }
+ this._numberInputElement.oninput = function() {
+ _this.valueChanged();
+ };
+ return this._numberInputElement;
+ };
+ NumberInput2.prototype.getJsonTypeName = function() {
+ return "Input.Number";
+ };
+ NumberInput2.prototype.isSet = function() {
+ return this.value !== void 0 && !isNaN(this.value);
+ };
+ NumberInput2.prototype.isValid = function() {
+ if (this.value === void 0) {
+ return !this.isRequired;
+ }
+ var result = true;
+ if (this.min !== void 0) {
+ result = result && this.value >= this.min;
+ }
+ if (this.max !== void 0) {
+ result = result && this.value <= this.max;
+ }
+ return result;
+ };
+ Object.defineProperty(NumberInput2.prototype, "value", {
+ get: function() {
+ return this._numberInputElement ? this._numberInputElement.valueAsNumber : void 0;
+ },
+ set: function(value) {
+ if (value && this._numberInputElement) {
+ this._numberInputElement.value = value.toString();
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ NumberInput2.valueProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "value");
+ NumberInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder");
+ NumberInput2.minProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "min");
+ NumberInput2.maxProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, "max");
+ __decorate([
+ (0, serialization_1.property)(NumberInput2.valueProperty)
+ ], NumberInput2.prototype, "defaultValue", void 0);
+ __decorate([
+ (0, serialization_1.property)(NumberInput2.minProperty)
+ ], NumberInput2.prototype, "min", void 0);
+ __decorate([
+ (0, serialization_1.property)(NumberInput2.maxProperty)
+ ], NumberInput2.prototype, "max", void 0);
+ __decorate([
+ (0, serialization_1.property)(NumberInput2.placeholderProperty)
+ ], NumberInput2.prototype, "placeholder", void 0);
+ return NumberInput2;
+ }(Input)
+ );
+ exports.NumberInput = NumberInput;
+ var DateInput = (
+ /** @class */
+ function(_super) {
+ __extends(DateInput2, _super);
+ function DateInput2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ DateInput2.prototype.internalRender = function() {
+ var _this = this;
+ this._dateInputElement = document.createElement("input");
+ this._dateInputElement.setAttribute("type", "date");
+ if (this.min) {
+ this._dateInputElement.setAttribute("min", this.min);
+ }
+ if (this.max) {
+ this._dateInputElement.setAttribute("max", this.max);
+ }
+ if (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() {
+ _this.valueChanged();
+ };
+ if (this.defaultValue) {
+ this._dateInputElement.value = this.defaultValue;
+ }
+ return this._dateInputElement;
+ };
+ DateInput2.prototype.getJsonTypeName = function() {
+ return "Input.Date";
+ };
+ DateInput2.prototype.isSet = function() {
+ return this.value ? true : false;
+ };
+ DateInput2.prototype.isValid = function() {
+ if (!this.value) {
+ return !this.isRequired;
+ }
+ var valueAsDate = new Date(this.value);
+ var result = true;
+ if (this.min) {
+ var minDate = new Date(this.min);
+ result = result && valueAsDate >= minDate;
+ }
+ if (this.max) {
+ var maxDate = new Date(this.max);
+ result = result && valueAsDate <= maxDate;
+ }
+ return result;
+ };
+ Object.defineProperty(DateInput2.prototype, "value", {
+ get: function() {
+ return this._dateInputElement ? this._dateInputElement.value : void 0;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ DateInput2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "value");
+ DateInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder");
+ DateInput2.minProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "min");
+ DateInput2.maxProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "max");
+ __decorate([
+ (0, serialization_1.property)(DateInput2.valueProperty)
+ ], DateInput2.prototype, "defaultValue", void 0);
+ __decorate([
+ (0, serialization_1.property)(DateInput2.minProperty)
+ ], DateInput2.prototype, "min", void 0);
+ __decorate([
+ (0, serialization_1.property)(DateInput2.maxProperty)
+ ], DateInput2.prototype, "max", void 0);
+ __decorate([
+ (0, serialization_1.property)(DateInput2.placeholderProperty)
+ ], DateInput2.prototype, "placeholder", void 0);
+ return DateInput2;
+ }(Input)
+ );
+ exports.DateInput = DateInput;
+ var TimeProperty = (
+ /** @class */
+ function(_super) {
+ __extends(TimeProperty2, _super);
+ function TimeProperty2(targetVersion, name) {
+ var _this = _super.call(this, targetVersion, name, function(sender, prop, source, context) {
+ var value = source[prop.name];
+ if (typeof value === "string" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {
+ return value;
+ }
+ return void 0;
+ }, function(sender, prop, target, value, context) {
+ context.serializeValue(target, prop.name, value);
+ }) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ return _this;
+ }
+ return TimeProperty2;
+ }(serialization_1.CustomProperty)
+ );
+ exports.TimeProperty = TimeProperty;
+ var TimeInput = (
+ /** @class */
+ function(_super) {
+ __extends(TimeInput2, _super);
+ function TimeInput2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ TimeInput2.convertTimeStringToDate = function(timeString) {
+ return /* @__PURE__ */ new Date("1973-09-04T" + timeString + ":00Z");
+ };
+ TimeInput2.prototype.internalRender = function() {
+ var _this = this;
+ this._timeInputElement = document.createElement("input");
+ this._timeInputElement.setAttribute("type", "time");
+ if (this.min) {
+ this._timeInputElement.setAttribute("min", this.min);
+ }
+ if (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() {
+ _this.valueChanged();
+ };
+ if (this.placeholder) {
+ this._timeInputElement.placeholder = this.placeholder;
+ this._timeInputElement.setAttribute("aria-label", this.placeholder);
+ }
+ this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0;
+ if (this.defaultValue) {
+ this._timeInputElement.value = this.defaultValue;
+ }
+ return this._timeInputElement;
+ };
+ TimeInput2.prototype.getJsonTypeName = function() {
+ return "Input.Time";
+ };
+ TimeInput2.prototype.isSet = function() {
+ return this.value ? true : false;
+ };
+ TimeInput2.prototype.isValid = function() {
+ if (!this.value) {
+ return !this.isRequired;
+ }
+ var valueAsDate = TimeInput2.convertTimeStringToDate(this.value);
+ var result = true;
+ if (this.min) {
+ var minDate = TimeInput2.convertTimeStringToDate(this.min);
+ result = result && valueAsDate >= minDate;
+ }
+ if (this.max) {
+ var maxDate = TimeInput2.convertTimeStringToDate(this.max);
+ result = result && valueAsDate <= maxDate;
+ }
+ return result;
+ };
+ Object.defineProperty(TimeInput2.prototype, "value", {
+ get: function() {
+ return this._timeInputElement ? this._timeInputElement.value : void 0;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ TimeInput2.valueProperty = new TimeProperty(serialization_1.Versions.v1_0, "value");
+ TimeInput2.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "placeholder");
+ TimeInput2.minProperty = new TimeProperty(serialization_1.Versions.v1_0, "min");
+ TimeInput2.maxProperty = new TimeProperty(serialization_1.Versions.v1_0, "max");
+ __decorate([
+ (0, serialization_1.property)(TimeInput2.valueProperty)
+ ], TimeInput2.prototype, "defaultValue", void 0);
+ __decorate([
+ (0, serialization_1.property)(TimeInput2.minProperty)
+ ], TimeInput2.prototype, "min", void 0);
+ __decorate([
+ (0, serialization_1.property)(TimeInput2.maxProperty)
+ ], TimeInput2.prototype, "max", void 0);
+ __decorate([
+ (0, serialization_1.property)(TimeInput2.placeholderProperty)
+ ], TimeInput2.prototype, "placeholder", void 0);
+ return TimeInput2;
+ }(Input)
+ );
+ exports.TimeInput = TimeInput;
+ var Action = (
+ /** @class */
+ function(_super) {
+ __extends(Action2, _super);
+ function Action2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.style = Enums.ActionStyle.Default;
+ _this.mode = Enums.ActionMode.Primary;
+ _this._state = 0;
+ _this._isFocusable = true;
+ return _this;
+ }
+ Action2.prototype.renderButtonContent = function() {
+ if (this.renderedElement) {
+ var hostConfig = this.hostConfig;
+ var titleElement = document.createElement("div");
+ titleElement.style.overflow = "hidden";
+ titleElement.style.textOverflow = "ellipsis";
+ if (!(hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle || hostConfig.actions.allowTitleToWrap)) {
+ titleElement.style.whiteSpace = "nowrap";
+ }
+ if (this.title) {
+ titleElement.innerText = this.title;
+ }
+ if (!this.iconUrl) {
+ this.renderedElement.classList.add("noIcon");
+ this.renderedElement.appendChild(titleElement);
+ } else {
+ var iconElement = document.createElement("img");
+ iconElement.src = this.iconUrl;
+ iconElement.style.width = hostConfig.actions.iconSize + "px";
+ iconElement.style.height = hostConfig.actions.iconSize + "px";
+ iconElement.style.flex = "0 0 auto";
+ if (hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle) {
+ this.renderedElement.classList.add("iconAbove");
+ this.renderedElement.style.flexDirection = "column";
+ if (this.title) {
+ iconElement.style.marginBottom = "6px";
+ }
+ } else {
+ this.renderedElement.classList.add("iconLeft");
+ iconElement.style.maxHeight = "100%";
+ if (this.title) {
+ iconElement.style.marginRight = "6px";
+ }
+ }
+ this.renderedElement.appendChild(iconElement);
+ this.renderedElement.appendChild(titleElement);
+ }
+ }
+ };
+ Action2.prototype.getParentContainer = function() {
+ if (this.parent instanceof Container) {
+ return this.parent;
+ }
+ return this.parent ? this.parent.getParentContainer() : void 0;
+ };
+ Action2.prototype.isDesignMode = function() {
+ var rootElement = this.getRootObject();
+ return rootElement instanceof CardElement && rootElement.isDesignMode();
+ };
+ Action2.prototype.updateCssClasses = function() {
+ var _a, _b;
+ if (this.parent && this.renderedElement) {
+ var hostConfig = this.parent.hostConfig;
+ this.renderedElement.className = hostConfig.makeCssClassName(this.isEffectivelyEnabled() ? "ac-pushButton" : "ac-pushButton-disabled");
+ var parentContainer = this.getParentContainer();
+ if (parentContainer) {
+ var parentContainerStyle = parentContainer.getEffectiveStyle();
+ if (parentContainerStyle) {
+ this.renderedElement.classList.add("style-" + parentContainerStyle);
+ }
+ }
+ this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1;
+ switch (this._state) {
+ case 0:
+ break;
+ case 1:
+ this.renderedElement.classList.add(hostConfig.makeCssClassName("expanded"));
+ break;
+ case 2:
+ this.renderedElement.classList.add(hostConfig.makeCssClassName("subdued"));
+ break;
+ }
+ if (this.style && this.isEffectivelyEnabled()) {
+ if (this.style === Enums.ActionStyle.Positive) {
+ (_a = this.renderedElement.classList).add.apply(_a, hostConfig.makeCssClassNames("primary", "style-positive"));
+ } else {
+ (_b = this.renderedElement.classList).add.apply(_b, hostConfig.makeCssClassNames("style-" + this.style.toLowerCase()));
+ }
+ }
+ }
+ };
+ Action2.prototype.getDefaultSerializationContext = function() {
+ return new SerializationContext();
+ };
+ Action2.prototype.internalGetReferencedInputs = function() {
+ return {};
+ };
+ Action2.prototype.internalPrepareForExecution = function(_inputs) {
+ };
+ Action2.prototype.internalValidateInputs = function(referencedInputs) {
+ var result = [];
+ if (referencedInputs) {
+ for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {
+ var key = _a[_i];
+ var input = referencedInputs[key];
+ if (!input.validateValue()) {
+ result.push(input);
+ }
+ }
+ }
+ return result;
+ };
+ Action2.prototype.shouldSerialize = function(context) {
+ return context.actionRegistry.findByName(this.getJsonTypeName()) !== void 0;
+ };
+ Action2.prototype.raiseExecuteActionEvent = function() {
+ if (this.onExecute) {
+ this.onExecute(this);
+ }
+ raiseExecuteActionEvent(this);
+ };
+ Action2.prototype.internalAfterExecute = function() {
+ var rootObject = this.getRootObject();
+ if (rootObject instanceof CardElement) {
+ rootObject.updateActionsEnabledState();
+ }
+ };
+ Action2.prototype.getHref = function() {
+ return "";
+ };
+ Action2.prototype.getAriaRole = function() {
+ return "button";
+ };
+ Action2.prototype.setupElementForAccessibility = function(element, promoteTooltipToLabel) {
+ if (promoteTooltipToLabel === void 0) {
+ promoteTooltipToLabel = false;
+ }
+ element.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1;
+ element.setAttribute("role", this.getAriaRole());
+ if (element instanceof HTMLButtonElement) {
+ element.disabled = !this.isEffectivelyEnabled();
+ }
+ if (!this.isEffectivelyEnabled()) {
+ element.setAttribute("aria-disabled", "true");
+ } else {
+ element.removeAttribute("aria-disabled");
+ element.classList.add(this.hostConfig.makeCssClassName("ac-selectable"));
+ }
+ if (this.title) {
+ element.setAttribute("aria-label", this.title);
+ element.title = this.title;
+ } else {
+ element.removeAttribute("aria-label");
+ element.removeAttribute("title");
+ }
+ if (this.tooltip) {
+ var targetAriaAttribute = promoteTooltipToLabel ? this.title ? "aria-description" : "aria-label" : "aria-description";
+ element.setAttribute(targetAriaAttribute, this.tooltip);
+ element.title = this.tooltip;
+ }
+ };
+ Action2.prototype.parse = function(source, context) {
+ return _super.prototype.parse.call(this, source, context ? context : new SerializationContext());
+ };
+ Action2.prototype.render = function() {
+ var _this = this;
+ var buttonElement = document.createElement("button");
+ buttonElement.type = "button";
+ buttonElement.style.display = "flex";
+ buttonElement.style.alignItems = "center";
+ buttonElement.style.justifyContent = "center";
+ buttonElement.onclick = function(e) {
+ if (_this.isEffectivelyEnabled()) {
+ e.preventDefault();
+ e.cancelBubble = true;
+ _this.execute();
+ }
+ };
+ this._renderedElement = buttonElement;
+ this.renderButtonContent();
+ this.updateCssClasses();
+ this.setupElementForAccessibility(buttonElement);
+ };
+ Action2.prototype.execute = function() {
+ if (this._actionCollection) {
+ this._actionCollection.actionExecuted(this);
+ }
+ this.raiseExecuteActionEvent();
+ this.internalAfterExecute();
+ };
+ Action2.prototype.prepareForExecution = function() {
+ var referencedInputs = this.getReferencedInputs();
+ var invalidInputs = this.internalValidateInputs(referencedInputs);
+ if (invalidInputs.length > 0) {
+ invalidInputs[0].focus();
+ return false;
+ }
+ this.internalPrepareForExecution(referencedInputs);
+ return true;
+ };
+ Action2.prototype.remove = function() {
+ if (this._actionCollection) {
+ return this._actionCollection.removeAction(this);
+ }
+ return false;
+ };
+ Action2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ return [];
+ };
+ Action2.prototype.getAllActions = function() {
+ return [this];
+ };
+ Action2.prototype.getResourceInformation = function() {
+ return this.iconUrl ? [{ url: this.iconUrl, mimeType: "image" }] : [];
+ };
+ Action2.prototype.getActionById = function(id) {
+ return this.id === id ? this : void 0;
+ };
+ Action2.prototype.getReferencedInputs = function() {
+ return this.internalGetReferencedInputs();
+ };
+ Action2.prototype.validateInputs = function() {
+ return this.internalValidateInputs(this.getReferencedInputs());
+ };
+ Action2.prototype.updateEnabledState = function() {
+ };
+ Action2.prototype.isEffectivelyEnabled = function() {
+ return this.isEnabled;
+ };
+ Object.defineProperty(Action2.prototype, "isPrimary", {
+ get: function() {
+ return this.style === Enums.ActionStyle.Positive;
+ },
+ set: function(value) {
+ if (value) {
+ this.style = Enums.ActionStyle.Positive;
+ } else {
+ if (this.style === Enums.ActionStyle.Positive) {
+ this.style = Enums.ActionStyle.Default;
+ }
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Action2.prototype, "hostConfig", {
+ get: function() {
+ return this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Action2.prototype, "parent", {
+ get: function() {
+ return this._parent;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Action2.prototype, "state", {
+ get: function() {
+ return this._state;
+ },
+ set: function(value) {
+ if (this._state !== value) {
+ this._state = value;
+ this.updateCssClasses();
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Action2.prototype, "isFocusable", {
+ get: function() {
+ return this._isFocusable;
+ },
+ set: function(value) {
+ if (this._isFocusable !== value) {
+ this._isFocusable = value;
+ this.updateCssClasses();
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Action2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "title");
+ Action2.iconUrlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, "iconUrl");
+ Action2.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_2, "style", [
+ { value: Enums.ActionStyle.Default },
+ { value: Enums.ActionStyle.Positive },
+ { value: Enums.ActionStyle.Destructive }
+ ], Enums.ActionStyle.Default);
+ Action2.modeProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, "mode", [{ value: Enums.ActionMode.Primary }, { value: Enums.ActionMode.Secondary }], Enums.ActionMode.Primary);
+ Action2.tooltipProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_5, "tooltip");
+ Action2.isEnabledProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, "isEnabled", true);
+ __decorate([
+ (0, serialization_1.property)(Action2.titleProperty)
+ ], Action2.prototype, "title", void 0);
+ __decorate([
+ (0, serialization_1.property)(Action2.iconUrlProperty)
+ ], Action2.prototype, "iconUrl", void 0);
+ __decorate([
+ (0, serialization_1.property)(Action2.styleProperty)
+ ], Action2.prototype, "style", void 0);
+ __decorate([
+ (0, serialization_1.property)(Action2.modeProperty)
+ ], Action2.prototype, "mode", void 0);
+ __decorate([
+ (0, serialization_1.property)(Action2.tooltipProperty)
+ ], Action2.prototype, "tooltip", void 0);
+ __decorate([
+ (0, serialization_1.property)(Action2.isEnabledProperty)
+ ], Action2.prototype, "isEnabled", void 0);
+ return Action2;
+ }(card_object_1.CardObject)
+ );
+ exports.Action = Action;
+ var SubmitActionBase = (
+ /** @class */
+ function(_super) {
+ __extends(SubmitActionBase2, _super);
+ function SubmitActionBase2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.disabledUnlessAssociatedInputsChange = false;
+ _this._isPrepared = false;
+ _this._areReferencedInputsDirty = false;
+ return _this;
+ }
+ SubmitActionBase2.prototype.internalGetReferencedInputs = function() {
+ var result = {};
+ if (this.associatedInputs !== "none") {
+ var current = this.parent;
+ var inputs = [];
+ while (current) {
+ inputs.push.apply(inputs, current.getAllInputs(false));
+ current = current.parent;
+ }
+ for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {
+ var input = inputs_1[_i];
+ if (input.id) {
+ result[input.id] = input;
+ }
+ }
+ }
+ return result;
+ };
+ SubmitActionBase2.prototype.internalPrepareForExecution = function(inputs) {
+ if (this._originalData) {
+ this._processedData = JSON.parse(JSON.stringify(this._originalData));
+ } else {
+ this._processedData = {};
+ }
+ if (this._processedData && inputs) {
+ for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {
+ var key = _a[_i];
+ var input = inputs[key];
+ if (input.id && input.isSet()) {
+ this._processedData[input.id] = typeof input.value === "string" ? input.value : input.value.toString();
+ }
+ }
+ }
+ this._isPrepared = true;
+ };
+ SubmitActionBase2.prototype.internalAfterExecute = function() {
+ if (shared_1.GlobalSettings.resetInputsDirtyStateAfterActionExecution) {
+ this.resetReferencedInputsDirtyState();
+ }
+ };
+ SubmitActionBase2.prototype.resetReferencedInputsDirtyState = function() {
+ var referencedInputs = this.getReferencedInputs();
+ this._areReferencedInputsDirty = false;
+ if (referencedInputs) {
+ for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {
+ var key = _a[_i];
+ var input = referencedInputs[key];
+ input.resetDirtyState();
+ }
+ }
+ };
+ SubmitActionBase2.prototype.updateEnabledState = function() {
+ this._areReferencedInputsDirty = false;
+ var referencedInputs = this.getReferencedInputs();
+ if (referencedInputs) {
+ for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {
+ var key = _a[_i];
+ var input = referencedInputs[key];
+ if (input.isDirty()) {
+ this._areReferencedInputsDirty = true;
+ break;
+ }
+ }
+ }
+ this.updateCssClasses();
+ if (this._renderedElement) {
+ this.setupElementForAccessibility(this._renderedElement);
+ }
+ };
+ SubmitActionBase2.prototype.isEffectivelyEnabled = function() {
+ var result = _super.prototype.isEffectivelyEnabled.call(this);
+ return this.disabledUnlessAssociatedInputsChange ? result && this._areReferencedInputsDirty : result;
+ };
+ Object.defineProperty(SubmitActionBase2.prototype, "data", {
+ get: function() {
+ return this._isPrepared ? this._processedData : this._originalData;
+ },
+ set: function(value) {
+ this._originalData = value;
+ this._isPrepared = false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ SubmitActionBase2.dataProperty = new serialization_1.PropertyDefinition(serialization_1.Versions.v1_0, "data");
+ SubmitActionBase2.associatedInputsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_3, "associatedInputs", function(sender, prop, source, context) {
+ var value = source[prop.name];
+ if (value !== void 0 && typeof value === "string") {
+ return value.toLowerCase() === "none" ? "none" : "auto";
+ }
+ return void 0;
+ }, function(sender, prop, target, value, context) {
+ context.serializeValue(target, prop.name, value);
+ });
+ SubmitActionBase2.disabledUnlessAssociatedInputsChangeProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, "disabledUnlessAssociatedInputsChange", false);
+ __decorate([
+ (0, serialization_1.property)(SubmitActionBase2.dataProperty)
+ ], SubmitActionBase2.prototype, "_originalData", void 0);
+ __decorate([
+ (0, serialization_1.property)(SubmitActionBase2.associatedInputsProperty)
+ ], SubmitActionBase2.prototype, "associatedInputs", void 0);
+ __decorate([
+ (0, serialization_1.property)(SubmitActionBase2.disabledUnlessAssociatedInputsChangeProperty)
+ ], SubmitActionBase2.prototype, "disabledUnlessAssociatedInputsChange", void 0);
+ return SubmitActionBase2;
+ }(Action)
+ );
+ exports.SubmitActionBase = SubmitActionBase;
+ var SubmitAction = (
+ /** @class */
+ function(_super) {
+ __extends(SubmitAction2, _super);
+ function SubmitAction2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ SubmitAction2.prototype.getJsonTypeName = function() {
+ return SubmitAction2.JsonTypeName;
+ };
+ SubmitAction2.JsonTypeName = "Action.Submit";
+ return SubmitAction2;
+ }(SubmitActionBase)
+ );
+ exports.SubmitAction = SubmitAction;
+ var ExecuteAction = (
+ /** @class */
+ function(_super) {
+ __extends(ExecuteAction2, _super);
+ function ExecuteAction2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ ExecuteAction2.prototype.getJsonTypeName = function() {
+ return ExecuteAction2.JsonTypeName;
+ };
+ ExecuteAction2.JsonTypeName = "Action.Execute";
+ ExecuteAction2.verbProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "verb");
+ __decorate([
+ (0, serialization_1.property)(ExecuteAction2.verbProperty)
+ ], ExecuteAction2.prototype, "verb", void 0);
+ return ExecuteAction2;
+ }(SubmitActionBase)
+ );
+ exports.ExecuteAction = ExecuteAction;
+ var OpenUrlAction = (
+ /** @class */
+ function(_super) {
+ __extends(OpenUrlAction2, _super);
+ function OpenUrlAction2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ OpenUrlAction2.prototype.getJsonTypeName = function() {
+ return OpenUrlAction2.JsonTypeName;
+ };
+ OpenUrlAction2.prototype.getAriaRole = function() {
+ return "link";
+ };
+ OpenUrlAction2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (!this.url) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("url"));
+ }
+ };
+ OpenUrlAction2.prototype.getHref = function() {
+ return this.url;
+ };
+ OpenUrlAction2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "url");
+ OpenUrlAction2.JsonTypeName = "Action.OpenUrl";
+ __decorate([
+ (0, serialization_1.property)(OpenUrlAction2.urlProperty)
+ ], OpenUrlAction2.prototype, "url", void 0);
+ return OpenUrlAction2;
+ }(Action)
+ );
+ exports.OpenUrlAction = OpenUrlAction;
+ var ToggleVisibilityAction = (
+ /** @class */
+ function(_super) {
+ __extends(ToggleVisibilityAction2, _super);
+ function ToggleVisibilityAction2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.targetElements = {};
+ return _this;
+ }
+ ToggleVisibilityAction2.prototype.updateAriaControlsAttribute = function() {
+ if (this.targetElements) {
+ var elementIds = Object.keys(this.targetElements);
+ if (this._renderedElement) {
+ if (elementIds.length > 0) {
+ this._renderedElement.setAttribute("aria-controls", elementIds.join(" "));
+ } else {
+ this._renderedElement.removeAttribute("aria-controls");
+ }
+ }
+ }
+ };
+ ToggleVisibilityAction2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (!this.targetElements) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("targetElements"));
+ }
+ };
+ ToggleVisibilityAction2.prototype.getJsonTypeName = function() {
+ return ToggleVisibilityAction2.JsonTypeName;
+ };
+ ToggleVisibilityAction2.prototype.render = function() {
+ _super.prototype.render.call(this);
+ this.updateAriaControlsAttribute();
+ };
+ ToggleVisibilityAction2.prototype.execute = function() {
+ _super.prototype.execute.call(this);
+ if (this.parent) {
+ for (var _i = 0, _a = Object.keys(this.targetElements); _i < _a.length; _i++) {
+ var elementId = _a[_i];
+ var targetElement = this.parent.getRootElement().getElementById(elementId);
+ if (targetElement) {
+ if (typeof this.targetElements[elementId] === "boolean") {
+ targetElement.isVisible = this.targetElements[elementId];
+ } else {
+ targetElement.isVisible = !targetElement.isVisible;
+ }
+ }
+ }
+ }
+ };
+ ToggleVisibilityAction2.prototype.addTargetElement = function(elementId, isVisible) {
+ if (isVisible === void 0) {
+ isVisible = void 0;
+ }
+ this.targetElements[elementId] = isVisible;
+ this.updateAriaControlsAttribute();
+ };
+ ToggleVisibilityAction2.prototype.removeTargetElement = function(elementId) {
+ delete this.targetElements[elementId];
+ this.updateAriaControlsAttribute();
+ };
+ ToggleVisibilityAction2.targetElementsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_2, "targetElements", function(sender, prop, source, context) {
+ var result = {};
+ if (Array.isArray(source[prop.name])) {
+ for (var _i = 0, _a = source[prop.name]; _i < _a.length; _i++) {
+ var item = _a[_i];
+ if (typeof item === "string") {
+ result[item] = void 0;
+ } else if (typeof item === "object") {
+ var elementId = item["elementId"];
+ if (typeof elementId === "string") {
+ result[elementId] = Utils.parseBool(item["isVisible"]);
+ }
+ }
+ }
+ }
+ return result;
+ }, function(sender, prop, target, value, context) {
+ var targetElements = [];
+ for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) {
+ var id = _a[_i];
+ if (typeof value[id] === "boolean") {
+ targetElements.push({
+ elementId: id,
+ isVisible: value[id]
+ });
+ } else {
+ targetElements.push(id);
+ }
+ }
+ context.serializeArray(target, prop.name, targetElements);
+ }, {}, function(sender) {
+ return {};
+ });
+ ToggleVisibilityAction2.JsonTypeName = "Action.ToggleVisibility";
+ __decorate([
+ (0, serialization_1.property)(ToggleVisibilityAction2.targetElementsProperty)
+ ], ToggleVisibilityAction2.prototype, "targetElements", void 0);
+ return ToggleVisibilityAction2;
+ }(Action)
+ );
+ exports.ToggleVisibilityAction = ToggleVisibilityAction;
+ var StringWithSubstitutionProperty = (
+ /** @class */
+ function(_super) {
+ __extends(StringWithSubstitutionProperty2, _super);
+ function StringWithSubstitutionProperty2(targetVersion, name) {
+ var _this = _super.call(this, targetVersion, name, void 0, function() {
+ return new shared_1.StringWithSubstitutions();
+ }) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ return _this;
+ }
+ StringWithSubstitutionProperty2.prototype.parse = function(sender, source, context) {
+ var result = new shared_1.StringWithSubstitutions();
+ result.set(Utils.parseString(source[this.name]));
+ return result;
+ };
+ StringWithSubstitutionProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeValue(target, this.name, value.getOriginal());
+ };
+ return StringWithSubstitutionProperty2;
+ }(serialization_1.PropertyDefinition)
+ );
+ var HttpHeader = (
+ /** @class */
+ function(_super) {
+ __extends(HttpHeader2, _super);
+ function HttpHeader2(name, value) {
+ if (name === void 0) {
+ name = "";
+ }
+ if (value === void 0) {
+ value = "";
+ }
+ var _this = _super.call(this) || this;
+ _this.name = name;
+ _this.value = value;
+ return _this;
+ }
+ HttpHeader2.prototype.getSchemaKey = function() {
+ return "HttpHeader";
+ };
+ HttpHeader2.prototype.getReferencedInputs = function(inputs, referencedInputs) {
+ this._value.getReferencedInputs(inputs, referencedInputs);
+ };
+ HttpHeader2.prototype.prepareForExecution = function(inputs) {
+ this._value.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);
+ };
+ Object.defineProperty(HttpHeader2.prototype, "value", {
+ get: function() {
+ return this._value.get();
+ },
+ set: function(newValue) {
+ this._value.set(newValue);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ HttpHeader2.nameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "name");
+ HttpHeader2.valueProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, "value");
+ __decorate([
+ (0, serialization_1.property)(HttpHeader2.nameProperty)
+ ], HttpHeader2.prototype, "name", void 0);
+ __decorate([
+ (0, serialization_1.property)(HttpHeader2.valueProperty)
+ ], HttpHeader2.prototype, "_value", void 0);
+ return HttpHeader2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.HttpHeader = HttpHeader;
+ var HttpAction = (
+ /** @class */
+ function(_super) {
+ __extends(HttpAction2, _super);
+ function HttpAction2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._ignoreInputValidation = false;
+ return _this;
+ }
+ HttpAction2.prototype.internalGetReferencedInputs = function() {
+ var allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];
+ var result = {};
+ this._url.getReferencedInputs(allInputs, result);
+ for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {
+ var header = _a[_i];
+ header.getReferencedInputs(allInputs, result);
+ }
+ this._body.getReferencedInputs(allInputs, result);
+ return result;
+ };
+ HttpAction2.prototype.internalPrepareForExecution = function(inputs) {
+ if (inputs) {
+ this._url.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);
+ var contentType = shared_1.ContentTypes.applicationJson;
+ for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {
+ var header = _a[_i];
+ header.prepareForExecution(inputs);
+ if (header.name && header.name.toLowerCase() === "content-type") {
+ contentType = header.value;
+ }
+ }
+ this._body.substituteInputValues(inputs, contentType);
+ }
+ };
+ HttpAction2.prototype.getJsonTypeName = function() {
+ return HttpAction2.JsonTypeName;
+ };
+ HttpAction2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (!this.url) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("url"));
+ }
+ if (this.headers.length > 0) {
+ for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {
+ var header = _a[_i];
+ if (!header.name) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.actionHttpHeadersMustHaveNameAndValue());
+ }
+ }
+ }
+ };
+ Object.defineProperty(HttpAction2.prototype, "ignoreInputValidation", {
+ get: function() {
+ return this._ignoreInputValidation;
+ },
+ set: function(value) {
+ this._ignoreInputValidation = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(HttpAction2.prototype, "url", {
+ get: function() {
+ return this._url.get();
+ },
+ set: function(value) {
+ this._url.set(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(HttpAction2.prototype, "body", {
+ get: function() {
+ return this._body.get();
+ },
+ set: function(value) {
+ this._body.set(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ HttpAction2.urlProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, "url");
+ HttpAction2.bodyProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, "body");
+ HttpAction2.methodProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "method");
+ HttpAction2.headersProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, "headers", HttpHeader);
+ HttpAction2.ignoreInputValidationProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, "ignoreInputValidation", false);
+ HttpAction2.JsonTypeName = "Action.Http";
+ __decorate([
+ (0, serialization_1.property)(HttpAction2.urlProperty)
+ ], HttpAction2.prototype, "_url", void 0);
+ __decorate([
+ (0, serialization_1.property)(HttpAction2.bodyProperty)
+ ], HttpAction2.prototype, "_body", void 0);
+ __decorate([
+ (0, serialization_1.property)(HttpAction2.methodProperty)
+ ], HttpAction2.prototype, "method", void 0);
+ __decorate([
+ (0, serialization_1.property)(HttpAction2.headersProperty)
+ ], HttpAction2.prototype, "headers", void 0);
+ __decorate([
+ (0, serialization_1.property)(HttpAction2.ignoreInputValidationProperty)
+ ], HttpAction2.prototype, "_ignoreInputValidation", void 0);
+ return HttpAction2;
+ }(Action)
+ );
+ exports.HttpAction = HttpAction;
+ var ShowCardAction = (
+ /** @class */
+ function(_super) {
+ __extends(ShowCardAction2, _super);
+ function ShowCardAction2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.card = new InlineAdaptiveCard();
+ return _this;
+ }
+ ShowCardAction2.prototype.updateCssClasses = function() {
+ _super.prototype.updateCssClasses.call(this);
+ if (this.renderedElement) {
+ var effectiveHostConfig = this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;
+ this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName("expandable"));
+ this.renderedElement.setAttribute("aria-expanded", (this.state === 1).toString());
+ }
+ };
+ ShowCardAction2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ var jsonCard = source["card"];
+ if (jsonCard) {
+ this.card.parse(jsonCard, context);
+ } else {
+ context.logParseEvent(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.showCardMustHaveCard());
+ }
+ };
+ ShowCardAction2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ if (this.card) {
+ context.serializeValue(target, "card", this.card.toJSON(context));
+ }
+ };
+ ShowCardAction2.prototype.raiseExecuteActionEvent = function() {
+ if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {
+ _super.prototype.raiseExecuteActionEvent.call(this);
+ }
+ };
+ ShowCardAction2.prototype.releaseDOMResources = function() {
+ _super.prototype.releaseDOMResources.call(this);
+ this.card.releaseDOMResources();
+ };
+ ShowCardAction2.prototype.getJsonTypeName = function() {
+ return ShowCardAction2.JsonTypeName;
+ };
+ ShowCardAction2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ this.card.internalValidateProperties(context);
+ };
+ ShowCardAction2.prototype.setParent = function(value) {
+ _super.prototype.setParent.call(this, value);
+ this.card.setParent(value);
+ };
+ ShowCardAction2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ return this.card.getAllInputs(processActions);
+ };
+ ShowCardAction2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ result.push.apply(result, this.card.getAllActions());
+ return result;
+ };
+ ShowCardAction2.prototype.getResourceInformation = function() {
+ var result = _super.prototype.getResourceInformation.call(this);
+ result.push.apply(result, this.card.getResourceInformation());
+ return result;
+ };
+ ShowCardAction2.prototype.getActionById = function(id) {
+ var result = _super.prototype.getActionById.call(this, id);
+ if (!result) {
+ result = this.card.getActionById(id);
+ }
+ return result;
+ };
+ ShowCardAction2.JsonTypeName = "Action.ShowCard";
+ return ShowCardAction2;
+ }(Action)
+ );
+ exports.ShowCardAction = ShowCardAction;
+ var OverflowAction = (
+ /** @class */
+ function(_super) {
+ __extends(OverflowAction2, _super);
+ function OverflowAction2(actions) {
+ var _this = _super.call(this) || this;
+ _this._actions = actions;
+ _this.title = strings_1.Strings.defaults.overflowButtonText();
+ return _this;
+ }
+ OverflowAction2.prototype.getActions = function() {
+ return this._actions;
+ };
+ OverflowAction2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ result.push.apply(result, this._actions);
+ return result;
+ };
+ OverflowAction2.prototype.getJsonTypeName = function() {
+ return ShowCardAction.JsonTypeName;
+ };
+ OverflowAction2.prototype.execute = function() {
+ var _this = this;
+ var _a;
+ var shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(this, this.renderedElement);
+ if (shouldDisplayPopupMenu && this.renderedElement) {
+ var contextMenu_1 = new controls_1.PopupMenu();
+ contextMenu_1.hostConfig = this.hostConfig;
+ var _loop_2 = function(i2) {
+ var menuItem = new controls_1.MenuItem(i2.toString(), (_a = this_1._actions[i2].title) !== null && _a !== void 0 ? _a : "");
+ menuItem.isEnabled = this_1._actions[i2].isEnabled;
+ menuItem.onClick = function() {
+ var actionToExecute = _this._actions[i2];
+ contextMenu_1.closePopup(false);
+ if (actionToExecute.isEnabled) {
+ actionToExecute.execute();
+ }
+ };
+ contextMenu_1.items.add(menuItem);
+ };
+ var this_1 = this;
+ for (var i = 0; i < this._actions.length; i++) {
+ _loop_2(i);
+ }
+ contextMenu_1.popup(this.renderedElement);
+ }
+ };
+ OverflowAction2.JsonTypeName = "Action.Overflow";
+ return OverflowAction2;
+ }(Action)
+ );
+ var ActionCollection = (
+ /** @class */
+ function() {
+ function ActionCollection2(owner) {
+ this._items = [];
+ this._renderedActions = [];
+ this._owner = owner;
+ }
+ ActionCollection2.prototype.isActionAllowed = function(action) {
+ var forbiddenTypes = this._owner.getForbiddenActionTypes();
+ if (forbiddenTypes) {
+ for (var _i = 0, forbiddenTypes_1 = forbiddenTypes; _i < forbiddenTypes_1.length; _i++) {
+ var forbiddenType = forbiddenTypes_1[_i];
+ if (action.constructor === forbiddenType) {
+ return false;
+ }
+ }
+ }
+ return true;
+ };
+ ActionCollection2.prototype.refreshContainer = function() {
+ clearElement(this._actionCardContainer);
+ if (!this._actionCard) {
+ this._actionCardContainer.style.marginTop = "0px";
+ return;
+ }
+ this._actionCardContainer.style.marginTop = this.renderedActionCount > 0 ? this._owner.hostConfig.actions.showCard.inlineTopMargin + "px" : "0px";
+ var padding = this._owner.getEffectivePadding();
+ this._owner.getImmediateSurroundingPadding(padding);
+ var physicalPadding = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);
+ if (this._actionCard) {
+ this._actionCard.style.paddingLeft = physicalPadding.left + "px";
+ this._actionCard.style.paddingRight = physicalPadding.right + "px";
+ this._actionCard.style.marginLeft = "-" + physicalPadding.left + "px";
+ this._actionCard.style.marginRight = "-" + physicalPadding.right + "px";
+ if (physicalPadding.bottom !== 0 && !this._owner.isDesignMode()) {
+ this._actionCard.style.paddingBottom = physicalPadding.bottom + "px";
+ this._actionCard.style.marginBottom = "-" + physicalPadding.bottom + "px";
+ }
+ Utils.appendChild(this._actionCardContainer, this._actionCard);
+ }
+ };
+ ActionCollection2.prototype.layoutChanged = function() {
+ this._owner.getRootElement().updateLayout();
+ };
+ ActionCollection2.prototype.showActionCard = function(action, suppressStyle, raiseEvent) {
+ if (suppressStyle === void 0) {
+ suppressStyle = false;
+ }
+ if (raiseEvent === void 0) {
+ raiseEvent = true;
+ }
+ action.card.suppressStyle = suppressStyle;
+ var renderedCard = action.card.renderedElement && !this._owner.isDesignMode() ? action.card.renderedElement : action.card.render();
+ this._actionCard = renderedCard;
+ this._expandedAction = action;
+ this.refreshContainer();
+ if (raiseEvent) {
+ this.layoutChanged();
+ raiseInlineCardExpandedEvent(action, true);
+ }
+ };
+ ActionCollection2.prototype.collapseExpandedAction = function() {
+ for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {
+ var action = _a[_i];
+ action.state = 0;
+ }
+ var previouslyExpandedAction = this._expandedAction;
+ this._expandedAction = void 0;
+ this._actionCard = void 0;
+ this.refreshContainer();
+ if (previouslyExpandedAction) {
+ this.layoutChanged();
+ raiseInlineCardExpandedEvent(previouslyExpandedAction, false);
+ }
+ };
+ ActionCollection2.prototype.expandShowCardAction = function(action, raiseEvent) {
+ var _this = this;
+ var afterSelectedAction = false;
+ for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {
+ var renderedAction = _a[_i];
+ if (this._owner.hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal && afterSelectedAction) {
+ renderedAction.isFocusable = false;
+ }
+ if (renderedAction !== action) {
+ renderedAction.state = 2;
+ } else {
+ renderedAction.state = 1;
+ afterSelectedAction = true;
+ if (renderedAction.renderedElement) {
+ renderedAction.renderedElement.onblur = function(_e) {
+ for (var _i2 = 0, _a2 = _this._renderedActions; _i2 < _a2.length; _i2++) {
+ var ra = _a2[_i2];
+ ra.isFocusable = true;
+ }
+ };
+ }
+ }
+ }
+ this.showActionCard(action, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), raiseEvent);
+ };
+ ActionCollection2.prototype.releaseDOMResources = function() {
+ for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {
+ var action = _a[_i];
+ action.releaseDOMResources();
+ }
+ };
+ ActionCollection2.prototype.actionExecuted = function(action) {
+ if (!(action instanceof ShowCardAction)) {
+ this.collapseExpandedAction();
+ } else {
+ if (action === this._expandedAction) {
+ this.collapseExpandedAction();
+ } else if (this._owner.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Inline) {
+ this.expandShowCardAction(action, true);
+ }
+ }
+ };
+ ActionCollection2.prototype.parse = function(source, context) {
+ this.clear();
+ if (Array.isArray(source)) {
+ for (var _i = 0, source_1 = source; _i < source_1.length; _i++) {
+ var jsonAction = source_1[_i];
+ var forbiddenActions = [];
+ if (this._owner instanceof ContainerWithActions) {
+ forbiddenActions = this._owner.getForbiddenActionNames();
+ }
+ var action = context.parseAction(this._owner, jsonAction, forbiddenActions, !this._owner.isDesignMode());
+ if (action) {
+ this.addAction(action);
+ }
+ }
+ }
+ };
+ ActionCollection2.prototype.toJSON = function(target, propertyName, context) {
+ context.serializeArray(target, propertyName, this._items);
+ };
+ ActionCollection2.prototype.getActionAt = function(id) {
+ return this._items[id];
+ };
+ ActionCollection2.prototype.getActionCount = function() {
+ return this._items.length;
+ };
+ ActionCollection2.prototype.getActionById = function(id) {
+ var result = void 0;
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ result = item.getActionById(id);
+ if (result) {
+ break;
+ }
+ }
+ return result;
+ };
+ ActionCollection2.prototype.validateProperties = function(context) {
+ if (this._owner.hostConfig.actions.maxActions && this._items.length > this._owner.hostConfig.actions.maxActions) {
+ context.addFailure(this._owner, Enums.ValidationEvent.TooManyActions, strings_1.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions));
+ }
+ if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {
+ context.addFailure(this._owner, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());
+ }
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ if (!this.isActionAllowed(item)) {
+ context.addFailure(this._owner, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(item.getJsonTypeName()));
+ }
+ item.internalValidateProperties(context);
+ }
+ };
+ ActionCollection2.prototype.render = function(orientation) {
+ var hostConfig = this._owner.hostConfig;
+ if (!hostConfig.supportsInteractivity) {
+ return void 0;
+ }
+ var element = document.createElement("div");
+ var maxActions = hostConfig.actions.maxActions ? Math.min(hostConfig.actions.maxActions, this._items.length) : this._items.length;
+ this._actionCardContainer = document.createElement("div");
+ this._renderedActions = [];
+ if (hostConfig.actions.preExpandSingleShowCardAction && maxActions === 1 && this._items[0] instanceof ShowCardAction && this.isActionAllowed(this._items[0])) {
+ this.showActionCard(this._items[0], true);
+ this._renderedActions.push(this._items[0]);
+ } else {
+ var buttonStrip = document.createElement("div");
+ buttonStrip.className = hostConfig.makeCssClassName("ac-actionSet");
+ buttonStrip.style.display = "flex";
+ if (orientation === Enums.Orientation.Horizontal) {
+ buttonStrip.style.flexDirection = "row";
+ if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) {
+ switch (this._owner.horizontalAlignment) {
+ case Enums.HorizontalAlignment.Center:
+ buttonStrip.style.justifyContent = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ buttonStrip.style.justifyContent = "flex-end";
+ break;
+ default:
+ buttonStrip.style.justifyContent = "flex-start";
+ break;
+ }
+ } else {
+ switch (hostConfig.actions.actionAlignment) {
+ case Enums.ActionAlignment.Center:
+ buttonStrip.style.justifyContent = "center";
+ break;
+ case Enums.ActionAlignment.Right:
+ buttonStrip.style.justifyContent = "flex-end";
+ break;
+ default:
+ buttonStrip.style.justifyContent = "flex-start";
+ break;
+ }
+ }
+ } else {
+ buttonStrip.style.flexDirection = "column";
+ if (this._owner.horizontalAlignment && hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) {
+ switch (this._owner.horizontalAlignment) {
+ case Enums.HorizontalAlignment.Center:
+ buttonStrip.style.alignItems = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ buttonStrip.style.alignItems = "flex-end";
+ break;
+ default:
+ buttonStrip.style.alignItems = "flex-start";
+ break;
+ }
+ } else {
+ switch (hostConfig.actions.actionAlignment) {
+ case Enums.ActionAlignment.Center:
+ buttonStrip.style.alignItems = "center";
+ break;
+ case Enums.ActionAlignment.Right:
+ buttonStrip.style.alignItems = "flex-end";
+ break;
+ case Enums.ActionAlignment.Stretch:
+ buttonStrip.style.alignItems = "stretch";
+ break;
+ default:
+ buttonStrip.style.alignItems = "flex-start";
+ break;
+ }
+ }
+ }
+ var allowedActions = this._items.filter(this.isActionAllowed.bind(this));
+ var primaryActions_1 = [];
+ var secondaryActions_1 = [];
+ if (!this._owner.isDesignMode()) {
+ allowedActions.forEach(function(action2) {
+ return action2.mode === Enums.ActionMode.Secondary ? secondaryActions_1.push(action2) : primaryActions_1.push(action2);
+ });
+ var overflowPrimaryActions = primaryActions_1.splice(hostConfig.actions.maxActions);
+ if (shared_1.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {
+ secondaryActions_1.push.apply(secondaryActions_1, overflowPrimaryActions);
+ }
+ var shouldRenderOverflowActionButton = true;
+ if (secondaryActions_1.length > 0) {
+ if (!this._overflowAction) {
+ this._overflowAction = new OverflowAction(secondaryActions_1);
+ this._overflowAction.setParent(this._owner);
+ this._overflowAction["_actionCollection"] = this;
+ }
+ var isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;
+ shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(this._overflowAction, isRootAction);
+ }
+ if (this._overflowAction && shouldRenderOverflowActionButton) {
+ primaryActions_1.push(this._overflowAction);
+ }
+ } else {
+ primaryActions_1 = allowedActions;
+ }
+ for (var i = 0; i < primaryActions_1.length; i++) {
+ var action = primaryActions_1[i];
+ action.render();
+ if (action.renderedElement) {
+ if (hostConfig.actions.actionsOrientation === Enums.Orientation.Horizontal && hostConfig.actions.actionAlignment === Enums.ActionAlignment.Stretch) {
+ action.renderedElement.style.flex = "0 1 100%";
+ } else {
+ action.renderedElement.style.flex = "0 1 auto";
+ }
+ buttonStrip.appendChild(action.renderedElement);
+ this._renderedActions.push(action);
+ if (i < primaryActions_1.length - 1 && hostConfig.actions.buttonSpacing > 0) {
+ var spacer = document.createElement("div");
+ if (orientation === Enums.Orientation.Horizontal) {
+ spacer.style.flex = "0 0 auto";
+ spacer.style.width = hostConfig.actions.buttonSpacing + "px";
+ } else {
+ spacer.style.height = hostConfig.actions.buttonSpacing + "px";
+ }
+ Utils.appendChild(buttonStrip, spacer);
+ }
+ }
+ }
+ var buttonStripContainer = document.createElement("div");
+ buttonStripContainer.style.overflow = "hidden";
+ buttonStripContainer.appendChild(buttonStrip);
+ Utils.appendChild(element, buttonStripContainer);
+ }
+ Utils.appendChild(element, this._actionCardContainer);
+ for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {
+ var renderedAction = _a[_i];
+ if (renderedAction.state === 1) {
+ this.expandShowCardAction(renderedAction, false);
+ break;
+ }
+ }
+ return this._renderedActions.length > 0 ? element : void 0;
+ };
+ ActionCollection2.prototype.addAction = function(action) {
+ if (!action) {
+ throw new Error("The action parameter cannot be null.");
+ }
+ if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {
+ this._items.push(action);
+ if (!action.parent) {
+ action.setParent(this._owner);
+ }
+ action["_actionCollection"] = this;
+ } else {
+ throw new Error(strings_1.Strings.errors.actionAlreadyParented());
+ }
+ };
+ ActionCollection2.prototype.removeAction = function(action) {
+ if (this.expandedAction && this._expandedAction === action) {
+ this.collapseExpandedAction();
+ }
+ var actionIndex = this._items.indexOf(action);
+ if (actionIndex >= 0) {
+ this._items.splice(actionIndex, 1);
+ action.setParent(void 0);
+ action["_actionCollection"] = void 0;
+ for (var i = 0; i < this._renderedActions.length; i++) {
+ if (this._renderedActions[i] === action) {
+ this._renderedActions.splice(i, 1);
+ break;
+ }
+ }
+ return true;
+ }
+ return false;
+ };
+ ActionCollection2.prototype.clear = function() {
+ this._items = [];
+ this._renderedActions = [];
+ this._expandedAction = void 0;
+ };
+ ActionCollection2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ var result = [];
+ if (processActions) {
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var action = _a[_i];
+ result.push.apply(result, action.getAllInputs());
+ }
+ }
+ return result;
+ };
+ ActionCollection2.prototype.getResourceInformation = function() {
+ var result = [];
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var action = _a[_i];
+ result.push.apply(result, action.getResourceInformation());
+ }
+ return result;
+ };
+ Object.defineProperty(ActionCollection2.prototype, "renderedActionCount", {
+ get: function() {
+ return this._renderedActions.length;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(ActionCollection2.prototype, "expandedAction", {
+ get: function() {
+ return this._expandedAction;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return ActionCollection2;
+ }()
+ );
+ var ActionSet = (
+ /** @class */
+ function(_super) {
+ __extends(ActionSet2, _super);
+ function ActionSet2() {
+ var _this = _super.call(this) || this;
+ _this._actionCollection = new ActionCollection(_this);
+ return _this;
+ }
+ ActionSet2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this._actionCollection.parse(source["actions"], context);
+ };
+ ActionSet2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ this._actionCollection.toJSON(target, "actions", context);
+ };
+ ActionSet2.prototype.internalRender = function() {
+ return this._actionCollection.render(this.orientation !== void 0 ? this.orientation : this.hostConfig.actions.actionsOrientation);
+ };
+ ActionSet2.prototype.releaseDOMResources = function() {
+ _super.prototype.releaseDOMResources.call(this);
+ this._actionCollection.releaseDOMResources();
+ };
+ ActionSet2.prototype.isBleedingAtBottom = function() {
+ if (this._actionCollection.renderedActionCount === 0) {
+ return _super.prototype.isBleedingAtBottom.call(this);
+ } else {
+ if (this._actionCollection.getActionCount() === 1) {
+ return this._actionCollection.expandedAction !== void 0 && !this.hostConfig.actions.preExpandSingleShowCardAction;
+ } else {
+ return this._actionCollection.expandedAction !== void 0;
+ }
+ }
+ };
+ ActionSet2.prototype.getJsonTypeName = function() {
+ return "ActionSet";
+ };
+ ActionSet2.prototype.getActionCount = function() {
+ return this._actionCollection.getActionCount();
+ };
+ ActionSet2.prototype.getActionAt = function(index) {
+ if (index >= 0 && index < this.getActionCount()) {
+ return this._actionCollection.getActionAt(index);
+ } else {
+ return _super.prototype.getActionAt.call(this, index);
+ }
+ };
+ ActionSet2.prototype.getActionById = function(id) {
+ var result = this._actionCollection.getActionById(id);
+ return result ? result : _super.prototype.getActionById.call(this, id);
+ };
+ ActionSet2.prototype.getAllActions = function() {
+ var result = _super.prototype.getAllActions.call(this);
+ for (var i = 0; i < this.getActionCount(); i++) {
+ var action = this.getActionAt(i);
+ if (action) {
+ result.push(action);
+ }
+ }
+ return result;
+ };
+ ActionSet2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ this._actionCollection.validateProperties(context);
+ };
+ ActionSet2.prototype.addAction = function(action) {
+ this._actionCollection.addAction(action);
+ };
+ ActionSet2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ return processActions ? this._actionCollection.getAllInputs() : [];
+ };
+ ActionSet2.prototype.getResourceInformation = function() {
+ return this._actionCollection.getResourceInformation();
+ };
+ ActionSet2.prototype.findDOMNodeOwner = function(node) {
+ var target = void 0;
+ for (var i = 0; i < this.getActionCount(); i++) {
+ var action = this.getActionAt(i);
+ if (action) {
+ target = action.findDOMNodeOwner(node);
+ if (target) {
+ return target;
+ }
+ }
+ }
+ return _super.prototype.findDOMNodeOwner.call(this, node);
+ };
+ Object.defineProperty(ActionSet2.prototype, "isInteractive", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ActionSet2.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, "orientation", Enums.Orientation);
+ __decorate([
+ (0, serialization_1.property)(ActionSet2.orientationProperty)
+ ], ActionSet2.prototype, "orientation", void 0);
+ return ActionSet2;
+ }(CardElement)
+ );
+ exports.ActionSet = ActionSet;
+ var ContainerStyleProperty = (
+ /** @class */
+ function(_super) {
+ __extends(ContainerStyleProperty2, _super);
+ function ContainerStyleProperty2(targetVersion, name, defaultValue, onGetInitialValue) {
+ var _this = _super.call(this, targetVersion, name, [
+ { value: Enums.ContainerStyle.Default },
+ { value: Enums.ContainerStyle.Emphasis },
+ { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Accent },
+ { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Good },
+ { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Attention },
+ { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Warning }
+ ], defaultValue, onGetInitialValue) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ _this.defaultValue = defaultValue;
+ _this.onGetInitialValue = onGetInitialValue;
+ return _this;
+ }
+ return ContainerStyleProperty2;
+ }(serialization_1.ValueSetProperty)
+ );
+ exports.ContainerStyleProperty = ContainerStyleProperty;
+ var StylableCardElementContainer = (
+ /** @class */
+ function(_super) {
+ __extends(StylableCardElementContainer2, _super);
+ function StylableCardElementContainer2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ Object.defineProperty(StylableCardElementContainer2.prototype, "style", {
+ get: function() {
+ if (this.allowCustomStyle) {
+ var style = this.getValue(StylableCardElementContainer2.styleProperty);
+ if (style && this.hostConfig.containerStyles.getStyleByName(style)) {
+ return style;
+ }
+ }
+ return void 0;
+ },
+ set: function(value) {
+ this.setValue(StylableCardElementContainer2.styleProperty, value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(StylableCardElementContainer2.prototype, "allowCustomStyle", {
+ //#endregion
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(StylableCardElementContainer2.prototype, "hasExplicitStyle", {
+ get: function() {
+ return this.getValue(StylableCardElementContainer2.styleProperty) !== void 0;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ StylableCardElementContainer2.prototype.applyBorder = function() {
+ };
+ StylableCardElementContainer2.prototype.applyBackground = function() {
+ if (this.renderedElement) {
+ var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));
+ if (styleDefinition.backgroundColor) {
+ var bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);
+ if (bgColor) {
+ this.renderedElement.style.backgroundColor = bgColor;
+ }
+ }
+ }
+ };
+ StylableCardElementContainer2.prototype.applyPadding = function() {
+ _super.prototype.applyPadding.call(this);
+ if (!this.renderedElement) {
+ return;
+ }
+ var physicalPadding = new shared_1.SpacingDefinition();
+ if (this.getEffectivePadding()) {
+ physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());
+ }
+ this.renderedElement.style.paddingTop = physicalPadding.top + "px";
+ this.renderedElement.style.paddingRight = physicalPadding.right + "px";
+ this.renderedElement.style.paddingBottom = physicalPadding.bottom + "px";
+ this.renderedElement.style.paddingLeft = physicalPadding.left + "px";
+ if (this.isBleeding()) {
+ var padding = new shared_1.PaddingDefinition();
+ this.getImmediateSurroundingPadding(padding);
+ var surroundingPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);
+ this.renderedElement.style.marginRight = "-" + surroundingPadding.right + "px";
+ this.renderedElement.style.marginLeft = "-" + surroundingPadding.left + "px";
+ if (!this.isDesignMode()) {
+ this.renderedElement.style.marginTop = "-" + surroundingPadding.top + "px";
+ this.renderedElement.style.marginBottom = "-" + surroundingPadding.bottom + "px";
+ }
+ if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {
+ this.separatorElement.style.marginLeft = "-" + surroundingPadding.left + "px";
+ this.separatorElement.style.marginRight = "-" + surroundingPadding.right + "px";
+ }
+ } else {
+ this.renderedElement.style.marginRight = "0";
+ this.renderedElement.style.marginLeft = "0";
+ this.renderedElement.style.marginTop = "0";
+ this.renderedElement.style.marginBottom = "0";
+ if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {
+ this.separatorElement.style.marginRight = "0";
+ this.separatorElement.style.marginLeft = "0";
+ }
+ }
+ };
+ StylableCardElementContainer2.prototype.getHasBackground = function(ignoreBackgroundImages) {
+ if (ignoreBackgroundImages === void 0) {
+ ignoreBackgroundImages = false;
+ }
+ var currentElement = this.parent;
+ while (currentElement) {
+ var currentElementHasBackgroundImage = false;
+ if (ignoreBackgroundImages) {
+ currentElementHasBackgroundImage = false;
+ } else {
+ currentElementHasBackgroundImage = currentElement instanceof Container ? currentElement.backgroundImage.isValid() : false;
+ }
+ if (currentElement instanceof StylableCardElementContainer2) {
+ if (this.hasExplicitStyle && (currentElement.getEffectiveStyle() !== this.getEffectiveStyle() || currentElementHasBackgroundImage)) {
+ return true;
+ }
+ }
+ currentElement = currentElement.parent;
+ }
+ return false;
+ };
+ StylableCardElementContainer2.prototype.getDefaultPadding = function() {
+ return this.getHasBackground() || this.getHasBorder() ? new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding) : _super.prototype.getDefaultPadding.call(this);
+ };
+ StylableCardElementContainer2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ var explicitStyle = this.getValue(StylableCardElementContainer2.styleProperty);
+ if (explicitStyle !== void 0) {
+ var styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);
+ if (!styleDefinition) {
+ context.addFailure(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(explicitStyle, "style"));
+ }
+ }
+ };
+ StylableCardElementContainer2.prototype.render = function() {
+ var renderedElement = _super.prototype.render.call(this);
+ if (renderedElement && this.getHasBackground()) {
+ this.applyBackground();
+ }
+ this.applyBorder();
+ return renderedElement;
+ };
+ StylableCardElementContainer2.prototype.getEffectiveStyle = function() {
+ var effectiveStyle = this.style;
+ return effectiveStyle ? effectiveStyle : _super.prototype.getEffectiveStyle.call(this);
+ };
+ StylableCardElementContainer2.styleProperty = new ContainerStyleProperty(serialization_1.Versions.v1_0, "style");
+ __decorate([
+ (0, serialization_1.property)(StylableCardElementContainer2.styleProperty)
+ ], StylableCardElementContainer2.prototype, "style", null);
+ return StylableCardElementContainer2;
+ }(CardElementContainer)
+ );
+ exports.StylableCardElementContainer = StylableCardElementContainer;
+ var ContainerBase = (
+ /** @class */
+ function(_super) {
+ __extends(ContainerBase2, _super);
+ function ContainerBase2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._bleed = false;
+ return _this;
+ }
+ ContainerBase2.prototype.adjustRenderedElementSize = function(renderedElement) {
+ _super.prototype.adjustRenderedElementSize.call(this, renderedElement);
+ if (this.minPixelHeight) {
+ renderedElement.style.minHeight = this.minPixelHeight + "px";
+ }
+ };
+ ContainerBase2.prototype.getHasExpandedAction = function() {
+ return false;
+ };
+ ContainerBase2.prototype.getBleed = function() {
+ return this._bleed;
+ };
+ ContainerBase2.prototype.setBleed = function(value) {
+ this._bleed = value;
+ };
+ Object.defineProperty(ContainerBase2.prototype, "renderedActionCount", {
+ get: function() {
+ return 0;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ContainerBase2.prototype.isBleeding = function() {
+ return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();
+ };
+ ContainerBase2.bleedProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, "bleed", false);
+ ContainerBase2.minHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_2, "minHeight");
+ __decorate([
+ (0, serialization_1.property)(ContainerBase2.bleedProperty)
+ ], ContainerBase2.prototype, "_bleed", void 0);
+ __decorate([
+ (0, serialization_1.property)(ContainerBase2.minHeightProperty)
+ ], ContainerBase2.prototype, "minPixelHeight", void 0);
+ return ContainerBase2;
+ }(StylableCardElementContainer)
+ );
+ exports.ContainerBase = ContainerBase;
+ var BackgroundImage = (
+ /** @class */
+ function(_super) {
+ __extends(BackgroundImage2, _super);
+ function BackgroundImage2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ BackgroundImage2.prototype.getSchemaKey = function() {
+ return "BackgroundImage";
+ };
+ BackgroundImage2.prototype.internalParse = function(source, context) {
+ if (typeof source === "string") {
+ this.resetDefaultValues();
+ this.url = source;
+ } else {
+ return _super.prototype.internalParse.call(this, source, context);
+ }
+ };
+ BackgroundImage2.prototype.apply = function(element) {
+ if (this.url && element.renderedElement) {
+ element.renderedElement.style.backgroundImage = "url('" + element.preProcessPropertyValue(BackgroundImage2.urlProperty, this.url) + "')";
+ switch (this.fillMode) {
+ case Enums.FillMode.Repeat:
+ element.renderedElement.style.backgroundRepeat = "repeat";
+ break;
+ case Enums.FillMode.RepeatHorizontally:
+ element.renderedElement.style.backgroundRepeat = "repeat-x";
+ break;
+ case Enums.FillMode.RepeatVertically:
+ element.renderedElement.style.backgroundRepeat = "repeat-y";
+ break;
+ case Enums.FillMode.Cover:
+ default:
+ element.renderedElement.style.backgroundRepeat = "no-repeat";
+ element.renderedElement.style.backgroundSize = "cover";
+ break;
+ }
+ switch (this.horizontalAlignment) {
+ case Enums.HorizontalAlignment.Left:
+ break;
+ case Enums.HorizontalAlignment.Center:
+ element.renderedElement.style.backgroundPositionX = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ element.renderedElement.style.backgroundPositionX = "right";
+ break;
+ }
+ switch (this.verticalAlignment) {
+ case Enums.VerticalAlignment.Top:
+ break;
+ case Enums.VerticalAlignment.Center:
+ element.renderedElement.style.backgroundPositionY = "center";
+ break;
+ case Enums.VerticalAlignment.Bottom:
+ element.renderedElement.style.backgroundPositionY = "bottom";
+ break;
+ }
+ }
+ };
+ BackgroundImage2.prototype.isValid = function() {
+ return this.url ? true : false;
+ };
+ BackgroundImage2.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "url");
+ BackgroundImage2.fillModeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "fillMode", Enums.FillMode, Enums.FillMode.Cover);
+ BackgroundImage2.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "horizontalAlignment", Enums.HorizontalAlignment, Enums.HorizontalAlignment.Left);
+ BackgroundImage2.verticalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, "verticalAlignment", Enums.VerticalAlignment, Enums.VerticalAlignment.Top);
+ __decorate([
+ (0, serialization_1.property)(BackgroundImage2.urlProperty)
+ ], BackgroundImage2.prototype, "url", void 0);
+ __decorate([
+ (0, serialization_1.property)(BackgroundImage2.fillModeProperty)
+ ], BackgroundImage2.prototype, "fillMode", void 0);
+ __decorate([
+ (0, serialization_1.property)(BackgroundImage2.horizontalAlignmentProperty)
+ ], BackgroundImage2.prototype, "horizontalAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(BackgroundImage2.verticalAlignmentProperty)
+ ], BackgroundImage2.prototype, "verticalAlignment", void 0);
+ return BackgroundImage2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.BackgroundImage = BackgroundImage;
+ var Container = (
+ /** @class */
+ function(_super) {
+ __extends(Container2, _super);
+ function Container2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._items = [];
+ _this._renderedItems = [];
+ return _this;
+ }
+ Object.defineProperty(Container2.prototype, "backgroundImage", {
+ get: function() {
+ return this.getValue(Container2.backgroundImageProperty);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Container2.prototype.insertItemAt = function(item, index, forceInsert) {
+ if (!item.parent || forceInsert) {
+ if (item.isStandalone) {
+ if (index < 0 || index >= this._items.length) {
+ this._items.push(item);
+ } else {
+ this._items.splice(index, 0, item);
+ }
+ item.setParent(this);
+ } else {
+ throw new Error(strings_1.Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));
+ }
+ } else {
+ throw new Error(strings_1.Strings.errors.elementAlreadyParented());
+ }
+ };
+ Container2.prototype.getItemsCollectionPropertyName = function() {
+ return "items";
+ };
+ Container2.prototype.applyBackground = function() {
+ if (this.backgroundImage.isValid() && this.renderedElement) {
+ this.backgroundImage.apply(this);
+ }
+ _super.prototype.applyBackground.call(this);
+ };
+ Container2.prototype.applyRTL = function(element) {
+ if (this.rtl !== void 0) {
+ element.dir = this.rtl ? "rtl" : "ltr";
+ }
+ };
+ Container2.prototype.internalRender = function() {
+ this._renderedItems = [];
+ var hostConfig = this.hostConfig;
+ var element = document.createElement("div");
+ this.applyRTL(element);
+ element.classList.add(hostConfig.makeCssClassName("ac-container"));
+ element.style.display = "flex";
+ element.style.flexDirection = "column";
+ if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {
+ element.style.minHeight = "-webkit-min-content";
+ }
+ switch (this.getEffectiveVerticalContentAlignment()) {
+ case Enums.VerticalAlignment.Center:
+ element.style.justifyContent = "center";
+ break;
+ case Enums.VerticalAlignment.Bottom:
+ element.style.justifyContent = "flex-end";
+ break;
+ default:
+ element.style.justifyContent = "flex-start";
+ break;
+ }
+ if (this._items.length > 0) {
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ var renderedItem = this.isElementAllowed(item) ? item.render() : void 0;
+ if (renderedItem) {
+ if (this._renderedItems.length > 0 && item.separatorElement) {
+ item.separatorElement.style.flex = "0 0 auto";
+ Utils.appendChild(element, item.separatorElement);
+ }
+ Utils.appendChild(element, renderedItem);
+ this._renderedItems.push(item);
+ }
+ }
+ } else {
+ if (this.isDesignMode()) {
+ var placeholderElement = this.createPlaceholderElement();
+ placeholderElement.style.width = "100%";
+ placeholderElement.style.height = "100%";
+ element.appendChild(placeholderElement);
+ }
+ }
+ return element;
+ };
+ Container2.prototype.truncateOverflow = function(maxHeight) {
+ if (this.renderedElement) {
+ var boundary_1 = this.renderedElement.offsetTop + maxHeight + 1;
+ var handleElement_1 = function(cardElement) {
+ var elt = cardElement.renderedElement;
+ if (elt) {
+ switch (Utils.getFitStatus(elt, boundary_1)) {
+ case Enums.ContainerFitStatus.FullyInContainer:
+ var sizeChanged = cardElement["resetOverflow"]();
+ if (sizeChanged) {
+ handleElement_1(cardElement);
+ }
+ break;
+ case Enums.ContainerFitStatus.Overflowing:
+ var containerMaxHeight = boundary_1 - elt.offsetTop;
+ cardElement["handleOverflow"](containerMaxHeight);
+ break;
+ case Enums.ContainerFitStatus.FullyOutOfContainer:
+ cardElement["handleOverflow"](0);
+ break;
+ }
+ }
+ };
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ handleElement_1(item);
+ }
+ return true;
+ }
+ return false;
+ };
+ Container2.prototype.undoOverflowTruncation = function() {
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ item["resetOverflow"]();
+ }
+ };
+ Container2.prototype.getHasBackground = function(ignoreBackgroundImages) {
+ if (ignoreBackgroundImages === void 0) {
+ ignoreBackgroundImages = false;
+ }
+ var result = ignoreBackgroundImages ? false : this.backgroundImage.isValid();
+ return result || _super.prototype.getHasBackground.call(this, ignoreBackgroundImages);
+ };
+ Container2.prototype.canHostSingletons = function() {
+ return false;
+ };
+ Container2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this.clear();
+ this.setShouldFallback(false);
+ var jsonItems = source[this.getItemsCollectionPropertyName()];
+ if (!Array.isArray(jsonItems) && typeof jsonItems === "object" && this.canHostSingletons()) {
+ var typeName = Utils.parseString(jsonItems["type"]);
+ if (typeName) {
+ var registration = context.elementRegistry.findByName(typeName);
+ if ((registration === null || registration === void 0 ? void 0 : registration.singletonBehavior) !== registry_1.ElementSingletonBehavior.NotAllowed) {
+ var element = context.parseElement(this, jsonItems, [], !this.isDesignMode(), true);
+ if (element) {
+ this.insertItemAt(element, -1, true);
+ }
+ }
+ }
+ } else if (Array.isArray(jsonItems)) {
+ for (var _i = 0, jsonItems_1 = jsonItems; _i < jsonItems_1.length; _i++) {
+ var item = jsonItems_1[_i];
+ var element = context.parseElement(this, item, this.forbiddenChildElements(), !this.isDesignMode());
+ if (element) {
+ this.insertItemAt(element, -1, true);
+ }
+ }
+ }
+ };
+ Container2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ var collectionPropertyName = this.getItemsCollectionPropertyName();
+ if (this._items.length === 1 && this._items[0].getElementSingletonBehavior() === registry_1.ElementSingletonBehavior.Only) {
+ context.serializeValue(target, collectionPropertyName, this._items[0].toJSON(context));
+ } else {
+ context.serializeArray(target, collectionPropertyName, this._items);
+ }
+ };
+ Object.defineProperty(Container2.prototype, "isSelectable", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Container2.prototype.getEffectivePadding = function() {
+ if (shared_1.GlobalSettings.removePaddingFromContainersWithBackgroundImage && !this.getHasBackground(true)) {
+ return new shared_1.PaddingDefinition();
+ }
+ return _super.prototype.getEffectivePadding.call(this);
+ };
+ Container2.prototype.getEffectiveVerticalContentAlignment = function() {
+ if (this.verticalContentAlignment !== void 0) {
+ return this.verticalContentAlignment;
+ }
+ var parentContainer = this.getParentContainer();
+ return parentContainer ? parentContainer.getEffectiveVerticalContentAlignment() : Enums.VerticalAlignment.Top;
+ };
+ Container2.prototype.getItemCount = function() {
+ return this._items.length;
+ };
+ Container2.prototype.getItemAt = function(index) {
+ return this._items[index];
+ };
+ Container2.prototype.getFirstVisibleRenderedItem = function() {
+ if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {
+ for (var _i = 0, _a = this._renderedItems; _i < _a.length; _i++) {
+ var item = _a[_i];
+ if (item.isVisible) {
+ return item;
+ }
+ }
+ }
+ return void 0;
+ };
+ Container2.prototype.getLastVisibleRenderedItem = function() {
+ if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {
+ for (var i = this._renderedItems.length - 1; i >= 0; i--) {
+ if (this._renderedItems[i].isVisible) {
+ return this._renderedItems[i];
+ }
+ }
+ }
+ return void 0;
+ };
+ Container2.prototype.getJsonTypeName = function() {
+ return "Container";
+ };
+ Container2.prototype.isFirstElement = function(element) {
+ var designMode = this.isDesignMode();
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ if (item.isVisible || designMode) {
+ return item === element;
+ }
+ }
+ return false;
+ };
+ Container2.prototype.isLastElement = function(element) {
+ var designMode = this.isDesignMode();
+ for (var i = this._items.length - 1; i >= 0; i--) {
+ if (this._items[i].isVisible || designMode) {
+ return this._items[i] === element;
+ }
+ }
+ return false;
+ };
+ Container2.prototype.isRtl = function() {
+ if (this.rtl !== void 0) {
+ return this.rtl;
+ } else {
+ var parentContainer = this.getParentContainer();
+ return parentContainer ? parentContainer.isRtl() : false;
+ }
+ };
+ Container2.prototype.isBleedingAtTop = function() {
+ var firstRenderedItem = this.getFirstVisibleRenderedItem();
+ return this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false);
+ };
+ Container2.prototype.isBleedingAtBottom = function() {
+ var lastRenderedItem = this.getLastVisibleRenderedItem();
+ return this.isBleeding() || (lastRenderedItem ? lastRenderedItem.isBleedingAtBottom() && lastRenderedItem.getEffectiveStyle() === this.getEffectiveStyle() : false);
+ };
+ Container2.prototype.indexOf = function(cardElement) {
+ return this._items.indexOf(cardElement);
+ };
+ Container2.prototype.addItem = function(item) {
+ this.insertItemAt(item, -1, false);
+ };
+ Container2.prototype.insertItemBefore = function(item, insertBefore) {
+ this.insertItemAt(item, this._items.indexOf(insertBefore), false);
+ };
+ Container2.prototype.insertItemAfter = function(item, insertAfter) {
+ this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);
+ };
+ Container2.prototype.removeItem = function(item) {
+ var itemIndex = this._items.indexOf(item);
+ if (itemIndex >= 0) {
+ this._items.splice(itemIndex, 1);
+ item.setParent(void 0);
+ this.updateLayout();
+ return true;
+ }
+ return false;
+ };
+ Container2.prototype.clear = function() {
+ this._items = [];
+ this._renderedItems = [];
+ };
+ Container2.prototype.getResourceInformation = function() {
+ var result = _super.prototype.getResourceInformation.call(this);
+ if (this.backgroundImage.isValid()) {
+ result.push({
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- validated by `isValid()`
+ url: this.backgroundImage.url,
+ mimeType: "image"
+ });
+ }
+ return result;
+ };
+ Container2.prototype.getActionById = function(id) {
+ var result = _super.prototype.getActionById.call(this, id);
+ if (!result) {
+ if (this.selectAction) {
+ result = this.selectAction.getActionById(id);
+ }
+ if (!result) {
+ for (var _i = 0, _a = this._items; _i < _a.length; _i++) {
+ var item = _a[_i];
+ result = item.getActionById(id);
+ if (result) {
+ break;
+ }
+ }
+ }
+ }
+ return result;
+ };
+ Object.defineProperty(Container2.prototype, "padding", {
+ get: function() {
+ return this.getPadding();
+ },
+ set: function(value) {
+ this.setPadding(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Container2.prototype, "selectAction", {
+ get: function() {
+ return this._selectAction;
+ },
+ set: function(value) {
+ this._selectAction = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Container2.prototype, "bleed", {
+ get: function() {
+ return this.getBleed();
+ },
+ set: function(value) {
+ this.setBleed(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Container2.backgroundImageProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_0, "backgroundImage", BackgroundImage);
+ Container2.verticalContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, "verticalContentAlignment", Enums.VerticalAlignment);
+ Container2.rtlProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, "rtl");
+ __decorate([
+ (0, serialization_1.property)(Container2.backgroundImageProperty)
+ ], Container2.prototype, "backgroundImage", null);
+ __decorate([
+ (0, serialization_1.property)(Container2.verticalContentAlignmentProperty)
+ ], Container2.prototype, "verticalContentAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(Container2.rtlProperty)
+ ], Container2.prototype, "rtl", void 0);
+ return Container2;
+ }(ContainerBase)
+ );
+ exports.Container = Container;
+ var Column = (
+ /** @class */
+ function(_super) {
+ __extends(Column2, _super);
+ function Column2(width) {
+ if (width === void 0) {
+ width = "stretch";
+ }
+ var _this = _super.call(this) || this;
+ _this.width = "stretch";
+ _this._computedWeight = 0;
+ _this.width = width;
+ return _this;
+ }
+ Column2.prototype.adjustRenderedElementSize = function(renderedElement) {
+ var minDesignTimeColumnHeight = 20;
+ if (this.isDesignMode()) {
+ renderedElement.style.minWidth = "20px";
+ renderedElement.style.minHeight = (!this.minPixelHeight ? minDesignTimeColumnHeight : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + "px";
+ } else {
+ renderedElement.style.minWidth = "0";
+ if (this.minPixelHeight) {
+ renderedElement.style.minHeight = this.minPixelHeight + "px";
+ }
+ }
+ if (this.width === "auto") {
+ renderedElement.style.flex = "0 1 auto";
+ } else if (this.width === "stretch") {
+ renderedElement.style.flex = "1 1 50px";
+ } else if (this.width instanceof shared_1.SizeAndUnit) {
+ if (this.width.unit === Enums.SizeUnit.Pixel) {
+ renderedElement.style.flex = "0 0 auto";
+ renderedElement.style.width = this.width.physicalSize + "px";
+ } else {
+ renderedElement.style.flex = "1 1 " + (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) + "%";
+ }
+ }
+ };
+ Column2.prototype.shouldSerialize = function(_context) {
+ return true;
+ };
+ Object.defineProperty(Column2.prototype, "separatorOrientation", {
+ get: function() {
+ return Enums.Orientation.Vertical;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Column2.prototype.getJsonTypeName = function() {
+ return "Column";
+ };
+ Object.defineProperty(Column2.prototype, "hasVisibleSeparator", {
+ get: function() {
+ if (this.parent && this.parent instanceof ColumnSet) {
+ return this.separatorElement !== void 0 && !this.parent.isLeftMostElement(this);
+ } else {
+ return false;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Column2.prototype, "isStandalone", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Column2.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, "width", function(sender, prop, source, context) {
+ var result = prop.defaultValue;
+ var value = source[prop.name];
+ var invalidWidth = false;
+ if (typeof value === "number" && !isNaN(value)) {
+ result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);
+ } else if (value === "auto" || value === "stretch") {
+ result = value;
+ } else if (typeof value === "string") {
+ try {
+ result = shared_1.SizeAndUnit.parse(value);
+ if (result.unit === Enums.SizeUnit.Pixel && prop.targetVersion.compareTo(context.targetVersion) > 0) {
+ invalidWidth = true;
+ }
+ } catch (e) {
+ invalidWidth = true;
+ }
+ } else {
+ invalidWidth = true;
+ }
+ if (invalidWidth) {
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));
+ result = "auto";
+ }
+ return result;
+ }, function(sender, property, target, value, context) {
+ if (value instanceof shared_1.SizeAndUnit) {
+ if (value.unit === Enums.SizeUnit.Pixel) {
+ context.serializeValue(target, "width", value.physicalSize + "px");
+ } else {
+ context.serializeNumber(target, "width", value.physicalSize);
+ }
+ } else {
+ context.serializeValue(target, "width", value);
+ }
+ }, "stretch");
+ __decorate([
+ (0, serialization_1.property)(Column2.widthProperty)
+ ], Column2.prototype, "width", void 0);
+ return Column2;
+ }(Container)
+ );
+ exports.Column = Column;
+ var ColumnSet = (
+ /** @class */
+ function(_super) {
+ __extends(ColumnSet2, _super);
+ function ColumnSet2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._columns = [];
+ return _this;
+ }
+ ColumnSet2.prototype.createColumnInstance = function(source, context) {
+ return context.parseCardObject(this, source, [], !this.isDesignMode(), function(typeName) {
+ return !typeName || typeName === "Column" ? new Column() : void 0;
+ }, function(typeName, _errorType) {
+ context.logParseEvent(void 0, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));
+ });
+ };
+ ColumnSet2.prototype.internalRender = function() {
+ this._renderedColumns = [];
+ if (this._columns.length > 0) {
+ var hostConfig = this.hostConfig;
+ var element = document.createElement("div");
+ element.className = hostConfig.makeCssClassName("ac-columnSet");
+ element.style.display = "flex";
+ if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {
+ element.style.minHeight = "-webkit-min-content";
+ }
+ switch (this.getEffectiveHorizontalAlignment()) {
+ case Enums.HorizontalAlignment.Center:
+ element.style.justifyContent = "center";
+ break;
+ case Enums.HorizontalAlignment.Right:
+ element.style.justifyContent = "flex-end";
+ break;
+ default:
+ element.style.justifyContent = "flex-start";
+ break;
+ }
+ var totalWeight = 0;
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ if (column.width instanceof shared_1.SizeAndUnit && column.width.unit === Enums.SizeUnit.Weight) {
+ totalWeight += column.width.physicalSize;
+ }
+ }
+ for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {
+ var column = _c[_b];
+ if (column.width instanceof shared_1.SizeAndUnit && column.width.unit === Enums.SizeUnit.Weight && totalWeight > 0) {
+ var computedWeight = 100 / totalWeight * column.width.physicalSize;
+ column["_computedWeight"] = computedWeight;
+ }
+ var renderedColumn = column.render();
+ if (renderedColumn) {
+ if (this._renderedColumns.length > 0 && column.separatorElement) {
+ column.separatorElement.style.flex = "0 0 auto";
+ Utils.appendChild(element, column.separatorElement);
+ }
+ Utils.appendChild(element, renderedColumn);
+ this._renderedColumns.push(column);
+ }
+ }
+ return this._renderedColumns.length > 0 ? element : void 0;
+ } else {
+ return void 0;
+ }
+ };
+ ColumnSet2.prototype.truncateOverflow = function(maxHeight) {
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ column["handleOverflow"](maxHeight);
+ }
+ return true;
+ };
+ ColumnSet2.prototype.undoOverflowTruncation = function() {
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ column["resetOverflow"]();
+ }
+ };
+ Object.defineProperty(ColumnSet2.prototype, "isSelectable", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ColumnSet2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this._columns = [];
+ this._renderedColumns = [];
+ var jsonColumns = source["columns"];
+ if (Array.isArray(jsonColumns)) {
+ for (var _i = 0, jsonColumns_1 = jsonColumns; _i < jsonColumns_1.length; _i++) {
+ var item = jsonColumns_1[_i];
+ var column = this.createColumnInstance(item, context);
+ if (column) {
+ this._columns.push(column);
+ }
+ }
+ }
+ };
+ ColumnSet2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ context.serializeArray(target, "columns", this._columns);
+ };
+ ColumnSet2.prototype.isFirstElement = function(element) {
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ if (column.isVisible) {
+ return column === element;
+ }
+ }
+ return false;
+ };
+ ColumnSet2.prototype.isBleedingAtTop = function() {
+ if (this.isBleeding()) {
+ return true;
+ }
+ if (this._renderedColumns && this._renderedColumns.length > 0) {
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ if (column.isBleedingAtTop()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+ ColumnSet2.prototype.isBleedingAtBottom = function() {
+ if (this.isBleeding()) {
+ return true;
+ }
+ if (this._renderedColumns && this._renderedColumns.length > 0) {
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ if (column.isBleedingAtBottom()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+ ColumnSet2.prototype.getItemCount = function() {
+ return this._columns.length;
+ };
+ ColumnSet2.prototype.getFirstVisibleRenderedItem = function() {
+ if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {
+ return this._renderedColumns[0];
+ } else {
+ return void 0;
+ }
+ };
+ ColumnSet2.prototype.getLastVisibleRenderedItem = function() {
+ if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {
+ return this._renderedColumns[this._renderedColumns.length - 1];
+ } else {
+ return void 0;
+ }
+ };
+ ColumnSet2.prototype.getColumnAt = function(index) {
+ return this._columns[index];
+ };
+ ColumnSet2.prototype.getItemAt = function(index) {
+ return this.getColumnAt(index);
+ };
+ ColumnSet2.prototype.getJsonTypeName = function() {
+ return "ColumnSet";
+ };
+ ColumnSet2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ var weightedColumns = 0;
+ var stretchedColumns = 0;
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ if (typeof column.width === "number") {
+ weightedColumns++;
+ } else if (column.width === "stretch") {
+ stretchedColumns++;
+ }
+ }
+ if (weightedColumns > 0 && stretchedColumns > 0) {
+ context.addFailure(this, Enums.ValidationEvent.Hint, strings_1.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet());
+ }
+ };
+ ColumnSet2.prototype.addColumn = function(column) {
+ if (!column.parent) {
+ this._columns.push(column);
+ column.setParent(this);
+ } else {
+ throw new Error(strings_1.Strings.errors.columnAlreadyBelongsToAnotherSet());
+ }
+ };
+ ColumnSet2.prototype.removeItem = function(item) {
+ if (item instanceof Column) {
+ var itemIndex = this._columns.indexOf(item);
+ if (itemIndex >= 0) {
+ this._columns.splice(itemIndex, 1);
+ item.setParent(void 0);
+ this.updateLayout();
+ return true;
+ }
+ }
+ return false;
+ };
+ ColumnSet2.prototype.indexOf = function(cardElement) {
+ return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;
+ };
+ ColumnSet2.prototype.isLeftMostElement = function(element) {
+ return this._columns.indexOf(element) === 0;
+ };
+ ColumnSet2.prototype.isRightMostElement = function(element) {
+ return this._columns.indexOf(element) === this._columns.length - 1;
+ };
+ ColumnSet2.prototype.isTopElement = function(element) {
+ return this._columns.indexOf(element) >= 0;
+ };
+ ColumnSet2.prototype.isBottomElement = function(element) {
+ return this._columns.indexOf(element) >= 0;
+ };
+ ColumnSet2.prototype.getActionById = function(id) {
+ var result = void 0;
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ result = column.getActionById(id);
+ if (result) {
+ break;
+ }
+ }
+ return result;
+ };
+ Object.defineProperty(ColumnSet2.prototype, "bleed", {
+ get: function() {
+ return this.getBleed();
+ },
+ set: function(value) {
+ this.setBleed(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(ColumnSet2.prototype, "padding", {
+ get: function() {
+ return this.getPadding();
+ },
+ set: function(value) {
+ this.setPadding(value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(ColumnSet2.prototype, "selectAction", {
+ get: function() {
+ return this._selectAction;
+ },
+ set: function(value) {
+ this._selectAction = value;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return ColumnSet2;
+ }(ContainerBase)
+ );
+ exports.ColumnSet = ColumnSet;
+ function raiseImageLoadedEvent(image) {
+ var card = image.getRootElement();
+ var onImageLoadedHandler = card && card.onImageLoaded ? card.onImageLoaded : AdaptiveCard.onImageLoaded;
+ if (onImageLoadedHandler) {
+ onImageLoadedHandler(image);
+ }
+ }
+ function raiseAnchorClickedEvent(element, anchor, ev) {
+ var card = element.getRootElement();
+ var onAnchorClickedHandler = card && card.onAnchorClicked ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;
+ return onAnchorClickedHandler !== void 0 ? onAnchorClickedHandler(element, anchor, ev) : false;
+ }
+ function raiseExecuteActionEvent(action) {
+ var card = action.parent ? action.parent.getRootElement() : void 0;
+ var onExecuteActionHandler = card && card.onExecuteAction ? card.onExecuteAction : AdaptiveCard.onExecuteAction;
+ if (action.prepareForExecution() && onExecuteActionHandler) {
+ onExecuteActionHandler(action);
+ }
+ }
+ function raiseInlineCardExpandedEvent(action, isExpanded) {
+ var card = action.parent ? action.parent.getRootElement() : void 0;
+ var onInlineCardExpandedHandler = card && card.onInlineCardExpanded ? card.onInlineCardExpanded : AdaptiveCard.onInlineCardExpanded;
+ if (onInlineCardExpandedHandler) {
+ onInlineCardExpandedHandler(action, isExpanded);
+ }
+ }
+ function raiseInputValueChangedEvent(input) {
+ var card = input.getRootElement();
+ var onInputValueChangedHandler = card && card.onInputValueChanged ? card.onInputValueChanged : AdaptiveCard.onInputValueChanged;
+ if (onInputValueChangedHandler) {
+ onInputValueChangedHandler(input);
+ }
+ }
+ function raiseElementVisibilityChangedEvent(element, shouldUpdateLayout) {
+ if (shouldUpdateLayout === void 0) {
+ shouldUpdateLayout = true;
+ }
+ var rootElement = element.getRootElement();
+ if (shouldUpdateLayout) {
+ rootElement.updateLayout();
+ }
+ var card = rootElement;
+ var onElementVisibilityChangedHandler = card && card.onElementVisibilityChanged ? card.onElementVisibilityChanged : AdaptiveCard.onElementVisibilityChanged;
+ if (onElementVisibilityChangedHandler !== void 0) {
+ onElementVisibilityChangedHandler(element);
+ }
+ }
+ function raiseDisplayOverflowActionMenuEvent(action, target) {
+ var card = action.parent ? action.parent.getRootElement() : void 0;
+ var onDisplayOverflowActionMenuHandler = card && card.onDisplayOverflowActionMenu ? card.onDisplayOverflowActionMenu : AdaptiveCard.onDisplayOverflowActionMenu;
+ return onDisplayOverflowActionMenuHandler !== void 0 ? onDisplayOverflowActionMenuHandler(action.getActions(), target) : false;
+ }
+ function raiseRenderOverflowActionsEvent(action, isAtRootLevelActions) {
+ var card = action.parent ? action.parent.getRootElement() : void 0;
+ var onRenderOverflowActionsHandler = card && card.onRenderOverflowActions ? card.onRenderOverflowActions : AdaptiveCard.onRenderOverflowActions;
+ return onRenderOverflowActionsHandler !== void 0 ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions) : false;
+ }
+ var ContainerWithActions = (
+ /** @class */
+ function(_super) {
+ __extends(ContainerWithActions2, _super);
+ function ContainerWithActions2() {
+ var _this = _super.call(this) || this;
+ _this._actionCollection = new ActionCollection(_this);
+ return _this;
+ }
+ ContainerWithActions2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this.parseActions(source, context);
+ };
+ ContainerWithActions2.prototype.parseActions = function(source, context) {
+ this._actionCollection.parse(source["actions"], context);
+ };
+ ContainerWithActions2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ this._actionCollection.toJSON(target, "actions", context);
+ };
+ ContainerWithActions2.prototype.internalRender = function() {
+ var element = _super.prototype.internalRender.call(this);
+ if (element) {
+ var renderedActions = this._actionCollection.render(this.hostConfig.actions.actionsOrientation);
+ if (renderedActions) {
+ Utils.appendChild(element, renderSeparation(this.hostConfig, {
+ spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)
+ }, Enums.Orientation.Horizontal));
+ Utils.appendChild(element, renderedActions);
+ }
+ if (this.renderIfEmpty) {
+ return element;
+ } else {
+ return element.children.length > 0 ? element : void 0;
+ }
+ } else {
+ return void 0;
+ }
+ };
+ ContainerWithActions2.prototype.getHasExpandedAction = function() {
+ if (this.renderedActionCount === 0) {
+ return false;
+ } else if (this.renderedActionCount === 1) {
+ return this._actionCollection.expandedAction !== void 0 && !this.hostConfig.actions.preExpandSingleShowCardAction;
+ } else {
+ return this._actionCollection.expandedAction !== void 0;
+ }
+ };
+ Object.defineProperty(ContainerWithActions2.prototype, "renderedActionCount", {
+ get: function() {
+ return this._actionCollection.renderedActionCount;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(ContainerWithActions2.prototype, "renderIfEmpty", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ ContainerWithActions2.prototype.releaseDOMResources = function() {
+ _super.prototype.releaseDOMResources.call(this);
+ this._actionCollection.releaseDOMResources();
+ };
+ ContainerWithActions2.prototype.getActionCount = function() {
+ return this._actionCollection.getActionCount();
+ };
+ ContainerWithActions2.prototype.getActionAt = function(index) {
+ if (index >= 0 && index < this.getActionCount()) {
+ return this._actionCollection.getActionAt(index);
+ } else {
+ return _super.prototype.getActionAt.call(this, index);
+ }
+ };
+ ContainerWithActions2.prototype.getActionById = function(id) {
+ var result = this._actionCollection.getActionById(id);
+ return result ? result : _super.prototype.getActionById.call(this, id);
+ };
+ ContainerWithActions2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (this._actionCollection) {
+ this._actionCollection.validateProperties(context);
+ }
+ };
+ ContainerWithActions2.prototype.isLastElement = function(element) {
+ return _super.prototype.isLastElement.call(this, element) && this._actionCollection.getActionCount() === 0;
+ };
+ ContainerWithActions2.prototype.addAction = function(action) {
+ this._actionCollection.addAction(action);
+ };
+ ContainerWithActions2.prototype.clear = function() {
+ _super.prototype.clear.call(this);
+ this._actionCollection.clear();
+ };
+ ContainerWithActions2.prototype.getAllInputs = function(processActions) {
+ if (processActions === void 0) {
+ processActions = true;
+ }
+ var result = _super.prototype.getAllInputs.call(this, processActions);
+ if (processActions) {
+ result.push.apply(result, this._actionCollection.getAllInputs(processActions));
+ }
+ return result;
+ };
+ ContainerWithActions2.prototype.getResourceInformation = function() {
+ var result = _super.prototype.getResourceInformation.call(this);
+ result.push.apply(result, this._actionCollection.getResourceInformation());
+ return result;
+ };
+ ContainerWithActions2.prototype.isBleedingAtBottom = function() {
+ if (this._actionCollection.renderedActionCount === 0) {
+ return _super.prototype.isBleedingAtBottom.call(this);
+ } else {
+ if (this._actionCollection.getActionCount() === 1) {
+ return this._actionCollection.expandedAction !== void 0 && !this.hostConfig.actions.preExpandSingleShowCardAction;
+ } else {
+ return this._actionCollection.expandedAction !== void 0;
+ }
+ }
+ };
+ ContainerWithActions2.prototype.getForbiddenActionNames = function() {
+ return [];
+ };
+ Object.defineProperty(ContainerWithActions2.prototype, "isStandalone", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return ContainerWithActions2;
+ }(Container)
+ );
+ exports.ContainerWithActions = ContainerWithActions;
+ var RefreshActionProperty = (
+ /** @class */
+ function(_super) {
+ __extends(RefreshActionProperty2, _super);
+ function RefreshActionProperty2(targetVersion, name) {
+ var _this = _super.call(this, targetVersion, name, void 0) || this;
+ _this.targetVersion = targetVersion;
+ _this.name = name;
+ return _this;
+ }
+ RefreshActionProperty2.prototype.parse = function(sender, source, context) {
+ var action = context.parseAction(sender.parent, source[this.name], [], false);
+ if (action !== void 0) {
+ if (action instanceof ExecuteAction) {
+ return action;
+ }
+ context.logParseEvent(sender, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(action.getJsonTypeName()));
+ }
+ context.logParseEvent(sender, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("action"));
+ return void 0;
+ };
+ RefreshActionProperty2.prototype.toJSON = function(sender, target, value, context) {
+ context.serializeValue(target, this.name, value ? value.toJSON(context) : void 0, void 0, true);
+ };
+ return RefreshActionProperty2;
+ }(serialization_1.PropertyDefinition)
+ );
+ exports.RefreshActionProperty = RefreshActionProperty;
+ var RefreshDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(RefreshDefinition2, _super);
+ function RefreshDefinition2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ Object.defineProperty(RefreshDefinition2.prototype, "action", {
+ get: function() {
+ return this.getValue(RefreshDefinition2.actionProperty);
+ },
+ set: function(value) {
+ this.setValue(RefreshDefinition2.actionProperty, value);
+ if (value) {
+ value.setParent(this.parent);
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ RefreshDefinition2.prototype.getSchemaKey = function() {
+ return "RefreshDefinition";
+ };
+ RefreshDefinition2.actionProperty = new RefreshActionProperty(serialization_1.Versions.v1_4, "action");
+ RefreshDefinition2.userIdsProperty = new serialization_1.StringArrayProperty(serialization_1.Versions.v1_4, "userIds");
+ __decorate([
+ (0, serialization_1.property)(RefreshDefinition2.actionProperty)
+ ], RefreshDefinition2.prototype, "action", null);
+ __decorate([
+ (0, serialization_1.property)(RefreshDefinition2.userIdsProperty)
+ ], RefreshDefinition2.prototype, "userIds", void 0);
+ return RefreshDefinition2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.RefreshDefinition = RefreshDefinition;
+ var AuthCardButton = (
+ /** @class */
+ function(_super) {
+ __extends(AuthCardButton2, _super);
+ function AuthCardButton2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ AuthCardButton2.prototype.getSchemaKey = function() {
+ return "AuthCardButton";
+ };
+ AuthCardButton2.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "type");
+ AuthCardButton2.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "title");
+ AuthCardButton2.imageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "image");
+ AuthCardButton2.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "value");
+ __decorate([
+ (0, serialization_1.property)(AuthCardButton2.typeProperty)
+ ], AuthCardButton2.prototype, "type", void 0);
+ __decorate([
+ (0, serialization_1.property)(AuthCardButton2.titleProperty)
+ ], AuthCardButton2.prototype, "title", void 0);
+ __decorate([
+ (0, serialization_1.property)(AuthCardButton2.imageProperty)
+ ], AuthCardButton2.prototype, "image", void 0);
+ __decorate([
+ (0, serialization_1.property)(AuthCardButton2.valueProperty)
+ ], AuthCardButton2.prototype, "value", void 0);
+ return AuthCardButton2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.AuthCardButton = AuthCardButton;
+ var TokenExchangeResource = (
+ /** @class */
+ function(_super) {
+ __extends(TokenExchangeResource2, _super);
+ function TokenExchangeResource2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ TokenExchangeResource2.prototype.getSchemaKey = function() {
+ return "TokenExchangeResource";
+ };
+ TokenExchangeResource2.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "id");
+ TokenExchangeResource2.uriProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "uri");
+ TokenExchangeResource2.providerIdProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "providerId");
+ __decorate([
+ (0, serialization_1.property)(TokenExchangeResource2.idProperty)
+ ], TokenExchangeResource2.prototype, "id", void 0);
+ __decorate([
+ (0, serialization_1.property)(TokenExchangeResource2.uriProperty)
+ ], TokenExchangeResource2.prototype, "uri", void 0);
+ __decorate([
+ (0, serialization_1.property)(TokenExchangeResource2.providerIdProperty)
+ ], TokenExchangeResource2.prototype, "providerId", void 0);
+ return TokenExchangeResource2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.TokenExchangeResource = TokenExchangeResource;
+ var Authentication = (
+ /** @class */
+ function(_super) {
+ __extends(Authentication2, _super);
+ function Authentication2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ Authentication2.prototype.getSchemaKey = function() {
+ return "Authentication";
+ };
+ Authentication2.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "text");
+ Authentication2.connectionNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, "connectionName");
+ Authentication2.buttonsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_4, "buttons", AuthCardButton);
+ Authentication2.tokenExchangeResourceProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, "tokenExchangeResource", TokenExchangeResource, true);
+ __decorate([
+ (0, serialization_1.property)(Authentication2.textProperty)
+ ], Authentication2.prototype, "text", void 0);
+ __decorate([
+ (0, serialization_1.property)(Authentication2.connectionNameProperty)
+ ], Authentication2.prototype, "connectionName", void 0);
+ __decorate([
+ (0, serialization_1.property)(Authentication2.buttonsProperty)
+ ], Authentication2.prototype, "buttons", void 0);
+ __decorate([
+ (0, serialization_1.property)(Authentication2.tokenExchangeResourceProperty)
+ ], Authentication2.prototype, "tokenExchangeResource", void 0);
+ return Authentication2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.Authentication = Authentication;
+ var AdaptiveCard = (
+ /** @class */
+ function(_super) {
+ __extends(AdaptiveCard2, _super);
+ function AdaptiveCard2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.designMode = false;
+ return _this;
+ }
+ Object.defineProperty(AdaptiveCard2.prototype, "refresh", {
+ get: function() {
+ return this.getValue(AdaptiveCard2.refreshProperty);
+ },
+ set: function(value) {
+ this.setValue(AdaptiveCard2.refreshProperty, value);
+ if (value) {
+ value.parent = this;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(AdaptiveCard2, "processMarkdown", {
+ get: function() {
+ throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());
+ },
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ set: function(_value) {
+ throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());
+ },
+ enumerable: false,
+ configurable: true
+ });
+ AdaptiveCard2.applyMarkdown = function(text) {
+ var result = {
+ didProcess: false
+ };
+ if (AdaptiveCard2.onProcessMarkdown) {
+ AdaptiveCard2.onProcessMarkdown(text, result);
+ } else if (window.markdownit) {
+ var markdownIt = window.markdownit;
+ result.outputHtml = markdownIt().render(text);
+ result.didProcess = true;
+ } else if (!AdaptiveCard2._haveWarnedAboutNoMarkdownProcessing) {
+ console.warn(strings_1.Strings.errors.markdownProcessingNotEnabled);
+ AdaptiveCard2._haveWarnedAboutNoMarkdownProcessing = true;
+ }
+ return result;
+ };
+ AdaptiveCard2.prototype.isVersionSupported = function() {
+ if (this.bypassVersionCheck) {
+ return true;
+ } else {
+ var unsupportedVersion = !this.version || !this.version.isValid || this.maxVersion.major < this.version.major || this.maxVersion.major === this.version.major && this.maxVersion.minor < this.version.minor;
+ return !unsupportedVersion;
+ }
+ };
+ AdaptiveCard2.prototype.getDefaultSerializationContext = function() {
+ return new SerializationContext(this.version);
+ };
+ AdaptiveCard2.prototype.getItemsCollectionPropertyName = function() {
+ return "body";
+ };
+ AdaptiveCard2.prototype.canHostSingletons = function() {
+ return true;
+ };
+ AdaptiveCard2.prototype.internalParse = function(source, context) {
+ this._fallbackCard = void 0;
+ var fallbackElement = context.parseElement(void 0, source["fallback"], this.forbiddenChildElements(), !this.isDesignMode());
+ if (fallbackElement) {
+ this._fallbackCard = new AdaptiveCard2();
+ this._fallbackCard.addItem(fallbackElement);
+ }
+ _super.prototype.internalParse.call(this, source, context);
+ };
+ AdaptiveCard2.prototype.internalToJSON = function(target, context) {
+ this.setValue(AdaptiveCard2.versionProperty, context.targetVersion);
+ _super.prototype.internalToJSON.call(this, target, context);
+ };
+ AdaptiveCard2.prototype.internalRender = function() {
+ var renderedElement = _super.prototype.internalRender.call(this);
+ if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {
+ renderedElement.style.removeProperty("minHeight");
+ }
+ return renderedElement;
+ };
+ AdaptiveCard2.prototype.getHasBackground = function(ignoreBackgroundImages) {
+ if (ignoreBackgroundImages === void 0) {
+ ignoreBackgroundImages = false;
+ }
+ return true;
+ };
+ AdaptiveCard2.prototype.getDefaultPadding = function() {
+ return new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding);
+ };
+ AdaptiveCard2.prototype.shouldSerialize = function(_context) {
+ return true;
+ };
+ Object.defineProperty(AdaptiveCard2.prototype, "renderIfEmpty", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(AdaptiveCard2.prototype, "bypassVersionCheck", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(AdaptiveCard2.prototype, "allowCustomStyle", {
+ get: function() {
+ return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(AdaptiveCard2.prototype, "hasBackground", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ AdaptiveCard2.prototype.getJsonTypeName = function() {
+ return "AdaptiveCard";
+ };
+ AdaptiveCard2.prototype.internalValidateProperties = function(context) {
+ _super.prototype.internalValidateProperties.call(this, context);
+ if (this.getValue(CardElement.typeNameProperty) !== "AdaptiveCard") {
+ context.addFailure(this, Enums.ValidationEvent.MissingCardType, strings_1.Strings.errors.invalidCardType());
+ }
+ if (!this.bypassVersionCheck && !this.version) {
+ context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet("version"));
+ } else if (!this.isVersionSupported()) {
+ context.addFailure(this, Enums.ValidationEvent.UnsupportedCardVersion, strings_1.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString()));
+ }
+ };
+ AdaptiveCard2.prototype.render = function(target) {
+ var renderedCard;
+ if (this.shouldFallback() && this._fallbackCard) {
+ this._fallbackCard.hostConfig = this.hostConfig;
+ renderedCard = this._fallbackCard.render();
+ } else {
+ renderedCard = _super.prototype.render.call(this);
+ if (renderedCard) {
+ renderedCard.classList.add(this.hostConfig.makeCssClassName("ac-adaptiveCard"));
+ if (shared_1.GlobalSettings.setTabIndexAtCardRoot) {
+ renderedCard.tabIndex = 0;
+ }
+ if (this.speak) {
+ renderedCard.setAttribute("aria-label", this.speak);
+ }
+ }
+ }
+ if (target) {
+ Utils.appendChild(target, renderedCard);
+ this.updateLayout();
+ }
+ return renderedCard;
+ };
+ AdaptiveCard2.prototype.updateLayout = function(processChildren) {
+ if (processChildren === void 0) {
+ processChildren = true;
+ }
+ _super.prototype.updateLayout.call(this, processChildren);
+ if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {
+ var padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);
+ this["handleOverflow"](this.renderedElement.offsetHeight - padding);
+ }
+ };
+ AdaptiveCard2.prototype.shouldFallback = function() {
+ return _super.prototype.shouldFallback.call(this) || !this.isVersionSupported();
+ };
+ Object.defineProperty(AdaptiveCard2.prototype, "hasVisibleSeparator", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ AdaptiveCard2.schemaUrl = "http://adaptivecards.io/schemas/adaptive-card.json";
+ AdaptiveCard2.$schemaProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, "$schema", function(sender, property, source, context) {
+ return AdaptiveCard2.schemaUrl;
+ }, function(sender, prop, target, value, context) {
+ context.serializeValue(target, prop.name, AdaptiveCard2.schemaUrl);
+ });
+ AdaptiveCard2.versionProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, "version", function(sender, prop, source, context) {
+ var version = serialization_1.Version.parse(source[prop.name], context);
+ if (version === void 0) {
+ version = serialization_1.Versions.latest;
+ context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidCardVersion(version.toString()));
+ }
+ return version;
+ }, function(sender, prop, target, value, context) {
+ if (value !== void 0) {
+ context.serializeValue(target, prop.name, value.toString());
+ }
+ }, serialization_1.Versions.v1_0);
+ AdaptiveCard2.fallbackTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "fallbackText");
+ AdaptiveCard2.speakProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, "speak");
+ AdaptiveCard2.refreshProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, "refresh", RefreshDefinition, true);
+ AdaptiveCard2.authenticationProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, "authentication", Authentication, true);
+ AdaptiveCard2._haveWarnedAboutNoMarkdownProcessing = false;
+ __decorate([
+ (0, serialization_1.property)(AdaptiveCard2.versionProperty)
+ ], AdaptiveCard2.prototype, "version", void 0);
+ __decorate([
+ (0, serialization_1.property)(AdaptiveCard2.fallbackTextProperty)
+ ], AdaptiveCard2.prototype, "fallbackText", void 0);
+ __decorate([
+ (0, serialization_1.property)(AdaptiveCard2.speakProperty)
+ ], AdaptiveCard2.prototype, "speak", void 0);
+ __decorate([
+ (0, serialization_1.property)(AdaptiveCard2.refreshProperty)
+ ], AdaptiveCard2.prototype, "refresh", null);
+ __decorate([
+ (0, serialization_1.property)(AdaptiveCard2.authenticationProperty)
+ ], AdaptiveCard2.prototype, "authentication", void 0);
+ return AdaptiveCard2;
+ }(ContainerWithActions)
+ );
+ exports.AdaptiveCard = AdaptiveCard;
+ var InlineAdaptiveCard = (
+ /** @class */
+ function(_super) {
+ __extends(InlineAdaptiveCard2, _super);
+ function InlineAdaptiveCard2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.suppressStyle = false;
+ return _this;
+ }
+ InlineAdaptiveCard2.prototype.getSchemaKey = function() {
+ return "InlineAdaptiveCard";
+ };
+ InlineAdaptiveCard2.prototype.populateSchema = function(schema) {
+ _super.prototype.populateSchema.call(this, schema);
+ schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);
+ };
+ InlineAdaptiveCard2.prototype.getDefaultPadding = function() {
+ return new shared_1.PaddingDefinition(this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding, this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding);
+ };
+ Object.defineProperty(InlineAdaptiveCard2.prototype, "bypassVersionCheck", {
+ get: function() {
+ return true;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(InlineAdaptiveCard2.prototype, "defaultStyle", {
+ get: function() {
+ if (this.suppressStyle) {
+ return Enums.ContainerStyle.Default;
+ } else {
+ return this.hostConfig.actions.showCard.style ? this.hostConfig.actions.showCard.style : Enums.ContainerStyle.Emphasis;
+ }
+ },
+ enumerable: false,
+ configurable: true
+ });
+ InlineAdaptiveCard2.prototype.render = function(target) {
+ var renderedCard = _super.prototype.render.call(this, target);
+ if (renderedCard) {
+ renderedCard.setAttribute("aria-live", "polite");
+ renderedCard.removeAttribute("tabindex");
+ }
+ return renderedCard;
+ };
+ return InlineAdaptiveCard2;
+ }(AdaptiveCard)
+ );
+ var SerializationContext = (
+ /** @class */
+ function(_super) {
+ __extends(SerializationContext2, _super);
+ function SerializationContext2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._forbiddenTypes = /* @__PURE__ */ new Set();
+ return _this;
+ }
+ SerializationContext2.prototype.internalParseCardObject = function(parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent, parsingSingletonObject) {
+ var _this = this;
+ if (parsingSingletonObject === void 0) {
+ parsingSingletonObject = false;
+ }
+ var result = void 0;
+ if (source && typeof source === "object") {
+ var oldForbiddenTypes_1 = /* @__PURE__ */ new Set();
+ this._forbiddenTypes.forEach(function(type) {
+ oldForbiddenTypes_1.add(type);
+ });
+ forbiddenTypes.forEach(function(type) {
+ _this._forbiddenTypes.add(type);
+ });
+ var typeName = Utils.parseString(source["type"]);
+ var ignoreForbiddenType = parsingSingletonObject && typeName === "Carousel";
+ if (typeName && this._forbiddenTypes.has(typeName) && !ignoreForbiddenType) {
+ logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);
+ } else {
+ var tryToFallback = false;
+ result = createInstanceCallback(typeName);
+ if (!result) {
+ tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback;
+ logParseEvent(typeName, Enums.TypeErrorType.UnknownType);
+ } else {
+ result.setParent(parent);
+ result.parse(source, this);
+ tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback && result.shouldFallback();
+ }
+ if (tryToFallback) {
+ var fallback = source["fallback"];
+ if (!fallback && parent) {
+ parent.setShouldFallback(true);
+ }
+ if (typeof fallback === "string" && fallback.toLowerCase() === "drop") {
+ result = void 0;
+ } else if (typeof fallback === "object") {
+ result = this.internalParseCardObject(parent, fallback, forbiddenTypes, true, createInstanceCallback, logParseEvent);
+ }
+ }
+ }
+ this._forbiddenTypes = oldForbiddenTypes_1;
+ }
+ return result;
+ };
+ SerializationContext2.prototype.cardObjectParsed = function(o, source) {
+ if (o instanceof Action && this.onParseAction) {
+ this.onParseAction(o, source, this);
+ } else if (o instanceof CardElement && this.onParseElement) {
+ this.onParseElement(o, source, this);
+ }
+ };
+ SerializationContext2.prototype.shouldSerialize = function(o) {
+ if (o instanceof Action) {
+ return this.actionRegistry.findByName(o.getJsonTypeName()) !== void 0;
+ } else if (o instanceof CardElement) {
+ return this.elementRegistry.findByName(o.getJsonTypeName()) !== void 0;
+ } else {
+ return true;
+ }
+ };
+ SerializationContext2.prototype.parseCardObject = function(parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent, parsingSingletonObject) {
+ if (parsingSingletonObject === void 0) {
+ parsingSingletonObject = false;
+ }
+ var forbiddenTypes = new Set(forbiddenTypeNames);
+ var result = this.internalParseCardObject(parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent, parsingSingletonObject);
+ if (result !== void 0) {
+ this.cardObjectParsed(result, source);
+ }
+ return result;
+ };
+ SerializationContext2.prototype.parseElement = function(parent, source, forbiddenTypes, allowFallback, _parsingSingletonObject) {
+ var _this = this;
+ if (_parsingSingletonObject === void 0) {
+ _parsingSingletonObject = false;
+ }
+ return this.parseCardObject(parent, source, forbiddenTypes, allowFallback, function(typeName) {
+ return _this.elementRegistry.createInstance(typeName, _this.targetVersion);
+ }, function(typeName, errorType) {
+ if (errorType === Enums.TypeErrorType.UnknownType) {
+ _this.logParseEvent(void 0, Enums.ValidationEvent.UnknownElementType, strings_1.Strings.errors.unknownElementType(typeName));
+ } else {
+ _this.logParseEvent(void 0, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));
+ }
+ }, _parsingSingletonObject);
+ };
+ SerializationContext2.prototype.parseAction = function(parent, source, forbiddenActionTypes, allowFallback) {
+ var _this = this;
+ return this.parseCardObject(parent, source, forbiddenActionTypes, allowFallback, function(typeName) {
+ return _this.actionRegistry.createInstance(typeName, _this.targetVersion);
+ }, function(typeName, errorType) {
+ if (errorType === Enums.TypeErrorType.UnknownType) {
+ _this.logParseEvent(void 0, Enums.ValidationEvent.UnknownActionType, strings_1.Strings.errors.unknownActionType(typeName));
+ } else {
+ _this.logParseEvent(void 0, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(typeName));
+ }
+ });
+ };
+ Object.defineProperty(SerializationContext2.prototype, "elementRegistry", {
+ get: function() {
+ var _a;
+ return (_a = this._elementRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.elements;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ SerializationContext2.prototype.setElementRegistry = function(value) {
+ this._elementRegistry = value;
+ };
+ Object.defineProperty(SerializationContext2.prototype, "actionRegistry", {
+ get: function() {
+ var _a;
+ return (_a = this._actionRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.actions;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ SerializationContext2.prototype.setActionRegistry = function(value) {
+ this._actionRegistry = value;
+ };
+ return SerializationContext2;
+ }(serialization_1.BaseSerializationContext)
+ );
+ exports.SerializationContext = SerializationContext;
+ registry_1.GlobalRegistry.defaultElements.register("Container", Container);
+ registry_1.GlobalRegistry.defaultElements.register("TextBlock", TextBlock);
+ registry_1.GlobalRegistry.defaultElements.register("RichTextBlock", RichTextBlock, serialization_1.Versions.v1_2);
+ registry_1.GlobalRegistry.defaultElements.register("TextRun", TextRun, serialization_1.Versions.v1_2);
+ registry_1.GlobalRegistry.defaultElements.register("Image", Image);
+ registry_1.GlobalRegistry.defaultElements.register("ImageSet", ImageSet);
+ registry_1.GlobalRegistry.defaultElements.register("Media", Media, serialization_1.Versions.v1_1);
+ registry_1.GlobalRegistry.defaultElements.register("FactSet", FactSet);
+ registry_1.GlobalRegistry.defaultElements.register("ColumnSet", ColumnSet);
+ registry_1.GlobalRegistry.defaultElements.register("ActionSet", ActionSet, serialization_1.Versions.v1_2);
+ registry_1.GlobalRegistry.defaultElements.register("Input.Text", TextInput);
+ registry_1.GlobalRegistry.defaultElements.register("Input.Date", DateInput);
+ registry_1.GlobalRegistry.defaultElements.register("Input.Time", TimeInput);
+ registry_1.GlobalRegistry.defaultElements.register("Input.Number", NumberInput);
+ registry_1.GlobalRegistry.defaultElements.register("Input.ChoiceSet", ChoiceSetInput);
+ registry_1.GlobalRegistry.defaultElements.register("Input.Toggle", ToggleInput);
+ registry_1.GlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);
+ registry_1.GlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);
+ registry_1.GlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);
+ registry_1.GlobalRegistry.defaultActions.register(ToggleVisibilityAction.JsonTypeName, ToggleVisibilityAction, serialization_1.Versions.v1_2);
+ registry_1.GlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, serialization_1.Versions.v1_4);
+ }
+});
+
+// node_modules/adaptivecards/lib/table.js
+var require_table = __commonJS({
+ "node_modules/adaptivecards/lib/table.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
+ r = Reflect.decorate(decorators, target, key, desc);
+ else
+ for (var i = decorators.length - 1; i >= 0; i--)
+ if (d = decorators[i])
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Table = exports.TableRow = exports.TableCell = exports.StylableContainer = exports.TableColumnDefinition = void 0;
+ var card_elements_1 = require_card_elements();
+ var enums_1 = require_enums();
+ var registry_1 = require_registry();
+ var serialization_1 = require_serialization();
+ var shared_1 = require_shared();
+ var strings_1 = require_strings();
+ var utils_1 = require_utils();
+ var TableColumnDefinition = (
+ /** @class */
+ function(_super) {
+ __extends(TableColumnDefinition2, _super);
+ function TableColumnDefinition2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.width = new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight);
+ return _this;
+ }
+ TableColumnDefinition2.prototype.getSchemaKey = function() {
+ return "ColumnDefinition";
+ };
+ TableColumnDefinition2.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "horizontalCellContentAlignment", enums_1.HorizontalAlignment);
+ TableColumnDefinition2.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "verticalCellContentAlignment", enums_1.VerticalAlignment);
+ TableColumnDefinition2.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_5, "width", function(sender, prop, source, context) {
+ var result = prop.defaultValue;
+ var value = source[prop.name];
+ var invalidWidth = false;
+ if (typeof value === "number" && !isNaN(value)) {
+ result = new shared_1.SizeAndUnit(value, enums_1.SizeUnit.Weight);
+ } else if (typeof value === "string") {
+ try {
+ result = shared_1.SizeAndUnit.parse(value);
+ } catch (e) {
+ invalidWidth = true;
+ }
+ } else {
+ invalidWidth = true;
+ }
+ if (invalidWidth) {
+ context.logParseEvent(sender, enums_1.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));
+ }
+ return result;
+ }, function(sender, property, target, value, context) {
+ if (value.unit === enums_1.SizeUnit.Pixel) {
+ context.serializeValue(target, "width", value.physicalSize + "px");
+ } else {
+ context.serializeNumber(target, "width", value.physicalSize);
+ }
+ }, new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight));
+ __decorate([
+ (0, serialization_1.property)(TableColumnDefinition2.horizontalCellContentAlignmentProperty)
+ ], TableColumnDefinition2.prototype, "horizontalCellContentAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(TableColumnDefinition2.verticalCellContentAlignmentProperty)
+ ], TableColumnDefinition2.prototype, "verticalCellContentAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(TableColumnDefinition2.widthProperty)
+ ], TableColumnDefinition2.prototype, "width", void 0);
+ return TableColumnDefinition2;
+ }(serialization_1.SerializableObject)
+ );
+ exports.TableColumnDefinition = TableColumnDefinition;
+ var StylableContainer = (
+ /** @class */
+ function(_super) {
+ __extends(StylableContainer2, _super);
+ function StylableContainer2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._items = [];
+ return _this;
+ }
+ StylableContainer2.prototype.parseItem = function(source, context) {
+ var _this = this;
+ return context.parseCardObject(
+ this,
+ source,
+ [],
+ // Forbidden types not supported for elements for now
+ !this.isDesignMode(),
+ function(typeName) {
+ return _this.createItemInstance(typeName);
+ },
+ function(typeName, _errorType) {
+ context.logParseEvent(void 0, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));
+ }
+ );
+ };
+ StylableContainer2.prototype.internalAddItem = function(item) {
+ if (!item.parent) {
+ this._items.push(item);
+ item.setParent(this);
+ } else {
+ throw new Error(strings_1.Strings.errors.elementAlreadyParented());
+ }
+ };
+ StylableContainer2.prototype.internalRemoveItem = function(item) {
+ var itemIndex = this._items.indexOf(item);
+ if (itemIndex >= 0) {
+ this._items.splice(itemIndex, 1);
+ item.setParent(void 0);
+ this.updateLayout();
+ return true;
+ }
+ return false;
+ };
+ StylableContainer2.prototype.internalIndexOf = function(item) {
+ return this._items.indexOf(item);
+ };
+ StylableContainer2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this._items = [];
+ var items = source[this.getCollectionPropertyName()];
+ if (Array.isArray(items)) {
+ for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
+ var item = items_1[_i];
+ var instance = this.parseItem(item, context);
+ if (instance) {
+ this._items.push(instance);
+ }
+ }
+ }
+ };
+ StylableContainer2.prototype.internalToJSON = function(target, context) {
+ _super.prototype.internalToJSON.call(this, target, context);
+ context.serializeArray(target, this.getCollectionPropertyName(), this._items);
+ };
+ StylableContainer2.prototype.removeItem = function(item) {
+ return this.internalRemoveItem(item);
+ };
+ StylableContainer2.prototype.getItemCount = function() {
+ return this._items.length;
+ };
+ StylableContainer2.prototype.getItemAt = function(index) {
+ return this._items[index];
+ };
+ StylableContainer2.prototype.getFirstVisibleRenderedItem = function() {
+ return this.getItemCount() > 0 ? this.getItemAt(0) : void 0;
+ };
+ StylableContainer2.prototype.getLastVisibleRenderedItem = function() {
+ return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : void 0;
+ };
+ return StylableContainer2;
+ }(card_elements_1.StylableCardElementContainer)
+ );
+ exports.StylableContainer = StylableContainer;
+ var TableCell = (
+ /** @class */
+ function(_super) {
+ __extends(TableCell2, _super);
+ function TableCell2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._columnIndex = -1;
+ _this._cellType = "data";
+ return _this;
+ }
+ TableCell2.prototype.getHasBorder = function() {
+ return this.parentRow.parentTable.showGridLines;
+ };
+ TableCell2.prototype.applyBorder = function() {
+ if (this.renderedElement && this.getHasBorder()) {
+ var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle);
+ if (styleDefinition.borderColor) {
+ var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor);
+ if (borderColor) {
+ this.renderedElement.style.borderRight = "1px solid " + borderColor;
+ this.renderedElement.style.borderBottom = "1px solid " + borderColor;
+ }
+ }
+ }
+ };
+ TableCell2.prototype.getDefaultPadding = function() {
+ return this.getHasBackground() || this.getHasBorder() ? new shared_1.PaddingDefinition(enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small) : _super.prototype.getDefaultPadding.call(this);
+ };
+ TableCell2.prototype.internalRender = function() {
+ var cellElement = _super.prototype.internalRender.call(this);
+ if (cellElement) {
+ cellElement.setAttribute("role", this.cellType === "data" ? "cell" : "columnheader");
+ cellElement.style.minWidth = "0";
+ if (this.cellType === "header") {
+ cellElement.setAttribute("scope", "col");
+ }
+ }
+ return cellElement;
+ };
+ TableCell2.prototype.shouldSerialize = function(_context) {
+ return true;
+ };
+ TableCell2.prototype.getJsonTypeName = function() {
+ return "TableCell";
+ };
+ TableCell2.prototype.getEffectiveTextStyleDefinition = function() {
+ if (this.cellType === "header") {
+ return this.hostConfig.textStyles.columnHeader;
+ }
+ return _super.prototype.getEffectiveTextStyleDefinition.call(this);
+ };
+ TableCell2.prototype.getEffectiveHorizontalAlignment = function() {
+ if (this.horizontalAlignment !== void 0) {
+ return this.horizontalAlignment;
+ }
+ if (this.parentRow.horizontalCellContentAlignment !== void 0) {
+ return this.parentRow.horizontalCellContentAlignment;
+ }
+ if (this.columnIndex >= 0) {
+ var horizontalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment;
+ if (horizontalAlignment !== void 0) {
+ return horizontalAlignment;
+ }
+ }
+ if (this.parentRow.parentTable.horizontalCellContentAlignment !== void 0) {
+ return this.parentRow.parentTable.horizontalCellContentAlignment;
+ }
+ return _super.prototype.getEffectiveHorizontalAlignment.call(this);
+ };
+ TableCell2.prototype.getEffectiveVerticalContentAlignment = function() {
+ if (this.verticalContentAlignment !== void 0) {
+ return this.verticalContentAlignment;
+ }
+ if (this.parentRow.verticalCellContentAlignment !== void 0) {
+ return this.parentRow.verticalCellContentAlignment;
+ }
+ if (this.columnIndex >= 0) {
+ var verticalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment;
+ if (verticalAlignment !== void 0) {
+ return verticalAlignment;
+ }
+ }
+ if (this.parentRow.parentTable.verticalCellContentAlignment !== void 0) {
+ return this.parentRow.parentTable.verticalCellContentAlignment;
+ }
+ return _super.prototype.getEffectiveVerticalContentAlignment.call(this);
+ };
+ Object.defineProperty(TableCell2.prototype, "columnIndex", {
+ get: function() {
+ return this._columnIndex;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(TableCell2.prototype, "cellType", {
+ get: function() {
+ return this._cellType;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(TableCell2.prototype, "parentRow", {
+ get: function() {
+ return this.parent;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(TableCell2.prototype, "isStandalone", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return TableCell2;
+ }(card_elements_1.Container)
+ );
+ exports.TableCell = TableCell;
+ var TableRow = (
+ /** @class */
+ function(_super) {
+ __extends(TableRow2, _super);
+ function TableRow2() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ TableRow2.prototype.getDefaultPadding = function() {
+ return new shared_1.PaddingDefinition(enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None);
+ };
+ TableRow2.prototype.applyBackground = function() {
+ if (this.renderedElement) {
+ var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));
+ if (styleDefinition.backgroundColor) {
+ var bgColor = (0, utils_1.stringToCssColor)(styleDefinition.backgroundColor);
+ if (bgColor) {
+ this.renderedElement.style.backgroundColor = bgColor;
+ }
+ }
+ }
+ };
+ TableRow2.prototype.getCollectionPropertyName = function() {
+ return "cells";
+ };
+ TableRow2.prototype.createItemInstance = function(typeName) {
+ return !typeName || typeName === "TableCell" ? new TableCell() : void 0;
+ };
+ TableRow2.prototype.internalRender = function() {
+ var isFirstRow = this.getIsFirstRow();
+ var cellSpacing = this.hostConfig.table.cellSpacing;
+ var rowElement = document.createElement("div");
+ rowElement.setAttribute("role", "row");
+ rowElement.style.display = "flex";
+ rowElement.style.flexDirection = "row";
+ for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {
+ var cell = this.getItemAt(i);
+ cell["_columnIndex"] = i;
+ cell["_cellType"] = this.parentTable.firstRowAsHeaders && isFirstRow ? "header" : "data";
+ var renderedCell = cell.render();
+ if (renderedCell) {
+ var column = this.parentTable.getColumnAt(i);
+ if (column.computedWidth.unit === enums_1.SizeUnit.Pixel) {
+ renderedCell.style.flex = "0 0 " + column.computedWidth.physicalSize + "px";
+ } else {
+ renderedCell.style.flex = "1 1 " + column.computedWidth.physicalSize + "%";
+ }
+ if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {
+ renderedCell.style.marginLeft = cellSpacing + "px";
+ }
+ rowElement.appendChild(renderedCell);
+ }
+ }
+ return rowElement.children.length > 0 ? rowElement : void 0;
+ };
+ TableRow2.prototype.shouldSerialize = function(_context) {
+ return true;
+ };
+ TableRow2.prototype.addCell = function(cell) {
+ this.internalAddItem(cell);
+ };
+ TableRow2.prototype.removeCellAt = function(columnIndex) {
+ if (columnIndex >= 0 && columnIndex < this.getItemCount()) {
+ return this.removeItem(this.getItemAt(columnIndex));
+ }
+ return false;
+ };
+ TableRow2.prototype.indexOf = function(cardElement) {
+ return cardElement instanceof TableCell ? this.internalIndexOf(cardElement) : -1;
+ };
+ TableRow2.prototype.ensureHasEnoughCells = function(cellCount) {
+ while (this.getItemCount() < cellCount) {
+ this.addCell(new TableCell());
+ }
+ };
+ TableRow2.prototype.getJsonTypeName = function() {
+ return "TableRow";
+ };
+ TableRow2.prototype.getIsFirstRow = function() {
+ return this.parentTable.getItemAt(0) === this;
+ };
+ Object.defineProperty(TableRow2.prototype, "parentTable", {
+ get: function() {
+ return this.parent;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(TableRow2.prototype, "isStandalone", {
+ get: function() {
+ return false;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ TableRow2.styleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, "style");
+ TableRow2.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "horizontalCellContentAlignment", enums_1.HorizontalAlignment);
+ TableRow2.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "verticalCellContentAlignment", enums_1.VerticalAlignment);
+ __decorate([
+ (0, serialization_1.property)(TableRow2.horizontalCellContentAlignmentProperty)
+ ], TableRow2.prototype, "horizontalCellContentAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(TableRow2.verticalCellContentAlignmentProperty)
+ ], TableRow2.prototype, "verticalCellContentAlignment", void 0);
+ return TableRow2;
+ }(StylableContainer)
+ );
+ exports.TableRow = TableRow;
+ var Table = (
+ /** @class */
+ function(_super) {
+ __extends(Table2, _super);
+ function Table2() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this._columns = [];
+ _this.firstRowAsHeaders = true;
+ _this.showGridLines = true;
+ return _this;
+ }
+ Object.defineProperty(Table2.prototype, "gridStyle", {
+ get: function() {
+ var style = this.getValue(Table2.gridStyleProperty);
+ if (style && this.hostConfig.containerStyles.getStyleByName(style)) {
+ return style;
+ }
+ return void 0;
+ },
+ set: function(value) {
+ this.setValue(Table2.gridStyleProperty, value);
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Table2.prototype.ensureRowsHaveEnoughCells = function() {
+ for (var i = 0; i < this.getItemCount(); i++) {
+ this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());
+ }
+ };
+ Table2.prototype.removeCellsFromColumn = function(columnIndex) {
+ for (var i = 0; i < this.getItemCount(); i++) {
+ this.getItemAt(i).removeCellAt(columnIndex);
+ }
+ };
+ Table2.prototype.getCollectionPropertyName = function() {
+ return "rows";
+ };
+ Table2.prototype.createItemInstance = function(typeName) {
+ return !typeName || typeName === "TableRow" ? new TableRow() : void 0;
+ };
+ Table2.prototype.internalParse = function(source, context) {
+ _super.prototype.internalParse.call(this, source, context);
+ this.ensureRowsHaveEnoughCells();
+ };
+ Table2.prototype.internalRender = function() {
+ if (this.getItemCount() > 0) {
+ var totalWeights = 0;
+ for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ if (column.width.unit === enums_1.SizeUnit.Weight) {
+ totalWeights += column.width.physicalSize;
+ }
+ }
+ for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {
+ var column = _c[_b];
+ if (column.width.unit === enums_1.SizeUnit.Pixel) {
+ column.computedWidth = new shared_1.SizeAndUnit(column.width.physicalSize, enums_1.SizeUnit.Pixel);
+ } else {
+ column.computedWidth = new shared_1.SizeAndUnit(100 / totalWeights * column.width.physicalSize, enums_1.SizeUnit.Weight);
+ }
+ }
+ var tableElement = document.createElement("div");
+ tableElement.setAttribute("role", "table");
+ tableElement.style.display = "flex";
+ tableElement.style.flexDirection = "column";
+ if (this.showGridLines) {
+ var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.gridStyle);
+ if (styleDefinition.borderColor) {
+ var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor);
+ if (borderColor) {
+ tableElement.style.borderTop = "1px solid " + borderColor;
+ tableElement.style.borderLeft = "1px solid " + borderColor;
+ }
+ }
+ }
+ var cellSpacing = this.hostConfig.table.cellSpacing;
+ for (var i = 0; i < this.getItemCount(); i++) {
+ var renderedRow = this.getItemAt(i).render();
+ if (renderedRow) {
+ if (i > 0 && !this.showGridLines && cellSpacing > 0) {
+ var separatorRow = document.createElement("div");
+ separatorRow.setAttribute("aria-hidden", "true");
+ separatorRow.style.height = cellSpacing + "px";
+ tableElement.appendChild(separatorRow);
+ }
+ tableElement.appendChild(renderedRow);
+ }
+ }
+ return tableElement;
+ }
+ return void 0;
+ };
+ Table2.prototype.addColumn = function(column) {
+ this._columns.push(column);
+ this.ensureRowsHaveEnoughCells();
+ };
+ Table2.prototype.removeColumn = function(column) {
+ var index = this._columns.indexOf(column);
+ if (index >= 0) {
+ this.removeCellsFromColumn(index);
+ this._columns.splice(index, 1);
+ }
+ };
+ Table2.prototype.getColumnCount = function() {
+ return this._columns.length;
+ };
+ Table2.prototype.getColumnAt = function(index) {
+ return this._columns[index];
+ };
+ Table2.prototype.addRow = function(row) {
+ this.internalAddItem(row);
+ row.ensureHasEnoughCells(this.getColumnCount());
+ };
+ Table2.prototype.indexOf = function(cardElement) {
+ return cardElement instanceof TableRow ? this.internalIndexOf(cardElement) : -1;
+ };
+ Table2.prototype.getJsonTypeName = function() {
+ return "Table";
+ };
+ Table2._columnsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_5, "columns", TableColumnDefinition);
+ Table2.firstRowAsHeadersProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, "firstRowAsHeaders", true);
+ Table2.showGridLinesProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, "showGridLines", true);
+ Table2.gridStyleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, "gridStyle");
+ Table2.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "horizontalCellContentAlignment", enums_1.HorizontalAlignment);
+ Table2.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, "verticalCellContentAlignment", enums_1.VerticalAlignment);
+ __decorate([
+ (0, serialization_1.property)(Table2._columnsProperty)
+ ], Table2.prototype, "_columns", void 0);
+ __decorate([
+ (0, serialization_1.property)(Table2.firstRowAsHeadersProperty)
+ ], Table2.prototype, "firstRowAsHeaders", void 0);
+ __decorate([
+ (0, serialization_1.property)(Table2.showGridLinesProperty)
+ ], Table2.prototype, "showGridLines", void 0);
+ __decorate([
+ (0, serialization_1.property)(Table2.gridStyleProperty)
+ ], Table2.prototype, "gridStyle", null);
+ __decorate([
+ (0, serialization_1.property)(Table2.horizontalCellContentAlignmentProperty)
+ ], Table2.prototype, "horizontalCellContentAlignment", void 0);
+ __decorate([
+ (0, serialization_1.property)(Table2.verticalCellContentAlignmentProperty)
+ ], Table2.prototype, "verticalCellContentAlignment", void 0);
+ return Table2;
+ }(StylableContainer)
+ );
+ exports.Table = Table;
+ registry_1.GlobalRegistry.defaultElements.register("Table", Table, serialization_1.Versions.v1_5);
+ }
+});
+
+// node_modules/adaptivecards/lib/channel-adapter.js
+var require_channel_adapter = __commonJS({
+ "node_modules/adaptivecards/lib/channel-adapter.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ChannelAdapter = void 0;
+ var ChannelAdapter = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function ChannelAdapter2() {
+ }
+ return ChannelAdapter2;
+ }()
+ );
+ exports.ChannelAdapter = ChannelAdapter;
+ }
+});
+
+// node_modules/adaptivecards/lib/activity-request.js
+var require_activity_request = __commonJS({
+ "node_modules/adaptivecards/lib/activity-request.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.LoginRequestResponse = exports.ErrorResponse = exports.SuccessResponse = exports.ActivityResponse = exports.ActivityRequestError = exports.ActivityRequestTrigger = void 0;
+ var ActivityRequestTrigger;
+ (function(ActivityRequestTrigger2) {
+ ActivityRequestTrigger2["Automatic"] = "automatic";
+ ActivityRequestTrigger2["Manual"] = "manual";
+ })(ActivityRequestTrigger = exports.ActivityRequestTrigger || (exports.ActivityRequestTrigger = {}));
+ var ActivityRequestError = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function ActivityRequestError2(code, message) {
+ this.code = code;
+ this.message = message;
+ }
+ return ActivityRequestError2;
+ }()
+ );
+ exports.ActivityRequestError = ActivityRequestError;
+ var ActivityResponse = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function ActivityResponse2(request) {
+ this.request = request;
+ }
+ return ActivityResponse2;
+ }()
+ );
+ exports.ActivityResponse = ActivityResponse;
+ var SuccessResponse = (
+ /** @class */
+ function(_super) {
+ __extends(SuccessResponse2, _super);
+ function SuccessResponse2(request, rawContent) {
+ var _this = _super.call(this, request) || this;
+ _this.request = request;
+ _this.rawContent = rawContent;
+ return _this;
+ }
+ return SuccessResponse2;
+ }(ActivityResponse)
+ );
+ exports.SuccessResponse = SuccessResponse;
+ var ErrorResponse = (
+ /** @class */
+ function(_super) {
+ __extends(ErrorResponse2, _super);
+ function ErrorResponse2(request, error) {
+ var _this = _super.call(this, request) || this;
+ _this.request = request;
+ _this.error = error;
+ return _this;
+ }
+ return ErrorResponse2;
+ }(ActivityResponse)
+ );
+ exports.ErrorResponse = ErrorResponse;
+ var LoginRequestResponse = (
+ /** @class */
+ function(_super) {
+ __extends(LoginRequestResponse2, _super);
+ function LoginRequestResponse2(request, auth) {
+ var _this = _super.call(this, request) || this;
+ _this.request = request;
+ _this._auth = auth;
+ for (var _i = 0, _a = _this._auth.buttons; _i < _a.length; _i++) {
+ var button = _a[_i];
+ if (button.type === "signin" && button.value !== void 0) {
+ try {
+ new URL(button.value);
+ _this.signinButton = button;
+ break;
+ } catch (e) {
+ }
+ }
+ }
+ return _this;
+ }
+ Object.defineProperty(LoginRequestResponse2.prototype, "tokenExchangeResource", {
+ get: function() {
+ return this._auth.tokenExchangeResource;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return LoginRequestResponse2;
+ }(ActivityResponse)
+ );
+ exports.LoginRequestResponse = LoginRequestResponse;
+ }
+});
+
+// node_modules/adaptivecards/lib/adaptive-applet.js
+var require_adaptive_applet = __commonJS({
+ "node_modules/adaptivecards/lib/adaptive-applet.js"(exports) {
+ "use strict";
+ var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
+ function adopt(value) {
+ return value instanceof P ? value : new P(function(resolve) {
+ resolve(value);
+ });
+ }
+ return new (P || (P = Promise))(function(resolve, reject) {
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e) {
+ reject(e);
+ }
+ }
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e) {
+ reject(e);
+ }
+ }
+ function step(result) {
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ };
+ var __generator = exports && exports.__generator || function(thisArg, body) {
+ var _ = { label: 0, sent: function() {
+ if (t[0] & 1)
+ throw t[1];
+ return t[1];
+ }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
+ return this;
+ }), g;
+ function verb(n) {
+ return function(v) {
+ return step([n, v]);
+ };
+ }
+ function step(op) {
+ if (f)
+ throw new TypeError("Generator is already executing.");
+ while (_)
+ try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
+ return t;
+ if (y = 0, t)
+ op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0:
+ case 1:
+ t = op;
+ break;
+ case 4:
+ _.label++;
+ return { value: op[1], done: false };
+ case 5:
+ _.label++;
+ y = op[1];
+ op = [0];
+ continue;
+ case 7:
+ op = _.ops.pop();
+ _.trys.pop();
+ continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
+ _ = 0;
+ continue;
+ }
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
+ _.label = op[1];
+ break;
+ }
+ if (op[0] === 6 && _.label < t[1]) {
+ _.label = t[1];
+ t = op;
+ break;
+ }
+ if (t && _.label < t[2]) {
+ _.label = t[2];
+ _.ops.push(op);
+ break;
+ }
+ if (t[2])
+ _.ops.pop();
+ _.trys.pop();
+ continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) {
+ op = [6, e];
+ y = 0;
+ } finally {
+ f = t = 0;
+ }
+ if (op[0] & 5)
+ throw op[1];
+ return { value: op[0] ? op[1] : void 0, done: true };
+ }
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.AdaptiveApplet = void 0;
+ var Enums = require_enums();
+ var Utils = require_utils();
+ var shared_1 = require_shared();
+ var activity_request_1 = require_activity_request();
+ var strings_1 = require_strings();
+ var card_elements_1 = require_card_elements();
+ var serialization_1 = require_serialization();
+ function logEvent(level, message) {
+ var optionalParams = [];
+ for (var _i = 2; _i < arguments.length; _i++) {
+ optionalParams[_i - 2] = arguments[_i];
+ }
+ if (shared_1.GlobalSettings.applets.logEnabled) {
+ if (shared_1.GlobalSettings.applets.onLogEvent) {
+ shared_1.GlobalSettings.applets.onLogEvent(level, message, optionalParams);
+ } else {
+ switch (level) {
+ case Enums.LogLevel.Warning:
+ console.warn(message, optionalParams);
+ break;
+ case Enums.LogLevel.Error:
+ console.error(message, optionalParams);
+ break;
+ default:
+ console.log(message, optionalParams);
+ break;
+ }
+ }
+ }
+ }
+ var ActivityRequest = (
+ /** @class */
+ function() {
+ function ActivityRequest2(action, trigger, consecutiveRefreshes) {
+ this.action = action;
+ this.trigger = trigger;
+ this.consecutiveRefreshes = consecutiveRefreshes;
+ this.attemptNumber = 0;
+ }
+ ActivityRequest2.prototype.retryAsync = function() {
+ return __awaiter(this, void 0, void 0, function() {
+ return __generator(this, function(_a) {
+ if (this.onSend) {
+ this.onSend(this);
+ }
+ return [
+ 2
+ /*return*/
+ ];
+ });
+ });
+ };
+ return ActivityRequest2;
+ }()
+ );
+ var AdaptiveApplet = (
+ /** @class */
+ function() {
+ function AdaptiveApplet2() {
+ this._allowAutomaticCardUpdate = false;
+ 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);
+ }
+ AdaptiveApplet2.prototype.displayCard = function(card) {
+ if (card.renderedElement) {
+ Utils.clearElementChildren(this._cardHostElement);
+ this._refreshButtonHostElement.style.display = "none";
+ this._cardHostElement.appendChild(card.renderedElement);
+ } else {
+ throw new Error("displayCard: undefined card.");
+ }
+ };
+ AdaptiveApplet2.prototype.showManualRefreshButton = function(refreshAction) {
+ var _this = this;
+ var displayBuiltInManualRefreshButton = this.onShowManualRefreshButton ? this.onShowManualRefreshButton(this) : true;
+ if (displayBuiltInManualRefreshButton) {
+ this._refreshButtonHostElement.style.display = "none";
+ var renderedRefreshButton = void 0;
+ if (this.onRenderManualRefreshButton) {
+ renderedRefreshButton = this.onRenderManualRefreshButton(this);
+ } else {
+ var message = strings_1.Strings.runtime.refreshThisCard();
+ if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {
+ var autoRefreshPausedMessage = strings_1.Strings.runtime.automaticRefreshPaused();
+ if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== " ") {
+ autoRefreshPausedMessage += " ";
+ }
+ message = strings_1.Strings.runtime.clckToRestartAutomaticRefresh();
+ }
+ var cardPayload = {
+ type: "AdaptiveCard",
+ version: "1.2",
+ body: [
+ {
+ type: "RichTextBlock",
+ horizontalAlignment: "right",
+ inlines: [
+ {
+ type: "TextRun",
+ text: message,
+ selectAction: {
+ type: "Action.Submit",
+ id: "refreshCard"
+ }
+ }
+ ]
+ }
+ ]
+ };
+ var card = new card_elements_1.AdaptiveCard();
+ card.parse(cardPayload, new card_elements_1.SerializationContext(serialization_1.Versions.v1_2));
+ card.onExecuteAction = function(action) {
+ if (action.id === "refreshCard") {
+ Utils.clearElementChildren(_this._refreshButtonHostElement);
+ _this.internalExecuteAction(refreshAction, activity_request_1.ActivityRequestTrigger.Automatic, 0);
+ }
+ };
+ renderedRefreshButton = card.render();
+ }
+ if (renderedRefreshButton) {
+ Utils.clearElementChildren(this._refreshButtonHostElement);
+ this._refreshButtonHostElement.appendChild(renderedRefreshButton);
+ this._refreshButtonHostElement.style.removeProperty("display");
+ }
+ }
+ };
+ AdaptiveApplet2.prototype.createActivityRequest = function(action, trigger, consecutiveRefreshes) {
+ var _this = this;
+ if (this.card) {
+ var request_1 = new ActivityRequest(action, trigger, consecutiveRefreshes);
+ request_1.onSend = function(sender) {
+ sender.attemptNumber++;
+ void _this.internalSendActivityRequestAsync(request_1);
+ };
+ var cancel = this.onPrepareActivityRequest ? !this.onPrepareActivityRequest(this, request_1, action) : false;
+ return cancel ? void 0 : request_1;
+ } else {
+ throw new Error("createActivityRequest: no card has been set.");
+ }
+ };
+ AdaptiveApplet2.prototype.createMagicCodeInputCard = function(attemptNumber) {
+ var payload = {
+ type: "AdaptiveCard",
+ version: "1.0",
+ body: [
+ {
+ type: "TextBlock",
+ color: "attention",
+ text: attemptNumber === 1 ? void 0 : "That didn't work... let's try again.",
+ wrap: true,
+ horizontalAlignment: "center"
+ },
+ {
+ type: "TextBlock",
+ text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"',
+ wrap: true,
+ horizontalAlignment: "center"
+ },
+ {
+ type: "Input.Text",
+ id: "magicCode",
+ placeholder: "Enter magic code"
+ },
+ {
+ type: "ActionSet",
+ horizontalAlignment: "center",
+ actions: [
+ {
+ type: "Action.Submit",
+ id: AdaptiveApplet2._submitMagicCodeActionId,
+ title: "Submit"
+ },
+ {
+ type: "Action.Submit",
+ id: AdaptiveApplet2._cancelMagicCodeAuthActionId,
+ title: "Cancel"
+ }
+ ]
+ }
+ ]
+ };
+ var card = new card_elements_1.AdaptiveCard();
+ card.parse(payload);
+ return card;
+ };
+ AdaptiveApplet2.prototype.cancelAutomaticRefresh = function() {
+ if (this._allowAutomaticCardUpdate) {
+ logEvent(Enums.LogLevel.Warning, "Automatic card refresh has been cancelled as a result of the user interacting with the card.");
+ }
+ this._allowAutomaticCardUpdate = false;
+ };
+ AdaptiveApplet2.prototype.createSerializationContext = function() {
+ return this.onCreateSerializationContext ? this.onCreateSerializationContext(this) : new card_elements_1.SerializationContext();
+ };
+ AdaptiveApplet2.prototype.internalSetCard = function(payload, consecutiveRefreshes) {
+ var _this = this;
+ if (typeof payload === "object" && payload["type"] === "AdaptiveCard") {
+ this._cardPayload = payload;
+ }
+ if (this._cardPayload) {
+ try {
+ var card = new card_elements_1.AdaptiveCard();
+ if (this.hostConfig) {
+ card.hostConfig = this.hostConfig;
+ }
+ var serializationContext = this.createSerializationContext();
+ card.parse(this._cardPayload, serializationContext);
+ var doChangeCard = this.onCardChanging ? this.onCardChanging(this, this._cardPayload) : true;
+ if (doChangeCard) {
+ this._card = card;
+ if (this._card.authentication && this._card.authentication.tokenExchangeResource && this.onPrefetchSSOToken) {
+ this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource);
+ }
+ this._card.onExecuteAction = function(action) {
+ _this.cancelAutomaticRefresh();
+ _this.internalExecuteAction(action, activity_request_1.ActivityRequestTrigger.Manual, 0);
+ };
+ this._card.onInputValueChanged = function(_input) {
+ _this.cancelAutomaticRefresh();
+ };
+ this._card.render();
+ if (this._card.renderedElement) {
+ this.displayCard(this._card);
+ if (this.onCardChanged) {
+ this.onCardChanged(this);
+ }
+ if (this._card.refresh) {
+ if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic && consecutiveRefreshes < shared_1.GlobalSettings.applets.refresh.maximumConsecutiveAutomaticRefreshes) {
+ if (shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <= 0) {
+ logEvent(Enums.LogLevel.Info, "Triggering automatic card refresh number " + (consecutiveRefreshes + 1));
+ this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1);
+ } else {
+ logEvent(Enums.LogLevel.Info, "Scheduling automatic card refresh number " + (consecutiveRefreshes + 1) + " in " + shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes + "ms");
+ var action_1 = this._card.refresh.action;
+ this._allowAutomaticCardUpdate = true;
+ window.setTimeout(function() {
+ if (_this._allowAutomaticCardUpdate) {
+ _this.internalExecuteAction(action_1, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveRefreshes + 1);
+ }
+ }, shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);
+ }
+ } else if (shared_1.GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled) {
+ if (consecutiveRefreshes > 0) {
+ logEvent(Enums.LogLevel.Warning, "Stopping automatic refreshes after " + consecutiveRefreshes + " consecutive refreshes.");
+ } else {
+ logEvent(Enums.LogLevel.Warning, "The card has a refresh section, but automatic refreshes are disabled.");
+ }
+ if (shared_1.GlobalSettings.applets.refresh.allowManualRefreshesAfterAutomaticRefreshes || shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual) {
+ logEvent(Enums.LogLevel.Info, "Showing manual refresh button.");
+ this.showManualRefreshButton(this._card.refresh.action);
+ }
+ }
+ }
+ }
+ }
+ } catch (error) {
+ logEvent(Enums.LogLevel.Error, "setCard: " + error);
+ }
+ }
+ };
+ AdaptiveApplet2.prototype.internalExecuteAction = function(action, trigger, consecutiveRefreshes) {
+ if (action instanceof card_elements_1.ExecuteAction) {
+ if (this.channelAdapter) {
+ var request = this.createActivityRequest(action, trigger, consecutiveRefreshes);
+ if (request) {
+ void request.retryAsync();
+ }
+ } else {
+ throw new Error("internalExecuteAction: No channel adapter set.");
+ }
+ }
+ if (this.onAction) {
+ this.onAction(this, action);
+ }
+ };
+ AdaptiveApplet2.prototype.createProgressOverlay = function(request) {
+ if (!this._progressOverlay) {
+ if (this.onCreateProgressOverlay) {
+ this._progressOverlay = this.onCreateProgressOverlay(this, request);
+ } else {
+ this._progressOverlay = document.createElement("div");
+ this._progressOverlay.className = "aaf-progress-overlay";
+ var spinner = document.createElement("div");
+ spinner.className = "aaf-spinner";
+ spinner.style.width = "28px";
+ spinner.style.height = "28px";
+ this._progressOverlay.appendChild(spinner);
+ }
+ }
+ return this._progressOverlay;
+ };
+ AdaptiveApplet2.prototype.removeProgressOverlay = function(request) {
+ if (this.onRemoveProgressOverlay) {
+ this.onRemoveProgressOverlay(this, request);
+ }
+ if (this._progressOverlay !== void 0) {
+ this.renderedElement.removeChild(this._progressOverlay);
+ this._progressOverlay = void 0;
+ }
+ };
+ AdaptiveApplet2.prototype.activityRequestSucceeded = function(response, parsedContent) {
+ if (this.onActivityRequestSucceeded) {
+ this.onActivityRequestSucceeded(this, response, parsedContent);
+ }
+ };
+ AdaptiveApplet2.prototype.activityRequestFailed = function(response) {
+ return this.onActivityRequestFailed ? this.onActivityRequestFailed(this, response) : shared_1.GlobalSettings.applets.defaultTimeBetweenRetryAttempts;
+ };
+ AdaptiveApplet2.prototype.showAuthCodeInputDialog = function(request) {
+ var _this = this;
+ var showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog ? this.onShowAuthCodeInputDialog(this, request) : true;
+ if (showBuiltInAuthCodeInputCard) {
+ var authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);
+ authCodeInputCard.render();
+ authCodeInputCard.onExecuteAction = function(submitMagicCodeAction) {
+ if (_this.card && submitMagicCodeAction instanceof card_elements_1.SubmitAction) {
+ switch (submitMagicCodeAction.id) {
+ case AdaptiveApplet2._submitMagicCodeActionId:
+ var authCode = void 0;
+ if (submitMagicCodeAction.data && typeof submitMagicCodeAction.data["magicCode"] === "string") {
+ authCode = submitMagicCodeAction.data["magicCode"];
+ }
+ if (authCode) {
+ _this.displayCard(_this.card);
+ request.authCode = authCode;
+ void request.retryAsync();
+ } else {
+ alert("Please enter the magic code you received.");
+ }
+ break;
+ case AdaptiveApplet2._cancelMagicCodeAuthActionId:
+ logEvent(Enums.LogLevel.Warning, "Authentication cancelled by user.");
+ _this.displayCard(_this.card);
+ break;
+ default:
+ logEvent(Enums.LogLevel.Error, "Unexpected action taken from magic code input card (id = " + submitMagicCodeAction.id + ")");
+ alert(strings_1.Strings.magicCodeInputCard.somethingWentWrong());
+ break;
+ }
+ }
+ };
+ this.displayCard(authCodeInputCard);
+ }
+ };
+ AdaptiveApplet2.prototype.internalSendActivityRequestAsync = function(request) {
+ return __awaiter(this, void 0, void 0, function() {
+ var overlay, done, _loop_1, this_1, state_1;
+ return __generator(this, function(_a) {
+ switch (_a.label) {
+ case 0:
+ if (!this.channelAdapter) {
+ throw new Error("internalSendActivityRequestAsync: channelAdapter is not set.");
+ }
+ overlay = this.createProgressOverlay(request);
+ if (overlay !== void 0) {
+ this.renderedElement.appendChild(overlay);
+ }
+ done = false;
+ _loop_1 = function() {
+ var response, error_1, parsedContent, retryIn_1, attemptOAuth, left, top_1;
+ return __generator(this, function(_b) {
+ switch (_b.label) {
+ case 0:
+ response = void 0;
+ if (request.attemptNumber === 1) {
+ logEvent(Enums.LogLevel.Info, "Sending activity request to channel (attempt " + request.attemptNumber + ")");
+ } else {
+ logEvent(Enums.LogLevel.Info, "Re-sending activity request to channel (attempt " + request.attemptNumber + ")");
+ }
+ _b.label = 1;
+ case 1:
+ _b.trys.push([1, 3, , 4]);
+ return [4, this_1.channelAdapter.sendRequestAsync(request)];
+ case 2:
+ response = _b.sent();
+ return [3, 4];
+ case 3:
+ error_1 = _b.sent();
+ logEvent(Enums.LogLevel.Error, "Activity request failed: " + error_1);
+ this_1.removeProgressOverlay(request);
+ done = true;
+ return [3, 4];
+ case 4:
+ if (!response)
+ return [3, 10];
+ if (!(response instanceof activity_request_1.SuccessResponse))
+ return [3, 5];
+ this_1.removeProgressOverlay(request);
+ if (response.rawContent === void 0) {
+ throw new Error("internalSendActivityRequestAsync: Action.Execute result is undefined");
+ }
+ parsedContent = response.rawContent;
+ try {
+ parsedContent = JSON.parse(response.rawContent);
+ } catch (_c) {
+ }
+ if (typeof parsedContent === "string") {
+ logEvent(Enums.LogLevel.Info, "The activity request returned a string after " + request.attemptNumber + " attempt(s).");
+ this_1.activityRequestSucceeded(response, parsedContent);
+ } else if (typeof parsedContent === "object" && parsedContent["type"] === "AdaptiveCard") {
+ logEvent(Enums.LogLevel.Info, "The activity request returned an Adaptive Card after " + request.attemptNumber + " attempt(s).");
+ this_1.internalSetCard(parsedContent, request.consecutiveRefreshes);
+ this_1.activityRequestSucceeded(response, this_1.card);
+ } else {
+ throw new Error("internalSendActivityRequestAsync: Action.Execute result is of unsupported type (" + typeof response.rawContent + ")");
+ }
+ done = true;
+ return [3, 10];
+ case 5:
+ if (!(response instanceof activity_request_1.ErrorResponse))
+ return [3, 9];
+ retryIn_1 = this_1.activityRequestFailed(response);
+ if (!(retryIn_1 >= 0 && request.attemptNumber < shared_1.GlobalSettings.applets.maximumRetryAttempts))
+ return [3, 7];
+ logEvent(Enums.LogLevel.Warning, "Activity request failed: ".concat(response.error.message, ". Retrying in ").concat(retryIn_1, "ms"));
+ request.attemptNumber++;
+ return [4, new Promise(function(resolve, _reject) {
+ window.setTimeout(function() {
+ resolve();
+ }, retryIn_1);
+ })];
+ case 6:
+ _b.sent();
+ return [3, 8];
+ case 7:
+ logEvent(Enums.LogLevel.Error, "Activity request failed: ".concat(response.error.message, ". Giving up after ").concat(request.attemptNumber, " attempt(s)"));
+ this_1.removeProgressOverlay(request);
+ done = true;
+ _b.label = 8;
+ case 8:
+ return [3, 10];
+ case 9:
+ if (response instanceof activity_request_1.LoginRequestResponse) {
+ logEvent(Enums.LogLevel.Info, "The activity request returned a LoginRequestResponse after " + request.attemptNumber + " attempt(s).");
+ if (request.attemptNumber <= shared_1.GlobalSettings.applets.maximumRetryAttempts) {
+ attemptOAuth = true;
+ if (response.tokenExchangeResource && this_1.onSSOTokenNeeded) {
+ attemptOAuth = !this_1.onSSOTokenNeeded(this_1, request, response.tokenExchangeResource);
+ }
+ if (attemptOAuth) {
+ this_1.removeProgressOverlay(request);
+ if (response.signinButton === void 0) {
+ throw new Error("internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL.");
+ }
+ logEvent(Enums.LogLevel.Info, "Login required at " + response.signinButton.value);
+ if (this_1.onShowSigninPrompt) {
+ this_1.onShowSigninPrompt(this_1, request, response.signinButton);
+ } else {
+ this_1.showAuthCodeInputDialog(request);
+ left = window.screenX + (window.outerWidth - shared_1.GlobalSettings.applets.authPromptWidth) / 2;
+ top_1 = window.screenY + (window.outerHeight - shared_1.GlobalSettings.applets.authPromptHeight) / 2;
+ window.open(response.signinButton.value, response.signinButton.title ? response.signinButton.title : "Sign in", "width=".concat(shared_1.GlobalSettings.applets.authPromptWidth, ",height=").concat(shared_1.GlobalSettings.applets.authPromptHeight, ",left=").concat(left, ",top=").concat(top_1));
+ }
+ }
+ } else {
+ logEvent(Enums.LogLevel.Error, "Authentication failed. Giving up after " + request.attemptNumber + " attempt(s)");
+ alert(strings_1.Strings.magicCodeInputCard.authenticationFailed());
+ }
+ return [2, "break"];
+ } else {
+ throw new Error("Unhandled response type: " + JSON.stringify(response));
+ }
+ _b.label = 10;
+ case 10:
+ return [
+ 2
+ /*return*/
+ ];
+ }
+ });
+ };
+ this_1 = this;
+ _a.label = 1;
+ case 1:
+ if (!!done)
+ return [3, 3];
+ return [5, _loop_1()];
+ case 2:
+ state_1 = _a.sent();
+ if (state_1 === "break")
+ return [3, 3];
+ return [3, 1];
+ case 3:
+ return [
+ 2
+ /*return*/
+ ];
+ }
+ });
+ });
+ };
+ AdaptiveApplet2.prototype.refreshCard = function() {
+ if (this._card && this._card.refresh) {
+ this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Manual, 0);
+ }
+ };
+ AdaptiveApplet2.prototype.setCard = function(payload) {
+ this.internalSetCard(payload, 0);
+ };
+ Object.defineProperty(AdaptiveApplet2.prototype, "card", {
+ get: function() {
+ return this._card;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ AdaptiveApplet2._submitMagicCodeActionId = "submitMagicCode";
+ AdaptiveApplet2._cancelMagicCodeAuthActionId = "cancelMagicCodeAuth";
+ return AdaptiveApplet2;
+ }()
+ );
+ exports.AdaptiveApplet = AdaptiveApplet;
+ }
+});
+
+// node_modules/adaptivecards/lib/adaptivecards.js
+var require_adaptivecards = __commonJS({
+ "node_modules/adaptivecards/lib/adaptivecards.js"(exports) {
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() {
+ return m[k];
+ } };
+ }
+ Object.defineProperty(o, k2, desc);
+ } : function(o, m, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m[k];
+ });
+ var __exportStar = exports && exports.__exportStar || function(m, exports2) {
+ for (var p in m)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m, p);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ __exportStar(require_strings(), exports);
+ __exportStar(require_enums(), exports);
+ __exportStar(require_shared(), exports);
+ __exportStar(require_utils(), exports);
+ __exportStar(require_serialization(), exports);
+ __exportStar(require_host_capabilities(), exports);
+ __exportStar(require_host_config(), exports);
+ __exportStar(require_registry(), exports);
+ __exportStar(require_card_object(), exports);
+ __exportStar(require_card_elements(), exports);
+ __exportStar(require_table(), exports);
+ __exportStar(require_channel_adapter(), exports);
+ __exportStar(require_activity_request(), exports);
+ __exportStar(require_adaptive_applet(), exports);
+ }
+});
+export default require_adaptivecards();
+/*! Bundled license information:
+
+adaptivecards/lib/shared.js:
+ (**
+ * Fast UUID generator, RFC4122 version 4 compliant.
+ * @author Jeff Ward (jcward.com).
+ * @license MIT license
+ * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
+ **)
+*/
+//# sourceMappingURL=adaptivecards.js.map
diff --git a/docs/.vitepress/cache/deps/adaptivecards.js.map b/docs/.vitepress/cache/deps/adaptivecards.js.map
new file mode 100644
index 0000000..4b0a288
--- /dev/null
+++ b/docs/.vitepress/cache/deps/adaptivecards.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../../node_modules/adaptivecards/src/strings.ts", "../../../../node_modules/adaptivecards/src/enums.ts", "../../../../node_modules/adaptivecards/src/shared.ts", "../../../../node_modules/adaptivecards/src/utils.ts", "../../../../node_modules/adaptivecards/src/serialization.ts", "../../../../node_modules/adaptivecards/src/host-capabilities.ts", "../../../../node_modules/adaptivecards/src/host-config.ts", "../../../../node_modules/adaptivecards/src/registry.ts", "../../../../node_modules/adaptivecards/src/card-object.ts", "../../../../node_modules/adaptivecards/src/text-formatters.ts", "../../../../node_modules/adaptivecards/src/controls/constants.ts", "../../../../node_modules/adaptivecards/src/controls/menu-item.ts", "../../../../node_modules/adaptivecards/src/controls/collection.ts", "../../../../node_modules/adaptivecards/src/controls/popup-control.ts", "../../../../node_modules/adaptivecards/src/controls/popup-menu.ts", "../../../../node_modules/adaptivecards/src/controls/index.ts", "../../../../node_modules/adaptivecards/src/card-elements.ts", "../../../../node_modules/adaptivecards/src/table.ts", "../../../../node_modules/adaptivecards/src/channel-adapter.ts", "../../../../node_modules/adaptivecards/src/activity-request.ts", "../../../../node_modules/adaptivecards/src/adaptive-applet.ts", "../../../../node_modules/adaptivecards/src/adaptivecards.ts"],
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class Strings {\r\n static readonly errors = {\r\n unknownElementType: (typeName: string) =>\r\n `Unknown element type \"${typeName}\". Fallback will be used if present.`,\r\n unknownActionType: (typeName: string) =>\r\n `Unknown action type \"${typeName}\". Fallback will be used if present.`,\r\n elementTypeNotAllowed: (typeName: string) =>\r\n `Element type \"${typeName}\" is not allowed in this context.`,\r\n actionTypeNotAllowed: (typeName: string) =>\r\n `Action type \"${typeName}\" is not allowed in this context.`,\r\n invalidPropertyValue: (value: any, propertyName: string) =>\r\n `Invalid value \"${value}\" for property \"${propertyName}\".`,\r\n showCardMustHaveCard: () =>\r\n `\"An Action.ShowCard must have its \"card\" property set to a valid AdaptiveCard object.`,\r\n invalidColumnWidth: (invalidWidth: string) =>\r\n `Invalid column width \"${invalidWidth}\" - defaulting to \"auto\".`,\r\n invalidCardVersion: (defaultingToVersion: string) =>\r\n `Invalid card version. Defaulting to \"${defaultingToVersion}\".`,\r\n invalidVersionString: (versionString: string) =>\r\n `Invalid version string \"${versionString}\".`,\r\n propertyValueNotSupported: (\r\n value: any,\r\n propertyName: string,\r\n supportedInVersion: string,\r\n versionUsed: string\r\n ) =>\r\n `Value \"${value}\" for property \"${propertyName}\" is supported in version ${supportedInVersion}, but you are using version ${versionUsed}.`,\r\n propertyNotSupported: (\r\n propertyName: string,\r\n supportedInVersion: string,\r\n versionUsed: string\r\n ) =>\r\n `Property \"${propertyName}\" is supported in version ${supportedInVersion}, but you are using version ${versionUsed}.`,\r\n indexOutOfRange: (index: number) => `Index out of range (${index}).`,\r\n elementCannotBeUsedAsInline: () =>\r\n \"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.\",\r\n inlineAlreadyParented: () =>\r\n \"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.\",\r\n interactivityNotAllowed: () => \"Interactivity is not allowed.\",\r\n inputsMustHaveUniqueId: () => \"All inputs must have a unique Id.\",\r\n choiceSetMustHaveAtLeastOneChoice: () =>\r\n \"An Input.ChoiceSet must have at least one choice defined.\",\r\n choiceSetChoicesMustHaveTitleAndValue: () =>\r\n \"All choices in an Input.ChoiceSet must have their title and value properties set.\",\r\n propertyMustBeSet: (propertyName: string) => `Property \"${propertyName}\" must be set.`,\r\n actionHttpHeadersMustHaveNameAndValue: () =>\r\n \"All headers of an Action.Http must have their name and value properties set.\",\r\n tooManyActions: (maximumActions: number) =>\r\n `Maximum number of actions exceeded (${maximumActions}).`,\r\n tooLittleTimeDelay: (minAutoplayDelay: number) =>\r\n `Autoplay Delay is too short (${minAutoplayDelay}).`,\r\n columnAlreadyBelongsToAnotherSet: () => \"This column already belongs to another ColumnSet.\",\r\n invalidCardType: () =>\r\n `Invalid or missing card type. Make sure the card's type property is set to \"AdaptiveCard\".`,\r\n unsupportedCardVersion: (version: string, maxSupportedVersion: string) =>\r\n `The specified card version (${version}) is not supported or still in preview. The latest released card version is ${maxSupportedVersion}.`,\r\n duplicateId: (id: string) => `Duplicate Id \"${id}\".`,\r\n markdownProcessingNotEnabled: () =>\r\n \"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown\",\r\n processMarkdownEventRemoved: () =>\r\n \"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.\",\r\n elementAlreadyParented: () => \"The element already belongs to another container.\",\r\n actionAlreadyParented: () => \"The action already belongs to another element.\",\r\n elementTypeNotStandalone: (typeName: string) =>\r\n `Elements of type ${typeName} cannot be used as standalone elements.`\r\n };\r\n static readonly magicCodeInputCard = {\r\n tryAgain: () => \"That didn't work... let's try again.\",\r\n pleaseLogin: () =>\r\n 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"',\r\n enterMagicCode: () => \"Enter magic code\",\r\n pleaseEnterMagicCodeYouReceived: () => \"Please enter the magic code you received.\",\r\n submit: () => \"Submit\",\r\n cancel: () => \"Cancel\",\r\n somethingWentWrong: () => \"Something went wrong. This action can't be handled.\",\r\n authenticationFailed: () => \"Authentication failed.\"\r\n };\r\n static readonly runtime = {\r\n automaticRefreshPaused: () => \"Automatic refresh paused.\",\r\n clckToRestartAutomaticRefresh: () => \"Click to restart.\",\r\n refreshThisCard: () => \"Refresh this card\"\r\n };\r\n static readonly hints = {\r\n dontUseWeightedAndStrecthedColumnsInSameSet: () =>\r\n \"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.\"\r\n };\r\n static readonly defaults = {\r\n inlineActionTitle: () => \"Inline Action\",\r\n overflowButtonText: () => \"...\",\r\n mediaPlayerAriaLabel: () => \"Media content\",\r\n mediaPlayerPlayMedia: () => \"Play media\",\r\n youTubeVideoPlayer: () => \"YouTube video player\",\r\n vimeoVideoPlayer: () => \"Vimeo video player\",\r\n dailymotionVideoPlayer: () => \"Dailymotion video player\"\r\n };\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n/*\r\n This should really be a string enum, e.g.\r\n\r\n export enum ContainerStyle {\r\n Default = \"default\",\r\n Emphasis = \"emphasis\"\r\n }\r\n\r\n However, some hosts do not use a version of TypeScript\r\n recent enough to understand string enums. This is\r\n a compatible construct that does not require using\r\n a more recent version of TypeScript.\r\n\r\n Also note the \"weird\" way these readonly fields are declared is to work around\r\n a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n and adopt this syntax for all other static readonly fields.\r\n*/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\nexport class ContainerStyle {\r\n static readonly Default: \"default\" = \"default\";\r\n static readonly Emphasis: \"emphasis\" = \"emphasis\";\r\n static readonly Accent: \"accent\" = \"accent\";\r\n static readonly Good: \"good\" = \"good\";\r\n static readonly Attention: \"attention\" = \"attention\";\r\n static readonly Warning: \"warning\" = \"warning\";\r\n}\r\n\r\nexport class ActionStyle {\r\n static readonly Default: \"default\" = \"default\";\r\n static readonly Positive: \"positive\" = \"positive\";\r\n static readonly Destructive: \"destructive\" = \"destructive\";\r\n}\r\n\r\nexport class ActionMode {\r\n static readonly Primary: \"primary\" = \"primary\";\r\n static readonly Secondary: \"secondary\" = \"secondary\";\r\n}\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\n\r\nexport enum Size {\r\n Auto,\r\n Stretch,\r\n Small,\r\n Medium,\r\n Large\r\n}\r\n\r\nexport enum ImageSize {\r\n Small,\r\n Medium,\r\n Large\r\n}\r\n\r\nexport enum SizeUnit {\r\n Weight,\r\n Pixel\r\n}\r\n\r\nexport enum TextSize {\r\n Small,\r\n Default,\r\n Medium,\r\n Large,\r\n ExtraLarge\r\n}\r\n\r\nexport enum TextWeight {\r\n Lighter,\r\n Default,\r\n Bolder\r\n}\r\n\r\nexport enum FontType {\r\n Default,\r\n Monospace\r\n}\r\n\r\nexport enum Spacing {\r\n None,\r\n Small,\r\n Default,\r\n Medium,\r\n Large,\r\n ExtraLarge,\r\n Padding\r\n}\r\n\r\nexport enum TextColor {\r\n Default,\r\n Dark,\r\n Light,\r\n Accent,\r\n Good,\r\n Warning,\r\n Attention\r\n}\r\n\r\nexport enum HorizontalAlignment {\r\n Left,\r\n Center,\r\n Right\r\n}\r\n\r\nexport enum VerticalAlignment {\r\n Top,\r\n Center,\r\n Bottom\r\n}\r\n\r\nexport enum ActionAlignment {\r\n Left,\r\n Center,\r\n Right,\r\n Stretch\r\n}\r\n\r\nexport enum ImageStyle {\r\n Default,\r\n Person\r\n}\r\n\r\nexport enum ShowCardActionMode {\r\n Inline,\r\n Popup\r\n}\r\n\r\nexport enum Orientation {\r\n Horizontal,\r\n Vertical\r\n}\r\n\r\nexport enum FillMode {\r\n Cover,\r\n RepeatHorizontally,\r\n RepeatVertically,\r\n Repeat\r\n}\r\n\r\nexport enum ActionIconPlacement {\r\n LeftOfTitle,\r\n AboveTitle\r\n}\r\n\r\nexport enum InputTextStyle {\r\n Text,\r\n Tel,\r\n Url,\r\n Email,\r\n Password\r\n}\r\n\r\nexport enum ValidationPhase {\r\n Parse,\r\n ToJSON,\r\n Validation\r\n}\r\n\r\nexport enum ValidationEvent {\r\n Hint,\r\n ActionTypeNotAllowed,\r\n CollectionCantBeEmpty,\r\n Deprecated,\r\n ElementTypeNotAllowed,\r\n InteractivityNotAllowed,\r\n InvalidPropertyValue,\r\n MissingCardType,\r\n PropertyCantBeNull,\r\n TooManyActions,\r\n UnknownActionType,\r\n UnknownElementType,\r\n UnsupportedCardVersion,\r\n DuplicateId,\r\n UnsupportedProperty,\r\n RequiredInputsShouldHaveLabel,\r\n RequiredInputsShouldHaveErrorMessage,\r\n Other\r\n}\r\n\r\nexport enum ContainerFitStatus {\r\n FullyInContainer,\r\n Overflowing,\r\n FullyOutOfContainer\r\n}\r\n\r\nexport enum TypeErrorType {\r\n UnknownType,\r\n ForbiddenType\r\n}\r\n\r\nexport enum RefreshMode {\r\n Disabled,\r\n Manual,\r\n Automatic\r\n}\r\n\r\nexport enum LogLevel {\r\n Info,\r\n Warning,\r\n Error\r\n}", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\n\r\nexport type Refresh = {\r\n mode: Enums.RefreshMode;\r\n timeBetweenAutomaticRefreshes: number;\r\n maximumConsecutiveAutomaticRefreshes: number;\r\n allowManualRefreshesAfterAutomaticRefreshes: boolean;\r\n};\r\n\r\nexport type AppletsSettings = {\r\n logEnabled: boolean;\r\n logLevel: Enums.LogLevel;\r\n maximumRetryAttempts: number;\r\n defaultTimeBetweenRetryAttempts: number;\r\n authPromptWidth: number;\r\n authPromptHeight: number;\r\n readonly refresh: Refresh;\r\n onLogEvent?: (level: Enums.LogLevel, message?: any, ...optionalParams: any[]) => void;\r\n};\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class GlobalSettings {\r\n static useAdvancedTextBlockTruncation: boolean = true;\r\n static useAdvancedCardBottomTruncation: boolean = false;\r\n static useMarkdownInRadioButtonAndCheckbox: boolean = true;\r\n static allowMarkForTextHighlighting: boolean = false;\r\n static alwaysBleedSeparators: boolean = false;\r\n static enableFullJsonRoundTrip: boolean = false;\r\n static displayInputValidationErrors: boolean = true;\r\n static allowPreProcessingPropertyValues: boolean = false;\r\n static setTabIndexAtCardRoot: boolean = true;\r\n static enableFallback: boolean = true;\r\n static useWebkitLineClamp: boolean = true;\r\n static allowMoreThanMaxActionsInOverflowMenu: boolean = false;\r\n static removePaddingFromContainersWithBackgroundImage: boolean = false;\r\n static resetInputsDirtyStateAfterActionExecution: boolean = true;\r\n\r\n static readonly applets: AppletsSettings = {\r\n logEnabled: true,\r\n logLevel: Enums.LogLevel.Error,\r\n maximumRetryAttempts: 3,\r\n defaultTimeBetweenRetryAttempts: 3000, // 3 seconds\r\n authPromptWidth: 400,\r\n authPromptHeight: 600,\r\n refresh: {\r\n mode: Enums.RefreshMode.Manual,\r\n timeBetweenAutomaticRefreshes: 3000, // 3 seconds\r\n maximumConsecutiveAutomaticRefreshes: 3,\r\n allowManualRefreshesAfterAutomaticRefreshes: true\r\n }\r\n };\r\n}\r\n\r\nexport const ContentTypes = {\r\n applicationJson: \"application/json\",\r\n applicationXWwwFormUrlencoded: \"application/x-www-form-urlencoded\"\r\n};\r\n\r\nexport interface ISeparationDefinition {\r\n spacing: number;\r\n lineThickness?: number;\r\n lineColor?: string;\r\n}\r\n\r\nexport interface IInput {\r\n id?: string;\r\n value?: string;\r\n validateValue(): boolean;\r\n}\r\n\r\nexport type Dictionary = { [key: string]: T };\r\n\r\nexport class StringWithSubstitutions {\r\n private _isProcessed: boolean = false;\r\n private _original?: string;\r\n private _processed?: string;\r\n\r\n getReferencedInputs(inputs: IInput[], referencedInputs: Dictionary) {\r\n if (!referencedInputs) {\r\n throw new Error(\"The referencedInputs parameter cannot be null.\");\r\n }\r\n\r\n if (this._original) {\r\n for (const input of inputs) {\r\n const matches = new RegExp(\"\\\\{{2}(\" + input.id + \").value\\\\}{2}\", \"gi\").exec(\r\n this._original\r\n );\r\n\r\n if (matches != null && input.id) {\r\n referencedInputs[input.id] = input;\r\n }\r\n }\r\n }\r\n }\r\n\r\n substituteInputValues(inputs: Dictionary, contentType: string) {\r\n this._processed = this._original;\r\n\r\n if (this._original) {\r\n const regEx = /\\{{2}([a-z0-9_$@]+).value\\}{2}/gi;\r\n let matches;\r\n\r\n while ((matches = regEx.exec(this._original)) !== null && this._processed) {\r\n for (const key of Object.keys(inputs)) {\r\n if (key.toLowerCase() === matches[1].toLowerCase()) {\r\n const matchedInput = inputs[key];\r\n\r\n let valueForReplace = \"\";\r\n\r\n if (matchedInput.value) {\r\n valueForReplace = matchedInput.value;\r\n }\r\n\r\n if (contentType === ContentTypes.applicationJson) {\r\n valueForReplace = JSON.stringify(valueForReplace);\r\n valueForReplace = valueForReplace.slice(1, -1);\r\n } else if (contentType === ContentTypes.applicationXWwwFormUrlencoded) {\r\n valueForReplace = encodeURIComponent(valueForReplace);\r\n }\r\n\r\n this._processed = this._processed.replace(matches[0], valueForReplace);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this._isProcessed = true;\r\n }\r\n\r\n getOriginal(): string | undefined {\r\n return this._original;\r\n }\r\n\r\n get(): string | undefined {\r\n if (!this._isProcessed) {\r\n return this._original;\r\n } else {\r\n return this._processed;\r\n }\r\n }\r\n\r\n set(value: string | undefined) {\r\n this._original = value;\r\n this._isProcessed = false;\r\n }\r\n}\r\n\r\nexport class SpacingDefinition {\r\n left: number = 0;\r\n top: number = 0;\r\n right: number = 0;\r\n bottom: number = 0;\r\n\r\n constructor(top: number = 0, right: number = 0, bottom: number = 0, left: number = 0) {\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n}\r\n\r\nexport class PaddingDefinition {\r\n top: Enums.Spacing = Enums.Spacing.None;\r\n right: Enums.Spacing = Enums.Spacing.None;\r\n bottom: Enums.Spacing = Enums.Spacing.None;\r\n left: Enums.Spacing = Enums.Spacing.None;\r\n\r\n constructor(\r\n top: Enums.Spacing = Enums.Spacing.None,\r\n right: Enums.Spacing = Enums.Spacing.None,\r\n bottom: Enums.Spacing = Enums.Spacing.None,\r\n left: Enums.Spacing = Enums.Spacing.None\r\n ) {\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n}\r\n\r\nexport class SizeAndUnit {\r\n physicalSize: number;\r\n unit: Enums.SizeUnit;\r\n\r\n static parse(input: string, requireUnitSpecifier: boolean = false): SizeAndUnit {\r\n const result = new SizeAndUnit(0, Enums.SizeUnit.Weight);\r\n\r\n if (typeof input === \"number\") {\r\n result.physicalSize = input;\r\n\r\n return result;\r\n } else if (typeof input === \"string\") {\r\n const regExp = /^([0-9]+)(px|\\*)?$/g;\r\n const matches = regExp.exec(input);\r\n const expectedMatchCount = requireUnitSpecifier ? 3 : 2;\r\n\r\n if (matches && matches.length >= expectedMatchCount) {\r\n result.physicalSize = parseInt(matches[1]);\r\n\r\n if (matches.length === 3) {\r\n if (matches[2] === \"px\") {\r\n result.unit = Enums.SizeUnit.Pixel;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n\r\n throw new Error(\"Invalid size: \" + input);\r\n }\r\n\r\n constructor(physicalSize: number, unit: Enums.SizeUnit) {\r\n this.physicalSize = physicalSize;\r\n this.unit = unit;\r\n }\r\n}\r\n\r\nexport interface IResourceInformation {\r\n url: string;\r\n mimeType: string;\r\n}\r\n\r\n/**\r\n * Fast UUID generator, RFC4122 version 4 compliant.\r\n * @author Jeff Ward (jcward.com).\r\n * @license MIT license\r\n * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\r\n **/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\nexport class UUID {\r\n private static lut: string[] = [];\r\n\r\n static generate(): string {\r\n const d0 = (Math.random() * 0xffffffff) | 0;\r\n const d1 = (Math.random() * 0xffffffff) | 0;\r\n const d2 = (Math.random() * 0xffffffff) | 0;\r\n const d3 = (Math.random() * 0xffffffff) | 0;\r\n\r\n return (\r\n UUID.lut[d0 & 0xff] +\r\n UUID.lut[(d0 >> 8) & 0xff] +\r\n UUID.lut[(d0 >> 16) & 0xff] +\r\n UUID.lut[(d0 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[d1 & 0xff] +\r\n UUID.lut[(d1 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[((d1 >> 16) & 0x0f) | 0x40] +\r\n UUID.lut[(d1 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 & 0x3f) | 0x80] +\r\n UUID.lut[(d2 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 >> 16) & 0xff] +\r\n UUID.lut[(d2 >> 24) & 0xff] +\r\n UUID.lut[d3 & 0xff] +\r\n UUID.lut[(d3 >> 8) & 0xff] +\r\n UUID.lut[(d3 >> 16) & 0xff] +\r\n UUID.lut[(d3 >> 24) & 0xff]\r\n );\r\n }\r\n\r\n static initialize() {\r\n for (let i = 0; i < 256; i++) {\r\n UUID.lut[i] = (i < 16 ? \"0\" : \"\") + i.toString(16);\r\n }\r\n }\r\n}\r\n\r\nUUID.initialize();\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport * as Shared from \"./shared\";\r\n\r\n// To work around TypeScript complaining about documentMode not being declared\r\n// on type Document\r\ndeclare global {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n interface Document {\r\n documentMode?: any;\r\n }\r\n}\r\n\r\nexport function isInternetExplorer(): boolean {\r\n // The documentMode property only exists in IE\r\n return window.document.documentMode !== undefined;\r\n}\r\n\r\nexport function isMobileOS(): boolean {\r\n const userAgent = window.navigator.userAgent;\r\n\r\n return (\r\n !!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i)\r\n );\r\n}\r\n\r\n/**\r\n * Generate a UUID prepended with \"__ac-\"\r\n */\r\nexport function generateUniqueId(): string {\r\n return \"__ac-\" + Shared.UUID.generate();\r\n}\r\n\r\nexport function appendChild(node: Node, child: Node | undefined) {\r\n if (child) {\r\n node.appendChild(child);\r\n }\r\n}\r\n\r\nexport function parseString(obj: any, defaultValue?: string): string | undefined {\r\n return typeof obj === \"string\" ? obj : defaultValue;\r\n}\r\n\r\nexport function parseNumber(obj: any, defaultValue?: number): number | undefined {\r\n return typeof obj === \"number\" ? obj : defaultValue;\r\n}\r\n\r\nexport function parseBool(value: any, defaultValue?: boolean): boolean | undefined {\r\n if (typeof value === \"boolean\") {\r\n return value;\r\n } else if (typeof value === \"string\") {\r\n switch (value.toLowerCase()) {\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n default:\r\n return defaultValue;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n}\r\n\r\nexport function getEnumValueByName(\r\n enumType: { [s: number]: string },\r\n name: string\r\n): number | undefined {\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in enumType) {\r\n const keyAsNumber = parseInt(key, 10);\r\n\r\n if (keyAsNumber >= 0) {\r\n const value = enumType[key];\r\n\r\n if (value && typeof value === \"string\" && value.toLowerCase() === name.toLowerCase()) {\r\n return keyAsNumber;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nexport function parseEnum(\r\n enumType: { [s: number]: string },\r\n name: string,\r\n defaultValue?: number\r\n): number | undefined {\r\n if (!name) {\r\n return defaultValue;\r\n }\r\n\r\n const enumValue = getEnumValueByName(enumType, name);\r\n\r\n return enumValue !== undefined ? enumValue : defaultValue;\r\n}\r\n\r\nexport function stringToCssColor(color: string | undefined): string | undefined {\r\n if (color) {\r\n const regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;\r\n const matches = regEx.exec(color);\r\n\r\n if (matches && matches[4]) {\r\n const a = parseInt(matches[1], 16) / 255;\r\n const r = parseInt(matches[2], 16);\r\n const g = parseInt(matches[3], 16);\r\n const b = parseInt(matches[4], 16);\r\n\r\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\";\r\n }\r\n }\r\n\r\n return color;\r\n}\r\n\r\nfunction truncateWorker(\r\n element: HTMLElement,\r\n maxHeight: number,\r\n fullText: string,\r\n truncateAt: (text: string, idx: number) => void,\r\n lineHeight?: number\r\n) {\r\n const fits = () => {\r\n // Allow a one pixel overflow to account for rounding differences\r\n // between browsers\r\n return maxHeight - element.scrollHeight >= -1.0;\r\n };\r\n\r\n if (fits()) {\r\n return;\r\n }\r\n\r\n const breakableIndices = findBreakableIndices(fullText);\r\n let lo = 0;\r\n let hi = breakableIndices.length;\r\n let bestBreakIdx = 0;\r\n\r\n // Do a binary search for the longest string that fits\r\n while (lo < hi) {\r\n const mid = Math.floor((lo + hi) / 2);\r\n truncateAt(fullText, breakableIndices[mid]);\r\n\r\n if (fits()) {\r\n bestBreakIdx = breakableIndices[mid];\r\n lo = mid + 1;\r\n } else {\r\n hi = mid;\r\n }\r\n }\r\n\r\n truncateAt(fullText, bestBreakIdx);\r\n\r\n // If we have extra room, try to expand the string letter by letter\r\n // (covers the case where we have to break in the middle of a long word)\r\n if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1.0) {\r\n let idx = findNextCharacter(fullText, bestBreakIdx);\r\n\r\n while (idx < fullText.length) {\r\n truncateAt(fullText, idx);\r\n\r\n if (fits()) {\r\n bestBreakIdx = idx;\r\n idx = findNextCharacter(fullText, idx);\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n truncateAt(fullText, bestBreakIdx);\r\n }\r\n}\r\n\r\nexport function truncateText(element: HTMLElement, maxHeight: number, lineHeight?: number) {\r\n truncateWorker(\r\n element,\r\n maxHeight,\r\n element.innerText,\r\n (text: string, idx: number) => {\r\n element.innerText = text.substring(0, idx) + \"...\";\r\n },\r\n lineHeight\r\n );\r\n}\r\n\r\n/**\r\n * {@link truncate} has been deprecated and is no longer in use internally. This policy passes\r\n * content through as it always has, which is _supposed_ to be dealing with text only (see {@link\r\n * TextBlock.truncateIfSupported}), but had a bug where it might actually pass through an element\r\n * for which innerHTML yielded actual HTML (since fixed).\r\n */\r\nconst ttDeprecatedPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(\"adaptivecards#deprecatedExportedFunctionPolicy\", {\r\n createHTML: (value) => value\r\n});\r\n\r\n/** @deprecated Use {@link truncateText} instead. */\r\nexport function truncate(element: HTMLElement, maxHeight: number, lineHeight?: number) {\r\n truncateWorker(\r\n element,\r\n maxHeight,\r\n element.innerHTML,\r\n (text: string, idx: number) => {\r\n const truncatedString = text.substring(0, idx) + \"...\";\r\n const truncatedHTML =\r\n ttDeprecatedPolicy?.createHTML(truncatedString) ?? truncatedString;\r\n element.innerHTML = truncatedHTML as string;\r\n },\r\n lineHeight\r\n );\r\n}\r\n\r\nfunction findBreakableIndices(html: string): number[] {\r\n const results: number[] = [];\r\n let idx = findNextCharacter(html, -1);\r\n\r\n while (idx < html.length) {\r\n if (html[idx] === \" \") {\r\n results.push(idx);\r\n }\r\n\r\n idx = findNextCharacter(html, idx);\r\n }\r\n\r\n return results;\r\n}\r\n\r\nfunction findNextCharacter(html: string, currIdx: number): number {\r\n currIdx += 1;\r\n\r\n // If we found the start of an HTML tag, keep advancing until we get\r\n // past it, so we don't end up truncating in the middle of the tag\r\n while (currIdx < html.length && html[currIdx] === \"<\") {\r\n while (currIdx < html.length && html[currIdx++] !== \">\") {\r\n continue;\r\n }\r\n }\r\n\r\n return currIdx;\r\n}\r\n\r\nexport function getFitStatus(element: HTMLElement, containerEnd: number): Enums.ContainerFitStatus {\r\n const start = element.offsetTop;\r\n const end = start + element.clientHeight;\r\n\r\n if (end <= containerEnd) {\r\n return Enums.ContainerFitStatus.FullyInContainer;\r\n } else if (start < containerEnd) {\r\n return Enums.ContainerFitStatus.Overflowing;\r\n } else {\r\n return Enums.ContainerFitStatus.FullyOutOfContainer;\r\n }\r\n}\r\n\r\nexport function getScrollX(): number {\r\n return window.pageXOffset;\r\n}\r\n\r\nexport function getScrollY(): number {\r\n return window.pageYOffset;\r\n}\r\n\r\nexport function clearElementChildren(element: HTMLElement) {\r\n while (element.firstChild) {\r\n element.removeChild(element.firstChild);\r\n }\r\n}", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { GlobalSettings, SizeAndUnit } from \"./shared\";\r\nimport * as Utils from \"./utils\";\r\nimport * as Enums from \"./enums\";\r\nimport { Strings } from \"./strings\";\r\n\r\nexport interface IValidationEvent {\r\n source?: SerializableObject;\r\n phase: Enums.ValidationPhase;\r\n event: Enums.ValidationEvent;\r\n message: string;\r\n}\r\n\r\nexport class Version {\r\n private _versionString: string;\r\n private _major: number;\r\n private _minor: number;\r\n private _isValid: boolean = true;\r\n private _label?: string;\r\n\r\n constructor(major: number = 1, minor: number = 1, label?: string) {\r\n this._major = major;\r\n this._minor = minor;\r\n this._label = label;\r\n }\r\n\r\n static parse(versionString: string, context: BaseSerializationContext): Version | undefined {\r\n if (!versionString) {\r\n return undefined;\r\n }\r\n\r\n const result = new Version();\r\n result._versionString = versionString;\r\n\r\n const regEx = /(\\d+).(\\d+)/gi;\r\n const matches = regEx.exec(versionString);\r\n\r\n if (matches != null && matches.length === 3) {\r\n result._major = parseInt(matches[1]);\r\n result._minor = parseInt(matches[2]);\r\n } else {\r\n result._isValid = false;\r\n }\r\n\r\n if (!result._isValid) {\r\n context.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidVersionString(result._versionString)\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toString(): string {\r\n return !this._isValid ? this._versionString : this._major + \".\" + this._minor;\r\n }\r\n\r\n toJSON(): any {\r\n return this.toString();\r\n }\r\n\r\n compareTo(otherVersion: Version): number {\r\n if (!this.isValid || !otherVersion.isValid) {\r\n throw new Error(\"Cannot compare invalid version.\");\r\n }\r\n\r\n if (this.major > otherVersion.major) {\r\n return 1;\r\n } else if (this.major < otherVersion.major) {\r\n return -1;\r\n } else if (this.minor > otherVersion.minor) {\r\n return 1;\r\n } else if (this.minor < otherVersion.minor) {\r\n return -1;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n get label(): string {\r\n return this._label ? this._label : this.toString();\r\n }\r\n\r\n get major(): number {\r\n return this._major;\r\n }\r\n\r\n get minor(): number {\r\n return this._minor;\r\n }\r\n\r\n get isValid(): boolean {\r\n return this._isValid;\r\n }\r\n}\r\n\r\nexport type TargetVersion = Version | \"*\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class Versions {\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n static readonly v1_0 = new Version(1, 0);\r\n static readonly v1_1 = new Version(1, 1);\r\n static readonly v1_2 = new Version(1, 2);\r\n static readonly v1_3 = new Version(1, 3);\r\n static readonly v1_4 = new Version(1, 4);\r\n static readonly v1_5 = new Version(1, 5);\r\n // If preview tag is added/removed from any version,\r\n // don't forget to update .ac-schema-version-1-?::after too in adaptivecards-site\\themes\\adaptivecards\\source\\css\\style.css\r\n static readonly v1_6 = new Version(1, 6, \"1.6 Preview\");\r\n static readonly latest = Versions.v1_5;\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n\r\n static getAllDeclaredVersions(): Version[] {\r\n const ctor = Versions;\r\n const properties: Version[] = [];\r\n\r\n for (const propertyName in ctor) {\r\n if (propertyName.match(/^v[0-9_]*$/)) {\r\n // filter latest\r\n try {\r\n const propertyValue = ctor[propertyName];\r\n\r\n if (propertyValue instanceof Version) {\r\n properties.push(propertyValue);\r\n }\r\n } catch {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n }\r\n return properties.sort((v1: Version, v2: Version) => v1.compareTo(v2));\r\n }\r\n}\r\n\r\nexport function isVersionLessOrEqual(\r\n version: TargetVersion,\r\n targetVersion: TargetVersion\r\n): boolean {\r\n if (version instanceof Version) {\r\n if (targetVersion instanceof Version) {\r\n return targetVersion.compareTo(version) >= 0;\r\n } else {\r\n // Target version is *\r\n return true;\r\n }\r\n } else {\r\n // Version is *\r\n return true;\r\n }\r\n}\r\n\r\nexport abstract class BaseSerializationContext {\r\n private _validationEvents: IValidationEvent[] = [];\r\n\r\n toJSONOriginalParam: any;\r\n targetVersion: Version;\r\n\r\n constructor(targetVersion: Version = Versions.latest) {\r\n this.targetVersion = targetVersion;\r\n }\r\n\r\n serializeValue(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue: any,\r\n defaultValue: any = undefined,\r\n forceDeleteIfNullOrDefault: boolean = false\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {\r\n delete target[propertyName];\r\n }\r\n } else if (propertyValue === defaultValue) {\r\n delete target[propertyName];\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeString(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue?: string,\r\n defaultValue?: string\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeBool(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue?: boolean,\r\n defaultValue?: boolean\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeNumber(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue?: number,\r\n defaultValue?: number\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue ||\r\n isNaN(propertyValue)\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = propertyValue;\r\n }\r\n }\r\n\r\n serializeEnum(\r\n enumType: { [s: number]: string },\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue: number | undefined,\r\n defaultValue: number | undefined = undefined\r\n ) {\r\n if (\r\n propertyValue === null ||\r\n propertyValue === undefined ||\r\n propertyValue === defaultValue\r\n ) {\r\n if (!GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n target[propertyName] = enumType[propertyValue];\r\n }\r\n }\r\n\r\n serializeArray(\r\n target: { [key: string]: any },\r\n propertyName: string,\r\n propertyValue: any[] | undefined\r\n ) {\r\n const items = [];\r\n\r\n if (propertyValue) {\r\n for (const item of propertyValue) {\r\n let serializedItem: any = undefined;\r\n\r\n if (item instanceof SerializableObject) {\r\n serializedItem = item.toJSON(this);\r\n } else if (item.toJSON) {\r\n serializedItem = item.toJSON();\r\n } else {\r\n serializedItem = item;\r\n }\r\n\r\n if (serializedItem !== undefined) {\r\n items.push(serializedItem);\r\n }\r\n }\r\n }\r\n\r\n if (items.length === 0) {\r\n if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n } else {\r\n this.serializeValue(target, propertyName, items);\r\n }\r\n }\r\n\r\n clearEvents() {\r\n this._validationEvents = [];\r\n }\r\n\r\n logEvent(\r\n source: SerializableObject | undefined,\r\n phase: Enums.ValidationPhase,\r\n event: Enums.ValidationEvent,\r\n message: string\r\n ) {\r\n this._validationEvents.push({\r\n source: source,\r\n phase: phase,\r\n event: event,\r\n message: message\r\n });\r\n }\r\n\r\n logParseEvent(\r\n source: SerializableObject | undefined,\r\n event: Enums.ValidationEvent,\r\n message: string\r\n ) {\r\n this.logEvent(source, Enums.ValidationPhase.Parse, event, message);\r\n }\r\n\r\n getEventAt(index: number): IValidationEvent {\r\n return this._validationEvents[index];\r\n }\r\n\r\n get eventCount(): number {\r\n return this._validationEvents.length;\r\n }\r\n}\r\n\r\nclass SimpleSerializationContext extends BaseSerializationContext {}\r\n\r\nexport class PropertyDefinition {\r\n private static _sequentialNumber: number = 0;\r\n\r\n getInternalName(): string {\r\n return this.name;\r\n }\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): any {\r\n return source[this.name];\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: any,\r\n context: BaseSerializationContext\r\n ): void {\r\n context.serializeValue(target, this.name, value, this.defaultValue);\r\n }\r\n\r\n readonly sequentialNumber: number;\r\n\r\n isSerializationEnabled: boolean = true;\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: any,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => any\r\n ) {\r\n this.sequentialNumber = PropertyDefinition._sequentialNumber;\r\n\r\n PropertyDefinition._sequentialNumber++;\r\n }\r\n}\r\n\r\nexport class StringProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): string | undefined {\r\n const parsedValue = Utils.parseString(source[this.name], this.defaultValue);\r\n const isUndefined =\r\n parsedValue === undefined || (parsedValue === \"\" && this.treatEmptyAsUndefined);\r\n\r\n if (!isUndefined && this.regEx !== undefined) {\r\n const matches = this.regEx.exec(parsedValue);\r\n\r\n if (!matches) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(parsedValue, this.name)\r\n );\r\n\r\n return undefined;\r\n }\r\n }\r\n\r\n return parsedValue;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeString(\r\n target,\r\n this.name,\r\n value === \"\" && this.treatEmptyAsUndefined ? undefined : value,\r\n this.defaultValue\r\n );\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly treatEmptyAsUndefined: boolean = true,\r\n readonly regEx?: RegExp,\r\n readonly defaultValue?: string,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class BoolProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): boolean | undefined {\r\n return Utils.parseBool(source[this.name], this.defaultValue);\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: object,\r\n value: boolean | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeBool(target, this.name, value, this.defaultValue);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: boolean,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => any\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class NumProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n return Utils.parseNumber(source[this.name], this.defaultValue);\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeNumber(target, this.name, value, this.defaultValue);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: number,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => any\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class PixelSizeProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n let result: number | undefined = undefined;\r\n const value = source[this.name];\r\n\r\n if (typeof value === \"string\") {\r\n let isValid = false;\r\n\r\n try {\r\n const size = SizeAndUnit.parse(value, true);\r\n\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n\r\n isValid = true;\r\n }\r\n } catch {\r\n // Do nothing. A parse error is emitted below\r\n }\r\n\r\n if (!isValid) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(source[this.name], \"minHeight\")\r\n );\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined\r\n );\r\n }\r\n}\r\n\r\nexport interface IVersionedValue {\r\n value: TValue;\r\n targetVersion?: Version;\r\n}\r\n\r\nexport class StringArrayProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): string[] | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined || !Array.isArray(sourceValue)) {\r\n return this.defaultValue;\r\n }\r\n\r\n const result: string[] = [];\r\n\r\n for (const value of sourceValue) {\r\n if (typeof value === \"string\") {\r\n result.push(value);\r\n } else {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n `Invalid array value \"${JSON.stringify(\r\n value\r\n )}\" of type \"${typeof value}\" ignored for \"${this.name}\".`\r\n );\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: string[] | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeArray(target, this.name, value);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: string[],\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string[] | undefined\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class ValueSetProperty extends PropertyDefinition {\r\n isValidValue(value: string, context: BaseSerializationContext): boolean {\r\n for (const versionedValue of this.values) {\r\n if (value.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n return targetVersion.compareTo(context.targetVersion) <= 0;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): string | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n\r\n if (typeof sourceValue === \"string\") {\r\n for (const versionedValue of this.values) {\r\n if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return versionedValue.value;\r\n } else {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.propertyValueNotSupported(\r\n sourceValue,\r\n this.name,\r\n targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(sourceValue, this.name)\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n let invalidValue = false;\r\n\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n\r\n for (const versionedValue of this.values) {\r\n if (versionedValue.value === value) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n\r\n break;\r\n } else {\r\n context.logEvent(\r\n sender,\r\n Enums.ValidationPhase.ToJSON,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.propertyValueNotSupported(\r\n value,\r\n this.name,\r\n targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!invalidValue) {\r\n context.serializeValue(target, this.name, value, this.defaultValue, true);\r\n }\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly values: IVersionedValue[],\r\n readonly defaultValue?: string,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n }\r\n}\r\n\r\nexport class EnumProperty extends PropertyDefinition {\r\n private _values: IVersionedValue[] = [];\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (typeof sourceValue !== \"string\") {\r\n return this.defaultValue;\r\n }\r\n\r\n const enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);\r\n\r\n if (enumValue !== undefined) {\r\n for (const versionedValue of this.values) {\r\n if (versionedValue.value === enumValue) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return enumValue;\r\n } else {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.propertyValueNotSupported(\r\n sourceValue,\r\n this.name,\r\n targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(sourceValue, this.name)\r\n );\r\n\r\n return this.defaultValue;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n let invalidValue = false;\r\n\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n\r\n for (const versionedValue of this.values) {\r\n if (versionedValue.value === value) {\r\n const targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n\r\n break;\r\n } else {\r\n context.logEvent(\r\n sender,\r\n Enums.ValidationPhase.ToJSON,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(value, this.name)\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!invalidValue) {\r\n context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);\r\n }\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly enumType: TEnum,\r\n readonly defaultValue?: number,\r\n values?: IVersionedValue[],\r\n readonly onGetInitialValue?: (sender: SerializableObject) => number\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n\r\n if (!values) {\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in enumType) {\r\n const keyAsNumber = parseInt(key, 10);\r\n\r\n if (keyAsNumber >= 0) {\r\n this._values.push({ value: keyAsNumber });\r\n }\r\n }\r\n } else {\r\n this._values = values;\r\n }\r\n }\r\n\r\n get values(): IVersionedValue[] {\r\n return this._values;\r\n }\r\n}\r\n\r\nexport type SerializableObjectType = { new (): SerializableObject };\r\n\r\nexport class SerializableObjectProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): SerializableObject | undefined {\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined) {\r\n return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;\r\n }\r\n\r\n const result = new this.objectType();\r\n result.parse(sourceValue, context);\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: SerializableObject | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n let serializedValue: object | undefined = undefined;\r\n\r\n if (value !== undefined && !value.hasAllDefaultValues()) {\r\n serializedValue = value.toJSON(context);\r\n }\r\n\r\n if (typeof serializedValue === \"object\" && Object.keys(serializedValue).length === 0) {\r\n serializedValue = undefined;\r\n }\r\n\r\n context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly objectType: SerializableObjectType,\r\n readonly nullable: boolean = false,\r\n defaultValue?: SerializableObject\r\n ) {\r\n super(targetVersion, name, defaultValue, (sender: SerializableObject) => {\r\n return this.nullable ? undefined : new this.objectType();\r\n });\r\n }\r\n}\r\n\r\nexport class SerializableObjectCollectionProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): SerializableObject[] | undefined {\r\n const result: SerializableObject[] | undefined = [];\r\n\r\n const sourceCollection = source[this.name];\r\n\r\n if (Array.isArray(sourceCollection)) {\r\n for (const sourceItem of sourceCollection) {\r\n const item = new this.objectType();\r\n item.parse(sourceItem, context);\r\n\r\n result.push(item);\r\n\r\n if (this.onItemAdded) {\r\n this.onItemAdded(sender, item);\r\n }\r\n }\r\n }\r\n\r\n return result.length > 0\r\n ? result\r\n : this.onGetInitialValue\r\n ? this.onGetInitialValue(sender)\r\n : undefined;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: SerializableObject[] | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeArray(target, this.name, value);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly objectType: SerializableObjectType,\r\n readonly onItemAdded?: (sender: SerializableObject, item: SerializableObject) => void\r\n ) {\r\n super(targetVersion, name, undefined, (sender: SerializableObject) => {\r\n return [];\r\n });\r\n }\r\n}\r\n\r\nexport class CustomProperty extends PropertyDefinition {\r\n parse(sender: SerializableObject, source: PropertyBag, context: BaseSerializationContext): T {\r\n return this.onParse(sender, this, source, context);\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: T,\r\n context: BaseSerializationContext\r\n ) {\r\n this.onToJSON(sender, this, target, value, context);\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly onParse: (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => T,\r\n readonly onToJSON: (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n target: PropertyBag,\r\n value: T,\r\n context: BaseSerializationContext\r\n ) => void,\r\n readonly defaultValue?: T,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => T\r\n ) {\r\n super(targetVersion, name, defaultValue, onGetInitialValue);\r\n\r\n if (!this.onParse) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onParse handler.\");\r\n }\r\n\r\n if (!this.onToJSON) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onToJSON handler.\");\r\n }\r\n }\r\n}\r\n\r\nexport class SerializableObjectSchema {\r\n private _properties: PropertyDefinition[] = [];\r\n\r\n indexOf(prop: PropertyDefinition): number {\r\n for (let i = 0; i < this._properties.length; i++) {\r\n if (this._properties[i] === prop) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n add(...properties: PropertyDefinition[]) {\r\n for (const prop of properties) {\r\n if (this.indexOf(prop) === -1) {\r\n this._properties.push(prop);\r\n }\r\n }\r\n }\r\n\r\n remove(...properties: PropertyDefinition[]) {\r\n for (const prop of properties) {\r\n while (true) {\r\n const index = this.indexOf(prop);\r\n\r\n if (index >= 0) {\r\n this._properties.splice(index, 1);\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n getItemAt(index: number): PropertyDefinition {\r\n return this._properties[index];\r\n }\r\n\r\n getCount(): number {\r\n return this._properties.length;\r\n }\r\n}\r\n\r\n// This is a decorator function, used to map SerializableObject descendant class members to\r\n// schema properties\r\nexport function property(prop: PropertyDefinition) {\r\n return function (target: any, propertyKey: string) {\r\n const descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};\r\n\r\n if (!descriptor.get && !descriptor.set) {\r\n descriptor.get = function (this: SerializableObject) {\r\n return this.getValue(prop);\r\n };\r\n descriptor.set = function (this: SerializableObject, value: any) {\r\n this.setValue(prop, value);\r\n };\r\n\r\n Object.defineProperty(target, propertyKey, descriptor);\r\n }\r\n };\r\n}\r\n\r\nexport type PropertyBag = { [propertyName: string]: any };\r\n\r\nexport abstract class SerializableObject {\r\n static onRegisterCustomProperties?: (\r\n sender: SerializableObject,\r\n schema: SerializableObjectSchema\r\n ) => void;\r\n static defaultMaxVersion: Version = Versions.latest;\r\n\r\n private static readonly _schemaCache: { [typeName: string]: SerializableObjectSchema } = {};\r\n\r\n private _propertyBag: PropertyBag = {};\r\n private _rawProperties: PropertyBag = {};\r\n\r\n protected abstract getSchemaKey(): string;\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SimpleSerializationContext();\r\n }\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n const ctor = this.constructor;\r\n const properties: PropertyDefinition[] = [];\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const propertyName in ctor) {\r\n try {\r\n const propertyValue = ctor[propertyName];\r\n\r\n if (propertyValue instanceof PropertyDefinition) {\r\n properties.push(propertyValue);\r\n }\r\n } catch {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n\r\n if (properties.length > 0) {\r\n const sortedProperties = properties.sort(\r\n (p1: PropertyDefinition, p2: PropertyDefinition) => {\r\n if (p1.sequentialNumber > p2.sequentialNumber) {\r\n return 1;\r\n } else if (p1.sequentialNumber < p2.sequentialNumber) {\r\n return -1;\r\n }\r\n\r\n return 0;\r\n }\r\n );\r\n\r\n schema.add(...sortedProperties);\r\n }\r\n\r\n if (SerializableObject.onRegisterCustomProperties) {\r\n SerializableObject.onRegisterCustomProperties(this, schema);\r\n }\r\n }\r\n\r\n protected getValue(prop: PropertyDefinition): any {\r\n return this._propertyBag.hasOwnProperty(prop.getInternalName())\r\n ? this._propertyBag[prop.getInternalName()]\r\n : prop.defaultValue;\r\n }\r\n\r\n protected setValue(prop: PropertyDefinition, value: any) {\r\n if (value === undefined || value === null) {\r\n delete this._propertyBag[prop.getInternalName()];\r\n } else {\r\n this._propertyBag[prop.getInternalName()] = value;\r\n }\r\n }\r\n\r\n protected internalParse(source: PropertyBag, context: BaseSerializationContext) {\r\n this._propertyBag = {};\r\n this._rawProperties = GlobalSettings.enableFullJsonRoundTrip ? (source ? source : {}) : {};\r\n\r\n if (source) {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n if (prop.isSerializationEnabled) {\r\n let propertyValue = prop.onGetInitialValue\r\n ? prop.onGetInitialValue(this)\r\n : undefined;\r\n\r\n if (source.hasOwnProperty(prop.name)) {\r\n if (prop.targetVersion.compareTo(context.targetVersion) <= 0) {\r\n propertyValue = prop.parse(this, source, context);\r\n } else {\r\n context.logParseEvent(\r\n this,\r\n Enums.ValidationEvent.UnsupportedProperty,\r\n Strings.errors.propertyNotSupported(\r\n prop.name,\r\n prop.targetVersion.toString(),\r\n context.targetVersion.toString()\r\n )\r\n );\r\n }\r\n }\r\n\r\n this.setValue(prop, propertyValue);\r\n }\r\n }\r\n } else {\r\n this.resetDefaultValues();\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: BaseSerializationContext) {\r\n const s = this.getSchema();\r\n const serializedProperties: string[] = [];\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n // Avoid serializing the same property multiple times. This is necessary\r\n // because some property definitions map to the same underlying schema\r\n // property\r\n if (\r\n prop.isSerializationEnabled &&\r\n prop.targetVersion.compareTo(context.targetVersion) <= 0 &&\r\n serializedProperties.indexOf(prop.name) === -1\r\n ) {\r\n prop.toJSON(this, target, this.getValue(prop), context);\r\n\r\n serializedProperties.push(prop.name);\r\n }\r\n }\r\n }\r\n\r\n protected shouldSerialize(_context: BaseSerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n maxVersion: Version = SerializableObject.defaultMaxVersion;\r\n\r\n constructor() {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n if (prop.onGetInitialValue) {\r\n this.setValue(prop, prop.onGetInitialValue(this));\r\n }\r\n }\r\n }\r\n\r\n parse(source: PropertyBag, context?: BaseSerializationContext) {\r\n this.internalParse(source, context ? context : new SimpleSerializationContext());\r\n }\r\n\r\n toJSON(context?: BaseSerializationContext): PropertyBag | undefined {\r\n let effectiveContext: BaseSerializationContext;\r\n\r\n if (context && context instanceof BaseSerializationContext) {\r\n effectiveContext = context;\r\n } else {\r\n effectiveContext = this.getDefaultSerializationContext();\r\n effectiveContext.toJSONOriginalParam = context;\r\n }\r\n\r\n if (this.shouldSerialize(effectiveContext)) {\r\n let result: PropertyBag;\r\n\r\n if (\r\n GlobalSettings.enableFullJsonRoundTrip &&\r\n this._rawProperties &&\r\n typeof this._rawProperties === \"object\"\r\n ) {\r\n result = this._rawProperties;\r\n } else {\r\n result = {};\r\n }\r\n\r\n this.internalToJSON(result, effectiveContext);\r\n\r\n return result;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n hasDefaultValue(prop: PropertyDefinition): boolean {\r\n return this.getValue(prop) === prop.defaultValue;\r\n }\r\n\r\n hasAllDefaultValues(): boolean {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n if (!this.hasDefaultValue(prop)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n resetDefaultValues() {\r\n const s = this.getSchema();\r\n\r\n for (let i = 0; i < s.getCount(); i++) {\r\n const prop = s.getItemAt(i);\r\n\r\n this.setValue(prop, prop.defaultValue);\r\n }\r\n }\r\n\r\n setCustomProperty(name: string, value: any) {\r\n const shouldDeleteProperty =\r\n (typeof value === \"string\" && !value) || value === undefined || value === null;\r\n\r\n if (shouldDeleteProperty) {\r\n delete this._rawProperties[name];\r\n } else {\r\n this._rawProperties[name] = value;\r\n }\r\n }\r\n\r\n getCustomProperty(name: string): any {\r\n return this._rawProperties[name];\r\n }\r\n\r\n getSchema(): SerializableObjectSchema {\r\n let schema: SerializableObjectSchema = SerializableObject._schemaCache[this.getSchemaKey()];\r\n\r\n if (!schema) {\r\n schema = new SerializableObjectSchema();\r\n\r\n this.populateSchema(schema);\r\n\r\n SerializableObject._schemaCache[this.getSchemaKey()] = schema;\r\n }\r\n\r\n return schema;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {\r\n TargetVersion,\r\n Version,\r\n SerializableObject,\r\n BaseSerializationContext,\r\n PropertyBag\r\n} from \"./serialization\";\r\n\r\nexport class HostCapabilities extends SerializableObject {\r\n private _capabilities: { [key: string]: TargetVersion } = {};\r\n\r\n protected getSchemaKey(): string {\r\n return \"HostCapabilities\";\r\n }\r\n\r\n protected internalParse(source: any, context: BaseSerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n if (source) {\r\n // eslint-disable-next-line guard-for-in\r\n for (const name in source) {\r\n const jsonVersion = source[name];\r\n\r\n if (typeof jsonVersion === \"string\") {\r\n if (jsonVersion === \"*\") {\r\n this.addCapability(name, \"*\");\r\n } else {\r\n const version = Version.parse(jsonVersion, context);\r\n\r\n if (version?.isValid) {\r\n this.addCapability(name, version);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: BaseSerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const key in this._capabilities) {\r\n target[key] = this._capabilities[key];\r\n }\r\n }\r\n\r\n addCapability(name: string, version: TargetVersion) {\r\n this._capabilities[name] = version;\r\n }\r\n\r\n removeCapability(name: string) {\r\n delete this._capabilities[name];\r\n }\r\n\r\n clear() {\r\n this._capabilities = {};\r\n }\r\n\r\n hasCapability(name: string, version: TargetVersion): boolean {\r\n if (this._capabilities.hasOwnProperty(name)) {\r\n if (version === \"*\" || this._capabilities[name] === \"*\") {\r\n return true;\r\n }\r\n\r\n return version.compareTo(this._capabilities[name]) <= 0;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n areAllMet(hostCapabilities: HostCapabilities): boolean {\r\n for (const capabilityName in this._capabilities) {\r\n if (\r\n !hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])\r\n ) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport * as Utils from \"./utils\";\r\nimport * as Shared from \"./shared\";\r\nimport { HostCapabilities } from \"./host-capabilities\";\r\n\r\nfunction parseHostConfigEnum(\r\n targetEnum: { [s: number]: string },\r\n value: string | number,\r\n defaultValue: number\r\n): number {\r\n if (typeof value === \"string\") {\r\n const parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);\r\n\r\n return parsedValue !== undefined ? parsedValue : defaultValue;\r\n } else if (typeof value === \"number\") {\r\n return value;\r\n } else {\r\n return defaultValue;\r\n }\r\n}\r\n\r\nexport class ColorDefinition {\r\n default: string = \"#000000\";\r\n subtle: string = \"#666666\";\r\n\r\n constructor(defaultColor?: string, subtleColor?: string) {\r\n if (defaultColor) {\r\n this.default = defaultColor;\r\n }\r\n\r\n if (subtleColor) {\r\n this.subtle = subtleColor;\r\n }\r\n }\r\n\r\n parse(obj?: any) {\r\n if (obj) {\r\n this.default = obj[\"default\"] || this.default;\r\n this.subtle = obj[\"subtle\"] || this.subtle;\r\n }\r\n }\r\n}\r\n\r\nexport class TextColorDefinition extends ColorDefinition {\r\n readonly highlightColors = new ColorDefinition(\"#22000000\", \"#11000000\");\r\n\r\n parse(obj?: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.highlightColors.parse(obj[\"highlightColors\"]);\r\n }\r\n }\r\n}\r\n\r\nexport class AdaptiveCardConfig {\r\n allowCustomStyle: boolean = false;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.allowCustomStyle = obj[\"allowCustomStyle\"] || this.allowCustomStyle;\r\n }\r\n }\r\n}\r\n\r\nexport class ImageSetConfig {\r\n imageSize: Enums.Size = Enums.Size.Medium;\r\n maxImageHeight: number = 100;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.imageSize = obj[\"imageSize\"] != null ? obj[\"imageSize\"] : this.imageSize;\r\n this.maxImageHeight = Utils.parseNumber(obj[\"maxImageHeight\"], 100)!;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n imageSize: Enums.Size[this.imageSize],\r\n maxImageHeight: this.maxImageHeight\r\n };\r\n }\r\n}\r\n\r\nexport class MediaConfig {\r\n defaultPoster?: string;\r\n allowInlinePlayback: boolean = true;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.defaultPoster = obj[\"defaultPoster\"];\r\n this.allowInlinePlayback = obj[\"allowInlinePlayback\"] || this.allowInlinePlayback;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n defaultPoster: this.defaultPoster,\r\n allowInlinePlayback: this.allowInlinePlayback\r\n };\r\n }\r\n}\r\n\r\nexport class TableConfig {\r\n cellSpacing: number = 8;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.cellSpacing =\r\n obj.cellSpacing && typeof obj.cellSpacing === \"number\"\r\n ? obj.cellSpacing\r\n : this.cellSpacing;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n cellSpacing: this.cellSpacing\r\n };\r\n }\r\n}\r\n\r\nexport class BaseTextDefinition {\r\n size: Enums.TextSize = Enums.TextSize.Default;\r\n color: Enums.TextColor = Enums.TextColor.Default;\r\n isSubtle: boolean = false;\r\n weight: Enums.TextWeight = Enums.TextWeight.Default;\r\n\r\n constructor(obj?: any) {\r\n this.parse(obj);\r\n }\r\n\r\n parse(obj: any) {\r\n if (obj) {\r\n this.size = parseHostConfigEnum(Enums.TextSize, obj[\"size\"], this.size);\r\n this.color = parseHostConfigEnum(Enums.TextColor, obj[\"color\"], this.color);\r\n this.isSubtle =\r\n obj.isSubtle !== undefined && typeof obj.isSubtle === \"boolean\"\r\n ? obj.isSubtle\r\n : this.isSubtle;\r\n this.weight = parseHostConfigEnum(\r\n Enums.TextWeight,\r\n obj[\"weight\"],\r\n this.getDefaultWeight()\r\n );\r\n }\r\n }\r\n\r\n getDefaultWeight(): Enums.TextWeight {\r\n return Enums.TextWeight.Default;\r\n }\r\n\r\n toJSON(): any {\r\n return {\r\n size: Enums.TextSize[this.size],\r\n color: Enums.TextColor[this.color],\r\n isSubtle: this.isSubtle,\r\n weight: Enums.TextWeight[this.weight]\r\n };\r\n }\r\n}\r\n\r\nexport class TextStyleDefinition extends BaseTextDefinition {\r\n fontType: Enums.FontType = Enums.FontType.Default;\r\n\r\n parse(obj: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);\r\n }\r\n }\r\n}\r\n\r\nexport class TextStyleSet {\r\n readonly default: TextStyleDefinition = new TextStyleDefinition();\r\n readonly heading: TextStyleDefinition = new TextStyleDefinition({\r\n size: \"Large\",\r\n weight: \"Bolder\"\r\n });\r\n readonly columnHeader: TextStyleDefinition = new TextStyleDefinition({\r\n weight: \"Bolder\"\r\n });\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.heading.parse(obj.heading);\r\n this.columnHeader.parse(obj.columnHeader);\r\n }\r\n }\r\n\r\n getStyleByName(name: string): TextStyleDefinition {\r\n switch (name.toLowerCase()) {\r\n case \"heading\":\r\n return this.heading;\r\n case \"columnHeader\":\r\n return this.columnHeader;\r\n default:\r\n return this.default;\r\n }\r\n }\r\n}\r\n\r\nexport class TextBlockConfig {\r\n headingLevel?: number;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.headingLevel = Utils.parseNumber(obj.headingLevel);\r\n }\r\n }\r\n}\r\n\r\nexport class RequiredInputLabelTextDefinition extends BaseTextDefinition {\r\n suffix?: string = \" *\";\r\n suffixColor: Enums.TextColor = Enums.TextColor.Attention;\r\n\r\n parse(obj?: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.suffix = obj[\"suffix\"] || this.suffix;\r\n this.suffixColor = parseHostConfigEnum(\r\n Enums.TextColor,\r\n obj[\"suffixColor\"],\r\n this.suffixColor\r\n );\r\n }\r\n }\r\n\r\n toJSON(): any {\r\n const result = super.toJSON();\r\n result[\"suffix\"] = this.suffix;\r\n result[\"suffixColor\"] = Enums.TextColor[this.suffixColor];\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class InputLabelConfig {\r\n inputSpacing: Enums.Spacing = Enums.Spacing.Small;\r\n readonly requiredInputs: RequiredInputLabelTextDefinition =\r\n new RequiredInputLabelTextDefinition();\r\n readonly optionalInputs: BaseTextDefinition = new BaseTextDefinition();\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.inputSpacing = parseHostConfigEnum(\r\n Enums.Spacing,\r\n obj[\"inputSpacing\"],\r\n this.inputSpacing\r\n );\r\n this.requiredInputs = new RequiredInputLabelTextDefinition(obj[\"requiredInputs\"]);\r\n this.optionalInputs = new BaseTextDefinition(obj[\"optionalInputs\"]);\r\n }\r\n }\r\n}\r\n\r\nexport class InputConfig {\r\n readonly label: InputLabelConfig = new InputLabelConfig();\r\n readonly errorMessage: BaseTextDefinition = new BaseTextDefinition({\r\n color: Enums.TextColor.Attention\r\n });\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.label = new InputLabelConfig(obj[\"label\"]);\r\n this.errorMessage = new BaseTextDefinition(obj[\"errorMessage\"]);\r\n }\r\n }\r\n}\r\n\r\nexport class FactTextDefinition extends BaseTextDefinition {\r\n wrap: boolean = true;\r\n\r\n parse(obj?: any) {\r\n super.parse(obj);\r\n\r\n if (obj) {\r\n this.wrap = obj[\"wrap\"] != null ? obj[\"wrap\"] : this.wrap;\r\n }\r\n }\r\n\r\n toJSON(): any {\r\n const result = super.toJSON();\r\n result[\"wrap\"] = this.wrap;\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class FactTitleDefinition extends FactTextDefinition {\r\n maxWidth?: number = 150;\r\n weight: Enums.TextWeight = Enums.TextWeight.Bolder;\r\n\r\n constructor(obj?: any) {\r\n super(obj);\r\n\r\n if (obj) {\r\n this.maxWidth = obj[\"maxWidth\"] != null ? obj[\"maxWidth\"] : this.maxWidth;\r\n this.weight = parseHostConfigEnum(\r\n Enums.TextWeight,\r\n obj[\"weight\"],\r\n Enums.TextWeight.Bolder\r\n );\r\n }\r\n }\r\n\r\n getDefaultWeight() {\r\n return Enums.TextWeight.Bolder;\r\n }\r\n}\r\n\r\nexport class FactSetConfig {\r\n readonly title: FactTitleDefinition = new FactTitleDefinition();\r\n readonly value: FactTextDefinition = new FactTextDefinition();\r\n spacing: number = 10;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.title = new FactTitleDefinition(obj[\"title\"]);\r\n this.value = new FactTextDefinition(obj[\"value\"]);\r\n this.spacing =\r\n obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;\r\n }\r\n }\r\n}\r\n\r\nexport class ShowCardActionConfig {\r\n actionMode: Enums.ShowCardActionMode = Enums.ShowCardActionMode.Inline;\r\n inlineTopMargin: number = 16;\r\n style?: string = Enums.ContainerStyle.Emphasis;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.actionMode = parseHostConfigEnum(\r\n Enums.ShowCardActionMode,\r\n obj[\"actionMode\"],\r\n Enums.ShowCardActionMode.Inline\r\n );\r\n this.inlineTopMargin =\r\n obj[\"inlineTopMargin\"] != null ? obj[\"inlineTopMargin\"] : this.inlineTopMargin;\r\n this.style =\r\n obj[\"style\"] && typeof obj[\"style\"] === \"string\"\r\n ? obj[\"style\"]\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n actionMode: Enums.ShowCardActionMode[this.actionMode],\r\n inlineTopMargin: this.inlineTopMargin,\r\n style: this.style\r\n };\r\n }\r\n}\r\n\r\nexport class ActionsConfig {\r\n maxActions: number = 5;\r\n spacing: Enums.Spacing = Enums.Spacing.Default;\r\n buttonSpacing: number = 20;\r\n readonly showCard: ShowCardActionConfig = new ShowCardActionConfig();\r\n preExpandSingleShowCardAction?: boolean = false;\r\n actionsOrientation: Enums.Orientation = Enums.Orientation.Horizontal;\r\n actionAlignment: Enums.ActionAlignment = Enums.ActionAlignment.Left;\r\n iconPlacement: Enums.ActionIconPlacement = Enums.ActionIconPlacement.LeftOfTitle;\r\n allowTitleToWrap: boolean = false;\r\n iconSize: number = 16;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n this.maxActions = obj[\"maxActions\"] != null ? obj[\"maxActions\"] : this.maxActions;\r\n this.spacing = parseHostConfigEnum(\r\n Enums.Spacing,\r\n obj.spacing && obj.spacing,\r\n Enums.Spacing.Default\r\n );\r\n this.buttonSpacing =\r\n obj[\"buttonSpacing\"] != null ? obj[\"buttonSpacing\"] : this.buttonSpacing;\r\n this.showCard = new ShowCardActionConfig(obj[\"showCard\"]);\r\n this.preExpandSingleShowCardAction = Utils.parseBool(\r\n obj[\"preExpandSingleShowCardAction\"],\r\n false\r\n );\r\n this.actionsOrientation = parseHostConfigEnum(\r\n Enums.Orientation,\r\n obj[\"actionsOrientation\"],\r\n Enums.Orientation.Horizontal\r\n );\r\n this.actionAlignment = parseHostConfigEnum(\r\n Enums.ActionAlignment,\r\n obj[\"actionAlignment\"],\r\n Enums.ActionAlignment.Left\r\n );\r\n this.iconPlacement = parseHostConfigEnum(\r\n Enums.ActionIconPlacement,\r\n obj[\"iconPlacement\"],\r\n Enums.ActionIconPlacement.LeftOfTitle\r\n );\r\n this.allowTitleToWrap =\r\n obj[\"allowTitleToWrap\"] != null ? obj[\"allowTitleToWrap\"] : this.allowTitleToWrap;\r\n\r\n try {\r\n const sizeAndUnit = Shared.SizeAndUnit.parse(obj[\"iconSize\"]);\r\n\r\n if (sizeAndUnit.unit === Enums.SizeUnit.Pixel) {\r\n this.iconSize = sizeAndUnit.physicalSize;\r\n }\r\n } catch (e) {\r\n // Swallow this, keep default icon size\r\n }\r\n }\r\n }\r\n\r\n toJSON() {\r\n return {\r\n maxActions: this.maxActions,\r\n spacing: Enums.Spacing[this.spacing],\r\n buttonSpacing: this.buttonSpacing,\r\n showCard: this.showCard,\r\n preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,\r\n actionsOrientation: Enums.Orientation[this.actionsOrientation],\r\n actionAlignment: Enums.ActionAlignment[this.actionAlignment]\r\n };\r\n }\r\n}\r\n\r\nexport class ColorSetDefinition {\r\n private parseSingleColor(obj: any, propertyName: string) {\r\n if (obj) {\r\n ((this)[propertyName] as TextColorDefinition).parse(obj[propertyName]);\r\n }\r\n }\r\n\r\n default: TextColorDefinition = new TextColorDefinition();\r\n dark: TextColorDefinition = new TextColorDefinition();\r\n light: TextColorDefinition = new TextColorDefinition();\r\n accent: TextColorDefinition = new TextColorDefinition();\r\n good: TextColorDefinition = new TextColorDefinition();\r\n warning: TextColorDefinition = new TextColorDefinition();\r\n attention: TextColorDefinition = new TextColorDefinition();\r\n\r\n constructor(obj?: any) {\r\n this.parse(obj);\r\n }\r\n\r\n parse(obj: any) {\r\n if (obj) {\r\n this.parseSingleColor(obj, \"default\");\r\n this.parseSingleColor(obj, \"dark\");\r\n this.parseSingleColor(obj, \"light\");\r\n this.parseSingleColor(obj, \"accent\");\r\n this.parseSingleColor(obj, \"good\");\r\n this.parseSingleColor(obj, \"warning\");\r\n this.parseSingleColor(obj, \"attention\");\r\n }\r\n }\r\n}\r\n\r\nexport class ContainerStyleDefinition {\r\n backgroundColor?: string;\r\n\r\n readonly foregroundColors: ColorSetDefinition = new ColorSetDefinition({\r\n \"default\": { default: \"#333333\", subtle: \"#EE333333\" },\r\n \"dark\": { default: \"#000000\", subtle: \"#66000000\" },\r\n \"light\": { default: \"#FFFFFF\", subtle: \"#33000000\" },\r\n \"accent\": { default: \"#2E89FC\", subtle: \"#882E89FC\" },\r\n \"good\": { default: \"#028A02\", subtle: \"#DD027502\" },\r\n \"warning\": { default: \"#E69500\", subtle: \"#DDE69500\" },\r\n \"attention\": { default: \"#CC3300\", subtle: \"#DDCC3300\" }\r\n });\r\n\r\n highlightBackgroundColor?: string;\r\n highlightForegroundColor?: string;\r\n borderColor?: string;\r\n\r\n parse(obj: any) {\r\n if (obj) {\r\n this.backgroundColor = obj[\"backgroundColor\"];\r\n\r\n this.foregroundColors.parse(obj[\"foregroundColors\"]);\r\n\r\n this.highlightBackgroundColor = obj[\"highlightBackgroundColor\"];\r\n this.highlightForegroundColor = obj[\"highlightForegroundColor\"];\r\n\r\n this.borderColor = obj[\"borderColor\"];\r\n }\r\n }\r\n\r\n constructor(obj?: any) {\r\n this.parse(obj);\r\n }\r\n\r\n get isBuiltIn(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nclass BuiltInContainerStyleDefinition extends ContainerStyleDefinition {\r\n get isBuiltIn(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface ILineHeightDefinitions {\r\n small: number;\r\n medium: number;\r\n default: number;\r\n large: number;\r\n extraLarge: number;\r\n}\r\n\r\nexport class ContainerStyleSet {\r\n private _allStyles: { [key: string]: ContainerStyleDefinition } = {};\r\n\r\n constructor(obj?: any) {\r\n this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();\r\n\r\n if (obj) {\r\n this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);\r\n this._allStyles[Enums.ContainerStyle.Emphasis].parse(\r\n obj[Enums.ContainerStyle.Emphasis]\r\n );\r\n this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);\r\n this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);\r\n this._allStyles[Enums.ContainerStyle.Attention].parse(\r\n obj[Enums.ContainerStyle.Attention]\r\n );\r\n this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);\r\n\r\n const customStyleArray = obj[\"customStyles\"];\r\n\r\n if (customStyleArray && Array.isArray(customStyleArray)) {\r\n for (const customStyle of customStyleArray) {\r\n if (customStyle) {\r\n const styleName = customStyle[\"name\"];\r\n\r\n if (styleName && typeof styleName === \"string\") {\r\n if (this._allStyles.hasOwnProperty(styleName)) {\r\n this._allStyles[styleName].parse(customStyle[\"style\"]);\r\n } else {\r\n this._allStyles[styleName] = new ContainerStyleDefinition(\r\n customStyle[\"style\"]\r\n );\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n toJSON() {\r\n const customStyleArray: any[] = [];\r\n\r\n Object.keys(this._allStyles).forEach((key) => {\r\n if (!this._allStyles[key].isBuiltIn) {\r\n customStyleArray.push({\r\n name: key,\r\n style: this._allStyles[key]\r\n });\r\n }\r\n });\r\n\r\n const result: any = {\r\n default: this.default,\r\n emphasis: this.emphasis\r\n };\r\n\r\n if (customStyleArray.length > 0) {\r\n result.customStyles = customStyleArray;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getStyleByName(\r\n name: string | undefined,\r\n defaultValue?: ContainerStyleDefinition\r\n ): ContainerStyleDefinition {\r\n if (name && this._allStyles.hasOwnProperty(name)) {\r\n return this._allStyles[name];\r\n } else {\r\n return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];\r\n }\r\n }\r\n\r\n get default(): ContainerStyleDefinition {\r\n return this._allStyles[Enums.ContainerStyle.Default];\r\n }\r\n\r\n get emphasis(): ContainerStyleDefinition {\r\n return this._allStyles[Enums.ContainerStyle.Emphasis];\r\n }\r\n}\r\n\r\nexport interface IFontSizeDefinitions {\r\n small: number;\r\n default: number;\r\n medium: number;\r\n large: number;\r\n extraLarge: number;\r\n}\r\n\r\nexport interface IFontWeightDefinitions {\r\n lighter: number;\r\n default: number;\r\n bolder: number;\r\n}\r\n\r\nexport class FontTypeDefinition {\r\n static readonly monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n\r\n fontFamily?: string = \"Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif\";\r\n\r\n fontSizes: IFontSizeDefinitions = {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n };\r\n\r\n fontWeights: IFontWeightDefinitions = {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n };\r\n\r\n constructor(fontFamily?: string) {\r\n if (fontFamily) {\r\n this.fontFamily = fontFamily;\r\n }\r\n }\r\n\r\n parse(obj?: any) {\r\n this.fontFamily = obj[\"fontFamily\"] || this.fontFamily;\r\n this.fontSizes = {\r\n small: (obj.fontSizes && obj.fontSizes[\"small\"]) || this.fontSizes.small,\r\n default: (obj.fontSizes && obj.fontSizes[\"default\"]) || this.fontSizes.default,\r\n medium: (obj.fontSizes && obj.fontSizes[\"medium\"]) || this.fontSizes.medium,\r\n large: (obj.fontSizes && obj.fontSizes[\"large\"]) || this.fontSizes.large,\r\n extraLarge: (obj.fontSizes && obj.fontSizes[\"extraLarge\"]) || this.fontSizes.extraLarge\r\n };\r\n this.fontWeights = {\r\n lighter: (obj.fontWeights && obj.fontWeights[\"lighter\"]) || this.fontWeights.lighter,\r\n default: (obj.fontWeights && obj.fontWeights[\"default\"]) || this.fontWeights.default,\r\n bolder: (obj.fontWeights && obj.fontWeights[\"bolder\"]) || this.fontWeights.bolder\r\n };\r\n }\r\n}\r\n\r\nexport class FontTypeSet {\r\n default: FontTypeDefinition;\r\n monospace: FontTypeDefinition;\r\n\r\n constructor(obj?: any) {\r\n this.default = new FontTypeDefinition();\r\n this.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n\r\n if (obj) {\r\n this.default.parse(obj[\"default\"]);\r\n this.monospace.parse(obj[\"monospace\"]);\r\n }\r\n }\r\n\r\n getStyleDefinition(style: Enums.FontType | undefined): FontTypeDefinition {\r\n switch (style) {\r\n case Enums.FontType.Monospace:\r\n return this.monospace;\r\n case Enums.FontType.Default:\r\n default:\r\n return this.default;\r\n }\r\n }\r\n}\r\n\r\nexport class HostConfig {\r\n readonly hostCapabilities = new HostCapabilities();\r\n\r\n private _legacyFontType: FontTypeDefinition;\r\n\r\n choiceSetInputValueSeparator: string = \",\";\r\n supportsInteractivity: boolean = true;\r\n lineHeights?: ILineHeightDefinitions;\r\n fontTypes?: FontTypeSet;\r\n\r\n readonly spacing = {\r\n small: 3,\r\n default: 8,\r\n medium: 20,\r\n large: 30,\r\n extraLarge: 40,\r\n padding: 15\r\n };\r\n\r\n readonly separator = {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n };\r\n\r\n readonly imageSizes = {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n };\r\n\r\n readonly containerStyles: ContainerStyleSet = new ContainerStyleSet();\r\n readonly inputs: InputConfig = new InputConfig();\r\n readonly actions: ActionsConfig = new ActionsConfig();\r\n readonly adaptiveCard: AdaptiveCardConfig = new AdaptiveCardConfig();\r\n readonly imageSet: ImageSetConfig = new ImageSetConfig();\r\n readonly media: MediaConfig = new MediaConfig();\r\n readonly factSet: FactSetConfig = new FactSetConfig();\r\n readonly table: TableConfig = new TableConfig();\r\n readonly textStyles: TextStyleSet = new TextStyleSet();\r\n readonly textBlock: TextBlockConfig = new TextBlockConfig();\r\n\r\n cssClassNamePrefix?: string;\r\n alwaysAllowBleed: boolean = false;\r\n\r\n constructor(obj?: any) {\r\n if (obj) {\r\n if (typeof obj === \"string\" || obj instanceof String) {\r\n obj = JSON.parse(obj as string);\r\n }\r\n\r\n this.choiceSetInputValueSeparator =\r\n obj && typeof obj[\"choiceSetInputValueSeparator\"] === \"string\"\r\n ? obj[\"choiceSetInputValueSeparator\"]\r\n : this.choiceSetInputValueSeparator;\r\n this.supportsInteractivity =\r\n obj && typeof obj[\"supportsInteractivity\"] === \"boolean\"\r\n ? obj[\"supportsInteractivity\"]\r\n : this.supportsInteractivity;\r\n\r\n this._legacyFontType = new FontTypeDefinition();\r\n this._legacyFontType.parse(obj);\r\n\r\n if (obj.fontTypes) {\r\n this.fontTypes = new FontTypeSet(obj.fontTypes);\r\n }\r\n\r\n if (obj.lineHeights) {\r\n this.lineHeights = {\r\n small: obj.lineHeights[\"small\"],\r\n default: obj.lineHeights[\"default\"],\r\n medium: obj.lineHeights[\"medium\"],\r\n large: obj.lineHeights[\"large\"],\r\n extraLarge: obj.lineHeights[\"extraLarge\"]\r\n };\r\n }\r\n\r\n this.imageSizes = {\r\n small: (obj.imageSizes && obj.imageSizes[\"small\"]) || this.imageSizes.small,\r\n medium: (obj.imageSizes && obj.imageSizes[\"medium\"]) || this.imageSizes.medium,\r\n large: (obj.imageSizes && obj.imageSizes[\"large\"]) || this.imageSizes.large\r\n };\r\n\r\n this.containerStyles = new ContainerStyleSet(obj[\"containerStyles\"]);\r\n this.spacing = {\r\n small: (obj.spacing && obj.spacing[\"small\"]) || this.spacing.small,\r\n default: (obj.spacing && obj.spacing[\"default\"]) || this.spacing.default,\r\n medium: (obj.spacing && obj.spacing[\"medium\"]) || this.spacing.medium,\r\n large: (obj.spacing && obj.spacing[\"large\"]) || this.spacing.large,\r\n extraLarge: (obj.spacing && obj.spacing[\"extraLarge\"]) || this.spacing.extraLarge,\r\n padding: (obj.spacing && obj.spacing[\"padding\"]) || this.spacing.padding\r\n };\r\n\r\n this.separator = {\r\n lineThickness:\r\n (obj.separator && obj.separator[\"lineThickness\"]) ||\r\n this.separator.lineThickness,\r\n lineColor: (obj.separator && obj.separator[\"lineColor\"]) || this.separator.lineColor\r\n };\r\n\r\n this.inputs = new InputConfig(obj.inputs || this.inputs);\r\n this.actions = new ActionsConfig(obj.actions || this.actions);\r\n this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);\r\n this.imageSet = new ImageSetConfig(obj[\"imageSet\"]);\r\n this.factSet = new FactSetConfig(obj[\"factSet\"]);\r\n this.textStyles = new TextStyleSet(obj[\"textStyles\"]);\r\n this.textBlock = new TextBlockConfig(obj[\"textBlock\"]);\r\n }\r\n }\r\n\r\n getFontTypeDefinition(style?: Enums.FontType): FontTypeDefinition {\r\n if (this.fontTypes) {\r\n return this.fontTypes.getStyleDefinition(style);\r\n } else {\r\n return style === Enums.FontType.Monospace\r\n ? FontTypeDefinition.monospace\r\n : this._legacyFontType;\r\n }\r\n }\r\n\r\n getEffectiveSpacing(spacing: Enums.Spacing): number {\r\n switch (spacing) {\r\n case Enums.Spacing.Small:\r\n return this.spacing.small;\r\n case Enums.Spacing.Default:\r\n return this.spacing.default;\r\n case Enums.Spacing.Medium:\r\n return this.spacing.medium;\r\n case Enums.Spacing.Large:\r\n return this.spacing.large;\r\n case Enums.Spacing.ExtraLarge:\r\n return this.spacing.extraLarge;\r\n case Enums.Spacing.Padding:\r\n return this.spacing.padding;\r\n default:\r\n return 0;\r\n }\r\n }\r\n\r\n paddingDefinitionToSpacingDefinition(\r\n paddingDefinition: Shared.PaddingDefinition\r\n ): Shared.SpacingDefinition {\r\n return new Shared.SpacingDefinition(\r\n this.getEffectiveSpacing(paddingDefinition.top),\r\n this.getEffectiveSpacing(paddingDefinition.right),\r\n this.getEffectiveSpacing(paddingDefinition.bottom),\r\n this.getEffectiveSpacing(paddingDefinition.left)\r\n );\r\n }\r\n\r\n makeCssClassNames(...classNames: string[]): string[] {\r\n const result: string[] = [];\r\n\r\n for (const className of classNames) {\r\n result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + \"-\" : \"\") + className);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n makeCssClassName(...classNames: string[]): string {\r\n const result = this.makeCssClassNames(...classNames).join(\" \");\r\n\r\n return result ? result : \"\";\r\n }\r\n\r\n get fontFamily(): string | undefined {\r\n return this._legacyFontType.fontFamily;\r\n }\r\n\r\n set fontFamily(value: string | undefined) {\r\n this._legacyFontType.fontFamily = value;\r\n }\r\n\r\n get fontSizes(): IFontSizeDefinitions {\r\n return this._legacyFontType.fontSizes;\r\n }\r\n\r\n get fontWeights(): IFontWeightDefinitions {\r\n return this._legacyFontType.fontWeights;\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const defaultHostConfig: HostConfig = new HostConfig({\r\n supportsInteractivity: true,\r\n spacing: {\r\n small: 10,\r\n default: 20,\r\n medium: 30,\r\n large: 40,\r\n extraLarge: 50,\r\n padding: 20\r\n },\r\n separator: {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n },\r\n fontTypes: {\r\n default: {\r\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n },\r\n monospace: {\r\n fontFamily: \"'Courier New', Courier, monospace\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n }\r\n },\r\n imageSizes: {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n },\r\n containerStyles: {\r\n default: {\r\n backgroundColor: \"#FFFFFF\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n emphasis: {\r\n backgroundColor: \"#08000000\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n accent: {\r\n backgroundColor: \"#C7DEF9\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n good: {\r\n backgroundColor: \"#CCFFCC\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n attention: {\r\n backgroundColor: \"#FFC5B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n warning: {\r\n backgroundColor: \"#FFE2B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n }\r\n },\r\n inputs: {\r\n label: {\r\n requiredInputs: {\r\n weight: Enums.TextWeight.Bolder,\r\n suffix: \" *\",\r\n suffixColor: Enums.TextColor.Attention\r\n },\r\n optionalInputs: {\r\n weight: Enums.TextWeight.Bolder\r\n }\r\n },\r\n errorMessage: {\r\n color: Enums.TextColor.Attention,\r\n weight: Enums.TextWeight.Bolder\r\n }\r\n },\r\n actions: {\r\n maxActions: 5,\r\n spacing: Enums.Spacing.Default,\r\n buttonSpacing: 10,\r\n showCard: {\r\n actionMode: Enums.ShowCardActionMode.Inline,\r\n inlineTopMargin: 16\r\n },\r\n actionsOrientation: Enums.Orientation.Horizontal,\r\n actionAlignment: Enums.ActionAlignment.Left\r\n },\r\n adaptiveCard: {\r\n allowCustomStyle: false\r\n },\r\n imageSet: {\r\n imageSize: Enums.Size.Medium,\r\n maxImageHeight: 100\r\n },\r\n factSet: {\r\n title: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Bolder,\r\n wrap: true,\r\n maxWidth: 150\r\n },\r\n value: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Default,\r\n wrap: true\r\n },\r\n spacing: 10\r\n }\r\n});\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { CardElement, Action } from \"./card-elements\";\r\nimport { SerializableObject, Version, Versions } from \"./serialization\";\r\n\r\n/**\r\n * Describes whether a certain element can be parsed in a \"singleton\" context.\r\n * Specifically, is the element allowed to exist as an object in a context where the\r\n * parent expects an Array of elements (e.g. `AdaptiveCard.body`)\r\n *\r\n * @example - Singleton element in a container (note `items` contains an `object` rather than an `Array`)\r\n * ```json\r\n * {\r\n * \"type\": \"Container\",\r\n * \"items\": {\r\n * \"type\": \"AllowedSingletonElement\"\r\n * }\r\n * }\r\n * ```\r\n */\r\nexport enum ElementSingletonBehavior {\r\n /** Element only valid in a singleton context. */\r\n Only,\r\n /** Element is allowed in a singleton context, but not required to be a singleton. */\r\n Allowed,\r\n /** Element is not allowed to exist in a singleton context. */\r\n NotAllowed\r\n}\r\n\r\nexport interface ITypeRegistration {\r\n typeName: string;\r\n objectType: { new (): T };\r\n schemaVersion: Version;\r\n singletonBehavior: ElementSingletonBehavior;\r\n}\r\n\r\nexport class CardObjectRegistry {\r\n private _items: { [typeName: string]: ITypeRegistration } = {};\r\n\r\n findByName(typeName: string): ITypeRegistration | undefined {\r\n return this._items.hasOwnProperty(typeName) ? this._items[typeName] : undefined;\r\n }\r\n\r\n clear() {\r\n this._items = {};\r\n }\r\n\r\n copyTo(target: CardObjectRegistry) {\r\n const keys = Object.keys(this._items);\r\n\r\n for (const key of keys) {\r\n const typeRegistration = this._items[key];\r\n\r\n target.register(\r\n typeRegistration.typeName,\r\n typeRegistration.objectType,\r\n typeRegistration.schemaVersion,\r\n typeRegistration.singletonBehavior\r\n );\r\n }\r\n }\r\n\r\n register(\r\n typeName: string,\r\n objectType: { new (): T },\r\n schemaVersion: Version = Versions.v1_0,\r\n singletonBehavior: ElementSingletonBehavior = ElementSingletonBehavior.NotAllowed\r\n ) {\r\n let registrationInfo = this.findByName(typeName);\r\n\r\n if (registrationInfo !== undefined) {\r\n registrationInfo.objectType = objectType;\r\n } else {\r\n registrationInfo = {\r\n typeName: typeName,\r\n objectType: objectType,\r\n schemaVersion: schemaVersion,\r\n singletonBehavior: singletonBehavior\r\n };\r\n }\r\n\r\n this._items[typeName] = registrationInfo;\r\n }\r\n\r\n unregister(typeName: string) {\r\n delete this._items[typeName];\r\n }\r\n\r\n createInstance(typeName: string, targetVersion: Version): T | undefined {\r\n const registrationInfo = this.findByName(typeName);\r\n\r\n return registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0\r\n ? new registrationInfo.objectType()\r\n : undefined;\r\n }\r\n\r\n getItemCount(): number {\r\n return Object.keys(this._items).length;\r\n }\r\n\r\n getItemAt(index: number): ITypeRegistration {\r\n return Object.keys(this._items).map((e) => this._items[e])[index];\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class GlobalRegistry {\r\n private static _elements?: CardObjectRegistry;\r\n private static _actions?: CardObjectRegistry;\r\n\r\n static populateWithDefaultElements(registry: CardObjectRegistry) {\r\n registry.clear();\r\n\r\n GlobalRegistry.defaultElements.copyTo(registry);\r\n }\r\n\r\n static populateWithDefaultActions(registry: CardObjectRegistry) {\r\n registry.clear();\r\n\r\n GlobalRegistry.defaultActions.copyTo(registry);\r\n }\r\n\r\n static readonly defaultElements = new CardObjectRegistry();\r\n static readonly defaultActions = new CardObjectRegistry();\r\n static get elements(): CardObjectRegistry {\r\n if (!GlobalRegistry._elements) {\r\n GlobalRegistry._elements = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements);\r\n }\r\n\r\n return GlobalRegistry._elements;\r\n }\r\n\r\n static get actions(): CardObjectRegistry {\r\n if (!GlobalRegistry._actions) {\r\n GlobalRegistry._actions = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions);\r\n }\r\n\r\n return GlobalRegistry._actions;\r\n }\r\n\r\n static reset() {\r\n GlobalRegistry._elements = undefined;\r\n GlobalRegistry._actions = undefined;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport { Strings } from \"./strings\";\r\nimport { Dictionary, GlobalSettings } from \"./shared\";\r\nimport { HostConfig } from \"./host-config\";\r\nimport { HostCapabilities } from \"./host-capabilities\";\r\nimport {\r\n Versions,\r\n property,\r\n SerializableObject,\r\n StringProperty,\r\n SerializableObjectProperty,\r\n IValidationEvent,\r\n PropertyDefinition\r\n} from \"./serialization\";\r\n\r\nexport class ValidationResults {\r\n readonly allIds: Dictionary = {};\r\n readonly validationEvents: IValidationEvent[] = [];\r\n\r\n addFailure(cardObject: CardObject, event: Enums.ValidationEvent, message: string) {\r\n this.validationEvents.push({\r\n phase: Enums.ValidationPhase.Validation,\r\n source: cardObject,\r\n event: event,\r\n message: message\r\n });\r\n }\r\n}\r\n\r\nexport type CardObjectType = { new (): CardObject };\r\n\r\nexport abstract class CardObject extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly typeNameProperty = new StringProperty(\r\n Versions.v1_0,\r\n \"type\",\r\n undefined,\r\n undefined,\r\n undefined,\r\n (sender: object) => {\r\n return (sender).getJsonTypeName();\r\n }\r\n );\r\n static readonly idProperty = new StringProperty(Versions.v1_0, \"id\");\r\n static readonly requiresProperty = new SerializableObjectProperty(\r\n Versions.v1_2,\r\n \"requires\",\r\n HostCapabilities,\r\n false,\r\n new HostCapabilities()\r\n );\r\n\r\n protected getSchemaKey(): string {\r\n return this.getJsonTypeName();\r\n }\r\n\r\n @property(CardObject.idProperty)\r\n id?: string;\r\n\r\n @property(CardObject.requiresProperty)\r\n get requires(): HostCapabilities {\r\n return this.getValue(CardObject.requiresProperty);\r\n }\r\n\r\n //#endregion\r\n\r\n private _shouldFallback: boolean = false;\r\n\r\n protected _parent?: CardObject;\r\n protected _renderedElement?: HTMLElement;\r\n\r\n /**\r\n * Checks if this CardObject contains the given DOM Node.\r\n * @param node The DOM Node to look for.\r\n * @returns `true` if the DOM Node was found, `false` otherwise.\r\n */\r\n protected contains(node: Node): boolean {\r\n if (this._renderedElement) {\r\n return this._renderedElement.contains(node);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n onPreProcessPropertyValue?: (\r\n sender: CardObject,\r\n property: PropertyDefinition,\r\n value: any\r\n ) => any;\r\n\r\n abstract getJsonTypeName(): string;\r\n\r\n abstract get hostConfig(): HostConfig;\r\n\r\n preProcessPropertyValue(prop: PropertyDefinition, propertyValue?: any): any {\r\n const value = propertyValue === undefined ? this.getValue(prop) : propertyValue;\r\n\r\n if (GlobalSettings.allowPreProcessingPropertyValues) {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n let currentObject: CardObject | undefined = this;\r\n\r\n while (currentObject && !currentObject.onPreProcessPropertyValue) {\r\n currentObject = currentObject.parent;\r\n }\r\n\r\n if (currentObject && currentObject.onPreProcessPropertyValue) {\r\n return currentObject.onPreProcessPropertyValue(this, prop, value);\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n\r\n setParent(value: CardObject | undefined) {\r\n this._parent = value;\r\n }\r\n\r\n setShouldFallback(value: boolean) {\r\n this._shouldFallback = value;\r\n }\r\n\r\n shouldFallback(): boolean {\r\n return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);\r\n }\r\n\r\n getRootObject(): CardObject {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n let currentObject: CardObject = this;\r\n\r\n while (currentObject.parent) {\r\n currentObject = currentObject.parent;\r\n }\r\n\r\n return currentObject;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n if (this.id) {\r\n if (context.allIds.hasOwnProperty(this.id)) {\r\n if (context.allIds[this.id] === 1) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.DuplicateId,\r\n Strings.errors.duplicateId(this.id)\r\n );\r\n }\r\n\r\n context.allIds[this.id] += 1;\r\n } else {\r\n context.allIds[this.id] = 1;\r\n }\r\n }\r\n }\r\n\r\n validateProperties(): ValidationResults {\r\n const result = new ValidationResults();\r\n\r\n this.internalValidateProperties(result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Recursively searches this CardObject and any children to find the\r\n * innermost CardObject that owns the given DOM Node.\r\n *\r\n * @param node The DOM Node to look for.\r\n *\r\n * @returns The owner of the given DOM Node, or `undefined` if no owner was found.\r\n */\r\n findDOMNodeOwner(node: Node): CardObject | undefined {\r\n // default implementation for CardObjects with no associated children\r\n return this.contains(node) ? this : undefined;\r\n }\r\n\r\n releaseDOMResources() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n get parent(): CardObject | undefined {\r\n return this._parent;\r\n }\r\n\r\n get renderedElement(): HTMLElement | undefined {\r\n return this._renderedElement;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nabstract class AbstractTextFormatter {\r\n private _regularExpression: RegExp;\r\n\r\n protected abstract internalFormat(lang: string | undefined, matches: RegExpExecArray): string;\r\n\r\n constructor(regularExpression: RegExp) {\r\n this._regularExpression = regularExpression;\r\n }\r\n\r\n format(lang: string | undefined, input: string | undefined): string | undefined {\r\n let matches;\r\n\r\n if (input) {\r\n let result = input;\r\n\r\n while ((matches = this._regularExpression.exec(input)) != null) {\r\n result = result.replace(matches[0], this.internalFormat(lang, matches));\r\n }\r\n\r\n return result;\r\n } else {\r\n return input;\r\n }\r\n }\r\n}\r\n\r\nclass DateFormatter extends AbstractTextFormatter {\r\n protected internalFormat(lang: string | undefined, matches: RegExpExecArray): string {\r\n const date = new Date(Date.parse(matches[1]));\r\n const format = matches[2] !== undefined ? matches[2].toLowerCase() : \"compact\";\r\n\r\n if (format !== \"compact\") {\r\n return date.toLocaleDateString(lang, {\r\n day: \"numeric\",\r\n weekday: format,\r\n month: format,\r\n year: \"numeric\"\r\n } as Intl.DateTimeFormatOptions);\r\n } else {\r\n return date.toLocaleDateString();\r\n }\r\n }\r\n}\r\n\r\nclass TimeFormatter extends AbstractTextFormatter {\r\n protected internalFormat(lang: string | undefined, matches: RegExpExecArray): string {\r\n const date = new Date(Date.parse(matches[1]));\r\n\r\n return date.toLocaleTimeString(lang, { hour: \"numeric\", minute: \"2-digit\" });\r\n }\r\n}\r\n\r\nexport function formatText(lang: string | undefined, text: string | undefined): string | undefined {\r\n const formatters: AbstractTextFormatter[] = [\r\n new DateFormatter(\r\n /\\{{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\r\n ),\r\n new TimeFormatter(\r\n /\\{{2}TIME\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))\\)\\}{2}/g\r\n )\r\n ];\r\n\r\n let result = text;\r\n\r\n for (const formatter of formatters) {\r\n result = formatter.format(lang, result);\r\n }\r\n\r\n return result;\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport class Constants {\r\n static readonly keys = {\r\n tab: \"Tab\",\r\n enter: \"Enter\",\r\n escape: \"Escape\",\r\n space: \" \",\r\n up: \"ArrowUp\",\r\n down: \"ArrowDown\",\r\n delete: \"Delete\"\r\n } as const;\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { defaultHostConfig, HostConfig } from \"../host-config\";\r\nimport { Constants } from \"./constants\";\r\n\r\nexport class MenuItem {\r\n private _hostConfig?: HostConfig;\r\n private _element: HTMLElement;\r\n private _value: string;\r\n private _isEnabled: boolean = true;\r\n\r\n private click() {\r\n if (this.isEnabled && this.onClick) {\r\n this.onClick(this);\r\n }\r\n }\r\n\r\n private updateCssClasses() {\r\n if (this._element) {\r\n const effectiveHostConfig = this._hostConfig ? this._hostConfig : defaultHostConfig;\r\n\r\n this._element.className = effectiveHostConfig.makeCssClassName(\"ac-ctrl\");\r\n this._element.classList.add(\r\n effectiveHostConfig.makeCssClassName(\r\n this.isEnabled ? \"ac-ctrl-dropdown-item\" : \"ac-ctrl-dropdown-item-disabled\"\r\n )\r\n );\r\n\r\n if (!this.isEnabled) {\r\n this._element.classList.add(effectiveHostConfig.makeCssClassName(\"ac-disabled\"));\r\n }\r\n }\r\n }\r\n\r\n readonly key: string;\r\n\r\n onClick?: (item: MenuItem) => void;\r\n\r\n constructor(key: string, value: string) {\r\n this.key = key;\r\n this._value = value;\r\n }\r\n\r\n toString(): string {\r\n return this.value;\r\n }\r\n\r\n render(hostConfig?: HostConfig): HTMLElement {\r\n this._hostConfig = hostConfig;\r\n\r\n if (!this._element) {\r\n this._element = document.createElement(\"span\");\r\n this._element.innerText = this.value;\r\n this._element.setAttribute(\"role\", \"menuitem\");\r\n\r\n if (!this.isEnabled) {\r\n this._element.setAttribute(\"aria-disabled\", \"true\");\r\n }\r\n\r\n this._element.setAttribute(\"aria-current\", \"false\");\r\n this._element.onmouseup = (_e) => {\r\n this.click();\r\n };\r\n this._element.onkeydown = (e) => {\r\n if (e.key === Constants.keys.enter) {\r\n e.cancelBubble = true;\r\n\r\n this.click();\r\n }\r\n };\r\n\r\n this.updateCssClasses();\r\n }\r\n\r\n return this._element;\r\n }\r\n\r\n get value(): string {\r\n return this._value;\r\n }\r\n\r\n set value(newValue: string) {\r\n this._value = newValue;\r\n\r\n if (this._element) {\r\n this._element.innerText = newValue;\r\n }\r\n }\r\n\r\n get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n set isEnabled(value: boolean) {\r\n if (this._isEnabled !== value) {\r\n this._isEnabled = value;\r\n\r\n this.updateCssClasses();\r\n }\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport class Collection {\r\n private _items: Array = [];\r\n\r\n onItemAdded: (item: TItem) => void;\r\n onItemRemoved: (item: TItem) => void;\r\n\r\n get(index: number): TItem {\r\n return this._items[index];\r\n }\r\n\r\n add(item: TItem) {\r\n this._items.push(item);\r\n\r\n if (this.onItemAdded) {\r\n this.onItemAdded(item);\r\n }\r\n }\r\n\r\n remove(item: TItem) {\r\n const i = this._items.indexOf(item);\r\n\r\n if (i >= 0) {\r\n this._items = this._items.splice(i, 1);\r\n\r\n if (this.onItemRemoved) {\r\n this.onItemRemoved(item);\r\n }\r\n }\r\n }\r\n\r\n indexOf(item: TItem): number {\r\n return this._items.indexOf(item);\r\n }\r\n\r\n get length(): number {\r\n return this._items.length;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Constants } from \"./constants\";\r\nimport * as Utils from \"../utils\";\r\nimport { defaultHostConfig, HostConfig } from \"../host-config\";\r\n\r\nexport abstract class PopupControl {\r\n private _isOpen: boolean = false;\r\n private _overlayElement: HTMLElement;\r\n private _popupElement: HTMLElement;\r\n private _hostConfig?: HostConfig;\r\n\r\n protected abstract renderContent(): HTMLElement;\r\n\r\n onClose: (popupControl: PopupControl, wasCancelled: boolean) => void;\r\n\r\n keyDown(e: KeyboardEvent) {\r\n switch (e.key) {\r\n case Constants.keys.escape:\r\n this.closePopup(true);\r\n\r\n break;\r\n }\r\n }\r\n\r\n render(_rootElementBounds: ClientRect): HTMLElement {\r\n const element = document.createElement(\"div\");\r\n element.tabIndex = 0;\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl\", \"ac-ctrl-popup-container\");\r\n element.setAttribute(\"role\", \"dialog\");\r\n element.setAttribute(\"aria-modal\", \"true\");\r\n element.onkeydown = (e) => {\r\n this.keyDown(e);\r\n\r\n return !e.cancelBubble;\r\n };\r\n\r\n element.appendChild(this.renderContent());\r\n\r\n return element;\r\n }\r\n\r\n focus() {\r\n if (this._popupElement) {\r\n (this._popupElement.firstElementChild).focus();\r\n }\r\n }\r\n\r\n popup(rootElement: HTMLElement) {\r\n if (!this._isOpen) {\r\n this._overlayElement = document.createElement(\"div\");\r\n this._overlayElement.className = this.hostConfig.makeCssClassName(\"ac-ctrl-overlay\");\r\n this._overlayElement.tabIndex = 0;\r\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\r\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\r\n this._overlayElement.onfocus = (_e) => {\r\n this.closePopup(true);\r\n };\r\n\r\n document.body.appendChild(this._overlayElement);\r\n\r\n const rootElementBounds = rootElement.getBoundingClientRect();\r\n\r\n this._popupElement = this.render(rootElementBounds);\r\n this._popupElement.classList.remove(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideLeftToRight\",\r\n \"ac-ctrl-slideRightToLeft\",\r\n \"ac-ctrl-slideTopToBottom\",\r\n \"ac-ctrl-slideRightToLeft\"\r\n )\r\n );\r\n\r\n window.addEventListener(\"resize\", (_e) => {\r\n this.closePopup(true);\r\n });\r\n\r\n const rootElementLabel = rootElement.getAttribute(\"aria-label\");\r\n if (rootElementLabel) {\r\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\r\n }\r\n\r\n this._overlayElement.appendChild(this._popupElement);\r\n\r\n const popupElementBounds = this._popupElement.getBoundingClientRect();\r\n\r\n const availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\r\n const availableSpaceAbove = rootElementBounds.top;\r\n const availableSpaceRight = window.innerWidth - rootElementBounds.right;\r\n const availableSpaceLeft = rootElementBounds.left;\r\n\r\n let left = rootElementBounds.left + Utils.getScrollX();\r\n let top;\r\n\r\n if (\r\n availableSpaceAbove < popupElementBounds.height &&\r\n availableSpaceBelow < popupElementBounds.height\r\n ) {\r\n // Not enough space above or below root element\r\n const actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\r\n\r\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\r\n\r\n if (actualPopupHeight < popupElementBounds.height) {\r\n top = Utils.getScrollY();\r\n } else {\r\n top =\r\n Utils.getScrollY() +\r\n rootElementBounds.top +\r\n (rootElementBounds.height - actualPopupHeight) / 2;\r\n }\r\n\r\n if (\r\n availableSpaceLeft < popupElementBounds.width &&\r\n availableSpaceRight < popupElementBounds.width\r\n ) {\r\n // Not enough space left or right of root element\r\n const actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\r\n\r\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\r\n\r\n if (actualPopupWidth < popupElementBounds.width) {\r\n left = Utils.getScrollX();\r\n } else {\r\n left =\r\n Utils.getScrollX() +\r\n rootElementBounds.left +\r\n (rootElementBounds.width - actualPopupWidth) / 2;\r\n }\r\n } else {\r\n // Enough space on the left or right of the root element\r\n if (availableSpaceRight >= popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideLeftToRight\"\r\n )\r\n );\r\n } else {\r\n left =\r\n Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideRightToLeft\"\r\n )\r\n );\r\n }\r\n }\r\n } else {\r\n // Enough space above or below root element\r\n if (availableSpaceBelow >= popupElementBounds.height) {\r\n top = Utils.getScrollY() + rootElementBounds.bottom;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideTopToBottom\"\r\n )\r\n );\r\n } else {\r\n top = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\r\n\r\n this._popupElement.classList.add(\r\n ...this.hostConfig.makeCssClassNames(\r\n \"ac-ctrl-slide\",\r\n \"ac-ctrl-slideBottomToTop\"\r\n )\r\n );\r\n }\r\n\r\n if (availableSpaceRight < popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\r\n }\r\n }\r\n\r\n this._popupElement.style.left = left + \"px\";\r\n this._popupElement.style.top = top + \"px\";\r\n\r\n this._popupElement.focus();\r\n\r\n this._isOpen = true;\r\n }\r\n }\r\n\r\n closePopup(wasCancelled: boolean) {\r\n if (this._isOpen) {\r\n document.body.removeChild(this._overlayElement);\r\n\r\n this._isOpen = false;\r\n\r\n if (this.onClose) {\r\n this.onClose(this, wasCancelled);\r\n }\r\n }\r\n }\r\n\r\n get hostConfig(): HostConfig {\r\n return this._hostConfig ? this._hostConfig : defaultHostConfig;\r\n }\r\n\r\n set hostConfig(value: HostConfig) {\r\n this._hostConfig = value;\r\n }\r\n\r\n get isOpen(): boolean {\r\n return this._isOpen;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Constants } from \"./constants\";\r\nimport { Collection } from \"./collection\";\r\nimport { PopupControl } from \"./popup-control\";\r\nimport { MenuItem } from \"./menu-item\";\r\n\r\nexport class PopupMenu extends PopupControl {\r\n private _items: Collection = new Collection();\r\n private _renderedItems: Array = [];\r\n private _selectedIndex: number = -1;\r\n\r\n protected renderContent(): HTMLElement {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl ac-popup\");\r\n element.setAttribute(\"role\", \"listbox\");\r\n\r\n for (let i = 0; i < this._items.length; i++) {\r\n const renderedItem = this._items.get(i).render(this.hostConfig);\r\n renderedItem.tabIndex = 0;\r\n\r\n element.appendChild(renderedItem);\r\n\r\n if (i === this.selectedIndex) {\r\n renderedItem.focus();\r\n }\r\n\r\n this._renderedItems.push(renderedItem);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n keyDown(e: KeyboardEvent) {\r\n super.keyDown(e);\r\n\r\n let selectedItemIndex = this._selectedIndex;\r\n\r\n switch (e.key) {\r\n case Constants.keys.tab:\r\n this.closePopup(true);\r\n\r\n break;\r\n /*\r\n case Constants.keys.enter:\r\n if (this.selectedIndex >= 0) {\r\n this.selectedIndex = this.selectedIndex;\r\n\r\n this.close();\r\n }\r\n\r\n break;\r\n */\r\n case Constants.keys.up:\r\n if (selectedItemIndex <= 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n } else {\r\n selectedItemIndex--;\r\n\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n }\r\n }\r\n\r\n this.selectedIndex = selectedItemIndex;\r\n\r\n e.cancelBubble = true;\r\n\r\n break;\r\n case Constants.keys.down:\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = 0;\r\n } else {\r\n selectedItemIndex++;\r\n\r\n if (selectedItemIndex >= this._renderedItems.length) {\r\n selectedItemIndex = 0;\r\n }\r\n }\r\n\r\n this.selectedIndex = selectedItemIndex;\r\n\r\n e.cancelBubble = true;\r\n\r\n break;\r\n }\r\n }\r\n\r\n get items(): Collection {\r\n return this._items;\r\n }\r\n\r\n get selectedIndex(): number {\r\n return this._selectedIndex;\r\n }\r\n\r\n set selectedIndex(index: number) {\r\n if (index >= 0 && index < this._renderedItems.length) {\r\n this._renderedItems[index].focus();\r\n\r\n this._selectedIndex = index;\r\n }\r\n }\r\n}\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport * from \"./menu-item\";\r\nexport * from \"./popup-menu\";\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport {\r\n PaddingDefinition,\r\n GlobalSettings,\r\n SizeAndUnit,\r\n SpacingDefinition,\r\n ISeparationDefinition,\r\n Dictionary,\r\n StringWithSubstitutions,\r\n ContentTypes,\r\n IInput,\r\n IResourceInformation\r\n} from \"./shared\";\r\nimport * as Utils from \"./utils\";\r\nimport {\r\n HostConfig,\r\n defaultHostConfig,\r\n BaseTextDefinition,\r\n FontTypeDefinition,\r\n ColorSetDefinition,\r\n TextColorDefinition,\r\n ContainerStyleDefinition,\r\n TextStyleDefinition\r\n} from \"./host-config\";\r\nimport * as TextFormatters from \"./text-formatters\";\r\nimport { CardObject, ValidationResults } from \"./card-object\";\r\nimport {\r\n Versions,\r\n Version,\r\n property,\r\n BaseSerializationContext,\r\n SerializableObject,\r\n SerializableObjectSchema,\r\n StringProperty,\r\n BoolProperty,\r\n ValueSetProperty,\r\n EnumProperty,\r\n SerializableObjectCollectionProperty,\r\n SerializableObjectProperty,\r\n PixelSizeProperty,\r\n NumProperty,\r\n PropertyBag,\r\n CustomProperty,\r\n PropertyDefinition,\r\n StringArrayProperty\r\n} from \"./serialization\";\r\nimport { CardObjectRegistry, GlobalRegistry, ElementSingletonBehavior } from \"./registry\";\r\nimport { Strings } from \"./strings\";\r\nimport { MenuItem, PopupMenu } from \"./controls\";\r\n\r\n\r\nfunction clearElement(element: HTMLElement) : void {\r\n const trustedHtml = (typeof window === 'undefined') ? \"\" : (window.trustedTypes?.emptyHTML ?? \"\");\r\n element.innerHTML = trustedHtml as string;\r\n}\r\n\r\nexport function renderSeparation(\r\n hostConfig: HostConfig,\r\n separationDefinition: ISeparationDefinition,\r\n orientation: Enums.Orientation\r\n): HTMLElement | undefined {\r\n if (\r\n separationDefinition.spacing > 0 ||\r\n (separationDefinition.lineThickness && separationDefinition.lineThickness > 0)\r\n ) {\r\n const separator = document.createElement(\"div\");\r\n separator.className = hostConfig.makeCssClassName(\r\n \"ac-\" +\r\n (orientation === Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\") +\r\n \"-separator\"\r\n );\r\n separator.setAttribute(\"aria-hidden\", \"true\");\r\n\r\n const color = separationDefinition.lineColor\r\n ? Utils.stringToCssColor(separationDefinition.lineColor)\r\n : \"\";\r\n\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingTop = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginBottom = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderBottom =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n } else {\r\n separator.style.height = separationDefinition.spacing + \"px\";\r\n }\r\n } else {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingLeft = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginRight = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderRight =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n } else {\r\n separator.style.width = separationDefinition.spacing + \"px\";\r\n }\r\n }\r\n\r\n separator.style.overflow = \"hidden\";\r\n separator.style.flex = \"0 0 auto\";\r\n\r\n return separator;\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nexport type CardElementHeight = \"auto\" | \"stretch\";\r\n\r\nexport abstract class CardElement extends CardObject {\r\n //#region Schema\r\n\r\n static readonly langProperty = new StringProperty(\r\n Versions.v1_1,\r\n \"lang\",\r\n true,\r\n /^[a-z]{2,3}$/gi\r\n );\r\n static readonly isVisibleProperty = new BoolProperty(Versions.v1_2, \"isVisible\", true);\r\n static readonly separatorProperty = new BoolProperty(Versions.v1_0, \"separator\", false);\r\n static readonly heightProperty = new ValueSetProperty(\r\n Versions.v1_1,\r\n \"height\",\r\n [{ value: \"auto\" }, { value: \"stretch\" }],\r\n \"auto\"\r\n );\r\n static readonly horizontalAlignmentProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"horizontalAlignment\",\r\n Enums.HorizontalAlignment\r\n );\r\n static readonly spacingProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"spacing\",\r\n Enums.Spacing,\r\n Enums.Spacing.Default\r\n );\r\n\r\n @property(CardElement.horizontalAlignmentProperty)\r\n horizontalAlignment?: Enums.HorizontalAlignment;\r\n\r\n @property(CardElement.spacingProperty)\r\n spacing: Enums.Spacing;\r\n\r\n @property(CardElement.separatorProperty)\r\n separator: boolean;\r\n\r\n @property(CardElement.heightProperty)\r\n height: CardElementHeight;\r\n\r\n @property(CardElement.langProperty)\r\n get lang(): string | undefined {\r\n const lang = this.getValue(CardElement.langProperty);\r\n\r\n if (lang) {\r\n return lang;\r\n } else {\r\n if (this.parent) {\r\n return this.parent.lang;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n set lang(value: string | undefined) {\r\n this.setValue(CardElement.langProperty, value);\r\n }\r\n\r\n @property(CardElement.isVisibleProperty)\r\n get isVisible(): boolean {\r\n return this.getValue(CardElement.isVisibleProperty);\r\n }\r\n\r\n set isVisible(value: boolean) {\r\n // If the element is going to be hidden, reset any changes that were due\r\n // to overflow truncation (this ensures that if the element is later\r\n // un-hidden it has the right content)\r\n if (GlobalSettings.useAdvancedCardBottomTruncation && !value) {\r\n this.undoOverflowTruncation();\r\n }\r\n\r\n if (this.isVisible !== value) {\r\n this.setValue(CardElement.isVisibleProperty, value);\r\n\r\n this.updateRenderedElementVisibility();\r\n\r\n if (this._renderedElement) {\r\n raiseElementVisibilityChangedEvent(this);\r\n }\r\n }\r\n\r\n if (this._renderedElement) {\r\n this._renderedElement.setAttribute(\"aria-expanded\", value.toString());\r\n }\r\n }\r\n\r\n //#endregion\r\n\r\n private _hostConfig?: HostConfig;\r\n private _separatorElement?: HTMLElement;\r\n private _truncatedDueToOverflow: boolean = false;\r\n private _defaultRenderedElementDisplayMode?: string;\r\n private _padding?: PaddingDefinition;\r\n\r\n private internalRenderSeparator(): HTMLElement | undefined {\r\n const renderedSeparator = renderSeparation(\r\n this.hostConfig,\r\n {\r\n spacing: this.hostConfig.getEffectiveSpacing(this.spacing),\r\n lineThickness: this.separator ? this.hostConfig.separator.lineThickness : undefined,\r\n lineColor: this.separator ? this.hostConfig.separator.lineColor : undefined\r\n },\r\n this.separatorOrientation\r\n );\r\n\r\n if (\r\n GlobalSettings.alwaysBleedSeparators &&\r\n renderedSeparator &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal\r\n ) {\r\n // Adjust separator's margins if the option to always bleed separators is turned on\r\n const parentContainer = this.getParentContainer();\r\n\r\n if (parentContainer && parentContainer.getEffectivePadding()) {\r\n const parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(\r\n parentContainer.getEffectivePadding()\r\n );\r\n\r\n renderedSeparator.style.marginLeft = \"-\" + parentPhysicalPadding.left + \"px\";\r\n renderedSeparator.style.marginRight = \"-\" + parentPhysicalPadding.right + \"px\";\r\n }\r\n }\r\n\r\n return renderedSeparator;\r\n }\r\n\r\n private updateRenderedElementVisibility() {\r\n const displayMode =\r\n this.isDesignMode() || this.isVisible\r\n ? this._defaultRenderedElementDisplayMode\r\n : \"none\";\r\n\r\n if (this._renderedElement) {\r\n if (displayMode) {\r\n this._renderedElement.style.display = displayMode;\r\n } else {\r\n this._renderedElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n\r\n if (this._separatorElement) {\r\n if (this.parent && this.parent.isFirstElement(this)) {\r\n this._separatorElement.style.display = \"none\";\r\n } else {\r\n if (displayMode) {\r\n this._separatorElement.style.display = displayMode;\r\n } else {\r\n this._separatorElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n private hideElementDueToOverflow() {\r\n if (this._renderedElement && this.isVisible) {\r\n this._renderedElement.style.visibility = \"hidden\";\r\n\r\n this.isVisible = false;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n }\r\n\r\n private showElementHiddenDueToOverflow() {\r\n if (this._renderedElement && !this.isVisible) {\r\n this._renderedElement.style.removeProperty(\"visibility\");\r\n\r\n this.isVisible = true;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n }\r\n\r\n // Marked private to emulate internal access\r\n private handleOverflow(maxHeight: number) {\r\n if (this.isVisible || this.isHiddenDueToOverflow()) {\r\n const handled = this.truncateOverflow(maxHeight);\r\n\r\n // Even if we were unable to truncate the element to fit this time,\r\n // it still could have been previously truncated\r\n this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;\r\n\r\n if (!handled) {\r\n this.hideElementDueToOverflow();\r\n } else if (handled && !this.isVisible) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n }\r\n }\r\n\r\n // Marked private to emulate internal access\r\n private resetOverflow(): boolean {\r\n let sizeChanged = false;\r\n\r\n if (this._truncatedDueToOverflow) {\r\n this.undoOverflowTruncation();\r\n this._truncatedDueToOverflow = false;\r\n sizeChanged = true;\r\n }\r\n\r\n if (this.isHiddenDueToOverflow()) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n\r\n return sizeChanged;\r\n }\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SerializationContext();\r\n }\r\n\r\n protected createPlaceholderElement(): HTMLElement {\r\n const styleDefinition = this.getEffectiveStyleDefinition();\r\n const foregroundCssColor = Utils.stringToCssColor(\r\n styleDefinition.foregroundColors.default.subtle\r\n );\r\n\r\n const element = document.createElement(\"div\");\r\n element.style.border = \"1px dashed \" + foregroundCssColor;\r\n element.style.padding = \"4px\";\r\n element.style.minHeight = \"32px\";\r\n element.style.fontSize = \"10px\";\r\n\r\n if (foregroundCssColor) {\r\n element.style.color = foregroundCssColor;\r\n }\r\n\r\n element.innerText = \"Empty \" + this.getJsonTypeName();\r\n\r\n return element;\r\n }\r\n\r\n protected adjustRenderedElementSize(renderedElement: HTMLElement) {\r\n if (this.height === \"auto\") {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n } else {\r\n renderedElement.style.flex = \"1 1 auto\";\r\n }\r\n }\r\n\r\n protected isDisplayed(): boolean {\r\n return (\r\n this._renderedElement !== undefined &&\r\n this.isVisible &&\r\n this._renderedElement.offsetHeight > 0\r\n );\r\n }\r\n\r\n protected abstract internalRender(): HTMLElement | undefined;\r\n\r\n protected overrideInternalRender(): HTMLElement | undefined {\r\n return this.internalRender();\r\n }\r\n\r\n protected applyPadding() {\r\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n if (GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {\r\n const padding = new PaddingDefinition();\r\n\r\n this.getImmediateSurroundingPadding(padding);\r\n\r\n const physicalPadding =\r\n this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n\r\n this.separatorElement.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n } else {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * Called when this element overflows the bottom of the card.\r\n * maxHeight will be the amount of space still available on the card (0 if\r\n * the element is fully off the card).\r\n */\r\n protected truncateOverflow(_maxHeight: number): boolean {\r\n // Child implementations should return true if the element handled\r\n // the truncation request such that its content fits within maxHeight,\r\n // false if the element should fall back to being hidden\r\n return false;\r\n }\r\n\r\n /*\r\n * This should reverse any changes performed in truncateOverflow().\r\n */\r\n protected undoOverflowTruncation() {\r\n return;\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition();\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n return false;\r\n }\r\n\r\n protected getHasBorder(): boolean {\r\n return false;\r\n }\r\n\r\n protected getPadding(): PaddingDefinition | undefined {\r\n return this._padding;\r\n }\r\n\r\n protected setPadding(value: PaddingDefinition | undefined) {\r\n this._padding = value;\r\n }\r\n\r\n protected shouldSerialize(context: SerializationContext): boolean {\r\n return context.elementRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n }\r\n\r\n protected get useDefaultSizing(): boolean {\r\n return true;\r\n }\r\n\r\n protected get separatorOrientation(): Enums.Orientation {\r\n return Enums.Orientation.Horizontal;\r\n }\r\n\r\n protected get defaultStyle(): string {\r\n return Enums.ContainerStyle.Default;\r\n }\r\n\r\n customCssSelector?: string;\r\n\r\n parse(source: any, context?: SerializationContext) {\r\n super.parse(source, context ? context : new SerializationContext());\r\n }\r\n\r\n asString(): string | undefined {\r\n return \"\";\r\n }\r\n\r\n isBleeding(): boolean {\r\n return false;\r\n }\r\n\r\n getEffectiveStyle(): string {\r\n if (this.parent) {\r\n return this.parent.getEffectiveStyle();\r\n }\r\n\r\n return this.defaultStyle;\r\n }\r\n\r\n getEffectiveStyleDefinition(): ContainerStyleDefinition {\r\n return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());\r\n }\r\n\r\n getEffectiveTextStyleDefinition(): TextStyleDefinition {\r\n if (this.parent) {\r\n return this.parent.getEffectiveTextStyleDefinition();\r\n }\r\n\r\n return this.hostConfig.textStyles.default;\r\n }\r\n\r\n getForbiddenActionTypes(): ActionType[] {\r\n return [];\r\n }\r\n\r\n getImmediateSurroundingPadding(\r\n result: PaddingDefinition,\r\n processTop: boolean = true,\r\n processRight: boolean = true,\r\n processBottom: boolean = true,\r\n processLeft: boolean = true\r\n ) {\r\n if (this.parent) {\r\n let doProcessTop = processTop && this.parent.isTopElement(this);\r\n let doProcessRight = processRight && this.parent.isRightMostElement(this);\r\n let doProcessBottom = processBottom && this.parent.isBottomElement(this);\r\n let doProcessLeft = processLeft && this.parent.isLeftMostElement(this);\r\n\r\n const effectivePadding = this.parent.getEffectivePadding();\r\n\r\n if (effectivePadding) {\r\n if (doProcessTop && effectivePadding.top !== Enums.Spacing.None) {\r\n result.top = effectivePadding.top;\r\n\r\n doProcessTop = false;\r\n }\r\n\r\n if (doProcessRight && effectivePadding.right !== Enums.Spacing.None) {\r\n result.right = effectivePadding.right;\r\n\r\n doProcessRight = false;\r\n }\r\n\r\n if (doProcessBottom && effectivePadding.bottom !== Enums.Spacing.None) {\r\n result.bottom = effectivePadding.bottom;\r\n\r\n doProcessBottom = false;\r\n }\r\n\r\n if (doProcessLeft && effectivePadding.left !== Enums.Spacing.None) {\r\n result.left = effectivePadding.left;\r\n\r\n doProcessLeft = false;\r\n }\r\n }\r\n\r\n if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {\r\n this.parent.getImmediateSurroundingPadding(\r\n result,\r\n doProcessTop,\r\n doProcessRight,\r\n doProcessBottom,\r\n doProcessLeft\r\n );\r\n }\r\n }\r\n }\r\n\r\n getActionCount(): number {\r\n return 0;\r\n }\r\n\r\n getActionAt(index: number): Action | undefined {\r\n throw new Error(Strings.errors.indexOutOfRange(index));\r\n }\r\n\r\n indexOfAction(action: Action): number {\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n if (this.getActionAt(i) === action) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n remove(): boolean {\r\n if (this.parent && this.parent instanceof CardElementContainer) {\r\n return this.parent.removeItem(this);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n this._renderedElement = this.overrideInternalRender();\r\n this._separatorElement = this.internalRenderSeparator();\r\n\r\n if (this._renderedElement) {\r\n if (this.id) {\r\n this._renderedElement.id = this.id;\r\n }\r\n\r\n if (this.customCssSelector) {\r\n this._renderedElement.classList.add(this.customCssSelector);\r\n }\r\n\r\n this._renderedElement.style.boxSizing = \"border-box\";\r\n this._defaultRenderedElementDisplayMode = this._renderedElement.style.display\r\n ? this._renderedElement.style.display\r\n : undefined;\r\n\r\n this.adjustRenderedElementSize(this._renderedElement);\r\n this.updateLayout(false);\r\n } else if (this.isDesignMode()) {\r\n this._renderedElement = this.createPlaceholderElement();\r\n }\r\n\r\n this.getRootElement().updateActionsEnabledState();\r\n\r\n return this._renderedElement;\r\n }\r\n\r\n updateLayout(_processChildren: boolean = true) {\r\n this.updateRenderedElementVisibility();\r\n this.applyPadding();\r\n }\r\n\r\n updateActionsEnabledState() {\r\n const allActions = this.getRootElement().getAllActions();\r\n\r\n for (let action of allActions) {\r\n action.updateEnabledState();\r\n }\r\n }\r\n\r\n indexOf(_cardElement: CardElement): number {\r\n return -1;\r\n }\r\n\r\n isDesignMode(): boolean {\r\n const rootElement = this.getRootElement();\r\n\r\n return rootElement instanceof AdaptiveCard && rootElement.designMode;\r\n }\r\n\r\n isFirstElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isLastElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isAtTheVeryLeft(): boolean {\r\n return this.parent\r\n ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft()\r\n : true;\r\n }\r\n\r\n isAtTheVeryRight(): boolean {\r\n return this.parent\r\n ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight()\r\n : true;\r\n }\r\n\r\n isAtTheVeryTop(): boolean {\r\n return this.parent\r\n ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop()\r\n : true;\r\n }\r\n\r\n isAtTheVeryBottom(): boolean {\r\n return this.parent\r\n ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom()\r\n : true;\r\n }\r\n\r\n isBleedingAtTop(): boolean {\r\n return false;\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n return false;\r\n }\r\n\r\n isLeftMostElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isRightMostElement(_element: CardElement): boolean {\r\n return true;\r\n }\r\n\r\n isTopElement(element: CardElement): boolean {\r\n return this.isFirstElement(element);\r\n }\r\n\r\n isBottomElement(element: CardElement): boolean {\r\n return this.isLastElement(element);\r\n }\r\n\r\n isHiddenDueToOverflow(): boolean {\r\n return (\r\n this._renderedElement !== undefined &&\r\n this._renderedElement.style.visibility === \"hidden\"\r\n );\r\n }\r\n\r\n getRootElement(): CardElement {\r\n return this.getRootObject() as CardElement;\r\n }\r\n\r\n getParentContainer(): Container | undefined {\r\n let currentElement = this.parent;\r\n\r\n while (currentElement) {\r\n if (currentElement instanceof Container) {\r\n return currentElement;\r\n }\r\n\r\n currentElement = currentElement.parent;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return [];\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result: Action[] = [];\r\n\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n let action = this.getActionAt(i);\r\n\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return [];\r\n }\r\n\r\n getElementById(id: string): CardElement | undefined {\r\n return this.id === id ? this : undefined;\r\n }\r\n\r\n getActionById(_id: string): Action | undefined {\r\n return undefined;\r\n }\r\n\r\n getEffectivePadding(): PaddingDefinition {\r\n const padding = this.getPadding();\r\n\r\n return padding ? padding : this.getDefaultPadding();\r\n }\r\n\r\n getEffectiveHorizontalAlignment(): Enums.HorizontalAlignment {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n\r\n if (this.parent) {\r\n return this.parent.getEffectiveHorizontalAlignment();\r\n }\r\n\r\n return Enums.HorizontalAlignment.Left;\r\n }\r\n\r\n get hostConfig(): HostConfig {\r\n if (this._hostConfig) {\r\n return this._hostConfig;\r\n } else {\r\n if (this.parent) {\r\n return this.parent.hostConfig;\r\n } else {\r\n return defaultHostConfig;\r\n }\r\n }\r\n }\r\n\r\n set hostConfig(value: HostConfig) {\r\n this._hostConfig = value;\r\n }\r\n\r\n get index(): number {\r\n if (this.parent) {\r\n return this.parent.indexOf(this);\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n get isInteractive(): boolean {\r\n return false;\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return true;\r\n }\r\n\r\n get isInline(): boolean {\r\n return false;\r\n }\r\n\r\n get hasVisibleSeparator(): boolean {\r\n if (this.parent && this.separatorElement) {\r\n return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n get separatorElement(): HTMLElement | undefined {\r\n return this._separatorElement;\r\n }\r\n\r\n get parent(): CardElement | undefined {\r\n return this._parent;\r\n }\r\n\r\n getElementSingletonBehavior(): ElementSingletonBehavior {\r\n return ElementSingletonBehavior.NotAllowed;\r\n }\r\n}\r\n\r\nexport class ActionProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: SerializationContext\r\n ): Action | undefined {\r\n const parent = sender;\r\n\r\n return context.parseAction(\r\n parent,\r\n source[this.name],\r\n this.forbiddenActionTypes,\r\n parent.isDesignMode()\r\n );\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: Action | undefined,\r\n context: SerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n value ? value.toJSON(context) : undefined,\r\n undefined,\r\n true\r\n );\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly forbiddenActionTypes: string[] = []\r\n ) {\r\n super(targetVersion, name, undefined);\r\n }\r\n}\r\n\r\nexport abstract class BaseTextBlock extends CardElement {\r\n //#region Schema\r\n\r\n static readonly textProperty = new StringProperty(Versions.v1_0, \"text\", true);\r\n static readonly sizeProperty = new EnumProperty(Versions.v1_0, \"size\", Enums.TextSize);\r\n static readonly weightProperty = new EnumProperty(Versions.v1_0, \"weight\", Enums.TextWeight);\r\n static readonly colorProperty = new EnumProperty(Versions.v1_0, \"color\", Enums.TextColor);\r\n static readonly isSubtleProperty = new BoolProperty(Versions.v1_0, \"isSubtle\");\r\n static readonly fontTypeProperty = new EnumProperty(Versions.v1_2, \"fontType\", Enums.FontType);\r\n static readonly selectActionProperty = new ActionProperty(Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n // selectAction is declared on BaseTextBlock but is only exposed on TextRun,\r\n // so the property is removed from the BaseTextBlock schema.\r\n schema.remove(BaseTextBlock.selectActionProperty);\r\n }\r\n\r\n @property(BaseTextBlock.sizeProperty)\r\n size?: Enums.TextSize;\r\n\r\n @property(BaseTextBlock.weightProperty)\r\n weight?: Enums.TextWeight;\r\n\r\n @property(BaseTextBlock.colorProperty)\r\n color?: Enums.TextColor;\r\n\r\n @property(BaseTextBlock.fontTypeProperty)\r\n fontType?: Enums.FontType;\r\n\r\n @property(BaseTextBlock.isSubtleProperty)\r\n isSubtle?: boolean;\r\n\r\n @property(BaseTextBlock.textProperty)\r\n get text(): string | undefined {\r\n return this.getValue(BaseTextBlock.textProperty);\r\n }\r\n\r\n set text(value: string | undefined) {\r\n this.setText(value);\r\n }\r\n\r\n @property(BaseTextBlock.selectActionProperty)\r\n selectAction?: Action;\r\n\r\n //#endregion\r\n\r\n protected getFontSize(fontType: FontTypeDefinition): number {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n return fontType.fontSizes.small;\r\n case Enums.TextSize.Medium:\r\n return fontType.fontSizes.medium;\r\n case Enums.TextSize.Large:\r\n return fontType.fontSizes.large;\r\n case Enums.TextSize.ExtraLarge:\r\n return fontType.fontSizes.extraLarge;\r\n default:\r\n return fontType.fontSizes.default;\r\n }\r\n }\r\n\r\n protected getColorDefinition(\r\n colorSet: ColorSetDefinition,\r\n color: Enums.TextColor\r\n ): TextColorDefinition {\r\n switch (color) {\r\n case Enums.TextColor.Accent:\r\n return colorSet.accent;\r\n case Enums.TextColor.Dark:\r\n return colorSet.dark;\r\n case Enums.TextColor.Light:\r\n return colorSet.light;\r\n case Enums.TextColor.Good:\r\n return colorSet.good;\r\n case Enums.TextColor.Warning:\r\n return colorSet.warning;\r\n case Enums.TextColor.Attention:\r\n return colorSet.attention;\r\n default:\r\n return colorSet.default;\r\n }\r\n }\r\n\r\n protected setText(value: string | undefined) {\r\n this.setValue(BaseTextBlock.textProperty, value);\r\n }\r\n\r\n ariaHidden: boolean = false;\r\n\r\n constructor(text?: string) {\r\n super();\r\n\r\n if (text) {\r\n this.text = text;\r\n }\r\n }\r\n\r\n init(textDefinition: BaseTextDefinition) {\r\n this.size = textDefinition.size;\r\n this.weight = textDefinition.weight;\r\n this.color = textDefinition.color;\r\n this.isSubtle = textDefinition.isSubtle;\r\n }\r\n\r\n asString(): string | undefined {\r\n return this.text;\r\n }\r\n\r\n applyStylesTo(targetElement: HTMLElement) {\r\n const fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);\r\n\r\n if (fontType.fontFamily) {\r\n targetElement.style.fontFamily = fontType.fontFamily;\r\n }\r\n\r\n let fontSize: number;\r\n\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n fontSize = fontType.fontSizes.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n fontSize = fontType.fontSizes.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n fontSize = fontType.fontSizes.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n fontSize = fontType.fontSizes.extraLarge;\r\n break;\r\n default:\r\n fontSize = fontType.fontSizes.default;\r\n break;\r\n }\r\n\r\n targetElement.style.fontSize = fontSize + \"px\";\r\n\r\n const colorDefinition = this.getColorDefinition(\r\n this.getEffectiveStyleDefinition().foregroundColors,\r\n this.effectiveColor\r\n );\r\n\r\n const targetColor = Utils.stringToCssColor(\r\n this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default\r\n );\r\n if (targetColor) {\r\n targetElement.style.color = targetColor;\r\n }\r\n\r\n let fontWeight: number;\r\n\r\n switch (this.effectiveWeight) {\r\n case Enums.TextWeight.Lighter:\r\n fontWeight = fontType.fontWeights.lighter;\r\n break;\r\n case Enums.TextWeight.Bolder:\r\n fontWeight = fontType.fontWeights.bolder;\r\n break;\r\n default:\r\n fontWeight = fontType.fontWeights.default;\r\n break;\r\n }\r\n\r\n targetElement.style.fontWeight = fontWeight.toString();\r\n\r\n if (this.ariaHidden) {\r\n targetElement.setAttribute(\"aria-hidden\", \"true\");\r\n }\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get effectiveColor(): Enums.TextColor {\r\n return this.color !== undefined ? this.color : this.getEffectiveTextStyleDefinition().color;\r\n }\r\n\r\n get effectiveFontType(): Enums.FontType {\r\n return this.fontType !== undefined\r\n ? this.fontType\r\n : this.getEffectiveTextStyleDefinition().fontType;\r\n }\r\n\r\n get effectiveIsSubtle(): boolean {\r\n return this.isSubtle !== undefined\r\n ? this.isSubtle\r\n : this.getEffectiveTextStyleDefinition().isSubtle;\r\n }\r\n\r\n get effectiveSize(): Enums.TextSize {\r\n return this.size !== undefined ? this.size : this.getEffectiveTextStyleDefinition().size;\r\n }\r\n\r\n get effectiveWeight(): Enums.TextWeight {\r\n return this.weight !== undefined\r\n ? this.weight\r\n : this.getEffectiveTextStyleDefinition().weight;\r\n }\r\n}\r\n\r\nexport type TextBlockStyle = \"default\" | \"heading\" | \"columnHeader\";\r\n\r\nexport class TextBlock extends BaseTextBlock {\r\n //#region Schema\r\n\r\n static readonly wrapProperty = new BoolProperty(Versions.v1_0, \"wrap\", false);\r\n static readonly maxLinesProperty = new NumProperty(Versions.v1_0, \"maxLines\");\r\n static readonly styleProperty = new ValueSetProperty(Versions.v1_5, \"style\", [\r\n { value: \"default\" },\r\n { value: \"columnHeader\" },\r\n { value: \"heading\" }\r\n ]);\r\n\r\n @property(TextBlock.wrapProperty)\r\n wrap: boolean = false;\r\n\r\n @property(TextBlock.maxLinesProperty)\r\n maxLines?: number;\r\n\r\n @property(TextBlock.styleProperty)\r\n style?: TextBlockStyle;\r\n\r\n //#endregion\r\n\r\n private _computedLineHeight: number;\r\n private _originalInnerHtml: string;\r\n private _processedText?: string;\r\n private _treatAsPlainText: boolean = true;\r\n\r\n private restoreOriginalContent() {\r\n if (this.renderedElement !== undefined) {\r\n if (this.maxLines && this.maxLines > 0) {\r\n this.renderedElement.style.maxHeight =\r\n this._computedLineHeight * this.maxLines + \"px\";\r\n }\r\n\r\n const originalHtml = TextBlock._ttRoundtripPolicy?.createHTML(this._originalInnerHtml) ?? this._originalInnerHtml;\r\n this.renderedElement.innerHTML = originalHtml as string;\r\n }\r\n }\r\n\r\n private truncateIfSupported(maxHeight: number): boolean {\r\n if (this.renderedElement !== undefined) {\r\n // For now, only truncate TextBlocks that contain just a single\r\n // paragraph -- since the maxLines calculation doesn't take into\r\n // account Markdown lists\r\n const children = this.renderedElement.children;\r\n const isTextOnly = !children.length;\r\n const truncationSupported =\r\n isTextOnly ||\r\n (children.length === 1 && (children[0]).tagName.toLowerCase() === \"p\" && !(children[0]).children.length);\r\n\r\n if (truncationSupported) {\r\n const element = isTextOnly ? this.renderedElement : children[0];\r\n\r\n Utils.truncateText(element, maxHeight, this._computedLineHeight);\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n // Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely\r\n // processed.\r\n private static readonly _ttMarkdownPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(\r\n \"adaptivecards#markdownPassthroughPolicy\",\r\n { createHTML: (value) => value }\r\n );\r\n\r\n // When \"advanced\" truncation is enabled (see GlobalSettings.useAdvancedCardBottomTruncation and\r\n // GlobalSettings.useAdvancedTextBlockTruncation), we store the original pre-truncation content in\r\n // _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see\r\n // TextBlock.restoreOriginalContent())\r\n private static readonly _ttRoundtripPolicy = (typeof window === 'undefined') ? undefined : window.trustedTypes?.createPolicy(\r\n \"adaptivecards#restoreContentsPolicy\",\r\n { createHTML: (value) => value }\r\n );\r\n\r\n protected setText(value: string) {\r\n super.setText(value);\r\n\r\n this._processedText = undefined;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._processedText = undefined;\r\n\r\n if (this.text) {\r\n const preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n const hostConfig = this.hostConfig;\r\n\r\n let element: HTMLElement;\r\n\r\n if (this.forElementId) {\r\n const labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n\r\n element = labelElement;\r\n } else {\r\n element = document.createElement(\"div\");\r\n }\r\n\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textBlock\"));\r\n element.style.overflow = \"hidden\";\r\n\r\n this.applyStylesTo(element);\r\n\r\n if (this.style === \"heading\") {\r\n element.setAttribute(\"role\", \"heading\");\r\n\r\n const headingLevel = this.hostConfig.textBlock.headingLevel;\r\n\r\n if (headingLevel !== undefined && headingLevel > 0) {\r\n element.setAttribute(\"aria-level\", headingLevel.toString());\r\n }\r\n }\r\n\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n element.onclick = (e) => {\r\n if (this.selectAction && this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n this.selectAction.setupElementForAccessibility(element);\r\n\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n\r\n if (!this._processedText) {\r\n this._treatAsPlainText = true;\r\n\r\n let formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n\r\n if (this.useMarkdown && formattedText) {\r\n if (GlobalSettings.allowMarkForTextHighlighting) {\r\n formattedText = formattedText\r\n .replace(//g, \"===\")\r\n .replace(/<\\/mark>/g, \"/==/\");\r\n }\r\n\r\n const markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);\r\n\r\n if (\r\n markdownProcessingResult.didProcess &&\r\n markdownProcessingResult.outputHtml\r\n ) {\r\n this._processedText = markdownProcessingResult.outputHtml;\r\n this._treatAsPlainText = false;\r\n\r\n // Only process tag if markdown processing was applied because\r\n // markdown processing is also responsible for sanitizing the input string\r\n if (GlobalSettings.allowMarkForTextHighlighting && this._processedText) {\r\n let markStyle: string = \"\";\r\n const effectiveStyle = this.getEffectiveStyleDefinition();\r\n\r\n if (effectiveStyle.highlightBackgroundColor) {\r\n markStyle +=\r\n \"background-color: \" +\r\n effectiveStyle.highlightBackgroundColor +\r\n \";\";\r\n }\r\n\r\n if (effectiveStyle.highlightForegroundColor) {\r\n markStyle +=\r\n \"color: \" + effectiveStyle.highlightForegroundColor + \";\";\r\n }\r\n\r\n if (markStyle) {\r\n markStyle = 'style=\"' + markStyle + '\"';\r\n }\r\n\r\n this._processedText = this._processedText\r\n .replace(/===/g, \"\")\r\n .replace(/\\/==\\//g, \" \");\r\n }\r\n } else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n } else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n }\r\n\r\n if (!this._processedText) {\r\n this._processedText = \"\";\r\n }\r\n\r\n if (this._treatAsPlainText) {\r\n element.innerText = this._processedText;\r\n } else {\r\n const processedHtml =\r\n TextBlock._ttMarkdownPolicy?.createHTML(this._processedText) ??\r\n this._processedText;\r\n element.innerHTML = processedHtml as string;\r\n }\r\n\r\n if (element.firstElementChild instanceof HTMLElement) {\r\n const firstElementChild = element.firstElementChild;\r\n firstElementChild.style.marginTop = \"0px\";\r\n firstElementChild.style.width = \"100%\";\r\n\r\n if (!this.wrap) {\r\n firstElementChild.style.overflow = \"hidden\";\r\n firstElementChild.style.textOverflow = \"ellipsis\";\r\n }\r\n }\r\n\r\n if (element.lastElementChild instanceof HTMLElement) {\r\n element.lastElementChild.style.marginBottom = \"0px\";\r\n }\r\n\r\n const anchors = element.getElementsByTagName(\"a\");\r\n\r\n for (const anchor of Array.from(anchors)) {\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n anchor.target = \"_blank\";\r\n anchor.onclick = (e: MouseEvent) => {\r\n if (raiseAnchorClickedEvent(this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n }\r\n };\r\n anchor.oncontextmenu = (e: MouseEvent) => {\r\n if (raiseAnchorClickedEvent(this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n }\r\n\r\n if (this.wrap) {\r\n element.style.wordWrap = \"break-word\";\r\n\r\n if (this.maxLines && this.maxLines > 0) {\r\n element.style.overflow = \"hidden\";\r\n\r\n if (Utils.isInternetExplorer() || !GlobalSettings.useWebkitLineClamp) {\r\n element.style.maxHeight = this._computedLineHeight * this.maxLines + \"px\";\r\n } else {\r\n // While non standard, --webkit-line-clamp works in every browser (except IE)\r\n // and is a great solution to support the maxLines feature with ellipsis\r\n // truncation. With --webkit-line-clamp there is need to use explicit line heights\r\n element.style.removeProperty(\"line-height\");\r\n element.style.display = \"-webkit-box\";\r\n element.style.webkitBoxOrient = \"vertical\";\r\n element.style.webkitLineClamp = this.maxLines.toString();\r\n }\r\n }\r\n } else {\r\n element.style.whiteSpace = \"nowrap\";\r\n element.style.textOverflow = \"ellipsis\";\r\n }\r\n\r\n if (\r\n GlobalSettings.useAdvancedTextBlockTruncation ||\r\n GlobalSettings.useAdvancedCardBottomTruncation\r\n ) {\r\n this._originalInnerHtml = element.innerHTML;\r\n }\r\n\r\n return element;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n protected truncateOverflow(maxHeight: number): boolean {\r\n if (maxHeight >= this._computedLineHeight) {\r\n return this.truncateIfSupported(maxHeight);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected undoOverflowTruncation() {\r\n this.restoreOriginalContent();\r\n\r\n if (GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {\r\n const maxHeight = this._computedLineHeight * this.maxLines;\r\n\r\n this.truncateIfSupported(maxHeight);\r\n }\r\n }\r\n\r\n useMarkdown: boolean = true;\r\n forElementId?: string;\r\n\r\n applyStylesTo(targetElement: HTMLElement) {\r\n super.applyStylesTo(targetElement);\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n targetElement.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n targetElement.style.textAlign = \"end\";\r\n break;\r\n default:\r\n targetElement.style.textAlign = \"start\";\r\n break;\r\n }\r\n\r\n const lineHeights = this.hostConfig.lineHeights;\r\n\r\n if (lineHeights) {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n this._computedLineHeight = lineHeights.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n this._computedLineHeight = lineHeights.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n this._computedLineHeight = lineHeights.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n this._computedLineHeight = lineHeights.extraLarge;\r\n break;\r\n default:\r\n this._computedLineHeight = lineHeights.default;\r\n break;\r\n }\r\n } else {\r\n // Looks like 1.33 is the magic number to compute line-height\r\n // from font size.\r\n this._computedLineHeight =\r\n this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) *\r\n 1.33;\r\n }\r\n\r\n targetElement.style.lineHeight = this._computedLineHeight + \"px\";\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TextBlock\";\r\n }\r\n\r\n getEffectiveTextStyleDefinition(): TextStyleDefinition {\r\n if (this.style) {\r\n return this.hostConfig.textStyles.getStyleByName(this.style);\r\n }\r\n\r\n return super.getEffectiveTextStyleDefinition();\r\n }\r\n\r\n updateLayout(processChildren: boolean = false) {\r\n super.updateLayout(processChildren);\r\n\r\n if (GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {\r\n // Reset the element's innerHTML in case the available room for\r\n // content has increased\r\n this.restoreOriginalContent();\r\n this.truncateIfSupported(this._computedLineHeight * this.maxLines);\r\n }\r\n }\r\n}\r\n\r\nexport class TextRun extends BaseTextBlock {\r\n //#region Schema\r\n\r\n static readonly italicProperty = new BoolProperty(Versions.v1_2, \"italic\", false);\r\n static readonly strikethroughProperty = new BoolProperty(Versions.v1_2, \"strikethrough\", false);\r\n static readonly highlightProperty = new BoolProperty(Versions.v1_2, \"highlight\", false);\r\n static readonly underlineProperty = new BoolProperty(Versions.v1_3, \"underline\", false);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n schema.add(BaseTextBlock.selectActionProperty);\r\n }\r\n\r\n @property(TextRun.italicProperty)\r\n italic: boolean = false;\r\n\r\n @property(TextRun.strikethroughProperty)\r\n strikethrough: boolean = false;\r\n\r\n @property(TextRun.highlightProperty)\r\n highlight: boolean = false;\r\n\r\n @property(TextRun.underlineProperty)\r\n underline: boolean = false;\r\n\r\n //#endregion\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n if (this.text) {\r\n const preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n const hostConfig = this.hostConfig;\r\n\r\n let formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n\r\n if (!formattedText) {\r\n formattedText = \"\";\r\n }\r\n\r\n const element = document.createElement(\"span\");\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textRun\"));\r\n\r\n this.applyStylesTo(element);\r\n\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n const anchor = document.createElement(\"a\");\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n\r\n const href = this.selectAction.getHref();\r\n\r\n anchor.href = href ? href : \"\";\r\n anchor.target = \"_blank\";\r\n anchor.onclick = (e) => {\r\n if (this.selectAction && this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n this.selectAction.setupElementForAccessibility(anchor);\r\n\r\n anchor.innerText = formattedText;\r\n\r\n element.appendChild(anchor);\r\n } else {\r\n element.innerText = formattedText;\r\n }\r\n\r\n return element;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n applyStylesTo(targetElement: HTMLElement) {\r\n super.applyStylesTo(targetElement);\r\n\r\n if (this.italic) {\r\n targetElement.style.fontStyle = \"italic\";\r\n }\r\n\r\n if (this.strikethrough) {\r\n targetElement.style.textDecoration = \"line-through\";\r\n }\r\n\r\n if (this.highlight) {\r\n const colorDefinition = this.getColorDefinition(\r\n this.getEffectiveStyleDefinition().foregroundColors,\r\n this.effectiveColor\r\n );\r\n\r\n const backgroundColor = Utils.stringToCssColor(\r\n this.effectiveIsSubtle\r\n ? colorDefinition.highlightColors.subtle\r\n : colorDefinition.highlightColors.default\r\n );\r\n if (backgroundColor) {\r\n targetElement.style.backgroundColor = backgroundColor;\r\n }\r\n }\r\n\r\n if (this.underline) {\r\n targetElement.style.textDecoration = \"underline\";\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TextRun\";\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n\r\n get isInline(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class RichTextBlock extends CardElement {\r\n private _inlines: CardElement[] = [];\r\n\r\n private internalAddInline(inline: CardElement, forceAdd: boolean = false) {\r\n if (!inline.isInline) {\r\n throw new Error(Strings.errors.elementCannotBeUsedAsInline());\r\n }\r\n\r\n const doAdd: boolean = inline.parent === undefined || forceAdd;\r\n\r\n if (!doAdd && inline.parent !== this) {\r\n throw new Error(Strings.errors.inlineAlreadyParented());\r\n } else {\r\n inline.setParent(this);\r\n\r\n this._inlines.push(inline);\r\n }\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._inlines = [];\r\n\r\n if (Array.isArray(source[\"inlines\"])) {\r\n for (const jsonInline of source[\"inlines\"]) {\r\n let inline: CardElement | undefined;\r\n\r\n if (typeof jsonInline === \"string\") {\r\n const textRun = new TextRun();\r\n textRun.text = jsonInline;\r\n\r\n inline = textRun;\r\n } else {\r\n // No fallback for inlines in 1.2\r\n inline = context.parseElement(this, jsonInline, [], false);\r\n }\r\n\r\n if (inline) {\r\n this.internalAddInline(inline, true);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n if (this._inlines.length > 0) {\r\n const jsonInlines: any[] = [];\r\n\r\n for (const inline of this._inlines) {\r\n jsonInlines.push(inline.toJSON(context));\r\n }\r\n\r\n context.serializeValue(target, \"inlines\", jsonInlines);\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n if (this._inlines.length > 0) {\r\n let element: HTMLElement;\r\n\r\n if (this.forElementId) {\r\n const labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n\r\n element = labelElement;\r\n } else {\r\n element = document.createElement(\"div\");\r\n }\r\n\r\n element.className = this.hostConfig.makeCssClassName(\"ac-richTextBlock\");\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.textAlign = \"end\";\r\n break;\r\n default:\r\n element.style.textAlign = \"start\";\r\n break;\r\n }\r\n\r\n let renderedInlines: number = 0;\r\n\r\n for (const inline of this._inlines) {\r\n const renderedInline = inline.render();\r\n\r\n if (renderedInline) {\r\n element.appendChild(renderedInline);\r\n\r\n renderedInlines++;\r\n }\r\n }\r\n\r\n if (renderedInlines > 0) {\r\n return element;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n forElementId?: string;\r\n\r\n asString(): string | undefined {\r\n let result = \"\";\r\n\r\n for (const inline of this._inlines) {\r\n result += inline.asString();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"RichTextBlock\";\r\n }\r\n\r\n getInlineCount(): number {\r\n return this._inlines.length;\r\n }\r\n\r\n getInlineAt(index: number): CardElement {\r\n if (index >= 0 && index < this._inlines.length) {\r\n return this._inlines[index];\r\n } else {\r\n throw new Error(Strings.errors.indexOutOfRange(index));\r\n }\r\n }\r\n\r\n addInline(inline: CardElement | string) {\r\n if (typeof inline === \"string\") {\r\n this.internalAddInline(new TextRun(inline));\r\n } else {\r\n this.internalAddInline(inline);\r\n }\r\n }\r\n\r\n removeInline(inline: CardElement): boolean {\r\n const index = this._inlines.indexOf(inline);\r\n\r\n if (index >= 0) {\r\n this._inlines[index].setParent(undefined);\r\n this._inlines.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n\r\nexport class Fact extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n\r\n // For historic reasons, the \"title\" schema property is exposed as \"name\" in the OM.\r\n @property(Fact.titleProperty)\r\n name?: string;\r\n\r\n @property(Fact.valueProperty)\r\n value?: string;\r\n\r\n //#endregion\r\n\r\n protected getSchemaKey(): string {\r\n return \"Fact\";\r\n }\r\n\r\n constructor(name?: string, value?: string) {\r\n super();\r\n\r\n this.name = name;\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport class FactSet extends CardElement {\r\n //#region Schema\r\n\r\n static readonly factsProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"facts\",\r\n Fact\r\n );\r\n\r\n @property(FactSet.factsProperty)\r\n facts: Fact[];\r\n\r\n //#endregion\r\n\r\n protected get useDefaultSizing(): boolean {\r\n return false;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let element: HTMLElement | undefined = undefined;\r\n const hostConfig = this.hostConfig;\r\n\r\n if (this.facts.length > 0) {\r\n element = document.createElement(\"table\");\r\n element.style.borderWidth = \"0px\";\r\n element.style.borderSpacing = \"0px\";\r\n element.style.borderStyle = \"none\";\r\n element.style.borderCollapse = \"collapse\";\r\n element.style.display = \"block\";\r\n element.style.overflow = \"hidden\";\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-factset\"));\r\n element.setAttribute(\"role\", \"presentation\");\r\n\r\n for (let i = 0; i < this.facts.length; i++) {\r\n const trElement = document.createElement(\"tr\");\r\n\r\n if (i > 0) {\r\n trElement.style.marginTop = hostConfig.factSet.spacing + \"px\";\r\n }\r\n\r\n // Title column\r\n let tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-title\"));\r\n\r\n if (hostConfig.factSet.title.maxWidth) {\r\n tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + \"px\";\r\n }\r\n\r\n tdElement.style.verticalAlign = \"top\";\r\n\r\n let textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text =\r\n !this.facts[i].name && this.isDesignMode() ? \"Title\" : this.facts[i].name;\r\n textBlock.size = hostConfig.factSet.title.size;\r\n textBlock.color = hostConfig.factSet.title.color;\r\n textBlock.isSubtle = hostConfig.factSet.title.isSubtle;\r\n textBlock.weight = hostConfig.factSet.title.weight;\r\n textBlock.wrap = hostConfig.factSet.title.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n\r\n // Spacer column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.width = \"10px\";\r\n\r\n Utils.appendChild(trElement, tdElement);\r\n\r\n // Value column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.style.verticalAlign = \"top\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-value\"));\r\n\r\n textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text = this.facts[i].value;\r\n textBlock.size = hostConfig.factSet.value.size;\r\n textBlock.color = hostConfig.factSet.value.color;\r\n textBlock.isSubtle = hostConfig.factSet.value.isSubtle;\r\n textBlock.weight = hostConfig.factSet.value.weight;\r\n textBlock.wrap = hostConfig.factSet.value.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n Utils.appendChild(element, trElement);\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"FactSet\";\r\n }\r\n}\r\n\r\nclass ImageDimensionProperty extends PropertyDefinition {\r\n getInternalName(): string {\r\n return this.internalName;\r\n }\r\n\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): number | undefined {\r\n let result: number | undefined = undefined;\r\n const sourceValue = source[this.name];\r\n\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n\r\n let isValid = false;\r\n\r\n if (typeof sourceValue === \"string\") {\r\n try {\r\n const size = SizeAndUnit.parse(sourceValue, true);\r\n\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n\r\n isValid = true;\r\n }\r\n } catch {\r\n // Swallow the exception\r\n }\r\n\r\n // If the source value isn't valid per this property definition,\r\n // check its validity per the fallback property, if specified\r\n if (!isValid && this.fallbackProperty) {\r\n isValid = this.fallbackProperty.isValidValue(sourceValue, context);\r\n }\r\n }\r\n\r\n if (!isValid) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(sourceValue, this.name)\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: number | undefined,\r\n context: BaseSerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined\r\n );\r\n }\r\n\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly internalName: string,\r\n readonly fallbackProperty?: ValueSetProperty\r\n ) {\r\n super(targetVersion, name);\r\n }\r\n}\r\n\r\nexport class Image extends CardElement {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringProperty(Versions.v1_0, \"url\");\r\n static readonly altTextProperty = new StringProperty(Versions.v1_0, \"altText\");\r\n static readonly backgroundColorProperty = new StringProperty(Versions.v1_1, \"backgroundColor\");\r\n static readonly styleProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"style\",\r\n Enums.ImageStyle,\r\n Enums.ImageStyle.Default\r\n );\r\n static readonly sizeProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"size\",\r\n Enums.Size,\r\n Enums.Size.Auto\r\n );\r\n static readonly pixelWidthProperty = new ImageDimensionProperty(\r\n Versions.v1_1,\r\n \"width\",\r\n \"pixelWidth\"\r\n );\r\n static readonly pixelHeightProperty = new ImageDimensionProperty(\r\n Versions.v1_1,\r\n \"height\",\r\n \"pixelHeight\",\r\n CardElement.heightProperty\r\n );\r\n static readonly selectActionProperty = new ActionProperty(Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n schema.remove(CardElement.heightProperty);\r\n }\r\n\r\n @property(Image.urlProperty)\r\n url?: string;\r\n\r\n @property(Image.altTextProperty)\r\n altText?: string;\r\n\r\n @property(Image.backgroundColorProperty)\r\n backgroundColor?: string;\r\n\r\n @property(Image.sizeProperty)\r\n size: Enums.Size = Enums.Size.Auto;\r\n\r\n @property(Image.styleProperty)\r\n style: Enums.ImageStyle = Enums.ImageStyle.Default;\r\n\r\n @property(Image.pixelWidthProperty)\r\n pixelWidth?: number;\r\n\r\n @property(Image.pixelHeightProperty)\r\n pixelHeight?: number;\r\n\r\n @property(Image.selectActionProperty)\r\n selectAction?: Action;\r\n\r\n //#endregion\r\n\r\n private applySize(element: HTMLElement) {\r\n if (this.pixelWidth || this.pixelHeight) {\r\n if (this.pixelWidth) {\r\n element.style.width = this.pixelWidth + \"px\";\r\n }\r\n\r\n if (this.pixelHeight) {\r\n element.style.height = this.pixelHeight + \"px\";\r\n }\r\n } else {\r\n if (this.maxHeight) {\r\n // If the image is constrained in height, we set its height property and\r\n // auto and stretch are ignored (default to medium). THis is necessary for\r\n // ImageSet which uses a maximum image height as opposed to the cards width\r\n // as a constraining dimension\r\n switch (this.size) {\r\n case Enums.Size.Small:\r\n element.style.height = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.height = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n default:\r\n element.style.height = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n\r\n element.style.maxHeight = this.maxHeight + \"px\";\r\n } else {\r\n switch (this.size) {\r\n case Enums.Size.Stretch:\r\n element.style.width = \"100%\";\r\n break;\r\n case Enums.Size.Auto:\r\n element.style.maxWidth = \"100%\";\r\n break;\r\n case Enums.Size.Small:\r\n element.style.width = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.width = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n case Enums.Size.Medium:\r\n element.style.width = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n\r\n element.style.maxHeight = \"100%\";\r\n }\r\n }\r\n }\r\n\r\n protected get useDefaultSizing() {\r\n return false;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let element: HTMLElement | undefined = undefined;\r\n\r\n if (this.url) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"flex-start\";\r\n\r\n // Cache hostConfig to avoid walking the parent hierarchy multiple times\r\n const hostConfig = this.hostConfig;\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n\r\n const imageElement = document.createElement(\"img\");\r\n imageElement.onload = (_e: Event) => {\r\n raiseImageLoadedEvent(this);\r\n };\r\n imageElement.onerror = (_e: Event) => {\r\n if (this.renderedElement) {\r\n const card = this.getRootElement() as AdaptiveCard;\r\n\r\n this.renderedElement;\r\n\r\n if (card && card.designMode) {\r\n const errorElement = document.createElement(\"div\");\r\n errorElement.style.display = \"flex\";\r\n errorElement.style.alignItems = \"center\";\r\n errorElement.style.justifyContent = \"center\";\r\n errorElement.style.backgroundColor = \"#EEEEEE\";\r\n errorElement.style.color = \"black\";\r\n errorElement.innerText = \":-(\";\r\n errorElement.style.padding = \"10px\";\r\n\r\n this.applySize(errorElement);\r\n\r\n this.renderedElement.appendChild(errorElement);\r\n }\r\n }\r\n\r\n raiseImageLoadedEvent(this);\r\n };\r\n imageElement.style.minWidth = \"0\";\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-image\"));\r\n\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n imageElement.onkeypress = (e) => {\r\n if (\r\n this.selectAction &&\r\n this.selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")\r\n ) {\r\n // enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n imageElement.onclick = (e) => {\r\n if (this.selectAction && this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.selectAction.execute();\r\n }\r\n };\r\n\r\n this.selectAction.setupElementForAccessibility(imageElement);\r\n\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n\r\n this.applySize(imageElement);\r\n\r\n if (this.style === Enums.ImageStyle.Person) {\r\n imageElement.style.borderRadius = \"50%\";\r\n imageElement.style.backgroundPosition = \"50% 50%\";\r\n imageElement.style.backgroundRepeat = \"no-repeat\";\r\n }\r\n\r\n const backgroundColor = Utils.stringToCssColor(this.backgroundColor);\r\n if (backgroundColor) {\r\n imageElement.style.backgroundColor = backgroundColor;\r\n }\r\n\r\n imageElement.src = this.preProcessPropertyValue(Image.urlProperty);\r\n\r\n const altTextProperty = this.preProcessPropertyValue(Image.altTextProperty);\r\n if (altTextProperty) {\r\n imageElement.alt = altTextProperty;\r\n }\r\n\r\n element.appendChild(imageElement);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n maxHeight?: number;\r\n\r\n getJsonTypeName(): string {\r\n return \"Image\";\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string) {\r\n let result = super.getActionById(id);\r\n\r\n if (!result && this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return this.url ? [{ url: this.url, mimeType: \"image\" }] : [];\r\n }\r\n}\r\n\r\nexport abstract class CardElementContainer extends CardElement {\r\n //#region Schema\r\n\r\n static readonly selectActionProperty = new ActionProperty(Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n if (!this.isSelectable) {\r\n schema.remove(CardElementContainer.selectActionProperty);\r\n }\r\n }\r\n\r\n @property(CardElementContainer.selectActionProperty)\r\n protected _selectAction?: Action;\r\n\r\n //#endregion\r\n\r\n protected isElementAllowed(element: CardElement) {\r\n return this.hostConfig.supportsInteractivity || !element.isInteractive;\r\n }\r\n\r\n protected applyPadding() {\r\n super.applyPadding();\r\n\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n\r\n let physicalPadding = new SpacingDefinition();\r\n\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(\r\n this.getEffectivePadding()\r\n );\r\n }\r\n\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n }\r\n\r\n protected get isSelectable(): boolean {\r\n return false;\r\n }\r\n\r\n // This function is kept but return [] when removing Carousel from code\r\n protected forbiddenChildElements(): string[] {\r\n return [];\r\n }\r\n\r\n abstract getItemCount(): number;\r\n abstract getItemAt(index: number): CardElement;\r\n abstract getFirstVisibleRenderedItem(): CardElement | undefined;\r\n abstract getLastVisibleRenderedItem(): CardElement | undefined;\r\n abstract removeItem(item: CardElement): boolean;\r\n\r\n allowVerticalOverflow: boolean = false;\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).releaseDOMResources();\r\n }\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n const item = this.getItemAt(i);\r\n\r\n if (!this.hostConfig.supportsInteractivity && item.isInteractive) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.InteractivityNotAllowed,\r\n Strings.errors.interactivityNotAllowed()\r\n );\r\n }\r\n\r\n if (!this.isElementAllowed(item)) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.InteractivityNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(item.getJsonTypeName())\r\n );\r\n }\r\n\r\n item.internalValidateProperties(context);\r\n }\r\n\r\n if (this._selectAction) {\r\n this._selectAction.internalValidateProperties(context);\r\n }\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n const element = super.render();\r\n\r\n if (element) {\r\n const hostConfig = this.hostConfig;\r\n\r\n if (this.allowVerticalOverflow) {\r\n element.style.overflowX = \"hidden\";\r\n element.style.overflowY = \"auto\";\r\n }\r\n\r\n if (\r\n element &&\r\n this.isSelectable &&\r\n this._selectAction &&\r\n hostConfig.supportsInteractivity\r\n ) {\r\n element.onclick = (e) => {\r\n if (this._selectAction && this._selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this._selectAction.execute();\r\n }\r\n };\r\n\r\n element.onkeypress = (e) => {\r\n if (\r\n this._selectAction &&\r\n this._selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")\r\n ) {\r\n // Enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this._selectAction.execute();\r\n }\r\n };\r\n\r\n this._selectAction.setupElementForAccessibility(element);\r\n\r\n if (this._selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n updateLayout(processChildren: boolean = true) {\r\n super.updateLayout(processChildren);\r\n\r\n if (processChildren) {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).updateLayout();\r\n }\r\n }\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n let result: Input[] = [];\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result.push(...this.getItemAt(i).getAllInputs(processActions));\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result.push(...this.getItemAt(i).getAllActions());\r\n }\r\n\r\n if (this._selectAction) {\r\n result.push(this._selectAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result: IResourceInformation[] = [];\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result.push(...this.getItemAt(i).getResourceInformation());\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getElementById(id: string): CardElement | undefined {\r\n let result = super.getElementById(id);\r\n\r\n if (!result) {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n result = this.getItemAt(i).getElementById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n findDOMNodeOwner(node: Node): CardObject | undefined {\r\n let target: CardObject | undefined = undefined;\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n // recur through child elements\r\n target = this.getItemAt(i).findDOMNodeOwner(node);\r\n\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n\r\n // If not found in children, check the actions\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n target = this.getActionAt(i)?.findDOMNodeOwner(node);\r\n\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n\r\n // if not found in children or actions, defer to parent implementation\r\n return super.findDOMNodeOwner(node);\r\n }\r\n}\r\n\r\nexport class ImageSet extends CardElementContainer {\r\n //#region Schema\r\n\r\n static readonly imagesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"images\",\r\n Image,\r\n (sender: SerializableObject, item: Image) => {\r\n item.setParent(sender);\r\n }\r\n );\r\n static readonly imageSizeProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"imageSize\",\r\n Enums.ImageSize,\r\n Enums.ImageSize.Medium\r\n );\r\n\r\n @property(ImageSet.imagesProperty)\r\n private _images: Image[] = [];\r\n\r\n @property(ImageSet.imageSizeProperty)\r\n imageSize: Enums.ImageSize = Enums.ImageSize.Medium;\r\n\r\n //#endregion\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let element: HTMLElement | undefined = undefined;\r\n\r\n if (this._images.length > 0) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.flexWrap = \"wrap\";\r\n\r\n for (const image of this._images) {\r\n switch (this.imageSize) {\r\n case Enums.ImageSize.Small:\r\n image.size = Enums.Size.Small;\r\n break;\r\n case Enums.ImageSize.Large:\r\n image.size = Enums.Size.Large;\r\n break;\r\n default:\r\n image.size = Enums.Size.Medium;\r\n break;\r\n }\r\n\r\n image.maxHeight = this.hostConfig.imageSet.maxImageHeight;\r\n\r\n const renderedImage = image.render();\r\n\r\n if (renderedImage) {\r\n renderedImage.style.display = \"inline-flex\";\r\n renderedImage.style.margin = \"0px\";\r\n renderedImage.style.marginRight = \"10px\";\r\n\r\n Utils.appendChild(element, renderedImage);\r\n }\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n getItemCount(): number {\r\n return this._images.length;\r\n }\r\n\r\n getItemAt(index: number): CardElement {\r\n return this._images[index];\r\n }\r\n\r\n getFirstVisibleRenderedItem(): CardElement | undefined {\r\n return this._images && this._images.length > 0 ? this._images[0] : undefined;\r\n }\r\n\r\n getLastVisibleRenderedItem(): CardElement | undefined {\r\n return this._images && this._images.length > 0\r\n ? this._images[this._images.length - 1]\r\n : undefined;\r\n }\r\n\r\n removeItem(item: CardElement): boolean {\r\n if (item instanceof Image) {\r\n const itemIndex = this._images.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._images.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"ImageSet\";\r\n }\r\n\r\n addImage(image: Image) {\r\n if (!image.parent) {\r\n this._images.push(image);\r\n\r\n image.setParent(this);\r\n } else {\r\n throw new Error(\"This image already belongs to another ImageSet\");\r\n }\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;\r\n }\r\n}\r\n\r\nexport abstract class ContentSource extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly mimeTypeProperty = new StringProperty(Versions.v1_1, \"mimeType\");\r\n static readonly urlProperty = new StringProperty(Versions.v1_1, \"url\");\r\n\r\n @property(ContentSource.mimeTypeProperty)\r\n mimeType?: string;\r\n\r\n @property(ContentSource.urlProperty)\r\n url?: string;\r\n\r\n //#endregion\r\n\r\n constructor(url?: string, mimeType?: string) {\r\n super();\r\n\r\n this.url = url;\r\n this.mimeType = mimeType;\r\n }\r\n\r\n isValid(): boolean {\r\n return this.mimeType && this.url ? true : false;\r\n }\r\n}\r\n\r\nexport class CaptionSource extends ContentSource {\r\n //#region Schema\r\n\r\n static readonly labelProperty = new StringProperty(Versions.v1_6, \"label\");\r\n\r\n @property(CaptionSource.labelProperty)\r\n label?: string;\r\n\r\n //#endregion\r\n\r\n constructor(url?: string, mimeType?: string, label?: string) {\r\n super(url, mimeType);\r\n\r\n this.label = label;\r\n }\r\n\r\n protected getSchemaKey(): string {\r\n return \"CaptionSource\";\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n let result: HTMLTrackElement | undefined = undefined;\r\n\r\n if (this.isValid()) {\r\n result = document.createElement(\"track\");\r\n result.src = this.url!;\r\n result.kind = \"captions\";\r\n result.label = this.label!;\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class MediaSource extends ContentSource {\r\n protected getSchemaKey(): string {\r\n return \"MediaSource\";\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n let result: HTMLSourceElement | undefined = undefined;\r\n\r\n if (this.isValid()) {\r\n result = document.createElement(\"source\");\r\n result.src = this.url!;\r\n result.type = this.mimeType!;\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport abstract class MediaPlayer {\r\n private _posterUrl?: string;\r\n\r\n abstract canPlay(): boolean;\r\n abstract render(): HTMLElement;\r\n abstract fetchVideoDetails(): Promise;\r\n\r\n play() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n get posterUrl(): string | undefined {\r\n return this._posterUrl;\r\n }\r\n\r\n protected set posterUrl(value: string | undefined) {\r\n this._posterUrl = value;\r\n }\r\n\r\n get selectedMediaType(): string | undefined {\r\n return undefined;\r\n }\r\n}\r\n\r\nexport class HTML5MediaPlayer extends MediaPlayer {\r\n private _selectedMediaType?: string;\r\n private _selectedSources: MediaSource[] = [];\r\n private _captionSources: CaptionSource[] = [];\r\n private _mediaElement?: HTMLMediaElement;\r\n\r\n private processSources() {\r\n this._selectedSources = [];\r\n this._captionSources = [];\r\n this._selectedMediaType = undefined;\r\n\r\n for (const source of this.owner.sources) {\r\n const mimeComponents = source.mimeType ? source.mimeType.split(\"/\") : [];\r\n\r\n if (mimeComponents.length === 2) {\r\n if (!this._selectedMediaType) {\r\n const index = HTML5MediaPlayer.supportedMediaTypes.indexOf(mimeComponents[0]);\r\n\r\n if (index >= 0) {\r\n this._selectedMediaType = HTML5MediaPlayer.supportedMediaTypes[index];\r\n }\r\n }\r\n if (mimeComponents[0] === this._selectedMediaType) {\r\n this._selectedSources.push(source);\r\n }\r\n }\r\n }\r\n\r\n this._captionSources.push(...this.owner.captionSources);\r\n }\r\n\r\n static readonly supportedMediaTypes = [\"audio\", \"video\"];\r\n\r\n constructor(readonly owner: Media) {\r\n super();\r\n\r\n this.processSources();\r\n }\r\n\r\n canPlay(): boolean {\r\n return this._selectedSources.length > 0;\r\n }\r\n\r\n async fetchVideoDetails() {\r\n // Nothing to fetch for the HTML5 media player\r\n }\r\n\r\n render(): HTMLElement {\r\n if (this._selectedMediaType === \"video\") {\r\n this._mediaElement = document.createElement(\"video\");\r\n } else {\r\n this._mediaElement = document.createElement(\"audio\");\r\n }\r\n\r\n this._mediaElement.setAttribute(\r\n \"aria-label\",\r\n this.owner.altText ? this.owner.altText : Strings.defaults.mediaPlayerAriaLabel()\r\n );\r\n this._mediaElement.setAttribute(\"webkit-playsinline\", \"\");\r\n this._mediaElement.setAttribute(\"playsinline\", \"\");\r\n // We enable crossorigin for cases where the caption file has a different domain than\r\n // the video file. If the caption file lives in a different domain than the video file\r\n // and crossorigin is not set, then the caption file will fail to load.\r\n this._mediaElement.setAttribute(\"crossorigin\", \"\");\r\n this._mediaElement.autoplay = true;\r\n this._mediaElement.controls = true;\r\n\r\n if (Utils.isMobileOS()) {\r\n this._mediaElement.muted = true;\r\n }\r\n\r\n this._mediaElement.preload = \"none\";\r\n this._mediaElement.style.width = \"100%\";\r\n\r\n for (const source of this.owner.sources) {\r\n const renderedSource = source.render();\r\n\r\n Utils.appendChild(this._mediaElement, renderedSource);\r\n }\r\n\r\n for (const captionSource of this.owner.captionSources) {\r\n if (captionSource.mimeType == \"vtt\") {\r\n const renderedCaptionSource = captionSource.render();\r\n\r\n Utils.appendChild(this._mediaElement, renderedCaptionSource);\r\n }\r\n }\r\n\r\n return this._mediaElement;\r\n }\r\n\r\n play() {\r\n if (this._mediaElement) {\r\n this._mediaElement.play();\r\n }\r\n }\r\n\r\n get selectedMediaType(): string | undefined {\r\n return this._selectedMediaType;\r\n }\r\n}\r\n\r\nexport abstract class CustomMediaPlayer extends MediaPlayer {\r\n constructor(matches: RegExpExecArray) {\r\n super();\r\n }\r\n}\r\n\r\nexport abstract class IFrameMediaMediaPlayer extends CustomMediaPlayer {\r\n private _videoId?: string;\r\n\r\n constructor(matches: RegExpExecArray, readonly iFrameTitle?: string) {\r\n super(matches);\r\n\r\n if (matches.length >= 2) {\r\n this._videoId = matches[1];\r\n }\r\n }\r\n\r\n abstract getEmbedVideoUrl(): string;\r\n\r\n canPlay(): boolean {\r\n return this._videoId !== undefined;\r\n }\r\n\r\n render(): HTMLElement {\r\n let container = document.createElement(\"div\");\r\n container.style.position = \"relative\";\r\n container.style.width = \"100%\";\r\n container.style.height = \"0\";\r\n container.style.paddingBottom = \"56.25%\";\r\n\r\n let iFrame = document.createElement(\"iframe\");\r\n iFrame.style.position = \"absolute\";\r\n iFrame.style.top = \"0\";\r\n iFrame.style.left = \"0\";\r\n iFrame.style.width = \"100%\";\r\n iFrame.style.height = \"100%\";\r\n iFrame.src = this.getEmbedVideoUrl();\r\n iFrame.frameBorder = \"0\";\r\n\r\n if (this.iFrameTitle) {\r\n iFrame.title = this.iFrameTitle;\r\n }\r\n\r\n iFrame.allow =\r\n \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\";\r\n iFrame.allowFullscreen = true;\r\n\r\n container.appendChild(iFrame);\r\n\r\n return container;\r\n }\r\n\r\n get videoId(): string | undefined {\r\n return this._videoId;\r\n }\r\n}\r\n\r\nexport class VimeoPlayer extends IFrameMediaMediaPlayer {\r\n async fetchVideoDetails(): Promise {\r\n const oEmbedUrl = `https://vimeo.com/api/oembed.json?url=${this.getEmbedVideoUrl()}`;\r\n\r\n let response = await fetch(oEmbedUrl);\r\n\r\n if (response.ok) {\r\n let json = await response.json();\r\n\r\n this.posterUrl = json[\"thumbnail_url\"];\r\n }\r\n }\r\n\r\n getEmbedVideoUrl(): string {\r\n return `https://player.vimeo.com/video/${this.videoId}?autoplay=1`;\r\n }\r\n}\r\n\r\nexport class DailymotionPlayer extends IFrameMediaMediaPlayer {\r\n async fetchVideoDetails(): Promise {\r\n const apiUrl = `https://api.dailymotion.com/video/${this.videoId}?fields=thumbnail_720_url`;\r\n\r\n let response = await fetch(apiUrl);\r\n\r\n if (response.ok) {\r\n let json = await response.json();\r\n\r\n this.posterUrl = json[\"thumbnail_720_url\"];\r\n }\r\n }\r\n\r\n getEmbedVideoUrl(): string {\r\n return `https://www.dailymotion.com/embed/video/${this.videoId}?autoplay=1`;\r\n }\r\n}\r\n\r\nexport class YouTubePlayer extends IFrameMediaMediaPlayer {\r\n private _startTimeIndex?: number;\r\n\r\n constructor(matches: RegExpExecArray, readonly iFrameTitle?: string) {\r\n super(matches, iFrameTitle);\r\n\r\n if (matches.length >= 3 && matches[2] !== undefined) {\r\n this._startTimeIndex = parseInt(matches[2]);\r\n }\r\n }\r\n\r\n async fetchVideoDetails(): Promise {\r\n this.posterUrl = this.videoId\r\n ? `https://img.youtube.com/vi/${this.videoId}/maxresdefault.jpg`\r\n : undefined;\r\n }\r\n\r\n getEmbedVideoUrl(): string {\r\n let url = `https://www.youtube.com/embed/${this.videoId}?autoplay=1`;\r\n\r\n if (this._startTimeIndex !== undefined) {\r\n url += `&start=${this._startTimeIndex}`;\r\n }\r\n\r\n return url;\r\n }\r\n}\r\n\r\nexport interface ICustomMediaPlayer {\r\n urlPatterns: RegExp[];\r\n createMediaPlayer: (matches: RegExpExecArray) => CustomMediaPlayer;\r\n}\r\n\r\nexport class Media extends CardElement {\r\n static customMediaPlayers: ICustomMediaPlayer[] = [\r\n {\r\n urlPatterns: [\r\n /^(?:https?:\\/\\/)?(?:www.)?youtube.com\\/watch\\?(?=.*v=([\\w\\d-_]+))(?=(?:.*t=(\\d+))?).*/gi,\r\n /^(?:https?:\\/\\/)?youtu.be\\/([\\w\\d-_]+)(?:\\?t=(\\d+))?/gi\r\n ],\r\n createMediaPlayer: (matches) =>\r\n new YouTubePlayer(matches, Strings.defaults.youTubeVideoPlayer())\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?vimeo.com\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: (matches) =>\r\n new VimeoPlayer(matches, Strings.defaults.vimeoVideoPlayer())\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?(?:www.)?dailymotion.com\\/video\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: (matches) =>\r\n new DailymotionPlayer(matches, Strings.defaults.dailymotionVideoPlayer())\r\n }\r\n ];\r\n\r\n //#region Schema\r\n\r\n static readonly sourcesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_1,\r\n \"sources\",\r\n MediaSource\r\n );\r\n static readonly captionSourcesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_6,\r\n \"captionSources\",\r\n CaptionSource\r\n );\r\n static readonly posterProperty = new StringProperty(Versions.v1_1, \"poster\");\r\n static readonly altTextProperty = new StringProperty(Versions.v1_1, \"altText\");\r\n\r\n @property(Media.sourcesProperty)\r\n sources: MediaSource[] = [];\r\n\r\n @property(Media.captionSourcesProperty)\r\n captionSources: CaptionSource[] = [];\r\n\r\n @property(Media.posterProperty)\r\n poster?: string;\r\n\r\n @property(Media.altTextProperty)\r\n altText?: string;\r\n\r\n //#endregion\r\n\r\n private _mediaPlayer: MediaPlayer;\r\n\r\n private createMediaPlayer(): MediaPlayer {\r\n for (let provider of Media.customMediaPlayers) {\r\n for (let source of this.sources) {\r\n if (source.url) {\r\n for (let pattern of provider.urlPatterns) {\r\n let matches = pattern.exec(source.url);\r\n\r\n if (matches !== null) {\r\n return provider.createMediaPlayer(matches);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return new HTML5MediaPlayer(this);\r\n }\r\n\r\n private handlePlayButtonInvoke(event: UIEvent): void {\r\n if (this.hostConfig.media.allowInlinePlayback) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n\r\n if (this.renderedElement) {\r\n const mediaPlayerElement = this._mediaPlayer.render();\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(mediaPlayerElement);\r\n\r\n this._mediaPlayer.play();\r\n\r\n mediaPlayerElement.focus();\r\n }\r\n } else {\r\n if (Media.onPlay) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n\r\n Media.onPlay(this);\r\n }\r\n }\r\n }\r\n\r\n private async displayPoster() {\r\n if (this.renderedElement) {\r\n const playButtonArrowWidth = 12;\r\n const playButtonArrowHeight = 15;\r\n\r\n const posterRootElement = document.createElement(\"div\");\r\n posterRootElement.className = this.hostConfig.makeCssClassName(\"ac-media-poster\");\r\n posterRootElement.setAttribute(\"role\", \"contentinfo\");\r\n posterRootElement.setAttribute(\r\n \"aria-label\",\r\n this.altText ? this.altText : Strings.defaults.mediaPlayerAriaLabel()\r\n );\r\n posterRootElement.style.position = \"relative\";\r\n posterRootElement.style.display = \"flex\";\r\n\r\n let posterUrl = this.poster ? this.poster : this._mediaPlayer.posterUrl;\r\n\r\n if (!posterUrl) {\r\n posterUrl = this.hostConfig.media.defaultPoster;\r\n }\r\n\r\n if (posterUrl) {\r\n const posterImageElement = document.createElement(\"img\");\r\n posterImageElement.style.width = \"100%\";\r\n posterImageElement.style.height = \"100%\";\r\n posterImageElement.setAttribute(\"role\", \"presentation\");\r\n\r\n posterImageElement.onerror = (_e: Event) => {\r\n if (posterImageElement.parentNode) {\r\n posterImageElement.parentNode.removeChild(posterImageElement);\r\n }\r\n\r\n posterRootElement.classList.add(\"empty\");\r\n posterRootElement.style.minHeight = \"150px\";\r\n };\r\n\r\n posterImageElement.src = posterUrl;\r\n\r\n posterRootElement.appendChild(posterImageElement);\r\n } else {\r\n posterRootElement.classList.add(\"empty\");\r\n posterRootElement.style.minHeight = \"150px\";\r\n }\r\n\r\n if (this.hostConfig.supportsInteractivity && this._mediaPlayer.canPlay()) {\r\n const playButtonOuterElement = document.createElement(\"div\");\r\n playButtonOuterElement.tabIndex = 0;\r\n playButtonOuterElement.setAttribute(\"role\", \"button\");\r\n playButtonOuterElement.setAttribute(\r\n \"aria-label\",\r\n Strings.defaults.mediaPlayerPlayMedia()\r\n );\r\n playButtonOuterElement.className =\r\n this.hostConfig.makeCssClassName(\"ac-media-playButton\");\r\n playButtonOuterElement.style.display = \"flex\";\r\n playButtonOuterElement.style.alignItems = \"center\";\r\n playButtonOuterElement.style.justifyContent = \"center\";\r\n playButtonOuterElement.onclick = (e) => {\r\n this.handlePlayButtonInvoke(e);\r\n };\r\n\r\n playButtonOuterElement.onkeypress = (e: KeyboardEvent) => {\r\n if (e.code === \"Enter\" || e.code === \"Space\") {\r\n // space or enter\r\n this.handlePlayButtonInvoke(e);\r\n }\r\n };\r\n\r\n const playButtonInnerElement = document.createElement(\"div\");\r\n playButtonInnerElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-media-playButton-arrow\"\r\n );\r\n playButtonInnerElement.style.width = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.height = playButtonArrowHeight + \"px\";\r\n playButtonInnerElement.style.borderTopWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderBottomWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.borderRightWidth = \"0\";\r\n playButtonInnerElement.style.borderStyle = \"solid\";\r\n playButtonInnerElement.style.borderTopColor = \"transparent\";\r\n playButtonInnerElement.style.borderRightColor = \"transparent\";\r\n playButtonInnerElement.style.borderBottomColor = \"transparent\";\r\n playButtonInnerElement.style.transform =\r\n \"translate(\" + playButtonArrowWidth / 10 + \"px,0px)\";\r\n\r\n playButtonOuterElement.appendChild(playButtonInnerElement);\r\n\r\n const playButtonContainer = document.createElement(\"div\");\r\n playButtonContainer.style.position = \"absolute\";\r\n playButtonContainer.style.left = \"0\";\r\n playButtonContainer.style.top = \"0\";\r\n playButtonContainer.style.width = \"100%\";\r\n playButtonContainer.style.height = \"100%\";\r\n playButtonContainer.style.display = \"flex\";\r\n playButtonContainer.style.justifyContent = \"center\";\r\n playButtonContainer.style.alignItems = \"center\";\r\n\r\n playButtonContainer.appendChild(playButtonOuterElement);\r\n posterRootElement.appendChild(playButtonContainer);\r\n }\r\n\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(posterRootElement);\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-media\");\r\n\r\n return element;\r\n }\r\n\r\n static onPlay?: (sender: Media) => void;\r\n\r\n render(): HTMLElement | undefined {\r\n let result = super.render();\r\n\r\n if (result) {\r\n this._mediaPlayer = this.createMediaPlayer();\r\n\r\n this._mediaPlayer.fetchVideoDetails().then(() => this.displayPoster());\r\n }\r\n\r\n return result;\r\n }\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this.displayPoster();\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Media\";\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n const result: IResourceInformation[] = [];\r\n\r\n if (this._mediaPlayer) {\r\n const posterUrl = this.poster ? this.poster : this.hostConfig.media.defaultPoster;\r\n\r\n if (posterUrl) {\r\n result.push({ url: posterUrl, mimeType: \"image\" });\r\n }\r\n }\r\n\r\n for (const mediaSource of this.sources) {\r\n if (mediaSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `mediaSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: mediaSource.url!,\r\n mimeType: mediaSource.mimeType!\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n\r\n for (const captionSource of this.captionSources) {\r\n if (captionSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `captionSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: captionSource.url!,\r\n mimeType: captionSource.mimeType!\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get selectedMediaType(): string | undefined {\r\n return this._mediaPlayer.selectedMediaType;\r\n }\r\n}\r\n\r\nexport abstract class Input extends CardElement implements IInput {\r\n //#region Schema\r\n\r\n static readonly labelProperty = new StringProperty(Versions.v1_3, \"label\", true);\r\n static readonly isRequiredProperty = new BoolProperty(Versions.v1_3, \"isRequired\", false);\r\n static readonly errorMessageProperty = new StringProperty(Versions.v1_3, \"errorMessage\", true);\r\n\r\n @property(Input.labelProperty)\r\n label?: string;\r\n\r\n @property(Input.isRequiredProperty)\r\n isRequired: boolean;\r\n\r\n @property(Input.errorMessageProperty)\r\n errorMessage?: string;\r\n\r\n //#endregion\r\n\r\n private _outerContainerElement: HTMLElement;\r\n private _inputControlContainerElement: HTMLElement;\r\n private _renderedErrorMessageElement?: HTMLElement;\r\n private _renderedLabelElement?: HTMLElement;\r\n private _renderedInputControlElement?: HTMLElement;\r\n private _oldValue: any;\r\n\r\n protected getAllLabelIds(): string[] {\r\n const labelIds: string[] = [];\r\n\r\n if (this.labelledBy) {\r\n labelIds.push(this.labelledBy);\r\n }\r\n\r\n if (this._renderedLabelElement) {\r\n labelIds.push(this._renderedLabelElement.id);\r\n }\r\n\r\n if (this._renderedErrorMessageElement) {\r\n labelIds.push(this._renderedErrorMessageElement.id);\r\n }\r\n\r\n return labelIds;\r\n }\r\n\r\n protected updateInputControlAriaLabelledBy() {\r\n if (this._renderedInputControlElement) {\r\n const labelIds: string[] = this.getAllLabelIds();\r\n\r\n if (labelIds.length > 0) {\r\n this._renderedInputControlElement.setAttribute(\r\n \"aria-labelledby\",\r\n labelIds.join(\" \")\r\n );\r\n } else {\r\n this._renderedInputControlElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n }\r\n\r\n protected get isNullable(): boolean {\r\n return true;\r\n }\r\n\r\n protected get renderedInputControlElement(): HTMLElement | undefined {\r\n return this._renderedInputControlElement;\r\n }\r\n\r\n protected get inputControlContainerElement(): HTMLElement {\r\n return this._inputControlContainerElement;\r\n }\r\n\r\n protected overrideInternalRender(): HTMLElement | undefined {\r\n const hostConfig = this.hostConfig;\r\n\r\n this._outerContainerElement = document.createElement(\"div\");\r\n this._outerContainerElement.style.display = \"flex\";\r\n this._outerContainerElement.style.flexDirection = \"column\";\r\n\r\n const renderedInputControlId = Utils.generateUniqueId();\r\n\r\n if (this.label) {\r\n const labelRichTextBlock = new RichTextBlock();\r\n labelRichTextBlock.setParent(this);\r\n labelRichTextBlock.forElementId = renderedInputControlId;\r\n\r\n const labelInline = new TextRun(this.label);\r\n labelRichTextBlock.addInline(labelInline);\r\n\r\n if (this.isRequired) {\r\n labelInline.init(hostConfig.inputs.label.requiredInputs);\r\n\r\n const isRequiredCueInline = new TextRun(\r\n hostConfig.inputs.label.requiredInputs.suffix\r\n );\r\n isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;\r\n isRequiredCueInline.ariaHidden = true;\r\n\r\n labelRichTextBlock.addInline(isRequiredCueInline);\r\n } else {\r\n labelInline.init(hostConfig.inputs.label.optionalInputs);\r\n }\r\n\r\n this._renderedLabelElement = labelRichTextBlock.render();\r\n\r\n if (this._renderedLabelElement) {\r\n this._renderedLabelElement.id = Utils.generateUniqueId();\r\n this._renderedLabelElement.style.marginBottom =\r\n hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + \"px\";\r\n\r\n this._outerContainerElement.appendChild(this._renderedLabelElement);\r\n }\r\n }\r\n\r\n this._inputControlContainerElement = document.createElement(\"div\");\r\n this._inputControlContainerElement.className =\r\n hostConfig.makeCssClassName(\"ac-input-container\");\r\n this._inputControlContainerElement.style.display = \"flex\";\r\n\r\n if (this.height === \"stretch\") {\r\n this._inputControlContainerElement.style.alignItems = \"stretch\";\r\n this._inputControlContainerElement.style.flex = \"1 1 auto\";\r\n }\r\n\r\n this._renderedInputControlElement = this.internalRender();\r\n\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.id = renderedInputControlId;\r\n this._renderedInputControlElement.style.minWidth = \"0px\";\r\n\r\n if (this.isNullable && this.isRequired) {\r\n this._renderedInputControlElement.setAttribute(\"aria-required\", \"true\");\r\n this._renderedInputControlElement.classList.add(\r\n hostConfig.makeCssClassName(\"ac-input-required\")\r\n );\r\n }\r\n\r\n this._inputControlContainerElement.appendChild(this._renderedInputControlElement);\r\n this._outerContainerElement.appendChild(this._inputControlContainerElement);\r\n\r\n this.updateInputControlAriaLabelledBy();\r\n\r\n return this._outerContainerElement;\r\n }\r\n\r\n this.resetDirtyState();\r\n\r\n return undefined;\r\n }\r\n\r\n protected valueChanged() {\r\n this.getRootElement().updateActionsEnabledState();\r\n\r\n if (this.isValid()) {\r\n this.resetValidationFailureCue();\r\n }\r\n\r\n if (this.onValueChanged) {\r\n this.onValueChanged(this);\r\n }\r\n\r\n raiseInputValueChangedEvent(this);\r\n }\r\n\r\n protected resetValidationFailureCue() {\r\n if (this.renderedInputControlElement) {\r\n this.renderedInputControlElement.classList.remove(\r\n this.hostConfig.makeCssClassName(\"ac-input-validation-failed\")\r\n );\r\n\r\n this.updateInputControlAriaLabelledBy();\r\n\r\n if (this._renderedErrorMessageElement) {\r\n this._outerContainerElement.removeChild(this._renderedErrorMessageElement);\r\n\r\n this._renderedErrorMessageElement = undefined;\r\n }\r\n }\r\n }\r\n\r\n protected showValidationErrorMessage() {\r\n if (\r\n this.renderedElement &&\r\n this.errorMessage &&\r\n GlobalSettings.displayInputValidationErrors\r\n ) {\r\n const errorMessageTextBlock = new TextBlock();\r\n errorMessageTextBlock.setParent(this);\r\n errorMessageTextBlock.text = this.errorMessage;\r\n errorMessageTextBlock.wrap = true;\r\n errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);\r\n\r\n this._renderedErrorMessageElement = errorMessageTextBlock.render();\r\n\r\n if (this._renderedErrorMessageElement) {\r\n this._renderedErrorMessageElement.id = Utils.generateUniqueId();\r\n this._outerContainerElement.appendChild(this._renderedErrorMessageElement);\r\n\r\n this.updateInputControlAriaLabelledBy();\r\n }\r\n }\r\n }\r\n\r\n onValueChanged: (sender: Input) => void;\r\n\r\n labelledBy?: string;\r\n\r\n abstract isSet(): boolean;\r\n\r\n focus() {\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.focus();\r\n }\r\n }\r\n\r\n isValid(): boolean {\r\n return true;\r\n }\r\n\r\n isDirty(): boolean {\r\n return this.value !== this._oldValue;\r\n }\r\n\r\n resetDirtyState() {\r\n this._oldValue = this.value;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.id) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.inputsMustHaveUniqueId()\r\n );\r\n }\r\n\r\n if (this.isRequired) {\r\n if (!this.label) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.RequiredInputsShouldHaveLabel,\r\n \"Required inputs should have a label\"\r\n );\r\n }\r\n\r\n if (!this.errorMessage) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage,\r\n \"Required inputs should have an error message\"\r\n );\r\n }\r\n }\r\n }\r\n\r\n validateValue(): boolean {\r\n this.resetValidationFailureCue();\r\n\r\n const result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();\r\n\r\n if (!result && this.renderedInputControlElement) {\r\n this.renderedInputControlElement.classList.add(\r\n this.hostConfig.makeCssClassName(\"ac-input-validation-failed\")\r\n );\r\n\r\n this.showValidationErrorMessage();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return [this];\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n let result = super.render();\r\n\r\n this.resetDirtyState();\r\n\r\n return result;\r\n }\r\n\r\n abstract get value(): any;\r\n\r\n get isInteractive(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class TextInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly maxLengthProperty = new NumProperty(Versions.v1_0, \"maxLength\");\r\n static readonly isMultilineProperty = new BoolProperty(Versions.v1_0, \"isMultiline\", false);\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly styleProperty = new EnumProperty(\r\n Versions.v1_0,\r\n \"style\",\r\n Enums.InputTextStyle,\r\n Enums.InputTextStyle.Text,\r\n [\r\n { value: Enums.InputTextStyle.Text },\r\n { value: Enums.InputTextStyle.Tel },\r\n { value: Enums.InputTextStyle.Url },\r\n { value: Enums.InputTextStyle.Email },\r\n { value: Enums.InputTextStyle.Password, targetVersion: Versions.v1_5 }\r\n ]\r\n );\r\n static readonly inlineActionProperty = new ActionProperty(Versions.v1_0, \"inlineAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n static readonly regexProperty = new StringProperty(Versions.v1_3, \"regex\", true);\r\n\r\n @property(TextInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(TextInput.maxLengthProperty)\r\n maxLength?: number;\r\n\r\n @property(TextInput.isMultilineProperty)\r\n isMultiline: boolean = false;\r\n\r\n @property(TextInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n @property(TextInput.styleProperty)\r\n style: Enums.InputTextStyle = Enums.InputTextStyle.Text;\r\n\r\n @property(TextInput.inlineActionProperty)\r\n inlineAction?: Action;\r\n\r\n @property(TextInput.regexProperty)\r\n regex?: string;\r\n\r\n //#endregion\r\n\r\n private setupInput(input: HTMLInputElement | HTMLTextAreaElement) {\r\n input.style.flex = \"1 1 auto\";\r\n\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.placeholder) {\r\n input.placeholder = this.placeholder;\r\n input.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n if (this.defaultValue) {\r\n input.value = this.defaultValue;\r\n }\r\n\r\n if (this.maxLength && this.maxLength > 0) {\r\n input.maxLength = this.maxLength;\r\n }\r\n\r\n input.oninput = () => {\r\n this.valueChanged();\r\n };\r\n input.onkeypress = (e: KeyboardEvent) => {\r\n // Ctrl+Enter pressed\r\n if (\r\n e.ctrlKey &&\r\n e.code === \"Enter\" &&\r\n this.inlineAction &&\r\n this.inlineAction.isEffectivelyEnabled()\r\n ) {\r\n this.inlineAction.execute();\r\n }\r\n };\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n let result: HTMLInputElement | HTMLTextAreaElement;\r\n\r\n if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {\r\n result = document.createElement(\"textarea\");\r\n result.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-textInput\",\r\n \"ac-multiline\"\r\n );\r\n\r\n if (this.height === \"stretch\") {\r\n result.style.height = \"initial\";\r\n }\r\n } else {\r\n result = document.createElement(\"input\");\r\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\");\r\n result.type = Enums.InputTextStyle[this.style].toLowerCase();\r\n }\r\n\r\n this.setupInput(result);\r\n\r\n return result;\r\n }\r\n\r\n protected overrideInternalRender(): HTMLElement | undefined {\r\n const renderedInputControl = super.overrideInternalRender();\r\n\r\n if (this.inlineAction) {\r\n const button = document.createElement(\"button\");\r\n button.className = this.hostConfig.makeCssClassName(\r\n this.inlineAction.isEffectivelyEnabled()\r\n ? \"ac-inlineActionButton\"\r\n : \"ac-inlineActionButton-disabled\"\r\n );\r\n\r\n button.onclick = (e) => {\r\n if (this.inlineAction && this.inlineAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.inlineAction.execute();\r\n }\r\n };\r\n\r\n if (this.inlineAction.iconUrl) {\r\n button.classList.add(\"iconOnly\");\r\n\r\n const icon = document.createElement(\"img\");\r\n icon.style.height = \"100%\";\r\n icon.setAttribute(\"role\", \"presentation\");\r\n\r\n // The below trick is necessary as a workaround in Chrome where the icon is initially displayed\r\n // at its native size then resized to 100% of the button's height. This cfreates an unpleasant\r\n // flicker. On top of that, Chrome's flex implementation fails to prperly re-layout the button\r\n // after the image has loaded and been gicven its final size. The below trick also fixes that.\r\n icon.style.display = \"none\";\r\n icon.onload = () => {\r\n icon.style.removeProperty(\"display\");\r\n };\r\n icon.onerror = () => {\r\n button.removeChild(icon);\r\n button.classList.remove(\"iconOnly\");\r\n button.classList.add(\"textOnly\");\r\n button.textContent =\r\n this.inlineAction && this.inlineAction.title\r\n ? this.inlineAction.title\r\n : Strings.defaults.inlineActionTitle();\r\n };\r\n\r\n icon.src = this.inlineAction.iconUrl;\r\n\r\n button.appendChild(icon);\r\n button.title = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : Strings.defaults.inlineActionTitle();\r\n } else {\r\n button.classList.add(\"textOnly\");\r\n button.textContent = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : Strings.defaults.inlineActionTitle();\r\n }\r\n\r\n this.inlineAction.setupElementForAccessibility(button, true);\r\n\r\n button.style.marginLeft = \"8px\";\r\n\r\n this.inputControlContainerElement.appendChild(button);\r\n }\r\n\r\n return renderedInputControl;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Text\";\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n if (this.inlineAction) {\r\n result.push(this.inlineAction);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string) {\r\n let result = super.getActionById(id);\r\n\r\n if (!result && this.inlineAction) {\r\n result = this.inlineAction.getActionById(id);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (!this.value) {\r\n return true;\r\n }\r\n\r\n if (this.regex) {\r\n return new RegExp(this.regex, \"g\").test(this.value);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n get value(): string | undefined {\r\n if (this.renderedInputControlElement) {\r\n if (this.isMultiline) {\r\n return (this.renderedInputControlElement).value;\r\n } else {\r\n return (this.renderedInputControlElement).value;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n}\r\n\r\nexport class ToggleInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly valueOnProperty = new StringProperty(\r\n Versions.v1_0,\r\n \"valueOn\",\r\n true,\r\n undefined,\r\n \"true\",\r\n (sender: SerializableObject) => {\r\n return \"true\";\r\n }\r\n );\r\n static readonly valueOffProperty = new StringProperty(\r\n Versions.v1_0,\r\n \"valueOff\",\r\n true,\r\n undefined,\r\n \"false\",\r\n (sender: SerializableObject) => {\r\n return \"false\";\r\n }\r\n );\r\n static readonly wrapProperty = new BoolProperty(Versions.v1_2, \"wrap\", false);\r\n\r\n @property(ToggleInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(ToggleInput.titleProperty)\r\n title?: string;\r\n\r\n @property(ToggleInput.valueOnProperty)\r\n valueOn: string = \"true\";\r\n\r\n @property(ToggleInput.valueOffProperty)\r\n valueOff: string = \"false\";\r\n\r\n @property(ToggleInput.wrapProperty)\r\n wrap: boolean = false;\r\n\r\n //#endregion\r\n\r\n private _checkboxInputElement: HTMLInputElement;\r\n private _checkboxInputLabelElement: HTMLElement | undefined;\r\n private _oldCheckboxValue: boolean;\r\n\r\n protected updateInputControlAriaLabelledBy() {\r\n if (this._checkboxInputElement) {\r\n let joinedLabelIds = this.getAllLabelIds().join(\" \");\r\n\r\n if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {\r\n joinedLabelIds += \" \" + this._checkboxInputLabelElement.id;\r\n }\r\n\r\n if (joinedLabelIds) {\r\n this._checkboxInputElement.setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n } else {\r\n this._checkboxInputElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-toggleInput\");\r\n element.style.width = \"100%\";\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"center\";\r\n\r\n this._checkboxInputElement = document.createElement(\"input\");\r\n this._checkboxInputElement.id = Utils.generateUniqueId();\r\n this._checkboxInputElement.type = \"checkbox\";\r\n this._checkboxInputElement.style.display = \"inline-block\";\r\n this._checkboxInputElement.style.verticalAlign = \"middle\";\r\n this._checkboxInputElement.style.margin = \"0\";\r\n this._checkboxInputElement.style.flex = \"0 0 auto\";\r\n\r\n if (this.title) {\r\n this._checkboxInputElement.setAttribute(\"aria-label\", this.title);\r\n }\r\n\r\n if (this.isRequired) {\r\n this._checkboxInputElement.setAttribute(\"aria-required\", \"true\");\r\n }\r\n\r\n this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.defaultValue === this.valueOn) {\r\n this._checkboxInputElement.checked = true;\r\n }\r\n\r\n this._oldCheckboxValue = this._checkboxInputElement.checked;\r\n\r\n this._checkboxInputElement.onchange = () => {\r\n this.valueChanged();\r\n };\r\n\r\n Utils.appendChild(element, this._checkboxInputElement);\r\n\r\n if (this.title || this.isDesignMode()) {\r\n const label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = this._checkboxInputElement.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = !this.title ? this.getJsonTypeName() : this.title;\r\n label.useMarkdown = GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n\r\n this._checkboxInputLabelElement = label.render();\r\n\r\n if (this._checkboxInputLabelElement) {\r\n this._checkboxInputLabelElement.id = Utils.generateUniqueId();\r\n this._checkboxInputLabelElement.style.display = \"inline-block\";\r\n this._checkboxInputLabelElement.style.flex = \"1 1 auto\";\r\n this._checkboxInputLabelElement.style.marginLeft = \"6px\";\r\n this._checkboxInputLabelElement.style.verticalAlign = \"middle\";\r\n\r\n const spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n\r\n Utils.appendChild(element, spacerElement);\r\n Utils.appendChild(element, this._checkboxInputLabelElement);\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n protected get isNullable(): boolean {\r\n return false;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Toggle\";\r\n }\r\n\r\n focus() {\r\n if (this._checkboxInputElement) {\r\n this._checkboxInputElement.focus();\r\n }\r\n }\r\n\r\n isSet(): boolean {\r\n if (this.isRequired) {\r\n return this.value === this.valueOn;\r\n }\r\n\r\n return this.value ? true : false;\r\n }\r\n\r\n isDirty(): boolean {\r\n return this._checkboxInputElement\r\n ? this._checkboxInputElement.checked !== this._oldCheckboxValue\r\n : false;\r\n }\r\n\r\n get value(): string | undefined {\r\n if (this._checkboxInputElement) {\r\n return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n}\r\n\r\nexport class Choice extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n\r\n @property(Choice.titleProperty)\r\n title?: string;\r\n\r\n @property(Choice.valueProperty)\r\n value?: string;\r\n\r\n //#endregion\r\n\r\n protected getSchemaKey(): string {\r\n return \"Choice\";\r\n }\r\n\r\n constructor(title?: string, value?: string) {\r\n super();\r\n\r\n this.title = title;\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport class ChoiceSetInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly choicesProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"choices\",\r\n Choice\r\n );\r\n static readonly styleProperty = new ValueSetProperty(\r\n Versions.v1_0,\r\n \"style\",\r\n [\r\n { value: \"compact\" },\r\n { value: \"expanded\" },\r\n { value: \"filtered\", targetVersion: Versions.v1_5 }\r\n ],\r\n \"compact\"\r\n );\r\n static readonly isMultiSelectProperty = new BoolProperty(Versions.v1_0, \"isMultiSelect\", false);\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly wrapProperty = new BoolProperty(Versions.v1_2, \"wrap\", false);\r\n\r\n @property(ChoiceSetInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(ChoiceSetInput.styleProperty)\r\n style?: \"compact\" | \"expanded\" | \"filtered\";\r\n\r\n get isCompact(): boolean {\r\n return !this.style || this.style === \"compact\";\r\n }\r\n\r\n set isCompact(value: boolean) {\r\n this.style = value ? undefined : \"expanded\";\r\n }\r\n\r\n @property(ChoiceSetInput.isMultiSelectProperty)\r\n isMultiSelect: boolean = false;\r\n\r\n @property(ChoiceSetInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n @property(ChoiceSetInput.wrapProperty)\r\n wrap: boolean = false;\r\n\r\n @property(ChoiceSetInput.choicesProperty)\r\n choices: Choice[] = [];\r\n\r\n //#endregion\r\n\r\n private static _uniqueCategoryCounter = 0;\r\n\r\n private static getUniqueCategoryName(): string {\r\n const uniqueCategoryName = \"__ac-category\" + ChoiceSetInput._uniqueCategoryCounter;\r\n\r\n ChoiceSetInput._uniqueCategoryCounter++;\r\n\r\n return uniqueCategoryName;\r\n }\r\n\r\n private _uniqueCategoryName: string;\r\n private _selectElement: HTMLSelectElement | undefined;\r\n private _textInput: HTMLInputElement | undefined;\r\n private _toggleInputs: HTMLInputElement[] | undefined;\r\n private _labels: Array;\r\n\r\n // Make sure `aria-current` is applied to the currently-selected item\r\n private internalApplyAriaCurrent(): void {\r\n if (this._selectElement) {\r\n const options = this._selectElement.options;\r\n\r\n if (options) {\r\n for (const option of Array.from(options)) {\r\n if (option.selected) {\r\n option.setAttribute(\"aria-current\", \"true\");\r\n } else {\r\n option.removeAttribute(\"aria-current\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private renderCompoundInput(\r\n cssClassName: string,\r\n type: \"checkbox\" | \"radio\",\r\n defaultValues: string[] | undefined\r\n ): HTMLElement {\r\n const element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", cssClassName);\r\n element.style.width = \"100%\";\r\n\r\n element.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n this._toggleInputs = [];\r\n this._labels = [];\r\n\r\n for (const choice of this.choices) {\r\n const input = document.createElement(\"input\");\r\n input.id = Utils.generateUniqueId();\r\n input.type = type;\r\n input.style.margin = \"0\";\r\n input.style.display = \"inline-block\";\r\n input.style.verticalAlign = \"middle\";\r\n input.style.flex = \"0 0 auto\";\r\n input.name = this.id ? this.id : this._uniqueCategoryName;\r\n\r\n if (this.isRequired) {\r\n input.setAttribute(\"aria-required\", \"true\");\r\n }\r\n\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (choice.value) {\r\n input.value = choice.value;\r\n }\r\n\r\n if (choice.title) {\r\n input.setAttribute(\"aria-label\", choice.title);\r\n }\r\n\r\n if (defaultValues && choice.value) {\r\n if (defaultValues.indexOf(choice.value) >= 0) {\r\n input.checked = true;\r\n }\r\n }\r\n\r\n input.onchange = () => {\r\n this.valueChanged();\r\n };\r\n\r\n this._toggleInputs.push(input);\r\n\r\n const compoundInput = document.createElement(\"div\");\r\n compoundInput.style.display = \"flex\";\r\n compoundInput.style.alignItems = \"center\";\r\n\r\n Utils.appendChild(compoundInput, input);\r\n\r\n const label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = input.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = choice.title ? choice.title : \"Choice \" + this._toggleInputs.length;\r\n label.useMarkdown = GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n\r\n const labelElement = label.render();\r\n\r\n this._labels.push(labelElement);\r\n\r\n if (labelElement) {\r\n labelElement.id = Utils.generateUniqueId();\r\n labelElement.style.display = \"inline-block\";\r\n labelElement.style.flex = \"1 1 auto\";\r\n labelElement.style.marginLeft = \"6px\";\r\n labelElement.style.verticalAlign = \"middle\";\r\n\r\n const spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n\r\n Utils.appendChild(compoundInput, spacerElement);\r\n Utils.appendChild(compoundInput, labelElement);\r\n }\r\n\r\n Utils.appendChild(element, compoundInput);\r\n }\r\n\r\n return element;\r\n }\r\n\r\n protected updateInputControlAriaLabelledBy() {\r\n if (\r\n (this.isMultiSelect || this.style === \"expanded\") &&\r\n this._toggleInputs &&\r\n this._labels\r\n ) {\r\n const labelIds: string[] = this.getAllLabelIds();\r\n\r\n for (let i = 0; i < this._toggleInputs.length; i++) {\r\n let joinedLabelIds = labelIds.join(\" \");\r\n const label = this._labels[i];\r\n\r\n if (label && label.id) {\r\n joinedLabelIds += \" \" + label.id;\r\n }\r\n\r\n if (joinedLabelIds) {\r\n this._toggleInputs[i].setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n } else {\r\n this._toggleInputs[i].removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n } else {\r\n super.updateInputControlAriaLabelledBy();\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName();\r\n\r\n if (this.isMultiSelect) {\r\n // Render as a list of toggle inputs\r\n return this.renderCompoundInput(\r\n \"ac-choiceSetInput-multiSelect\",\r\n \"checkbox\",\r\n this.defaultValue\r\n ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator)\r\n : undefined\r\n );\r\n } else {\r\n if (this.style === \"expanded\") {\r\n // Render as a series of radio buttons\r\n return this.renderCompoundInput(\r\n \"ac-choiceSetInput-expanded\",\r\n \"radio\",\r\n this.defaultValue ? [this.defaultValue] : undefined\r\n );\r\n } else if (this.style === \"filtered\") {\r\n // Render as a text input coupled with a datalist\r\n const inputContainer = document.createElement(\"div\");\r\n inputContainer.style.width = \"100%\";\r\n\r\n this._textInput = document.createElement(\"input\");\r\n this._textInput.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-multichoiceInput\",\r\n \"ac-choiceSetInput-filtered\"\r\n );\r\n this._textInput.type = \"text\";\r\n this._textInput.style.width = \"100%\";\r\n this._textInput.oninput = () => {\r\n this.valueChanged();\r\n\r\n if (this._textInput) {\r\n // Remove aria-label when value is not empty so narration software doesn't\r\n // read the placeholder\r\n if (this.value) {\r\n this._textInput.removeAttribute(\"placeholder\");\r\n this._textInput.removeAttribute(\"aria-label\");\r\n } else if (this.placeholder) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n }\r\n };\r\n\r\n if (this.defaultValue) {\r\n this._textInput.value = this.defaultValue;\r\n }\r\n\r\n if (this.placeholder && !this._textInput.value) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._textInput.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n const dataList = document.createElement(\"datalist\");\r\n dataList.id = Utils.generateUniqueId();\r\n\r\n for (const choice of this.choices) {\r\n const option = document.createElement(\"option\");\r\n // To fix https://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value\r\n // value is mapped to choice.title other than choice.value\r\n if (choice.title) {\r\n option.value = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n dataList.appendChild(option);\r\n }\r\n\r\n this._textInput.setAttribute(\"list\", dataList.id);\r\n\r\n inputContainer.append(this._textInput, dataList);\r\n\r\n return inputContainer;\r\n } else {\r\n // Render as a combo box\r\n this._selectElement = document.createElement(\"select\");\r\n this._selectElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-multichoiceInput\",\r\n \"ac-choiceSetInput-compact\"\r\n );\r\n this._selectElement.style.width = \"100%\";\r\n\r\n this._selectElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n const placeholderOption = document.createElement(\"option\");\r\n placeholderOption.selected = true;\r\n placeholderOption.disabled = true;\r\n placeholderOption.hidden = true;\r\n placeholderOption.value = \"\";\r\n\r\n if (this.placeholder) {\r\n placeholderOption.text = this.placeholder;\r\n }\r\n\r\n Utils.appendChild(this._selectElement, placeholderOption);\r\n\r\n for (const choice of this.choices) {\r\n const option = document.createElement(\"option\");\r\n option.value = choice.value!;\r\n\r\n if (choice.title) {\r\n option.text = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (choice.value === this.defaultValue) {\r\n option.selected = true;\r\n }\r\n\r\n Utils.appendChild(this._selectElement, option);\r\n }\r\n\r\n this._selectElement.onchange = () => {\r\n this.internalApplyAriaCurrent();\r\n this.valueChanged();\r\n };\r\n\r\n this.internalApplyAriaCurrent();\r\n\r\n return this._selectElement;\r\n }\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.ChoiceSet\";\r\n }\r\n\r\n focus() {\r\n if (this._toggleInputs && (this.isMultiSelect || this.style === \"expanded\")) {\r\n if (this._toggleInputs.length > 0) {\r\n this._toggleInputs[0].focus();\r\n }\r\n } else if (this._textInput) {\r\n this._textInput.focus();\r\n } else {\r\n super.focus();\r\n }\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (this.choices.length === 0) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.CollectionCantBeEmpty,\r\n Strings.errors.choiceSetMustHaveAtLeastOneChoice()\r\n );\r\n }\r\n\r\n for (const choice of this.choices) {\r\n if (!choice.title || !choice.value) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.choiceSetChoicesMustHaveTitleAndValue()\r\n );\r\n }\r\n }\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (this._textInput) {\r\n if (this.value === \"\" || this.value === this.placeholder) {\r\n return true;\r\n }\r\n for (const choice of this.choices) {\r\n if (this.value === choice.value) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n return super.isValid();\r\n }\r\n\r\n get value(): string | undefined {\r\n if (!this.isMultiSelect) {\r\n if (this._selectElement) {\r\n return this._selectElement.selectedIndex > 0\r\n ? this._selectElement.value\r\n : undefined;\r\n } else if (this._textInput) {\r\n for (const choice of this.choices) {\r\n if (choice.title && this._textInput.value === choice.title) {\r\n return choice.value;\r\n }\r\n }\r\n return this._textInput.value;\r\n } else if (this._toggleInputs && this._toggleInputs.length > 0) {\r\n for (const toggleInput of this._toggleInputs) {\r\n if (toggleInput.checked) {\r\n return toggleInput.value;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n } else {\r\n if (!this._toggleInputs || this._toggleInputs.length === 0) {\r\n return undefined;\r\n }\r\n\r\n let result: string = \"\";\r\n\r\n for (const toggleInput of this._toggleInputs) {\r\n if (toggleInput.checked) {\r\n if (result !== \"\") {\r\n result += this.hostConfig.choiceSetInputValueSeparator;\r\n }\r\n\r\n result += toggleInput.value;\r\n }\r\n }\r\n\r\n return result ? result : undefined;\r\n }\r\n }\r\n}\r\n\r\nexport class NumberInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new NumProperty(Versions.v1_0, \"value\");\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly minProperty = new NumProperty(Versions.v1_0, \"min\");\r\n static readonly maxProperty = new NumProperty(Versions.v1_0, \"max\");\r\n\r\n @property(NumberInput.valueProperty)\r\n defaultValue?: number;\r\n\r\n @property(NumberInput.minProperty)\r\n min?: number;\r\n\r\n @property(NumberInput.maxProperty)\r\n max?: number;\r\n\r\n @property(NumberInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n //#endregion\r\n\r\n private _numberInputElement: HTMLInputElement;\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._numberInputElement = document.createElement(\"input\");\r\n this._numberInputElement.setAttribute(\"type\", \"number\");\r\n\r\n if (this.min !== undefined) {\r\n this._numberInputElement.setAttribute(\"min\", this.min.toString());\r\n }\r\n\r\n if (this.max !== undefined) {\r\n this._numberInputElement.setAttribute(\"max\", this.max.toString());\r\n }\r\n\r\n this._numberInputElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-numberInput\"\r\n );\r\n this._numberInputElement.style.width = \"100%\";\r\n\r\n this._numberInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.defaultValue !== undefined) {\r\n this._numberInputElement.valueAsNumber = this.defaultValue;\r\n }\r\n\r\n if (this.placeholder) {\r\n this._numberInputElement.placeholder = this.placeholder;\r\n this._numberInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._numberInputElement.oninput = () => {\r\n this.valueChanged();\r\n };\r\n\r\n return this._numberInputElement;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Number\";\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value !== undefined && !isNaN(this.value);\r\n }\r\n\r\n isValid(): boolean {\r\n if (this.value === undefined) {\r\n return !this.isRequired;\r\n }\r\n\r\n let result = true;\r\n\r\n if (this.min !== undefined) {\r\n result = result && this.value >= this.min;\r\n }\r\n\r\n if (this.max !== undefined) {\r\n result = result && this.value <= this.max;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get value(): number | undefined {\r\n return this._numberInputElement ? this._numberInputElement.valueAsNumber : undefined;\r\n }\r\n\r\n set value(value: number | undefined) {\r\n if (value && this._numberInputElement) {\r\n this._numberInputElement.value = value.toString();\r\n }\r\n }\r\n}\r\n\r\nexport class DateInput extends Input {\r\n //#region Schema\r\n\r\n static readonly valueProperty = new StringProperty(Versions.v1_0, \"value\");\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly minProperty = new StringProperty(Versions.v1_0, \"min\");\r\n static readonly maxProperty = new StringProperty(Versions.v1_0, \"max\");\r\n\r\n @property(DateInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(DateInput.minProperty)\r\n min?: string;\r\n\r\n @property(DateInput.maxProperty)\r\n max?: string;\r\n\r\n @property(DateInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n //#endregion\r\n\r\n private _dateInputElement: HTMLInputElement;\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._dateInputElement = document.createElement(\"input\");\r\n this._dateInputElement.setAttribute(\"type\", \"date\");\r\n\r\n if (this.min) {\r\n this._dateInputElement.setAttribute(\"min\", this.min);\r\n }\r\n\r\n if (this.max) {\r\n this._dateInputElement.setAttribute(\"max\", this.max);\r\n }\r\n\r\n if (this.placeholder) {\r\n this._dateInputElement.placeholder = this.placeholder;\r\n this._dateInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._dateInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n this._dateInputElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-dateInput\"\r\n );\r\n this._dateInputElement.style.width = \"100%\";\r\n\r\n this._dateInputElement.oninput = () => {\r\n this.valueChanged();\r\n };\r\n\r\n if (this.defaultValue) {\r\n this._dateInputElement.value = this.defaultValue;\r\n }\r\n\r\n return this._dateInputElement;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Date\";\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n\r\n const valueAsDate = new Date(this.value);\r\n\r\n let result = true;\r\n\r\n if (this.min) {\r\n const minDate = new Date(this.min);\r\n\r\n result = result && valueAsDate >= minDate;\r\n }\r\n\r\n if (this.max) {\r\n const maxDate = new Date(this.max);\r\n\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get value(): string | undefined {\r\n return this._dateInputElement ? this._dateInputElement.value : undefined;\r\n }\r\n}\r\n\r\nexport class TimeProperty extends CustomProperty {\r\n constructor(readonly targetVersion: Version, readonly name: string) {\r\n super(\r\n targetVersion,\r\n name,\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const value = source[prop.name];\r\n\r\n if (typeof value === \"string\" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {\r\n return value;\r\n }\r\n\r\n return undefined;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n context.serializeValue(target, prop.name, value);\r\n }\r\n );\r\n }\r\n}\r\n\r\nexport class TimeInput extends Input {\r\n private static convertTimeStringToDate(timeString: string): Date {\r\n return new Date(\"1973-09-04T\" + timeString + \":00Z\");\r\n }\r\n\r\n //#region Schema\r\n\r\n static readonly valueProperty = new TimeProperty(Versions.v1_0, \"value\");\r\n static readonly placeholderProperty = new StringProperty(Versions.v1_0, \"placeholder\");\r\n static readonly minProperty = new TimeProperty(Versions.v1_0, \"min\");\r\n static readonly maxProperty = new TimeProperty(Versions.v1_0, \"max\");\r\n\r\n @property(TimeInput.valueProperty)\r\n defaultValue?: string;\r\n\r\n @property(TimeInput.minProperty)\r\n min?: string;\r\n\r\n @property(TimeInput.maxProperty)\r\n max?: string;\r\n\r\n @property(TimeInput.placeholderProperty)\r\n placeholder?: string;\r\n\r\n //#endregion\r\n\r\n private _timeInputElement: HTMLInputElement;\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._timeInputElement = document.createElement(\"input\");\r\n this._timeInputElement.setAttribute(\"type\", \"time\");\r\n\r\n if (this.min) {\r\n this._timeInputElement.setAttribute(\"min\", this.min);\r\n }\r\n\r\n if (this.max) {\r\n this._timeInputElement.setAttribute(\"max\", this.max);\r\n }\r\n\r\n this._timeInputElement.className = this.hostConfig.makeCssClassName(\r\n \"ac-input\",\r\n \"ac-timeInput\"\r\n );\r\n this._timeInputElement.style.width = \"100%\";\r\n this._timeInputElement.oninput = () => {\r\n this.valueChanged();\r\n };\r\n\r\n if (this.placeholder) {\r\n this._timeInputElement.placeholder = this.placeholder;\r\n this._timeInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n\r\n this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n\r\n if (this.defaultValue) {\r\n this._timeInputElement.value = this.defaultValue;\r\n }\r\n\r\n return this._timeInputElement;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Input.Time\";\r\n }\r\n\r\n isSet(): boolean {\r\n return this.value ? true : false;\r\n }\r\n\r\n isValid(): boolean {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n\r\n const valueAsDate = TimeInput.convertTimeStringToDate(this.value);\r\n\r\n let result = true;\r\n\r\n if (this.min) {\r\n const minDate = TimeInput.convertTimeStringToDate(this.min);\r\n\r\n result = result && valueAsDate >= minDate;\r\n }\r\n\r\n if (this.max) {\r\n const maxDate = TimeInput.convertTimeStringToDate(this.max);\r\n\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get value(): string | undefined {\r\n return this._timeInputElement ? this._timeInputElement.value : undefined;\r\n }\r\n}\r\n\r\nexport const enum ActionButtonState {\r\n Normal,\r\n Expanded,\r\n Subdued\r\n}\r\n\r\nexport type ActionType = { new (): Action };\r\n\r\nexport abstract class Action extends CardObject {\r\n //#region Schema\r\n\r\n static readonly titleProperty = new StringProperty(Versions.v1_0, \"title\");\r\n static readonly iconUrlProperty = new StringProperty(Versions.v1_1, \"iconUrl\");\r\n static readonly styleProperty = new ValueSetProperty(\r\n Versions.v1_2,\r\n \"style\",\r\n [\r\n { value: Enums.ActionStyle.Default },\r\n { value: Enums.ActionStyle.Positive },\r\n { value: Enums.ActionStyle.Destructive }\r\n ],\r\n Enums.ActionStyle.Default\r\n );\r\n static readonly modeProperty = new ValueSetProperty(\r\n Versions.v1_5,\r\n \"mode\",\r\n [{ value: Enums.ActionMode.Primary }, { value: Enums.ActionMode.Secondary }],\r\n Enums.ActionMode.Primary\r\n );\r\n static readonly tooltipProperty = new StringProperty(Versions.v1_5, \"tooltip\");\r\n static readonly isEnabledProperty = new BoolProperty(Versions.v1_5, \"isEnabled\", true);\r\n\r\n @property(Action.titleProperty)\r\n title?: string;\r\n\r\n @property(Action.iconUrlProperty)\r\n iconUrl?: string;\r\n\r\n @property(Action.styleProperty)\r\n style: string = Enums.ActionStyle.Default;\r\n\r\n @property(Action.modeProperty)\r\n mode: string = Enums.ActionMode.Primary;\r\n\r\n @property(Action.tooltipProperty)\r\n tooltip?: string;\r\n\r\n @property(Action.isEnabledProperty)\r\n isEnabled: boolean;\r\n\r\n //#endregion\r\n\r\n private renderButtonContent() {\r\n if (this.renderedElement) {\r\n // Cache hostConfig for perf\r\n const hostConfig = this.hostConfig;\r\n\r\n const titleElement = document.createElement(\"div\");\r\n titleElement.style.overflow = \"hidden\";\r\n titleElement.style.textOverflow = \"ellipsis\";\r\n\r\n if (\r\n !(\r\n hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle ||\r\n hostConfig.actions.allowTitleToWrap\r\n )\r\n ) {\r\n titleElement.style.whiteSpace = \"nowrap\";\r\n }\r\n\r\n if (this.title) {\r\n titleElement.innerText = this.title;\r\n }\r\n\r\n if (!this.iconUrl) {\r\n this.renderedElement.classList.add(\"noIcon\");\r\n this.renderedElement.appendChild(titleElement);\r\n } else {\r\n const iconElement = document.createElement(\"img\");\r\n iconElement.src = this.iconUrl;\r\n iconElement.style.width = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.height = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.flex = \"0 0 auto\";\r\n\r\n if (hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle) {\r\n this.renderedElement.classList.add(\"iconAbove\");\r\n this.renderedElement.style.flexDirection = \"column\";\r\n\r\n if (this.title) {\r\n iconElement.style.marginBottom = \"6px\";\r\n }\r\n } else {\r\n this.renderedElement.classList.add(\"iconLeft\");\r\n\r\n iconElement.style.maxHeight = \"100%\";\r\n\r\n if (this.title) {\r\n iconElement.style.marginRight = \"6px\";\r\n }\r\n }\r\n\r\n this.renderedElement.appendChild(iconElement);\r\n this.renderedElement.appendChild(titleElement);\r\n }\r\n }\r\n }\r\n\r\n private getParentContainer(): Container | undefined {\r\n if (this.parent instanceof Container) {\r\n return this.parent;\r\n }\r\n\r\n return this.parent ? this.parent.getParentContainer() : undefined;\r\n }\r\n\r\n private _state: ActionButtonState = ActionButtonState.Normal;\r\n private _actionCollection?: ActionCollection; // hold the reference to its action collection\r\n private _isFocusable: boolean = true;\r\n\r\n isDesignMode(): boolean {\r\n const rootElement = this.getRootObject();\r\n\r\n return rootElement instanceof CardElement && rootElement.isDesignMode();\r\n }\r\n\r\n protected updateCssClasses() {\r\n if (this.parent && this.renderedElement) {\r\n const hostConfig = this.parent.hostConfig;\r\n\r\n this.renderedElement.className = hostConfig.makeCssClassName(\r\n this.isEffectivelyEnabled() ? \"ac-pushButton\" : \"ac-pushButton-disabled\"\r\n );\r\n\r\n const parentContainer = this.getParentContainer();\r\n\r\n if (parentContainer) {\r\n const parentContainerStyle = parentContainer.getEffectiveStyle();\r\n\r\n if (parentContainerStyle) {\r\n this.renderedElement.classList.add(\"style-\" + parentContainerStyle);\r\n }\r\n }\r\n\r\n this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1;\r\n\r\n switch (this._state) {\r\n case ActionButtonState.Normal:\r\n // No additional classes needed\r\n break;\r\n\r\n case ActionButtonState.Expanded:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"expanded\"));\r\n break;\r\n case ActionButtonState.Subdued:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"subdued\"));\r\n break;\r\n }\r\n\r\n if (this.style && this.isEffectivelyEnabled()) {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n this.renderedElement.classList.add(\r\n ...hostConfig.makeCssClassNames(\"primary\", \"style-positive\")\r\n );\r\n } else {\r\n this.renderedElement.classList.add(\r\n ...hostConfig.makeCssClassNames(\"style-\" + this.style.toLowerCase())\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SerializationContext();\r\n }\r\n\r\n protected internalGetReferencedInputs(): Dictionary {\r\n return {};\r\n }\r\n\r\n protected internalPrepareForExecution(_inputs: Dictionary | undefined) {\r\n // Do nothing in base implementation\r\n }\r\n\r\n protected internalValidateInputs(referencedInputs: Dictionary | undefined): Input[] {\r\n const result: Input[] = [];\r\n\r\n if (referencedInputs) {\r\n for (const key of Object.keys(referencedInputs)) {\r\n const input = referencedInputs[key];\r\n\r\n if (!input.validateValue()) {\r\n result.push(input);\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n protected shouldSerialize(context: SerializationContext): boolean {\r\n return context.actionRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n }\r\n\r\n protected raiseExecuteActionEvent() {\r\n if (this.onExecute) {\r\n this.onExecute(this);\r\n }\r\n\r\n raiseExecuteActionEvent(this);\r\n }\r\n\r\n protected internalAfterExecute() {\r\n let rootObject = this.getRootObject();\r\n\r\n if (rootObject instanceof CardElement) {\r\n rootObject.updateActionsEnabledState();\r\n }\r\n }\r\n\r\n onExecute: (sender: Action) => void;\r\n\r\n getHref(): string | undefined {\r\n return \"\";\r\n }\r\n\r\n getAriaRole(): string {\r\n return \"button\";\r\n }\r\n\r\n setupElementForAccessibility(element: HTMLElement, promoteTooltipToLabel: boolean = false) {\r\n element.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1;\r\n\r\n element.setAttribute(\"role\", this.getAriaRole());\r\n\r\n if (element instanceof HTMLButtonElement) {\r\n element.disabled = !this.isEffectivelyEnabled();\r\n }\r\n\r\n if (!this.isEffectivelyEnabled()) {\r\n element.setAttribute(\"aria-disabled\", \"true\");\r\n } else {\r\n element.removeAttribute(\"aria-disabled\");\r\n element.classList.add(this.hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n\r\n if (this.title) {\r\n element.setAttribute(\"aria-label\", this.title);\r\n element.title = this.title;\r\n } else {\r\n element.removeAttribute(\"aria-label\");\r\n element.removeAttribute(\"title\");\r\n }\r\n\r\n if (this.tooltip) {\r\n const targetAriaAttribute = promoteTooltipToLabel\r\n ? this.title\r\n ? \"aria-description\"\r\n : \"aria-label\"\r\n : \"aria-description\";\r\n\r\n element.setAttribute(targetAriaAttribute, this.tooltip);\r\n element.title = this.tooltip;\r\n }\r\n }\r\n\r\n parse(source: any, context?: SerializationContext) {\r\n return super.parse(source, context ? context : new SerializationContext());\r\n }\r\n\r\n render() {\r\n const buttonElement = document.createElement(\"button\");\r\n buttonElement.type = \"button\";\r\n buttonElement.style.display = \"flex\";\r\n buttonElement.style.alignItems = \"center\";\r\n buttonElement.style.justifyContent = \"center\";\r\n buttonElement.onclick = (e) => {\r\n if (this.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n\r\n this.execute();\r\n }\r\n };\r\n\r\n this._renderedElement = buttonElement;\r\n\r\n this.renderButtonContent();\r\n this.updateCssClasses();\r\n this.setupElementForAccessibility(buttonElement);\r\n }\r\n\r\n execute() {\r\n if (this._actionCollection) {\r\n this._actionCollection.actionExecuted(this);\r\n }\r\n\r\n this.raiseExecuteActionEvent();\r\n this.internalAfterExecute();\r\n }\r\n\r\n prepareForExecution(): boolean {\r\n const referencedInputs = this.getReferencedInputs();\r\n const invalidInputs = this.internalValidateInputs(referencedInputs);\r\n\r\n if (invalidInputs.length > 0) {\r\n invalidInputs[0].focus();\r\n\r\n return false;\r\n }\r\n\r\n this.internalPrepareForExecution(referencedInputs);\r\n\r\n return true;\r\n }\r\n\r\n remove(): boolean {\r\n if (this._actionCollection) {\r\n return this._actionCollection.removeAction(this);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return [];\r\n }\r\n\r\n getAllActions(): Action[] {\r\n return [this];\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return this.iconUrl ? [{ url: this.iconUrl, mimeType: \"image\" }] : [];\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n return this.id === id ? this : undefined;\r\n }\r\n\r\n getReferencedInputs(): Dictionary | undefined {\r\n return this.internalGetReferencedInputs();\r\n }\r\n\r\n /**\r\n * Validates the inputs associated with this action.\r\n *\r\n * @returns A list of inputs that failed validation, or an empty array if no input failed validation.\r\n */\r\n validateInputs(): Input[] {\r\n return this.internalValidateInputs(this.getReferencedInputs());\r\n }\r\n\r\n updateEnabledState() {\r\n // Do nothing in base implementation\r\n }\r\n\r\n isEffectivelyEnabled(): boolean {\r\n return this.isEnabled;\r\n }\r\n\r\n get isPrimary(): boolean {\r\n return this.style === Enums.ActionStyle.Positive;\r\n }\r\n\r\n set isPrimary(value: boolean) {\r\n if (value) {\r\n this.style = Enums.ActionStyle.Positive;\r\n } else {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n this.style = Enums.ActionStyle.Default;\r\n }\r\n }\r\n }\r\n\r\n get hostConfig(): HostConfig {\r\n return this.parent ? this.parent.hostConfig : defaultHostConfig;\r\n }\r\n\r\n get parent(): CardElement | undefined {\r\n return this._parent;\r\n }\r\n\r\n get state(): ActionButtonState {\r\n return this._state;\r\n }\r\n\r\n set state(value: ActionButtonState) {\r\n if (this._state !== value) {\r\n this._state = value;\r\n\r\n this.updateCssClasses();\r\n }\r\n }\r\n\r\n get isFocusable(): boolean {\r\n return this._isFocusable;\r\n }\r\n\r\n set isFocusable(value: boolean) {\r\n if (this._isFocusable !== value) {\r\n this._isFocusable = value;\r\n\r\n this.updateCssClasses();\r\n }\r\n }\r\n}\r\n\r\nexport abstract class SubmitActionBase extends Action {\r\n //#region Schema\r\n\r\n static readonly dataProperty = new PropertyDefinition(Versions.v1_0, \"data\");\r\n static readonly associatedInputsProperty = new CustomProperty(\r\n Versions.v1_3,\r\n \"associatedInputs\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const value = source[prop.name];\r\n\r\n if (value !== undefined && typeof value === \"string\") {\r\n return value.toLowerCase() === \"none\" ? \"none\" : \"auto\";\r\n }\r\n\r\n return undefined;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: string | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n context.serializeValue(target, prop.name, value);\r\n }\r\n );\r\n static readonly disabledUnlessAssociatedInputsChangeProperty = new BoolProperty(\r\n Versions.v1_6,\r\n \"disabledUnlessAssociatedInputsChange\",\r\n false\r\n );\r\n\r\n @property(SubmitActionBase.dataProperty)\r\n private _originalData?: PropertyBag;\r\n\r\n @property(SubmitActionBase.associatedInputsProperty)\r\n associatedInputs?: \"auto\" | \"none\";\r\n\r\n @property(SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty)\r\n disabledUnlessAssociatedInputsChange: boolean = false;\r\n\r\n //#endregion\r\n\r\n private _isPrepared: boolean = false;\r\n private _processedData?: PropertyBag;\r\n private _areReferencedInputsDirty: boolean = false;\r\n\r\n protected internalGetReferencedInputs(): Dictionary {\r\n const result: Dictionary = {};\r\n\r\n if (this.associatedInputs !== \"none\") {\r\n let current: CardElement | undefined = this.parent;\r\n let inputs: Input[] = [];\r\n\r\n while (current) {\r\n inputs.push(...current.getAllInputs(false));\r\n\r\n current = current.parent;\r\n }\r\n\r\n for (const input of inputs) {\r\n if (input.id) {\r\n result[input.id] = input;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n protected internalPrepareForExecution(inputs: Dictionary | undefined) {\r\n if (this._originalData) {\r\n this._processedData = JSON.parse(JSON.stringify(this._originalData));\r\n } else {\r\n this._processedData = {};\r\n }\r\n\r\n if (this._processedData && inputs) {\r\n for (const key of Object.keys(inputs)) {\r\n const input = inputs[key];\r\n\r\n if (input.id && input.isSet()) {\r\n this._processedData[input.id] =\r\n typeof input.value === \"string\" ? input.value : input.value.toString();\r\n }\r\n }\r\n }\r\n\r\n this._isPrepared = true;\r\n }\r\n\r\n protected internalAfterExecute() {\r\n if (GlobalSettings.resetInputsDirtyStateAfterActionExecution) {\r\n this.resetReferencedInputsDirtyState();\r\n }\r\n }\r\n\r\n resetReferencedInputsDirtyState() {\r\n let referencedInputs = this.getReferencedInputs();\r\n\r\n this._areReferencedInputsDirty = false;\r\n\r\n if (referencedInputs) {\r\n for (const key of Object.keys(referencedInputs)) {\r\n const input = referencedInputs[key];\r\n\r\n input.resetDirtyState();\r\n }\r\n }\r\n }\r\n\r\n updateEnabledState() {\r\n this._areReferencedInputsDirty = false;\r\n\r\n let referencedInputs = this.getReferencedInputs();\r\n\r\n if (referencedInputs) {\r\n for (const key of Object.keys(referencedInputs)) {\r\n const input = referencedInputs[key];\r\n\r\n if (input.isDirty()) {\r\n this._areReferencedInputsDirty = true;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateCssClasses();\r\n\r\n if (this._renderedElement) {\r\n this.setupElementForAccessibility(this._renderedElement);\r\n }\r\n }\r\n\r\n isEffectivelyEnabled(): boolean {\r\n let result = super.isEffectivelyEnabled();\r\n\r\n return this.disabledUnlessAssociatedInputsChange\r\n ? result && this._areReferencedInputsDirty\r\n : result;\r\n }\r\n\r\n get data(): object | undefined {\r\n return this._isPrepared ? this._processedData : this._originalData;\r\n }\r\n\r\n set data(value: object | undefined) {\r\n this._originalData = value;\r\n this._isPrepared = false;\r\n }\r\n}\r\n\r\nexport class SubmitAction extends SubmitActionBase {\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.Submit\" = \"Action.Submit\";\r\n\r\n getJsonTypeName(): string {\r\n return SubmitAction.JsonTypeName;\r\n }\r\n}\r\n\r\nexport class ExecuteAction extends SubmitActionBase {\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.Execute\" = \"Action.Execute\";\r\n\r\n //#region Schema\r\n\r\n static readonly verbProperty = new StringProperty(Versions.v1_4, \"verb\");\r\n\r\n @property(ExecuteAction.verbProperty)\r\n verb: string;\r\n\r\n //#endregion\r\n\r\n getJsonTypeName(): string {\r\n return ExecuteAction.JsonTypeName;\r\n }\r\n}\r\n\r\nexport class OpenUrlAction extends Action {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringProperty(Versions.v1_0, \"url\");\r\n\r\n @property(OpenUrlAction.urlProperty)\r\n url?: string;\r\n\r\n //#endregion\r\n\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.OpenUrl\" = \"Action.OpenUrl\";\r\n\r\n getJsonTypeName(): string {\r\n return OpenUrlAction.JsonTypeName;\r\n }\r\n\r\n getAriaRole(): string {\r\n return \"link\";\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.url) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"url\")\r\n );\r\n }\r\n }\r\n\r\n getHref(): string | undefined {\r\n return this.url;\r\n }\r\n}\r\n\r\nexport class ToggleVisibilityAction extends Action {\r\n //#region Schema\r\n\r\n static readonly targetElementsProperty = new CustomProperty(\r\n Versions.v1_2,\r\n \"targetElements\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const result: PropertyBag = {};\r\n\r\n if (Array.isArray(source[prop.name])) {\r\n for (const item of source[prop.name]) {\r\n if (typeof item === \"string\") {\r\n result[item] = undefined;\r\n } else if (typeof item === \"object\") {\r\n const elementId = item[\"elementId\"];\r\n\r\n if (typeof elementId === \"string\") {\r\n result[elementId] = Utils.parseBool(item[\"isVisible\"]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n const targetElements: any[] = [];\r\n\r\n for (const id of Object.keys(value)) {\r\n if (typeof value[id] === \"boolean\") {\r\n targetElements.push({\r\n elementId: id,\r\n isVisible: value[id]\r\n });\r\n } else {\r\n targetElements.push(id);\r\n }\r\n }\r\n\r\n context.serializeArray(target, prop.name, targetElements);\r\n },\r\n {},\r\n (sender: SerializableObject) => {\r\n return {};\r\n }\r\n );\r\n\r\n @property(ToggleVisibilityAction.targetElementsProperty)\r\n targetElements: { [key: string]: any } = {};\r\n\r\n //#endregion\r\n\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.ToggleVisibility\" = \"Action.ToggleVisibility\";\r\n\r\n private updateAriaControlsAttribute() {\r\n // apply aria labels to make it clear which elements this action will toggle\r\n if (this.targetElements) {\r\n const elementIds = Object.keys(this.targetElements);\r\n\r\n if (this._renderedElement) {\r\n if (elementIds.length > 0) {\r\n this._renderedElement.setAttribute(\"aria-controls\", elementIds.join(\" \"));\r\n } else {\r\n this._renderedElement.removeAttribute(\"aria-controls\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.targetElements) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"targetElements\")\r\n );\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return ToggleVisibilityAction.JsonTypeName;\r\n }\r\n\r\n render() {\r\n super.render();\r\n\r\n this.updateAriaControlsAttribute();\r\n }\r\n\r\n execute() {\r\n super.execute();\r\n if (this.parent) {\r\n for (const elementId of Object.keys(this.targetElements)) {\r\n const targetElement = this.parent.getRootElement().getElementById(elementId);\r\n\r\n if (targetElement) {\r\n if (typeof this.targetElements[elementId] === \"boolean\") {\r\n targetElement.isVisible = this.targetElements[elementId];\r\n } else {\r\n targetElement.isVisible = !targetElement.isVisible;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n addTargetElement(elementId: string, isVisible: boolean | undefined = undefined) {\r\n this.targetElements[elementId] = isVisible;\r\n this.updateAriaControlsAttribute();\r\n }\r\n\r\n removeTargetElement(elementId: string) {\r\n delete this.targetElements[elementId];\r\n this.updateAriaControlsAttribute();\r\n }\r\n}\r\n\r\nclass StringWithSubstitutionProperty extends PropertyDefinition {\r\n parse(\r\n sender: SerializableObject,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ): StringWithSubstitutions {\r\n const result = new StringWithSubstitutions();\r\n result.set(Utils.parseString(source[this.name]));\r\n\r\n return result;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: StringWithSubstitutions,\r\n context: BaseSerializationContext\r\n ): void {\r\n context.serializeValue(target, this.name, value.getOriginal());\r\n }\r\n\r\n constructor(readonly targetVersion: Version, readonly name: string) {\r\n super(targetVersion, name, undefined, () => {\r\n return new StringWithSubstitutions();\r\n });\r\n }\r\n}\r\n\r\nexport class HttpHeader extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly nameProperty = new StringProperty(Versions.v1_0, \"name\");\r\n static readonly valueProperty = new StringWithSubstitutionProperty(Versions.v1_0, \"value\");\r\n\r\n protected getSchemaKey(): string {\r\n return \"HttpHeader\";\r\n }\r\n\r\n @property(HttpHeader.nameProperty)\r\n name: string;\r\n\r\n @property(HttpHeader.valueProperty)\r\n private _value: StringWithSubstitutions;\r\n\r\n //#endregion\r\n\r\n constructor(name: string = \"\", value: string = \"\") {\r\n super();\r\n\r\n this.name = name;\r\n this.value = value;\r\n }\r\n\r\n getReferencedInputs(inputs: Input[], referencedInputs: Dictionary ) {\r\n this._value.getReferencedInputs(inputs, referencedInputs);\r\n }\r\n\r\n prepareForExecution(inputs: Dictionary ) {\r\n this._value.substituteInputValues(inputs, ContentTypes.applicationXWwwFormUrlencoded);\r\n }\r\n\r\n get value(): string | undefined {\r\n return this._value.get();\r\n }\r\n\r\n set value(newValue: string | undefined) {\r\n this._value.set(newValue);\r\n }\r\n}\r\n\r\nexport class HttpAction extends Action {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringWithSubstitutionProperty(Versions.v1_0, \"url\");\r\n static readonly bodyProperty = new StringWithSubstitutionProperty(Versions.v1_0, \"body\");\r\n static readonly methodProperty = new StringProperty(Versions.v1_0, \"method\");\r\n static readonly headersProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_0,\r\n \"headers\",\r\n HttpHeader\r\n );\r\n static readonly ignoreInputValidationProperty = new BoolProperty(\r\n Versions.v1_3,\r\n \"ignoreInputValidation\",\r\n false\r\n );\r\n\r\n @property(HttpAction.urlProperty)\r\n private _url: StringWithSubstitutions;\r\n\r\n @property(HttpAction.bodyProperty)\r\n private _body: StringWithSubstitutions;\r\n\r\n @property(HttpAction.methodProperty)\r\n method?: string;\r\n\r\n @property(HttpAction.headersProperty)\r\n headers: HttpHeader[];\r\n\r\n @property(HttpAction.ignoreInputValidationProperty)\r\n private _ignoreInputValidation: boolean = false;\r\n\r\n //#endregion\r\n\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.Http\" = \"Action.Http\";\r\n\r\n protected internalGetReferencedInputs(): Dictionary {\r\n const allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];\r\n const result: Dictionary = {};\r\n\r\n this._url.getReferencedInputs(allInputs, result);\r\n\r\n for (const header of this.headers) {\r\n header.getReferencedInputs(allInputs, result);\r\n }\r\n\r\n this._body.getReferencedInputs(allInputs, result);\r\n\r\n return result;\r\n }\r\n\r\n protected internalPrepareForExecution(inputs: Dictionary | undefined) {\r\n if (inputs) {\r\n this._url.substituteInputValues(inputs, ContentTypes.applicationXWwwFormUrlencoded);\r\n\r\n let contentType = ContentTypes.applicationJson;\r\n\r\n for (const header of this.headers) {\r\n header.prepareForExecution(inputs);\r\n\r\n if (header.name && header.name.toLowerCase() === \"content-type\") {\r\n contentType = header.value!;\r\n }\r\n }\r\n\r\n this._body.substituteInputValues(inputs, contentType);\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return HttpAction.JsonTypeName;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (!this.url) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"url\")\r\n );\r\n }\r\n\r\n if (this.headers.length > 0) {\r\n for (const header of this.headers) {\r\n if (!header.name) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.actionHttpHeadersMustHaveNameAndValue()\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n get ignoreInputValidation(): boolean {\r\n return this._ignoreInputValidation;\r\n }\r\n\r\n set ignoreInputValidation(value: boolean) {\r\n this._ignoreInputValidation = value;\r\n }\r\n\r\n get url(): string | undefined {\r\n return this._url.get();\r\n }\r\n\r\n set url(value: string | undefined) {\r\n this._url.set(value);\r\n }\r\n\r\n get body(): string | undefined {\r\n return this._body.get();\r\n }\r\n\r\n set body(value: string | undefined) {\r\n this._body.set(value);\r\n }\r\n}\r\n\r\nexport class ShowCardAction extends Action {\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n static readonly JsonTypeName: \"Action.ShowCard\" = \"Action.ShowCard\";\r\n\r\n protected updateCssClasses() {\r\n super.updateCssClasses();\r\n\r\n if (this.renderedElement) {\r\n const effectiveHostConfig = this.parent ? this.parent.hostConfig : defaultHostConfig;\r\n\r\n this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName(\"expandable\"));\r\n this.renderedElement.setAttribute(\r\n \"aria-expanded\",\r\n (this.state === ActionButtonState.Expanded).toString()\r\n );\r\n }\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n const jsonCard = source[\"card\"];\r\n\r\n if (jsonCard) {\r\n this.card.parse(jsonCard, context);\r\n } else {\r\n context.logParseEvent(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.showCardMustHaveCard()\r\n );\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n if (this.card) {\r\n context.serializeValue(target, \"card\", this.card.toJSON(context));\r\n }\r\n }\r\n\r\n protected raiseExecuteActionEvent() {\r\n if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {\r\n // Only raise the event in Popup mode.\r\n super.raiseExecuteActionEvent();\r\n }\r\n }\r\n\r\n readonly card: AdaptiveCard = new InlineAdaptiveCard();\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this.card.releaseDOMResources();\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return ShowCardAction.JsonTypeName;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n this.card.internalValidateProperties(context);\r\n }\r\n\r\n setParent(value: CardElement) {\r\n super.setParent(value);\r\n\r\n this.card.setParent(value);\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return this.card.getAllInputs(processActions);\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n result.push(...this.card.getAllActions());\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result = super.getResourceInformation();\r\n\r\n result.push(...this.card.getResourceInformation());\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result = super.getActionById(id);\r\n\r\n if (!result) {\r\n result = this.card.getActionById(id);\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nclass OverflowAction extends Action {\r\n static readonly JsonTypeName: \"Action.Overflow\" = \"Action.Overflow\";\r\n private _actions: Action[];\r\n\r\n constructor(actions: Action[]) {\r\n super();\r\n this._actions = actions;\r\n\r\n this.title = Strings.defaults.overflowButtonText();\r\n }\r\n\r\n getActions(): readonly Action[] {\r\n return this._actions;\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n result.push(...this._actions);\r\n\r\n return result;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return ShowCardAction.JsonTypeName;\r\n }\r\n\r\n execute() {\r\n const shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(\r\n this,\r\n this.renderedElement\r\n );\r\n\r\n if (shouldDisplayPopupMenu && this.renderedElement) {\r\n const contextMenu = new PopupMenu();\r\n contextMenu.hostConfig = this.hostConfig;\r\n\r\n for (let i = 0; i < this._actions.length; i++) {\r\n const menuItem = new MenuItem(i.toString(), this._actions[i].title ?? \"\");\r\n menuItem.isEnabled = this._actions[i].isEnabled;\r\n menuItem.onClick = () => {\r\n const actionToExecute = this._actions[i];\r\n\r\n contextMenu.closePopup(false);\r\n\r\n if (actionToExecute.isEnabled) {\r\n actionToExecute.execute();\r\n }\r\n };\r\n\r\n contextMenu.items.add(menuItem);\r\n }\r\n\r\n contextMenu.popup(this.renderedElement);\r\n }\r\n }\r\n}\r\n\r\nclass ActionCollection {\r\n private _owner: CardElement;\r\n private _actionCardContainer: HTMLDivElement;\r\n private _expandedAction?: ShowCardAction;\r\n private _actionCard?: HTMLElement;\r\n\r\n private isActionAllowed(action: Action): boolean {\r\n const forbiddenTypes = this._owner.getForbiddenActionTypes();\r\n\r\n if (forbiddenTypes) {\r\n for (const forbiddenType of forbiddenTypes) {\r\n if (action.constructor === forbiddenType) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n private refreshContainer() {\r\n clearElement(this._actionCardContainer);\r\n\r\n if (!this._actionCard) {\r\n this._actionCardContainer.style.marginTop = \"0px\";\r\n\r\n return;\r\n }\r\n\r\n this._actionCardContainer.style.marginTop =\r\n this.renderedActionCount > 0\r\n ? this._owner.hostConfig.actions.showCard.inlineTopMargin + \"px\"\r\n : \"0px\";\r\n\r\n const padding = this._owner.getEffectivePadding();\r\n\r\n this._owner.getImmediateSurroundingPadding(padding);\r\n\r\n const physicalPadding =\r\n this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n\r\n if (this._actionCard) {\r\n this._actionCard.style.paddingLeft = physicalPadding.left + \"px\";\r\n this._actionCard.style.paddingRight = physicalPadding.right + \"px\";\r\n\r\n this._actionCard.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this._actionCard.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n\r\n if (physicalPadding.bottom !== 0 && !this._owner.isDesignMode()) {\r\n this._actionCard.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this._actionCard.style.marginBottom = \"-\" + physicalPadding.bottom + \"px\";\r\n }\r\n\r\n Utils.appendChild(this._actionCardContainer, this._actionCard);\r\n }\r\n }\r\n\r\n private layoutChanged() {\r\n this._owner.getRootElement().updateLayout();\r\n }\r\n\r\n private showActionCard(\r\n action: ShowCardAction,\r\n suppressStyle: boolean = false,\r\n raiseEvent: boolean = true\r\n ) {\r\n (action.card).suppressStyle = suppressStyle;\r\n\r\n // Always re-render a ShowCard action in design mode; reuse already rendered ShowCard (if available) otherwise\r\n const renderedCard =\r\n action.card.renderedElement && !this._owner.isDesignMode()\r\n ? action.card.renderedElement\r\n : action.card.render();\r\n\r\n this._actionCard = renderedCard;\r\n this._expandedAction = action;\r\n\r\n this.refreshContainer();\r\n\r\n if (raiseEvent) {\r\n this.layoutChanged();\r\n\r\n raiseInlineCardExpandedEvent(action, true);\r\n }\r\n }\r\n\r\n private collapseExpandedAction() {\r\n for (const action of this._renderedActions) {\r\n action.state = ActionButtonState.Normal;\r\n }\r\n\r\n const previouslyExpandedAction = this._expandedAction;\r\n\r\n this._expandedAction = undefined;\r\n this._actionCard = undefined;\r\n\r\n this.refreshContainer();\r\n\r\n if (previouslyExpandedAction) {\r\n this.layoutChanged();\r\n\r\n raiseInlineCardExpandedEvent(previouslyExpandedAction, false);\r\n }\r\n }\r\n\r\n private expandShowCardAction(action: ShowCardAction, raiseEvent: boolean) {\r\n let afterSelectedAction = false;\r\n\r\n for (const renderedAction of this._renderedActions) {\r\n // Remove actions after selected action from tabOrder if the actions are oriented horizontally, to skip focus directly to expanded card\r\n if (\r\n this._owner.hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal &&\r\n afterSelectedAction\r\n ) {\r\n renderedAction.isFocusable = false;\r\n }\r\n\r\n if (renderedAction !== action) {\r\n renderedAction.state = ActionButtonState.Subdued;\r\n } else {\r\n renderedAction.state = ActionButtonState.Expanded;\r\n\r\n afterSelectedAction = true;\r\n\r\n if (renderedAction.renderedElement) {\r\n renderedAction.renderedElement.onblur = (_e) => {\r\n for (const ra of this._renderedActions) {\r\n ra.isFocusable = true;\r\n }\r\n };\r\n }\r\n }\r\n }\r\n\r\n this.showActionCard(\r\n action,\r\n !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()),\r\n raiseEvent\r\n );\r\n }\r\n\r\n private _items: Action[] = [];\r\n private _overflowAction?: OverflowAction;\r\n private _renderedActions: Action[] = [];\r\n\r\n constructor(owner: CardElement) {\r\n this._owner = owner;\r\n }\r\n\r\n releaseDOMResources() {\r\n for (let action of this._renderedActions) {\r\n action.releaseDOMResources();\r\n }\r\n }\r\n\r\n actionExecuted(action: Action) {\r\n if (!(action instanceof ShowCardAction)) {\r\n this.collapseExpandedAction();\r\n } else {\r\n if (action === this._expandedAction) {\r\n this.collapseExpandedAction();\r\n } else if (\r\n this._owner.hostConfig.actions.showCard.actionMode ===\r\n Enums.ShowCardActionMode.Inline\r\n ) {\r\n this.expandShowCardAction(action, true);\r\n }\r\n }\r\n }\r\n\r\n parse(source: any, context: SerializationContext) {\r\n this.clear();\r\n\r\n if (Array.isArray(source)) {\r\n for (const jsonAction of source) {\r\n let forbiddenActions: string[] = [];\r\n\r\n // If the action owner is a ContainerWithActions, we should check for forbidden actions\r\n if (this._owner instanceof ContainerWithActions) {\r\n forbiddenActions = this._owner.getForbiddenActionNames();\r\n }\r\n\r\n const action = context.parseAction(\r\n this._owner,\r\n jsonAction,\r\n forbiddenActions,\r\n !this._owner.isDesignMode()\r\n );\r\n\r\n if (action) {\r\n this.addAction(action);\r\n }\r\n }\r\n }\r\n }\r\n\r\n toJSON(target: PropertyBag, propertyName: string, context: SerializationContext): any {\r\n context.serializeArray(target, propertyName, this._items);\r\n }\r\n\r\n getActionAt(id: number): Action | undefined {\r\n return this._items[id];\r\n }\r\n\r\n getActionCount(): number {\r\n return this._items.length;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result: Action | undefined = undefined;\r\n\r\n for (const item of this._items) {\r\n result = item.getActionById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n validateProperties(context: ValidationResults) {\r\n if (\r\n this._owner.hostConfig.actions.maxActions &&\r\n this._items.length > this._owner.hostConfig.actions.maxActions\r\n ) {\r\n context.addFailure(\r\n this._owner,\r\n Enums.ValidationEvent.TooManyActions,\r\n Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions)\r\n );\r\n }\r\n\r\n if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {\r\n context.addFailure(\r\n this._owner,\r\n Enums.ValidationEvent.InteractivityNotAllowed,\r\n Strings.errors.interactivityNotAllowed()\r\n );\r\n }\r\n\r\n for (const item of this._items) {\r\n if (!this.isActionAllowed(item)) {\r\n context.addFailure(\r\n this._owner,\r\n Enums.ValidationEvent.ActionTypeNotAllowed,\r\n Strings.errors.actionTypeNotAllowed(item.getJsonTypeName())\r\n );\r\n }\r\n\r\n item.internalValidateProperties(context);\r\n }\r\n }\r\n\r\n render(orientation: Enums.Orientation): HTMLElement | undefined {\r\n // Cache hostConfig for better perf\r\n const hostConfig = this._owner.hostConfig;\r\n\r\n if (!hostConfig.supportsInteractivity) {\r\n return undefined;\r\n }\r\n\r\n const element = document.createElement(\"div\");\r\n const maxActions = hostConfig.actions.maxActions\r\n ? Math.min(hostConfig.actions.maxActions, this._items.length)\r\n : this._items.length;\r\n\r\n this._actionCardContainer = document.createElement(\"div\");\r\n this._renderedActions = [];\r\n\r\n if (\r\n hostConfig.actions.preExpandSingleShowCardAction &&\r\n maxActions === 1 &&\r\n this._items[0] instanceof ShowCardAction &&\r\n this.isActionAllowed(this._items[0])\r\n ) {\r\n this.showActionCard(this._items[0], true);\r\n this._renderedActions.push(this._items[0]);\r\n } else {\r\n const buttonStrip = document.createElement(\"div\");\r\n buttonStrip.className = hostConfig.makeCssClassName(\"ac-actionSet\");\r\n buttonStrip.style.display = \"flex\";\r\n\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n buttonStrip.style.flexDirection = \"row\";\r\n\r\n if (\r\n this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch\r\n ) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n } else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n }\r\n } else {\r\n buttonStrip.style.flexDirection = \"column\";\r\n\r\n if (\r\n this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch\r\n ) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n } else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n case Enums.ActionAlignment.Stretch:\r\n buttonStrip.style.alignItems = \"stretch\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n }\r\n }\r\n\r\n const allowedActions = this._items.filter(this.isActionAllowed.bind(this));\r\n\r\n let primaryActions: Action[] = [];\r\n const secondaryActions: Action[] = [];\r\n\r\n if (!this._owner.isDesignMode()) {\r\n allowedActions.forEach((action) =>\r\n action.mode === Enums.ActionMode.Secondary\r\n ? secondaryActions.push(action)\r\n : primaryActions.push(action)\r\n );\r\n\r\n // If primaryActions.length > maxActions, extra actions are moved to overflow\r\n const overflowPrimaryActions = primaryActions.splice(hostConfig.actions.maxActions);\r\n\r\n if (GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {\r\n secondaryActions.push(...overflowPrimaryActions);\r\n }\r\n\r\n let shouldRenderOverflowActionButton = true;\r\n\r\n if (secondaryActions.length > 0) {\r\n if (!this._overflowAction) {\r\n this._overflowAction = new OverflowAction(secondaryActions);\r\n this._overflowAction.setParent(this._owner);\r\n this._overflowAction[\"_actionCollection\"] = this;\r\n }\r\n\r\n const isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;\r\n shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(\r\n this._overflowAction,\r\n isRootAction\r\n );\r\n }\r\n\r\n if (this._overflowAction && shouldRenderOverflowActionButton) {\r\n primaryActions.push(this._overflowAction);\r\n }\r\n } else {\r\n primaryActions = allowedActions;\r\n }\r\n\r\n for (let i = 0; i < primaryActions.length; i++) {\r\n const action = primaryActions[i];\r\n action.render();\r\n\r\n if (action.renderedElement) {\r\n if (\r\n hostConfig.actions.actionsOrientation === Enums.Orientation.Horizontal &&\r\n hostConfig.actions.actionAlignment === Enums.ActionAlignment.Stretch\r\n ) {\r\n action.renderedElement.style.flex = \"0 1 100%\";\r\n } else {\r\n action.renderedElement.style.flex = \"0 1 auto\";\r\n }\r\n\r\n buttonStrip.appendChild(action.renderedElement);\r\n\r\n this._renderedActions.push(action);\r\n\r\n if (i < primaryActions.length - 1 && hostConfig.actions.buttonSpacing > 0) {\r\n const spacer = document.createElement(\"div\");\r\n\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n spacer.style.flex = \"0 0 auto\";\r\n spacer.style.width = hostConfig.actions.buttonSpacing + \"px\";\r\n } else {\r\n spacer.style.height = hostConfig.actions.buttonSpacing + \"px\";\r\n }\r\n\r\n Utils.appendChild(buttonStrip, spacer);\r\n }\r\n }\r\n }\r\n\r\n const buttonStripContainer = document.createElement(\"div\");\r\n buttonStripContainer.style.overflow = \"hidden\";\r\n buttonStripContainer.appendChild(buttonStrip);\r\n\r\n Utils.appendChild(element, buttonStripContainer);\r\n }\r\n\r\n Utils.appendChild(element, this._actionCardContainer);\r\n\r\n for (const renderedAction of this._renderedActions) {\r\n if (renderedAction.state === ActionButtonState.Expanded) {\r\n this.expandShowCardAction(renderedAction, false);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this._renderedActions.length > 0 ? element : undefined;\r\n }\r\n\r\n addAction(action: Action) {\r\n if (!action) {\r\n throw new Error(\"The action parameter cannot be null.\");\r\n }\r\n\r\n if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {\r\n this._items.push(action);\r\n\r\n if (!action.parent) {\r\n action.setParent(this._owner);\r\n }\r\n\r\n action[\"_actionCollection\"] = this;\r\n } else {\r\n throw new Error(Strings.errors.actionAlreadyParented());\r\n }\r\n }\r\n\r\n removeAction(action: Action): boolean {\r\n if (this.expandedAction && this._expandedAction === action) {\r\n this.collapseExpandedAction();\r\n }\r\n\r\n const actionIndex = this._items.indexOf(action);\r\n\r\n if (actionIndex >= 0) {\r\n this._items.splice(actionIndex, 1);\r\n\r\n action.setParent(undefined);\r\n\r\n action[\"_actionCollection\"] = undefined;\r\n\r\n for (let i = 0; i < this._renderedActions.length; i++) {\r\n if (this._renderedActions[i] === action) {\r\n this._renderedActions.splice(i, 1);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n clear() {\r\n this._items = [];\r\n this._renderedActions = [];\r\n this._expandedAction = undefined;\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n let result: Input[] = [];\r\n\r\n if (processActions) {\r\n for (const action of this._items) {\r\n result.push(...action.getAllInputs());\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result: IResourceInformation[] = [];\r\n\r\n for (const action of this._items) {\r\n result.push(...action.getResourceInformation());\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get renderedActionCount(): number {\r\n return this._renderedActions.length;\r\n }\r\n\r\n get expandedAction(): ShowCardAction | undefined {\r\n return this._expandedAction;\r\n }\r\n}\r\n\r\nexport class ActionSet extends CardElement {\r\n //#region Schema\r\n\r\n static readonly orientationProperty = new EnumProperty(\r\n Versions.v1_1,\r\n \"orientation\",\r\n Enums.Orientation\r\n );\r\n\r\n @property(ActionSet.orientationProperty)\r\n orientation?: Enums.Orientation;\r\n\r\n //#endregion\r\n\r\n private _actionCollection: ActionCollection;\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n return this._actionCollection.render(\r\n this.orientation !== undefined\r\n ? this.orientation\r\n : this.hostConfig.actions.actionsOrientation\r\n );\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this._actionCollection = new ActionCollection(this);\r\n }\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this._actionCollection.releaseDOMResources();\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return super.isBleedingAtBottom();\r\n } else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (\r\n this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction\r\n );\r\n } else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"ActionSet\";\r\n }\r\n\r\n getActionCount(): number {\r\n return this._actionCollection.getActionCount();\r\n }\r\n\r\n getActionAt(index: number): Action | undefined {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n } else {\r\n return super.getActionAt(index);\r\n }\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n const result: Action | undefined = this._actionCollection.getActionById(id);\r\n\r\n return result ? result : super.getActionById(id);\r\n }\r\n\r\n getAllActions(): Action[] {\r\n const result = super.getAllActions();\r\n\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n let action = this.getActionAt(i);\r\n\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n this._actionCollection.validateProperties(context);\r\n }\r\n\r\n addAction(action: Action) {\r\n this._actionCollection.addAction(action);\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n return processActions ? this._actionCollection.getAllInputs() : [];\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n return this._actionCollection.getResourceInformation();\r\n }\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n findDOMNodeOwner(node: Node): CardObject | undefined {\r\n let target: CardObject | undefined = undefined;\r\n\r\n for (let i = 0; i < this.getActionCount(); i++) {\r\n const action = this.getActionAt(i);\r\n\r\n if (action) {\r\n // recur through each Action\r\n target = action.findDOMNodeOwner(node);\r\n\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n }\r\n\r\n // if not found in any Action, defer to parent implementation\r\n return super.findDOMNodeOwner(node);\r\n }\r\n\r\n get isInteractive(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport class ContainerStyleProperty extends ValueSetProperty {\r\n constructor(\r\n readonly targetVersion: Version,\r\n readonly name: string,\r\n readonly defaultValue?: string,\r\n readonly onGetInitialValue?: (sender: SerializableObject) => string\r\n ) {\r\n super(\r\n targetVersion,\r\n name,\r\n [\r\n { value: Enums.ContainerStyle.Default },\r\n { value: Enums.ContainerStyle.Emphasis },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Accent },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Good },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Attention },\r\n { targetVersion: Versions.v1_2, value: Enums.ContainerStyle.Warning }\r\n ],\r\n defaultValue,\r\n onGetInitialValue\r\n );\r\n }\r\n}\r\n\r\nexport abstract class StylableCardElementContainer extends CardElementContainer {\r\n //#region Schema\r\n\r\n static readonly styleProperty = new ContainerStyleProperty(Versions.v1_0, \"style\");\r\n\r\n @property(StylableCardElementContainer.styleProperty)\r\n get style(): string | undefined {\r\n if (this.allowCustomStyle) {\r\n const style = this.getValue(StylableCardElementContainer.styleProperty);\r\n\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n set style(value: string | undefined) {\r\n this.setValue(StylableCardElementContainer.styleProperty, value);\r\n }\r\n\r\n //#endregion\r\n\r\n protected get allowCustomStyle(): boolean {\r\n return true;\r\n }\r\n\r\n protected get hasExplicitStyle(): boolean {\r\n return this.getValue(StylableCardElementContainer.styleProperty) !== undefined;\r\n }\r\n\r\n protected applyBorder() {\r\n // No border in base implementation\r\n }\r\n\r\n protected applyBackground() {\r\n if (this.renderedElement) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.style,\r\n this.hostConfig.containerStyles.getStyleByName(this.defaultStyle)\r\n );\r\n\r\n if (styleDefinition.backgroundColor) {\r\n const bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected applyPadding() {\r\n super.applyPadding();\r\n\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n\r\n let physicalPadding = new SpacingDefinition();\r\n\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(\r\n this.getEffectivePadding()\r\n );\r\n }\r\n\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n\r\n if (this.isBleeding()) {\r\n // Bleed into the first parent that does have padding\r\n const padding = new PaddingDefinition();\r\n\r\n this.getImmediateSurroundingPadding(padding);\r\n\r\n const surroundingPadding =\r\n this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n\r\n this.renderedElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n this.renderedElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n\r\n if (!this.isDesignMode()) {\r\n this.renderedElement.style.marginTop = \"-\" + surroundingPadding.top + \"px\";\r\n this.renderedElement.style.marginBottom = \"-\" + surroundingPadding.bottom + \"px\";\r\n }\r\n\r\n if (\r\n this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal\r\n ) {\r\n this.separatorElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n }\r\n } else {\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n this.renderedElement.style.marginTop = \"0\";\r\n this.renderedElement.style.marginBottom = \"0\";\r\n\r\n if (\r\n this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal\r\n ) {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n let currentElement: CardElement | undefined = this.parent;\r\n\r\n while (currentElement) {\r\n let currentElementHasBackgroundImage: boolean = false;\r\n\r\n if (ignoreBackgroundImages) {\r\n currentElementHasBackgroundImage = false;\r\n } else {\r\n currentElementHasBackgroundImage =\r\n currentElement instanceof Container\r\n ? currentElement.backgroundImage.isValid()\r\n : false;\r\n }\r\n\r\n if (currentElement instanceof StylableCardElementContainer) {\r\n if (\r\n this.hasExplicitStyle &&\r\n (currentElement.getEffectiveStyle() !== this.getEffectiveStyle() ||\r\n currentElementHasBackgroundImage)\r\n ) {\r\n return true;\r\n }\r\n }\r\n\r\n currentElement = currentElement.parent;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new PaddingDefinition(\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding\r\n )\r\n : super.getDefaultPadding();\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n const explicitStyle = this.getValue(StylableCardElementContainer.styleProperty);\r\n\r\n if (explicitStyle !== undefined) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);\r\n\r\n if (!styleDefinition) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidPropertyValue(explicitStyle, \"style\")\r\n );\r\n }\r\n }\r\n }\r\n\r\n render(): HTMLElement | undefined {\r\n const renderedElement = super.render();\r\n\r\n if (renderedElement && this.getHasBackground()) {\r\n this.applyBackground();\r\n }\r\n\r\n this.applyBorder();\r\n\r\n return renderedElement;\r\n }\r\n\r\n getEffectiveStyle(): string {\r\n const effectiveStyle = this.style;\r\n\r\n return effectiveStyle ? effectiveStyle : super.getEffectiveStyle();\r\n }\r\n}\r\n\r\nexport abstract class ContainerBase extends StylableCardElementContainer {\r\n //#region Schema\r\n\r\n static readonly bleedProperty = new BoolProperty(Versions.v1_2, \"bleed\", false);\r\n static readonly minHeightProperty = new PixelSizeProperty(Versions.v1_2, \"minHeight\");\r\n\r\n @property(ContainerBase.bleedProperty)\r\n private _bleed: boolean = false;\r\n\r\n @property(ContainerBase.minHeightProperty)\r\n minPixelHeight?: number;\r\n\r\n //#endregion\r\n\r\n protected adjustRenderedElementSize(renderedElement: HTMLElement) {\r\n super.adjustRenderedElementSize(renderedElement);\r\n\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n }\r\n\r\n protected getHasExpandedAction(): boolean {\r\n return false;\r\n }\r\n\r\n protected getBleed(): boolean {\r\n return this._bleed;\r\n }\r\n\r\n protected setBleed(value: boolean) {\r\n this._bleed = value;\r\n }\r\n\r\n protected get renderedActionCount(): number {\r\n return 0;\r\n }\r\n\r\n isBleeding(): boolean {\r\n return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();\r\n }\r\n}\r\n\r\nexport class BackgroundImage extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly urlProperty = new StringProperty(Versions.v1_0, \"url\");\r\n static readonly fillModeProperty = new EnumProperty(\r\n Versions.v1_2,\r\n \"fillMode\",\r\n Enums.FillMode,\r\n Enums.FillMode.Cover\r\n );\r\n static readonly horizontalAlignmentProperty = new EnumProperty(\r\n Versions.v1_2,\r\n \"horizontalAlignment\",\r\n Enums.HorizontalAlignment,\r\n Enums.HorizontalAlignment.Left\r\n );\r\n static readonly verticalAlignmentProperty = new EnumProperty(\r\n Versions.v1_2,\r\n \"verticalAlignment\",\r\n Enums.VerticalAlignment,\r\n Enums.VerticalAlignment.Top\r\n );\r\n\r\n @property(BackgroundImage.urlProperty)\r\n url?: string;\r\n\r\n @property(BackgroundImage.fillModeProperty)\r\n fillMode: Enums.FillMode;\r\n\r\n @property(BackgroundImage.horizontalAlignmentProperty)\r\n horizontalAlignment: Enums.HorizontalAlignment;\r\n\r\n @property(BackgroundImage.verticalAlignmentProperty)\r\n verticalAlignment: Enums.VerticalAlignment;\r\n\r\n //#endregion\r\n\r\n protected getSchemaKey(): string {\r\n return \"BackgroundImage\";\r\n }\r\n\r\n protected internalParse(source: any, context: BaseSerializationContext) {\r\n if (typeof source === \"string\") {\r\n this.resetDefaultValues();\r\n this.url = source;\r\n } else {\r\n return super.internalParse(source, context);\r\n }\r\n }\r\n\r\n apply(element: CardElement) {\r\n if (this.url && element.renderedElement) {\r\n element.renderedElement.style.backgroundImage =\r\n \"url('\" +\r\n element.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) +\r\n \"')\";\r\n\r\n switch (this.fillMode) {\r\n case Enums.FillMode.Repeat:\r\n element.renderedElement.style.backgroundRepeat = \"repeat\";\r\n break;\r\n case Enums.FillMode.RepeatHorizontally:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-x\";\r\n break;\r\n case Enums.FillMode.RepeatVertically:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-y\";\r\n break;\r\n case Enums.FillMode.Cover:\r\n default:\r\n element.renderedElement.style.backgroundRepeat = \"no-repeat\";\r\n element.renderedElement.style.backgroundSize = \"cover\";\r\n break;\r\n }\r\n\r\n switch (this.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Left:\r\n break;\r\n case Enums.HorizontalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionX = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.renderedElement.style.backgroundPositionX = \"right\";\r\n break;\r\n }\r\n\r\n switch (this.verticalAlignment) {\r\n case Enums.VerticalAlignment.Top:\r\n break;\r\n case Enums.VerticalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionY = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.renderedElement.style.backgroundPositionY = \"bottom\";\r\n break;\r\n }\r\n }\r\n }\r\n\r\n isValid(): boolean {\r\n return this.url ? true : false;\r\n }\r\n}\r\n\r\nexport class Container extends ContainerBase {\r\n //#region Schema\r\n static readonly backgroundImageProperty = new SerializableObjectProperty(\r\n Versions.v1_0,\r\n \"backgroundImage\",\r\n BackgroundImage\r\n );\r\n static readonly verticalContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_1,\r\n \"verticalContentAlignment\",\r\n Enums.VerticalAlignment\r\n );\r\n static readonly rtlProperty = new BoolProperty(Versions.v1_0, \"rtl\");\r\n\r\n @property(Container.backgroundImageProperty)\r\n get backgroundImage(): BackgroundImage {\r\n return this.getValue(Container.backgroundImageProperty);\r\n }\r\n\r\n @property(Container.verticalContentAlignmentProperty)\r\n verticalContentAlignment?: Enums.VerticalAlignment;\r\n\r\n @property(Container.rtlProperty)\r\n rtl?: boolean;\r\n\r\n //#endregion\r\n\r\n private _items: CardElement[] = [];\r\n private _renderedItems: CardElement[] = [];\r\n\r\n protected insertItemAt(item: CardElement, index: number, forceInsert: boolean) {\r\n if (!item.parent || forceInsert) {\r\n if (item.isStandalone) {\r\n if (index < 0 || index >= this._items.length) {\r\n this._items.push(item);\r\n } else {\r\n this._items.splice(index, 0, item);\r\n }\r\n\r\n item.setParent(this);\r\n } else {\r\n throw new Error(Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));\r\n }\r\n } else {\r\n throw new Error(Strings.errors.elementAlreadyParented());\r\n }\r\n }\r\n\r\n protected getItemsCollectionPropertyName(): string {\r\n return \"items\";\r\n }\r\n\r\n protected applyBackground() {\r\n if (this.backgroundImage.isValid() && this.renderedElement) {\r\n this.backgroundImage.apply(this);\r\n }\r\n\r\n super.applyBackground();\r\n }\r\n\r\n protected applyRTL(element: HTMLElement) {\r\n if (this.rtl !== undefined) {\r\n element.dir = this.rtl ? \"rtl\" : \"ltr\";\r\n }\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._renderedItems = [];\r\n\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n const hostConfig = this.hostConfig;\r\n\r\n const element = document.createElement(\"div\");\r\n\r\n this.applyRTL(element);\r\n\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-container\"));\r\n element.style.display = \"flex\";\r\n element.style.flexDirection = \"column\";\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // Forces the container to be at least as tall as its content.\r\n //\r\n // Fixes a quirk in Chrome where, for nested flex elements, the\r\n // inner element's height would never exceed the outer element's\r\n // height. This caused overflow truncation to break -- containers\r\n // would always be measured as not overflowing, since their heights\r\n // were constrained by their parents as opposed to truly reflecting\r\n // the height of their content.\r\n //\r\n // See the \"Browser Rendering Notes\" section of this answer:\r\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n\r\n switch (this.getEffectiveVerticalContentAlignment()) {\r\n case Enums.VerticalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n\r\n if (this._items.length > 0) {\r\n for (const item of this._items) {\r\n const renderedItem = this.isElementAllowed(item) ? item.render() : undefined;\r\n\r\n if (renderedItem) {\r\n if (this._renderedItems.length > 0 && item.separatorElement) {\r\n item.separatorElement.style.flex = \"0 0 auto\";\r\n\r\n Utils.appendChild(element, item.separatorElement);\r\n }\r\n\r\n Utils.appendChild(element, renderedItem);\r\n\r\n this._renderedItems.push(item);\r\n }\r\n }\r\n } else {\r\n if (this.isDesignMode()) {\r\n const placeholderElement = this.createPlaceholderElement();\r\n placeholderElement.style.width = \"100%\";\r\n placeholderElement.style.height = \"100%\";\r\n\r\n element.appendChild(placeholderElement);\r\n }\r\n }\r\n\r\n return element;\r\n }\r\n\r\n protected truncateOverflow(maxHeight: number): boolean {\r\n if (this.renderedElement) {\r\n // Add 1 to account for rounding differences between browsers\r\n const boundary = this.renderedElement.offsetTop + maxHeight + 1;\r\n\r\n const handleElement = (cardElement: CardElement) => {\r\n const elt = cardElement.renderedElement;\r\n\r\n if (elt) {\r\n switch (Utils.getFitStatus(elt, boundary)) {\r\n case Enums.ContainerFitStatus.FullyInContainer:\r\n const sizeChanged = cardElement[\"resetOverflow\"]();\r\n // If the element's size changed after resetting content,\r\n // we have to check if it still fits fully in the card\r\n if (sizeChanged) {\r\n handleElement(cardElement);\r\n }\r\n break;\r\n case Enums.ContainerFitStatus.Overflowing:\r\n const containerMaxHeight = boundary - elt.offsetTop;\r\n cardElement[\"handleOverflow\"](containerMaxHeight);\r\n break;\r\n case Enums.ContainerFitStatus.FullyOutOfContainer:\r\n cardElement[\"handleOverflow\"](0);\r\n break;\r\n }\r\n }\r\n };\r\n\r\n for (const item of this._items) {\r\n handleElement(item);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected undoOverflowTruncation() {\r\n for (const item of this._items) {\r\n item[\"resetOverflow\"]();\r\n }\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n let result = ignoreBackgroundImages ? false : this.backgroundImage.isValid();\r\n\r\n return result || super.getHasBackground(ignoreBackgroundImages);\r\n }\r\n\r\n protected canHostSingletons() {\r\n return false;\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this.clear();\r\n this.setShouldFallback(false);\r\n\r\n let jsonItems = source[this.getItemsCollectionPropertyName()];\r\n\r\n if (\r\n !Array.isArray(jsonItems) &&\r\n typeof jsonItems === \"object\" &&\r\n this.canHostSingletons()\r\n ) {\r\n const typeName = Utils.parseString(jsonItems[\"type\"]);\r\n if (typeName) {\r\n const registration = context.elementRegistry.findByName(typeName);\r\n if (registration?.singletonBehavior !== ElementSingletonBehavior.NotAllowed) {\r\n const element = context.parseElement(\r\n this,\r\n jsonItems,\r\n [],\r\n !this.isDesignMode(),\r\n true\r\n );\r\n\r\n if (element) {\r\n this.insertItemAt(element, -1, true);\r\n }\r\n }\r\n }\r\n } else if (Array.isArray(jsonItems)) {\r\n for (const item of jsonItems) {\r\n const element = context.parseElement(\r\n this,\r\n item,\r\n this.forbiddenChildElements(),\r\n !this.isDesignMode()\r\n );\r\n\r\n if (element) {\r\n this.insertItemAt(element, -1, true);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n const collectionPropertyName = this.getItemsCollectionPropertyName();\r\n\r\n if (\r\n this._items.length === 1 &&\r\n this._items[0].getElementSingletonBehavior() === ElementSingletonBehavior.Only\r\n ) {\r\n // If the element is only allowed in a singleton context, parse it to an object instead of an array\r\n context.serializeValue(target, collectionPropertyName, this._items[0].toJSON(context));\r\n } else {\r\n context.serializeArray(target, collectionPropertyName, this._items);\r\n }\r\n }\r\n\r\n protected get isSelectable(): boolean {\r\n return true;\r\n }\r\n\r\n getEffectivePadding(): PaddingDefinition {\r\n if (\r\n GlobalSettings.removePaddingFromContainersWithBackgroundImage &&\r\n !this.getHasBackground(true)\r\n ) {\r\n return new PaddingDefinition();\r\n }\r\n\r\n return super.getEffectivePadding();\r\n }\r\n\r\n getEffectiveVerticalContentAlignment(): Enums.VerticalAlignment {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n\r\n const parentContainer = this.getParentContainer();\r\n\r\n return parentContainer\r\n ? parentContainer.getEffectiveVerticalContentAlignment()\r\n : Enums.VerticalAlignment.Top;\r\n }\r\n\r\n getItemCount(): number {\r\n return this._items.length;\r\n }\r\n\r\n getItemAt(index: number): CardElement {\r\n return this._items[index];\r\n }\r\n\r\n getFirstVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (const item of this._renderedItems) {\r\n if (item.isVisible) {\r\n return item;\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n getLastVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (let i = this._renderedItems.length - 1; i >= 0; i--) {\r\n if (this._renderedItems[i].isVisible) {\r\n return this._renderedItems[i];\r\n }\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Container\";\r\n }\r\n\r\n isFirstElement(element: CardElement): boolean {\r\n const designMode = this.isDesignMode();\r\n\r\n for (const item of this._items) {\r\n if (item.isVisible || designMode) {\r\n return item === element;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isLastElement(element: CardElement): boolean {\r\n const designMode = this.isDesignMode();\r\n\r\n for (let i = this._items.length - 1; i >= 0; i--) {\r\n if (this._items[i].isVisible || designMode) {\r\n return this._items[i] === element;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isRtl(): boolean {\r\n if (this.rtl !== undefined) {\r\n return this.rtl;\r\n } else {\r\n const parentContainer = this.getParentContainer();\r\n\r\n return parentContainer ? parentContainer.isRtl() : false;\r\n }\r\n }\r\n\r\n isBleedingAtTop(): boolean {\r\n const firstRenderedItem = this.getFirstVisibleRenderedItem();\r\n\r\n return (\r\n this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false)\r\n );\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n const lastRenderedItem = this.getLastVisibleRenderedItem();\r\n\r\n return (\r\n this.isBleeding() ||\r\n (lastRenderedItem\r\n ? lastRenderedItem.isBleedingAtBottom() &&\r\n lastRenderedItem.getEffectiveStyle() === this.getEffectiveStyle()\r\n : false)\r\n );\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return this._items.indexOf(cardElement);\r\n }\r\n\r\n addItem(item: CardElement) {\r\n this.insertItemAt(item, -1, false);\r\n }\r\n\r\n insertItemBefore(item: CardElement, insertBefore: CardElement) {\r\n this.insertItemAt(item, this._items.indexOf(insertBefore), false);\r\n }\r\n\r\n insertItemAfter(item: CardElement, insertAfter: CardElement) {\r\n this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);\r\n }\r\n\r\n removeItem(item: CardElement): boolean {\r\n const itemIndex = this._items.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n clear() {\r\n this._items = [];\r\n this._renderedItems = [];\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n const result = super.getResourceInformation();\r\n\r\n if (this.backgroundImage.isValid()) {\r\n result.push({\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- validated by `isValid()`\r\n url: this.backgroundImage.url!,\r\n mimeType: \"image\"\r\n });\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result: Action | undefined = super.getActionById(id);\r\n\r\n if (!result) {\r\n if (this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n\r\n if (!result) {\r\n for (const item of this._items) {\r\n result = item.getActionById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get padding(): PaddingDefinition | undefined {\r\n return this.getPadding();\r\n }\r\n\r\n set padding(value: PaddingDefinition | undefined) {\r\n this.setPadding(value);\r\n }\r\n\r\n get selectAction(): Action | undefined {\r\n return this._selectAction;\r\n }\r\n\r\n set selectAction(value: Action | undefined) {\r\n this._selectAction = value;\r\n }\r\n\r\n get bleed(): boolean {\r\n return this.getBleed();\r\n }\r\n\r\n set bleed(value: boolean) {\r\n this.setBleed(value);\r\n }\r\n}\r\n\r\nexport type ColumnWidth = SizeAndUnit | \"auto\" | \"stretch\";\r\n\r\nexport class Column extends Container {\r\n //#region Schema\r\n\r\n static readonly widthProperty = new CustomProperty(\r\n Versions.v1_0,\r\n \"width\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n let result: ColumnWidth = prop.defaultValue;\r\n const value = source[prop.name];\r\n let invalidWidth = false;\r\n\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new SizeAndUnit(value, Enums.SizeUnit.Weight);\r\n } else if (value === \"auto\" || value === \"stretch\") {\r\n result = value;\r\n } else if (typeof value === \"string\") {\r\n try {\r\n result = SizeAndUnit.parse(value);\r\n\r\n if (\r\n result.unit === Enums.SizeUnit.Pixel &&\r\n prop.targetVersion.compareTo(context.targetVersion) > 0\r\n ) {\r\n invalidWidth = true;\r\n }\r\n } catch (e) {\r\n invalidWidth = true;\r\n }\r\n } else {\r\n invalidWidth = true;\r\n }\r\n\r\n if (invalidWidth) {\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidColumnWidth(value)\r\n );\r\n\r\n result = \"auto\";\r\n }\r\n\r\n return result;\r\n },\r\n (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n target: PropertyBag,\r\n value: ColumnWidth,\r\n context: BaseSerializationContext\r\n ) => {\r\n if (value instanceof SizeAndUnit) {\r\n if (value.unit === Enums.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n } else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n } else {\r\n context.serializeValue(target, \"width\", value);\r\n }\r\n },\r\n \"stretch\"\r\n );\r\n\r\n @property(Column.widthProperty)\r\n width: ColumnWidth = \"stretch\";\r\n\r\n //#endregion\r\n\r\n private _computedWeight: number = 0;\r\n\r\n protected adjustRenderedElementSize(renderedElement: HTMLElement) {\r\n const minDesignTimeColumnHeight = 20;\r\n\r\n if (this.isDesignMode()) {\r\n renderedElement.style.minWidth = \"20px\";\r\n renderedElement.style.minHeight =\r\n (!this.minPixelHeight\r\n ? minDesignTimeColumnHeight\r\n : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + \"px\";\r\n } else {\r\n renderedElement.style.minWidth = \"0\";\r\n\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n }\r\n\r\n if (this.width === \"auto\") {\r\n renderedElement.style.flex = \"0 1 auto\";\r\n } else if (this.width === \"stretch\") {\r\n renderedElement.style.flex = \"1 1 50px\";\r\n } else if (this.width instanceof SizeAndUnit) {\r\n if (this.width.unit === Enums.SizeUnit.Pixel) {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n renderedElement.style.width = this.width.physicalSize + \"px\";\r\n } else {\r\n renderedElement.style.flex =\r\n \"1 1 \" +\r\n (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) +\r\n \"%\";\r\n }\r\n }\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n protected get separatorOrientation(): Enums.Orientation {\r\n return Enums.Orientation.Vertical;\r\n }\r\n\r\n constructor(width: ColumnWidth = \"stretch\") {\r\n super();\r\n\r\n this.width = width;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Column\";\r\n }\r\n\r\n get hasVisibleSeparator(): boolean {\r\n if (this.parent && this.parent instanceof ColumnSet) {\r\n return this.separatorElement !== undefined && !this.parent.isLeftMostElement(this);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class ColumnSet extends ContainerBase {\r\n private _columns: Column[] = [];\r\n private _renderedColumns: Column[];\r\n\r\n private createColumnInstance(source: any, context: SerializationContext): Column | undefined {\r\n return context.parseCardObject(\r\n this,\r\n source,\r\n [],\r\n !this.isDesignMode(),\r\n (typeName: string) => {\r\n return !typeName || typeName === \"Column\" ? new Column() : undefined;\r\n },\r\n (typeName: string, _errorType: Enums.TypeErrorType) => {\r\n context.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.ElementTypeNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(typeName)\r\n );\r\n }\r\n );\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n this._renderedColumns = [];\r\n\r\n if (this._columns.length > 0) {\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n const hostConfig = this.hostConfig;\r\n\r\n const element = document.createElement(\"div\");\r\n element.className = hostConfig.makeCssClassName(\"ac-columnSet\");\r\n element.style.display = \"flex\";\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // See comment in Container.internalRender()\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n\r\n let totalWeight: number = 0;\r\n\r\n for (const column of this._columns) {\r\n if (\r\n column.width instanceof SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight\r\n ) {\r\n totalWeight += column.width.physicalSize;\r\n }\r\n }\r\n\r\n for (const column of this._columns) {\r\n if (\r\n column.width instanceof SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight &&\r\n totalWeight > 0\r\n ) {\r\n const computedWeight = (100 / totalWeight) * column.width.physicalSize;\r\n\r\n // Best way to emulate \"internal\" access I know of\r\n column[\"_computedWeight\"] = computedWeight;\r\n }\r\n\r\n const renderedColumn = column.render();\r\n\r\n if (renderedColumn) {\r\n if (this._renderedColumns.length > 0 && column.separatorElement) {\r\n column.separatorElement.style.flex = \"0 0 auto\";\r\n\r\n Utils.appendChild(element, column.separatorElement);\r\n }\r\n\r\n Utils.appendChild(element, renderedColumn);\r\n\r\n this._renderedColumns.push(column);\r\n }\r\n }\r\n\r\n return this._renderedColumns.length > 0 ? element : undefined;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n protected truncateOverflow(maxHeight: number): boolean {\r\n for (const column of this._columns) {\r\n column[\"handleOverflow\"](maxHeight);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n protected undoOverflowTruncation() {\r\n for (const column of this._columns) {\r\n column[\"resetOverflow\"]();\r\n }\r\n }\r\n\r\n protected get isSelectable(): boolean {\r\n return true;\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._columns = [];\r\n this._renderedColumns = [];\r\n\r\n const jsonColumns = source[\"columns\"];\r\n\r\n if (Array.isArray(jsonColumns)) {\r\n for (const item of jsonColumns) {\r\n const column = this.createColumnInstance(item, context);\r\n\r\n if (column) {\r\n this._columns.push(column);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n context.serializeArray(target, \"columns\", this._columns);\r\n }\r\n\r\n isFirstElement(element: CardElement): boolean {\r\n for (const column of this._columns) {\r\n if (column.isVisible) {\r\n return column === element;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isBleedingAtTop(): boolean {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (const column of this._columns) {\r\n if (column.isBleedingAtTop()) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (const column of this._columns) {\r\n if (column.isBleedingAtBottom()) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n getItemCount(): number {\r\n return this._columns.length;\r\n }\r\n\r\n getFirstVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[0];\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n getLastVisibleRenderedItem(): CardElement | undefined {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[this._renderedColumns.length - 1];\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n getColumnAt(index: number): Column {\r\n return this._columns[index];\r\n }\r\n\r\n getItemAt(index: number): CardElement {\r\n return this.getColumnAt(index);\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"ColumnSet\";\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n let weightedColumns: number = 0;\r\n let stretchedColumns: number = 0;\r\n\r\n for (const column of this._columns) {\r\n if (typeof column.width === \"number\") {\r\n weightedColumns++;\r\n } else if (column.width === \"stretch\") {\r\n stretchedColumns++;\r\n }\r\n }\r\n\r\n if (weightedColumns > 0 && stretchedColumns > 0) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.Hint,\r\n Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet()\r\n );\r\n }\r\n }\r\n\r\n addColumn(column: Column) {\r\n if (!column.parent) {\r\n this._columns.push(column);\r\n\r\n column.setParent(this);\r\n } else {\r\n throw new Error(Strings.errors.columnAlreadyBelongsToAnotherSet());\r\n }\r\n }\r\n\r\n removeItem(item: CardElement): boolean {\r\n if (item instanceof Column) {\r\n const itemIndex = this._columns.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._columns.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;\r\n }\r\n\r\n isLeftMostElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) === 0;\r\n }\r\n\r\n isRightMostElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) === this._columns.length - 1;\r\n }\r\n\r\n isTopElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) >= 0;\r\n }\r\n\r\n isBottomElement(element: CardElement): boolean {\r\n return this._columns.indexOf(element) >= 0;\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n let result: Action | undefined = undefined;\r\n\r\n for (const column of this._columns) {\r\n result = column.getActionById(id);\r\n\r\n if (result) {\r\n break;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n get bleed(): boolean {\r\n return this.getBleed();\r\n }\r\n\r\n set bleed(value: boolean) {\r\n this.setBleed(value);\r\n }\r\n\r\n get padding(): PaddingDefinition | undefined {\r\n return this.getPadding();\r\n }\r\n\r\n set padding(value: PaddingDefinition | undefined) {\r\n this.setPadding(value);\r\n }\r\n\r\n get selectAction(): Action | undefined {\r\n return this._selectAction;\r\n }\r\n\r\n set selectAction(value: Action | undefined) {\r\n this._selectAction = value;\r\n }\r\n}\r\n\r\nfunction raiseImageLoadedEvent(image: Image) {\r\n const card = image.getRootElement() as AdaptiveCard;\r\n const onImageLoadedHandler =\r\n card && card.onImageLoaded ? card.onImageLoaded : AdaptiveCard.onImageLoaded;\r\n\r\n if (onImageLoadedHandler) {\r\n onImageLoadedHandler(image);\r\n }\r\n}\r\n\r\nfunction raiseAnchorClickedEvent(\r\n element: CardElement,\r\n anchor: HTMLAnchorElement,\r\n ev?: MouseEvent\r\n): boolean {\r\n const card = element.getRootElement() as AdaptiveCard;\r\n const onAnchorClickedHandler =\r\n card && card.onAnchorClicked ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;\r\n\r\n return onAnchorClickedHandler !== undefined\r\n ? onAnchorClickedHandler(element, anchor, ev)\r\n : false;\r\n}\r\n\r\nfunction raiseExecuteActionEvent(action: Action) {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onExecuteActionHandler =\r\n card && card.onExecuteAction ? card.onExecuteAction : AdaptiveCard.onExecuteAction;\r\n\r\n if (action.prepareForExecution() && onExecuteActionHandler) {\r\n onExecuteActionHandler(action);\r\n }\r\n}\r\n\r\nfunction raiseInlineCardExpandedEvent(action: ShowCardAction, isExpanded: boolean) {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onInlineCardExpandedHandler =\r\n card && card.onInlineCardExpanded\r\n ? card.onInlineCardExpanded\r\n : AdaptiveCard.onInlineCardExpanded;\r\n\r\n if (onInlineCardExpandedHandler) {\r\n onInlineCardExpandedHandler(action, isExpanded);\r\n }\r\n}\r\n\r\nfunction raiseInputValueChangedEvent(input: Input) {\r\n const card = input.getRootElement() as AdaptiveCard;\r\n const onInputValueChangedHandler =\r\n card && card.onInputValueChanged\r\n ? card.onInputValueChanged\r\n : AdaptiveCard.onInputValueChanged;\r\n\r\n if (onInputValueChangedHandler) {\r\n onInputValueChangedHandler(input);\r\n }\r\n}\r\n\r\nfunction raiseElementVisibilityChangedEvent(\r\n element: CardElement,\r\n shouldUpdateLayout: boolean = true\r\n) {\r\n const rootElement = element.getRootElement();\r\n\r\n if (shouldUpdateLayout) {\r\n rootElement.updateLayout();\r\n }\r\n\r\n const card = rootElement as AdaptiveCard;\r\n const onElementVisibilityChangedHandler =\r\n card && card.onElementVisibilityChanged\r\n ? card.onElementVisibilityChanged\r\n : AdaptiveCard.onElementVisibilityChanged;\r\n\r\n if (onElementVisibilityChangedHandler !== undefined) {\r\n onElementVisibilityChangedHandler(element);\r\n }\r\n}\r\n\r\n/**\r\n * @returns return false to continue with default context menu; return true to skip SDK default context menu\r\n */\r\nfunction raiseDisplayOverflowActionMenuEvent(\r\n action: OverflowAction,\r\n target?: HTMLElement\r\n): boolean {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onDisplayOverflowActionMenuHandler =\r\n card && card.onDisplayOverflowActionMenu\r\n ? card.onDisplayOverflowActionMenu\r\n : AdaptiveCard.onDisplayOverflowActionMenu;\r\n\r\n return onDisplayOverflowActionMenuHandler !== undefined\r\n ? onDisplayOverflowActionMenuHandler(action.getActions(), target)\r\n : false;\r\n}\r\n\r\n/**\r\n * @returns return false to continue with default action button; return true to skip SDK default action button\r\n */\r\nfunction raiseRenderOverflowActionsEvent(\r\n action: OverflowAction,\r\n isAtRootLevelActions: boolean\r\n): boolean {\r\n const card = action.parent ? (action.parent.getRootElement() as AdaptiveCard) : undefined;\r\n const onRenderOverflowActionsHandler =\r\n card && card.onRenderOverflowActions\r\n ? card.onRenderOverflowActions\r\n : AdaptiveCard.onRenderOverflowActions;\r\n\r\n return onRenderOverflowActionsHandler !== undefined\r\n ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions)\r\n : false;\r\n}\r\n\r\nexport abstract class ContainerWithActions extends Container {\r\n private _actionCollection: ActionCollection;\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this.parseActions(source, context);\r\n }\r\n\r\n protected parseActions(source: any, context: SerializationContext) {\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const element = super.internalRender();\r\n\r\n if (element) {\r\n const renderedActions = this._actionCollection.render(\r\n this.hostConfig.actions.actionsOrientation\r\n );\r\n\r\n if (renderedActions) {\r\n Utils.appendChild(\r\n element,\r\n renderSeparation(\r\n this.hostConfig,\r\n {\r\n spacing: this.hostConfig.getEffectiveSpacing(\r\n this.hostConfig.actions.spacing\r\n )\r\n },\r\n Enums.Orientation.Horizontal\r\n )\r\n );\r\n Utils.appendChild(element, renderedActions);\r\n }\r\n\r\n if (this.renderIfEmpty) {\r\n return element;\r\n } else {\r\n return element.children.length > 0 ? element : undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n protected getHasExpandedAction(): boolean {\r\n if (this.renderedActionCount === 0) {\r\n return false;\r\n } else if (this.renderedActionCount === 1) {\r\n return (\r\n this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction\r\n );\r\n } else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n\r\n protected get renderedActionCount(): number {\r\n return this._actionCollection.renderedActionCount;\r\n }\r\n\r\n protected get renderIfEmpty(): boolean {\r\n return false;\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this._actionCollection = new ActionCollection(this);\r\n }\r\n\r\n releaseDOMResources() {\r\n super.releaseDOMResources();\r\n\r\n this._actionCollection.releaseDOMResources();\r\n }\r\n\r\n getActionCount(): number {\r\n return this._actionCollection.getActionCount();\r\n }\r\n\r\n getActionAt(index: number): Action | undefined {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n } else {\r\n return super.getActionAt(index);\r\n }\r\n }\r\n\r\n getActionById(id: string): Action | undefined {\r\n const result: Action | undefined = this._actionCollection.getActionById(id);\r\n\r\n return result ? result : super.getActionById(id);\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (this._actionCollection) {\r\n this._actionCollection.validateProperties(context);\r\n }\r\n }\r\n\r\n isLastElement(element: CardElement): boolean {\r\n return super.isLastElement(element) && this._actionCollection.getActionCount() === 0;\r\n }\r\n\r\n addAction(action: Action) {\r\n this._actionCollection.addAction(action);\r\n }\r\n\r\n clear() {\r\n super.clear();\r\n\r\n this._actionCollection.clear();\r\n }\r\n\r\n getAllInputs(processActions: boolean = true): Input[] {\r\n let result = super.getAllInputs(processActions);\r\n\r\n if (processActions) {\r\n result.push(...this._actionCollection.getAllInputs(processActions));\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getResourceInformation(): IResourceInformation[] {\r\n let result = super.getResourceInformation();\r\n\r\n result.push(...this._actionCollection.getResourceInformation());\r\n\r\n return result;\r\n }\r\n\r\n isBleedingAtBottom(): boolean {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return super.isBleedingAtBottom();\r\n } else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (\r\n this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction\r\n );\r\n } else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n }\r\n\r\n getForbiddenActionNames(): string[] {\r\n return [];\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport interface IMarkdownProcessingResult {\r\n didProcess: boolean;\r\n outputHtml?: any;\r\n}\r\n\r\nexport class RefreshActionProperty extends PropertyDefinition {\r\n parse(\r\n sender: RefreshDefinition,\r\n source: PropertyBag,\r\n context: SerializationContext\r\n ): ExecuteAction | undefined {\r\n const action = context.parseAction(sender.parent, source[this.name], [], false);\r\n\r\n if (action !== undefined) {\r\n if (action instanceof ExecuteAction) {\r\n return action;\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.ActionTypeNotAllowed,\r\n Strings.errors.actionTypeNotAllowed(action.getJsonTypeName())\r\n );\r\n }\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"action\")\r\n );\r\n\r\n return undefined;\r\n }\r\n\r\n toJSON(\r\n sender: SerializableObject,\r\n target: PropertyBag,\r\n value: ExecuteAction | undefined,\r\n context: SerializationContext\r\n ) {\r\n context.serializeValue(\r\n target,\r\n this.name,\r\n value ? value.toJSON(context) : undefined,\r\n undefined,\r\n true\r\n );\r\n }\r\n\r\n constructor(readonly targetVersion: Version, readonly name: string) {\r\n super(targetVersion, name, undefined);\r\n }\r\n}\r\n\r\nexport class RefreshDefinition extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly actionProperty = new RefreshActionProperty(Versions.v1_4, \"action\");\r\n static readonly userIdsProperty = new StringArrayProperty(Versions.v1_4, \"userIds\");\r\n\r\n @property(RefreshDefinition.actionProperty)\r\n get action(): ExecuteAction {\r\n return this.getValue(RefreshDefinition.actionProperty);\r\n }\r\n\r\n set action(value: ExecuteAction) {\r\n this.setValue(RefreshDefinition.actionProperty, value);\r\n\r\n if (value) {\r\n value.setParent(this.parent);\r\n }\r\n }\r\n\r\n @property(RefreshDefinition.userIdsProperty)\r\n userIds?: string[];\r\n\r\n protected getSchemaKey(): string {\r\n return \"RefreshDefinition\";\r\n }\r\n\r\n //#endregion\r\n\r\n parent: CardElement;\r\n}\r\n\r\nexport class AuthCardButton extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly typeProperty = new StringProperty(Versions.v1_4, \"type\");\r\n static readonly titleProperty = new StringProperty(Versions.v1_4, \"title\");\r\n static readonly imageProperty = new StringProperty(Versions.v1_4, \"image\");\r\n static readonly valueProperty = new StringProperty(Versions.v1_4, \"value\");\r\n\r\n protected getSchemaKey(): string {\r\n return \"AuthCardButton\";\r\n }\r\n\r\n //#endregion\r\n\r\n @property(AuthCardButton.typeProperty)\r\n type: string;\r\n\r\n @property(AuthCardButton.titleProperty)\r\n title?: string;\r\n\r\n @property(AuthCardButton.imageProperty)\r\n image?: string;\r\n\r\n @property(AuthCardButton.valueProperty)\r\n value: string;\r\n}\r\n\r\nexport class TokenExchangeResource extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly idProperty = new StringProperty(Versions.v1_4, \"id\");\r\n static readonly uriProperty = new StringProperty(Versions.v1_4, \"uri\");\r\n static readonly providerIdProperty = new StringProperty(Versions.v1_4, \"providerId\");\r\n\r\n protected getSchemaKey(): string {\r\n return \"TokenExchangeResource\";\r\n }\r\n\r\n //#endregion\r\n\r\n @property(TokenExchangeResource.idProperty)\r\n id?: string;\r\n\r\n @property(TokenExchangeResource.uriProperty)\r\n uri?: string;\r\n\r\n @property(TokenExchangeResource.providerIdProperty)\r\n providerId?: string;\r\n}\r\n\r\nexport class Authentication extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly textProperty = new StringProperty(Versions.v1_4, \"text\");\r\n static readonly connectionNameProperty = new StringProperty(Versions.v1_4, \"connectionName\");\r\n static readonly buttonsProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_4,\r\n \"buttons\",\r\n AuthCardButton\r\n );\r\n static readonly tokenExchangeResourceProperty = new SerializableObjectProperty(\r\n Versions.v1_4,\r\n \"tokenExchangeResource\",\r\n TokenExchangeResource,\r\n true\r\n );\r\n\r\n protected getSchemaKey(): string {\r\n return \"Authentication\";\r\n }\r\n\r\n //#endregion\r\n\r\n @property(Authentication.textProperty)\r\n text?: string;\r\n\r\n @property(Authentication.connectionNameProperty)\r\n connectionName?: string;\r\n\r\n @property(Authentication.buttonsProperty)\r\n buttons: AuthCardButton[];\r\n\r\n @property(Authentication.tokenExchangeResourceProperty)\r\n tokenExchangeResource?: TokenExchangeResource;\r\n}\r\n\r\n// @dynamic\r\nexport class AdaptiveCard extends ContainerWithActions {\r\n static readonly schemaUrl = \"http://adaptivecards.io/schemas/adaptive-card.json\";\r\n\r\n //#region Schema\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected static readonly $schemaProperty = new CustomProperty(\r\n Versions.v1_0,\r\n \"$schema\",\r\n (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n return AdaptiveCard.schemaUrl;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: Versions | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n context.serializeValue(target, prop.name, AdaptiveCard.schemaUrl);\r\n }\r\n );\r\n\r\n static readonly versionProperty = new CustomProperty(\r\n Versions.v1_0,\r\n \"version\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n let version = Version.parse(source[prop.name], context);\r\n\r\n if (version === undefined) {\r\n version = Versions.latest;\r\n\r\n context.logParseEvent(\r\n sender,\r\n Enums.ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidCardVersion(version.toString())\r\n );\r\n }\r\n\r\n return version;\r\n },\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n target: PropertyBag,\r\n value: Version | undefined,\r\n context: BaseSerializationContext\r\n ) => {\r\n if (value !== undefined) {\r\n context.serializeValue(target, prop.name, value.toString());\r\n }\r\n },\r\n Versions.v1_0\r\n );\r\n\r\n static readonly fallbackTextProperty = new StringProperty(Versions.v1_0, \"fallbackText\");\r\n static readonly speakProperty = new StringProperty(Versions.v1_0, \"speak\");\r\n static readonly refreshProperty = new SerializableObjectProperty(\r\n Versions.v1_4,\r\n \"refresh\",\r\n RefreshDefinition,\r\n true\r\n );\r\n static readonly authenticationProperty = new SerializableObjectProperty(\r\n Versions.v1_4,\r\n \"authentication\",\r\n Authentication,\r\n true\r\n );\r\n\r\n @property(AdaptiveCard.versionProperty)\r\n version: Version;\r\n\r\n @property(AdaptiveCard.fallbackTextProperty)\r\n fallbackText?: string;\r\n\r\n @property(AdaptiveCard.speakProperty)\r\n speak?: string;\r\n\r\n @property(AdaptiveCard.refreshProperty)\r\n get refresh(): RefreshDefinition | undefined {\r\n return this.getValue(AdaptiveCard.refreshProperty);\r\n }\r\n\r\n set refresh(value: RefreshDefinition | undefined) {\r\n this.setValue(AdaptiveCard.refreshProperty, value);\r\n\r\n if (value) {\r\n value.parent = this;\r\n }\r\n }\r\n\r\n @property(AdaptiveCard.authenticationProperty)\r\n authentication?: Authentication;\r\n\r\n //#endregion\r\n\r\n private static _haveWarnedAboutNoMarkdownProcessing = false;\r\n\r\n static onAnchorClicked?: (\r\n element: CardElement,\r\n anchor: HTMLAnchorElement,\r\n ev?: MouseEvent\r\n ) => boolean;\r\n static onExecuteAction?: (action: Action) => void;\r\n static onElementVisibilityChanged?: (element: CardElement) => void;\r\n static onImageLoaded?: (image: Image) => void;\r\n static onInlineCardExpanded?: (action: ShowCardAction, isExpanded: boolean) => void;\r\n static onInputValueChanged?: (input: Input) => void;\r\n static onProcessMarkdown?: (text: string, result: IMarkdownProcessingResult) => void;\r\n static onDisplayOverflowActionMenu?: (\r\n actions: readonly Action[],\r\n target?: HTMLElement\r\n ) => boolean;\r\n static onRenderOverflowActions?: (\r\n actions: readonly Action[],\r\n isRootLevelActions: boolean\r\n ) => boolean;\r\n\r\n static get processMarkdown(): (text: string) => string {\r\n throw new Error(Strings.errors.processMarkdownEventRemoved());\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n static set processMarkdown(_value: (text: string) => string) {\r\n throw new Error(Strings.errors.processMarkdownEventRemoved());\r\n }\r\n\r\n static applyMarkdown(text: string): IMarkdownProcessingResult {\r\n const result: IMarkdownProcessingResult = {\r\n didProcess: false\r\n };\r\n\r\n if (AdaptiveCard.onProcessMarkdown) {\r\n AdaptiveCard.onProcessMarkdown(text, result);\r\n } else if ((window).markdownit) {\r\n // Check for markdownit\r\n const markdownIt: any = (window).markdownit;\r\n result.outputHtml = markdownIt().render(text);\r\n result.didProcess = true;\r\n } else if (!AdaptiveCard._haveWarnedAboutNoMarkdownProcessing) {\r\n // eslint-disable-next-line no-console\r\n console.warn(Strings.errors.markdownProcessingNotEnabled);\r\n AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private _fallbackCard?: AdaptiveCard;\r\n\r\n private isVersionSupported(): boolean {\r\n if (this.bypassVersionCheck) {\r\n return true;\r\n } else {\r\n const unsupportedVersion: boolean =\r\n !this.version ||\r\n !this.version.isValid ||\r\n this.maxVersion.major < this.version.major ||\r\n (this.maxVersion.major === this.version.major &&\r\n this.maxVersion.minor < this.version.minor);\r\n\r\n return !unsupportedVersion;\r\n }\r\n }\r\n\r\n protected getDefaultSerializationContext(): BaseSerializationContext {\r\n return new SerializationContext(this.version);\r\n }\r\n\r\n protected getItemsCollectionPropertyName(): string {\r\n return \"body\";\r\n }\r\n\r\n protected canHostSingletons() {\r\n return true;\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n this._fallbackCard = undefined;\r\n\r\n const fallbackElement = context.parseElement(\r\n undefined,\r\n source[\"fallback\"],\r\n this.forbiddenChildElements(),\r\n !this.isDesignMode()\r\n );\r\n\r\n if (fallbackElement) {\r\n this._fallbackCard = new AdaptiveCard();\r\n this._fallbackCard.addItem(fallbackElement);\r\n }\r\n\r\n super.internalParse(source, context);\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n this.setValue(AdaptiveCard.versionProperty, context.targetVersion);\r\n\r\n super.internalToJSON(target, context);\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const renderedElement = super.internalRender();\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {\r\n // Unlike containers, the root card element should be allowed to\r\n // be shorter than its content (otherwise the overflow truncation\r\n // logic would never get triggered)\r\n renderedElement.style.removeProperty(\"minHeight\");\r\n }\r\n\r\n return renderedElement;\r\n }\r\n\r\n protected getHasBackground(ignoreBackgroundImages: boolean = false): boolean {\r\n return true;\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition(\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n Enums.Spacing.Padding\r\n );\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n protected get renderIfEmpty(): boolean {\r\n return true;\r\n }\r\n\r\n protected get bypassVersionCheck(): boolean {\r\n return false;\r\n }\r\n\r\n protected get allowCustomStyle() {\r\n return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;\r\n }\r\n\r\n protected get hasBackground(): boolean {\r\n return true;\r\n }\r\n\r\n onAnchorClicked?: (element: CardElement, anchor: HTMLAnchorElement, ev?: MouseEvent) => boolean;\r\n onExecuteAction?: (action: Action) => void;\r\n onElementVisibilityChanged?: (element: CardElement) => void;\r\n onImageLoaded?: (image: Image) => void;\r\n onInlineCardExpanded?: (action: ShowCardAction, isExpanded: boolean) => void;\r\n onInputValueChanged?: (input: Input) => void;\r\n onDisplayOverflowActionMenu?: (actions: readonly Action[], target?: HTMLElement) => boolean;\r\n onRenderOverflowActions?: (actions: readonly Action[], isRootLevelActions: boolean) => boolean;\r\n\r\n designMode: boolean = false;\r\n\r\n getJsonTypeName(): string {\r\n return \"AdaptiveCard\";\r\n }\r\n\r\n internalValidateProperties(context: ValidationResults) {\r\n super.internalValidateProperties(context);\r\n\r\n if (this.getValue(CardElement.typeNameProperty) !== \"AdaptiveCard\") {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.MissingCardType,\r\n Strings.errors.invalidCardType()\r\n );\r\n }\r\n\r\n if (!this.bypassVersionCheck && !this.version) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.PropertyCantBeNull,\r\n Strings.errors.propertyMustBeSet(\"version\")\r\n );\r\n } else if (!this.isVersionSupported()) {\r\n context.addFailure(\r\n this,\r\n Enums.ValidationEvent.UnsupportedCardVersion,\r\n Strings.errors.unsupportedCardVersion(\r\n this.version.toString(),\r\n this.maxVersion.toString()\r\n )\r\n );\r\n }\r\n }\r\n\r\n render(target?: HTMLElement): HTMLElement | undefined {\r\n let renderedCard: HTMLElement | undefined;\r\n\r\n if (this.shouldFallback() && this._fallbackCard) {\r\n this._fallbackCard.hostConfig = this.hostConfig;\r\n\r\n renderedCard = this._fallbackCard.render();\r\n } else {\r\n renderedCard = super.render();\r\n\r\n if (renderedCard) {\r\n renderedCard.classList.add(this.hostConfig.makeCssClassName(\"ac-adaptiveCard\"));\r\n\r\n // Having a tabIndex on the root container for a card can mess up accessibility in some scenarios.\r\n // However, we've shipped this behavior before, and so can't just turn it off in a point release. For\r\n // now, to unblock accessibility scenarios for our customers, we've got an option to turn it off. In a\r\n // future release, we should strongly consider flipping the default such that we *don't* emit a tabIndex\r\n // by default.\r\n if (GlobalSettings.setTabIndexAtCardRoot) {\r\n renderedCard.tabIndex = 0;\r\n }\r\n\r\n if (this.speak) {\r\n renderedCard.setAttribute(\"aria-label\", this.speak);\r\n }\r\n }\r\n }\r\n\r\n if (target) {\r\n Utils.appendChild(target, renderedCard);\r\n\r\n this.updateLayout();\r\n }\r\n\r\n return renderedCard;\r\n }\r\n\r\n updateLayout(processChildren: boolean = true) {\r\n super.updateLayout(processChildren);\r\n\r\n if (GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {\r\n const padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n this[\"handleOverflow\"](this.renderedElement!.offsetHeight - padding);\r\n }\r\n }\r\n\r\n shouldFallback(): boolean {\r\n return super.shouldFallback() || !this.isVersionSupported();\r\n }\r\n\r\n get hasVisibleSeparator(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nclass InlineAdaptiveCard extends AdaptiveCard {\r\n //#region Schema\r\n\r\n protected getSchemaKey(): string {\r\n return \"InlineAdaptiveCard\";\r\n }\r\n\r\n protected populateSchema(schema: SerializableObjectSchema) {\r\n super.populateSchema(schema);\r\n\r\n schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);\r\n }\r\n\r\n //#endregion\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition(\r\n this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding,\r\n Enums.Spacing.Padding,\r\n this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding,\r\n Enums.Spacing.Padding\r\n );\r\n }\r\n\r\n protected get bypassVersionCheck(): boolean {\r\n return true;\r\n }\r\n\r\n protected get defaultStyle(): string {\r\n if (this.suppressStyle) {\r\n return Enums.ContainerStyle.Default;\r\n } else {\r\n return this.hostConfig.actions.showCard.style\r\n ? this.hostConfig.actions.showCard.style\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n }\r\n\r\n suppressStyle: boolean = false;\r\n\r\n render(target?: HTMLElement): HTMLElement | undefined {\r\n const renderedCard = super.render(target);\r\n\r\n if (renderedCard) {\r\n renderedCard.setAttribute(\"aria-live\", \"polite\");\r\n renderedCard.removeAttribute(\"tabindex\");\r\n }\r\n\r\n return renderedCard;\r\n }\r\n}\r\n\r\nexport class SerializationContext extends BaseSerializationContext {\r\n private _elementRegistry?: CardObjectRegistry;\r\n private _actionRegistry?: CardObjectRegistry;\r\n\r\n private _forbiddenTypes: Set = new Set();\r\n private internalParseCardObject(\r\n parent: CardElement | undefined,\r\n source: any,\r\n forbiddenTypes: Set,\r\n allowFallback: boolean,\r\n createInstanceCallback: (typeName: string | undefined) => T | undefined,\r\n logParseEvent: (typeName: string | undefined, errorType: Enums.TypeErrorType) => void,\r\n parsingSingletonObject: boolean = false\r\n ): T | undefined {\r\n let result: T | undefined = undefined;\r\n\r\n if (source && typeof source === \"object\") {\r\n const oldForbiddenTypes = new Set();\r\n this._forbiddenTypes.forEach((type) => {\r\n oldForbiddenTypes.add(type);\r\n });\r\n forbiddenTypes.forEach((type) => {\r\n this._forbiddenTypes.add(type);\r\n });\r\n\r\n const typeName = Utils.parseString(source[\"type\"]);\r\n\r\n const ignoreForbiddenType = parsingSingletonObject && typeName === \"Carousel\";\r\n\r\n if (typeName && this._forbiddenTypes.has(typeName) && !ignoreForbiddenType) {\r\n logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);\r\n } else {\r\n let tryToFallback = false;\r\n\r\n result = createInstanceCallback(typeName);\r\n\r\n if (!result) {\r\n tryToFallback = GlobalSettings.enableFallback && allowFallback;\r\n\r\n logParseEvent(typeName, Enums.TypeErrorType.UnknownType);\r\n } else {\r\n result.setParent(parent);\r\n result.parse(source, this);\r\n\r\n tryToFallback =\r\n GlobalSettings.enableFallback && allowFallback && result.shouldFallback();\r\n }\r\n\r\n if (tryToFallback) {\r\n const fallback = source[\"fallback\"];\r\n\r\n if (!fallback && parent) {\r\n parent.setShouldFallback(true);\r\n }\r\n if (typeof fallback === \"string\" && fallback.toLowerCase() === \"drop\") {\r\n result = undefined;\r\n } else if (typeof fallback === \"object\") {\r\n result = this.internalParseCardObject(\r\n parent,\r\n fallback,\r\n forbiddenTypes,\r\n true,\r\n createInstanceCallback,\r\n logParseEvent\r\n );\r\n }\r\n }\r\n }\r\n\r\n this._forbiddenTypes = oldForbiddenTypes;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n protected cardObjectParsed(o: SerializableObject, source: any) {\r\n if (o instanceof Action && this.onParseAction) {\r\n this.onParseAction(o, source, this);\r\n } else if (o instanceof CardElement && this.onParseElement) {\r\n this.onParseElement(o, source, this);\r\n }\r\n }\r\n\r\n onParseAction?: (action: Action, source: any, context: SerializationContext) => void;\r\n onParseElement?: (element: CardElement, source: any, context: SerializationContext) => void;\r\n\r\n shouldSerialize(o: SerializableObject): boolean {\r\n if (o instanceof Action) {\r\n return this.actionRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n } else if (o instanceof CardElement) {\r\n return this.elementRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n parseCardObject(\r\n parent: CardElement | undefined,\r\n source: any,\r\n forbiddenTypeNames: string[],\r\n allowFallback: boolean,\r\n createInstanceCallback: (typeName: string) => T | undefined,\r\n logParseEvent: (typeName: string, errorType: Enums.TypeErrorType) => void,\r\n parsingSingletonObject: boolean = false\r\n ): T | undefined {\r\n const forbiddenTypes = new Set(forbiddenTypeNames);\r\n const result = this.internalParseCardObject(\r\n parent,\r\n source,\r\n forbiddenTypes,\r\n allowFallback,\r\n createInstanceCallback,\r\n logParseEvent,\r\n parsingSingletonObject\r\n );\r\n\r\n if (result !== undefined) {\r\n this.cardObjectParsed(result, source);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n parseElement(\r\n parent: CardElement | undefined,\r\n source: any,\r\n forbiddenTypes: string[],\r\n allowFallback: boolean,\r\n _parsingSingletonObject: boolean = false\r\n ): CardElement | undefined {\r\n return this.parseCardObject(\r\n parent,\r\n source,\r\n forbiddenTypes,\r\n allowFallback,\r\n (typeName: string) => {\r\n return this.elementRegistry.createInstance(typeName, this.targetVersion);\r\n },\r\n (typeName: string, errorType: Enums.TypeErrorType) => {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.UnknownElementType,\r\n Strings.errors.unknownElementType(typeName)\r\n );\r\n } else {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.ElementTypeNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(typeName)\r\n );\r\n }\r\n },\r\n _parsingSingletonObject\r\n );\r\n }\r\n\r\n parseAction(\r\n parent: CardElement,\r\n source: any,\r\n forbiddenActionTypes: string[],\r\n allowFallback: boolean\r\n ): Action | undefined {\r\n return this.parseCardObject(\r\n parent,\r\n source,\r\n forbiddenActionTypes,\r\n allowFallback,\r\n (typeName: string) => {\r\n return this.actionRegistry.createInstance(typeName, this.targetVersion);\r\n },\r\n (typeName: string, errorType: Enums.TypeErrorType) => {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.UnknownActionType,\r\n Strings.errors.unknownActionType(typeName)\r\n );\r\n } else {\r\n this.logParseEvent(\r\n undefined,\r\n Enums.ValidationEvent.ActionTypeNotAllowed,\r\n Strings.errors.actionTypeNotAllowed(typeName)\r\n );\r\n }\r\n }\r\n );\r\n }\r\n\r\n get elementRegistry(): CardObjectRegistry {\r\n return this._elementRegistry ?? GlobalRegistry.elements;\r\n }\r\n\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n setElementRegistry(value: CardObjectRegistry | undefined) {\r\n this._elementRegistry = value;\r\n }\r\n\r\n get actionRegistry(): CardObjectRegistry {\r\n return this._actionRegistry ?? GlobalRegistry.actions;\r\n }\r\n\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n setActionRegistry(value: CardObjectRegistry | undefined) {\r\n this._actionRegistry = value;\r\n }\r\n}\r\n\r\nGlobalRegistry.defaultElements.register(\"Container\", Container);\r\nGlobalRegistry.defaultElements.register(\"TextBlock\", TextBlock);\r\nGlobalRegistry.defaultElements.register(\"RichTextBlock\", RichTextBlock, Versions.v1_2);\r\nGlobalRegistry.defaultElements.register(\"TextRun\", TextRun, Versions.v1_2);\r\nGlobalRegistry.defaultElements.register(\"Image\", Image);\r\nGlobalRegistry.defaultElements.register(\"ImageSet\", ImageSet);\r\nGlobalRegistry.defaultElements.register(\"Media\", Media, Versions.v1_1);\r\nGlobalRegistry.defaultElements.register(\"FactSet\", FactSet);\r\nGlobalRegistry.defaultElements.register(\"ColumnSet\", ColumnSet);\r\nGlobalRegistry.defaultElements.register(\"ActionSet\", ActionSet, Versions.v1_2);\r\nGlobalRegistry.defaultElements.register(\"Input.Text\", TextInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Date\", DateInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Time\", TimeInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Number\", NumberInput);\r\nGlobalRegistry.defaultElements.register(\"Input.ChoiceSet\", ChoiceSetInput);\r\nGlobalRegistry.defaultElements.register(\"Input.Toggle\", ToggleInput);\r\n\r\nGlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);\r\nGlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);\r\nGlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);\r\nGlobalRegistry.defaultActions.register(\r\n ToggleVisibilityAction.JsonTypeName,\r\n ToggleVisibilityAction,\r\n Versions.v1_2\r\n);\r\nGlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, Versions.v1_4);\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {\r\n CardElement,\r\n StylableCardElementContainer,\r\n SerializationContext,\r\n Container,\r\n ContainerStyleProperty\r\n} from \"./card-elements\";\r\nimport {\r\n HorizontalAlignment,\r\n VerticalAlignment,\r\n SizeUnit,\r\n ValidationEvent,\r\n TypeErrorType,\r\n Spacing\r\n} from \"./enums\";\r\nimport { TextStyleDefinition } from \"./host-config\";\r\nimport { GlobalRegistry } from \"./registry\";\r\nimport {\r\n BaseSerializationContext,\r\n BoolProperty,\r\n CustomProperty,\r\n EnumProperty,\r\n property,\r\n PropertyBag,\r\n PropertyDefinition,\r\n SerializableObject,\r\n SerializableObjectCollectionProperty,\r\n Versions\r\n} from \"./serialization\";\r\nimport { SizeAndUnit, PaddingDefinition } from \"./shared\";\r\nimport { Strings } from \"./strings\";\r\nimport { stringToCssColor } from \"./utils\";\r\n\r\nexport class TableColumnDefinition extends SerializableObject {\r\n //#region Schema\r\n\r\n static readonly horizontalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n HorizontalAlignment\r\n );\r\n static readonly verticalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n VerticalAlignment\r\n );\r\n\r\n static readonly widthProperty = new CustomProperty(\r\n Versions.v1_5,\r\n \"width\",\r\n (\r\n sender: SerializableObject,\r\n prop: PropertyDefinition,\r\n source: PropertyBag,\r\n context: BaseSerializationContext\r\n ) => {\r\n let result: SizeAndUnit = prop.defaultValue;\r\n const value = source[prop.name];\r\n let invalidWidth = false;\r\n\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new SizeAndUnit(value, SizeUnit.Weight);\r\n } else if (typeof value === \"string\") {\r\n try {\r\n result = SizeAndUnit.parse(value);\r\n } catch (e) {\r\n invalidWidth = true;\r\n }\r\n } else {\r\n invalidWidth = true;\r\n }\r\n\r\n if (invalidWidth) {\r\n context.logParseEvent(\r\n sender,\r\n ValidationEvent.InvalidPropertyValue,\r\n Strings.errors.invalidColumnWidth(value)\r\n );\r\n }\r\n\r\n return result;\r\n },\r\n (\r\n sender: SerializableObject,\r\n property: PropertyDefinition,\r\n target: PropertyBag,\r\n value: SizeAndUnit,\r\n context: BaseSerializationContext\r\n ) => {\r\n if (value.unit === SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n } else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n },\r\n new SizeAndUnit(1, SizeUnit.Weight)\r\n );\r\n\r\n @property(TableColumnDefinition.horizontalCellContentAlignmentProperty)\r\n horizontalCellContentAlignment?: HorizontalAlignment;\r\n\r\n @property(TableColumnDefinition.verticalCellContentAlignmentProperty)\r\n verticalCellContentAlignment?: VerticalAlignment;\r\n\r\n @property(TableColumnDefinition.widthProperty)\r\n width: SizeAndUnit = new SizeAndUnit(1, SizeUnit.Weight);\r\n\r\n getSchemaKey(): string {\r\n return \"ColumnDefinition\";\r\n }\r\n\r\n //#endregion\r\n\r\n computedWidth: SizeAndUnit;\r\n}\r\n\r\nexport abstract class StylableContainer<\r\n T extends CardElement\r\n> extends StylableCardElementContainer {\r\n private _items: T[] = [];\r\n\r\n private parseItem(source: any, context: SerializationContext): T | undefined {\r\n return context.parseCardObject(\r\n this,\r\n source,\r\n [], // Forbidden types not supported for elements for now\r\n !this.isDesignMode(),\r\n (typeName: string) => {\r\n return this.createItemInstance(typeName);\r\n },\r\n (typeName: string, _errorType: TypeErrorType) => {\r\n context.logParseEvent(\r\n undefined,\r\n ValidationEvent.ElementTypeNotAllowed,\r\n Strings.errors.elementTypeNotAllowed(typeName)\r\n );\r\n }\r\n );\r\n }\r\n\r\n protected abstract getCollectionPropertyName(): string;\r\n protected abstract createItemInstance(typeName: string): T | undefined;\r\n\r\n protected internalAddItem(item: T) {\r\n if (!item.parent) {\r\n this._items.push(item);\r\n\r\n item.setParent(this);\r\n } else {\r\n throw new Error(Strings.errors.elementAlreadyParented());\r\n }\r\n }\r\n\r\n protected internalRemoveItem(item: T): boolean {\r\n const itemIndex = this._items.indexOf(item);\r\n\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n\r\n item.setParent(undefined);\r\n\r\n this.updateLayout();\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n protected internalIndexOf(item: T): number {\r\n return this._items.indexOf(item);\r\n }\r\n\r\n protected internalParse(source: any, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this._items = [];\r\n\r\n const items = source[this.getCollectionPropertyName()];\r\n\r\n if (Array.isArray(items)) {\r\n for (const item of items) {\r\n const instance = this.parseItem(item, context);\r\n\r\n if (instance) {\r\n this._items.push(instance);\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected internalToJSON(target: PropertyBag, context: SerializationContext) {\r\n super.internalToJSON(target, context);\r\n\r\n context.serializeArray(target, this.getCollectionPropertyName(), this._items);\r\n }\r\n\r\n removeItem(item: T): boolean {\r\n return this.internalRemoveItem(item);\r\n }\r\n\r\n getItemCount(): number {\r\n return this._items.length;\r\n }\r\n\r\n getItemAt(index: number): T {\r\n return this._items[index];\r\n }\r\n\r\n getFirstVisibleRenderedItem(): T | undefined {\r\n return this.getItemCount() > 0 ? this.getItemAt(0) : undefined;\r\n }\r\n\r\n getLastVisibleRenderedItem(): T | undefined {\r\n return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : undefined;\r\n }\r\n}\r\n\r\nexport type CellType = \"data\" | \"header\";\r\n\r\nexport class TableCell extends Container {\r\n private _columnIndex: number = -1;\r\n private _cellType: CellType = \"data\";\r\n\r\n protected getHasBorder(): boolean {\r\n return this.parentRow.parentTable.showGridLines;\r\n }\r\n\r\n protected applyBorder() {\r\n if (this.renderedElement && this.getHasBorder()) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.parentRow.parentTable.gridStyle\r\n );\r\n\r\n if (styleDefinition.borderColor) {\r\n const borderColor = stringToCssColor(styleDefinition.borderColor);\r\n\r\n if (borderColor) {\r\n this.renderedElement.style.borderRight = \"1px solid \" + borderColor;\r\n this.renderedElement.style.borderBottom = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new PaddingDefinition(Spacing.Small, Spacing.Small, Spacing.Small, Spacing.Small)\r\n : super.getDefaultPadding();\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const cellElement = super.internalRender();\r\n\r\n if (cellElement) {\r\n cellElement.setAttribute(\"role\", this.cellType === \"data\" ? \"cell\" : \"columnheader\");\r\n cellElement.style.minWidth = \"0\";\r\n\r\n if (this.cellType === \"header\") {\r\n cellElement.setAttribute(\"scope\", \"col\");\r\n }\r\n }\r\n\r\n return cellElement;\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TableCell\";\r\n }\r\n\r\n getEffectiveTextStyleDefinition(): TextStyleDefinition {\r\n if (this.cellType === \"header\") {\r\n return this.hostConfig.textStyles.columnHeader;\r\n }\r\n\r\n return super.getEffectiveTextStyleDefinition();\r\n }\r\n\r\n getEffectiveHorizontalAlignment(): HorizontalAlignment {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n\r\n if (this.parentRow.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.horizontalCellContentAlignment;\r\n }\r\n\r\n if (this.columnIndex >= 0) {\r\n const horizontalAlignment = this.parentRow.parentTable.getColumnAt(\r\n this.columnIndex\r\n ).horizontalCellContentAlignment;\r\n\r\n if (horizontalAlignment !== undefined) {\r\n return horizontalAlignment;\r\n }\r\n }\r\n\r\n if (this.parentRow.parentTable.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.horizontalCellContentAlignment;\r\n }\r\n\r\n return super.getEffectiveHorizontalAlignment();\r\n }\r\n\r\n getEffectiveVerticalContentAlignment(): VerticalAlignment {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n\r\n if (this.parentRow.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.verticalCellContentAlignment;\r\n }\r\n\r\n if (this.columnIndex >= 0) {\r\n const verticalAlignment = this.parentRow.parentTable.getColumnAt(\r\n this.columnIndex\r\n ).verticalCellContentAlignment;\r\n\r\n if (verticalAlignment !== undefined) {\r\n return verticalAlignment;\r\n }\r\n }\r\n\r\n if (this.parentRow.parentTable.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.verticalCellContentAlignment;\r\n }\r\n\r\n return super.getEffectiveVerticalContentAlignment();\r\n }\r\n\r\n get columnIndex(): number {\r\n return this._columnIndex;\r\n }\r\n\r\n get cellType(): CellType {\r\n return this._cellType;\r\n }\r\n\r\n get parentRow(): TableRow {\r\n return this.parent as TableRow;\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class TableRow extends StylableContainer {\r\n //#region Schema\r\n\r\n static readonly styleProperty = new ContainerStyleProperty(Versions.v1_5, \"style\");\r\n static readonly horizontalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n HorizontalAlignment\r\n );\r\n static readonly verticalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n VerticalAlignment\r\n );\r\n\r\n @property(TableRow.horizontalCellContentAlignmentProperty)\r\n horizontalCellContentAlignment?: HorizontalAlignment;\r\n\r\n @property(TableRow.verticalCellContentAlignmentProperty)\r\n verticalCellContentAlignment?: VerticalAlignment;\r\n\r\n //#endregion\r\n\r\n protected getDefaultPadding(): PaddingDefinition {\r\n return new PaddingDefinition(Spacing.None, Spacing.None, Spacing.None, Spacing.None);\r\n }\r\n\r\n protected applyBackground() {\r\n if (this.renderedElement) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.style,\r\n this.hostConfig.containerStyles.getStyleByName(this.defaultStyle)\r\n );\r\n\r\n if (styleDefinition.backgroundColor) {\r\n const bgColor = stringToCssColor(styleDefinition.backgroundColor);\r\n\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected getCollectionPropertyName(): string {\r\n return \"cells\";\r\n }\r\n\r\n protected createItemInstance(typeName: string): TableCell | undefined {\r\n return !typeName || typeName === \"TableCell\" ? new TableCell() : undefined;\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n const isFirstRow = this.getIsFirstRow();\r\n const cellSpacing = this.hostConfig.table.cellSpacing;\r\n\r\n const rowElement = document.createElement(\"div\");\r\n rowElement.setAttribute(\"role\", \"row\");\r\n rowElement.style.display = \"flex\";\r\n rowElement.style.flexDirection = \"row\";\r\n\r\n for (let i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {\r\n const cell = this.getItemAt(i);\r\n\r\n // Cheating a bit in order to keep cellType read-only\r\n cell[\"_columnIndex\"] = i;\r\n cell[\"_cellType\"] =\r\n this.parentTable.firstRowAsHeaders && isFirstRow ? \"header\" : \"data\";\r\n\r\n const renderedCell = cell.render();\r\n\r\n if (renderedCell) {\r\n const column = this.parentTable.getColumnAt(i);\r\n\r\n if (column.computedWidth.unit === SizeUnit.Pixel) {\r\n renderedCell.style.flex = \"0 0 \" + column.computedWidth.physicalSize + \"px\";\r\n } else {\r\n renderedCell.style.flex = \"1 1 \" + column.computedWidth.physicalSize + \"%\";\r\n }\r\n\r\n if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {\r\n renderedCell.style.marginLeft = cellSpacing + \"px\";\r\n }\r\n\r\n rowElement.appendChild(renderedCell);\r\n }\r\n }\r\n\r\n return rowElement.children.length > 0 ? rowElement : undefined;\r\n }\r\n\r\n protected shouldSerialize(_context: SerializationContext): boolean {\r\n return true;\r\n }\r\n\r\n addCell(cell: TableCell) {\r\n this.internalAddItem(cell);\r\n }\r\n\r\n removeCellAt(columnIndex: number): boolean {\r\n if (columnIndex >= 0 && columnIndex < this.getItemCount()) {\r\n return this.removeItem(this.getItemAt(columnIndex));\r\n }\r\n\r\n return false;\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof TableCell ? this.internalIndexOf(cardElement) : -1;\r\n }\r\n\r\n ensureHasEnoughCells(cellCount: number) {\r\n while (this.getItemCount() < cellCount) {\r\n this.addCell(new TableCell());\r\n }\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"TableRow\";\r\n }\r\n\r\n getIsFirstRow(): boolean {\r\n return this.parentTable.getItemAt(0) === this;\r\n }\r\n\r\n get parentTable(): Table {\r\n return this.parent as Table;\r\n }\r\n\r\n get isStandalone(): boolean {\r\n return false;\r\n }\r\n}\r\n\r\nexport class Table extends StylableContainer {\r\n //#region Schema\r\n\r\n private static readonly _columnsProperty = new SerializableObjectCollectionProperty(\r\n Versions.v1_5,\r\n \"columns\",\r\n TableColumnDefinition\r\n );\r\n\r\n static readonly firstRowAsHeadersProperty = new BoolProperty(\r\n Versions.v1_5,\r\n \"firstRowAsHeaders\",\r\n true\r\n );\r\n static readonly showGridLinesProperty = new BoolProperty(Versions.v1_5, \"showGridLines\", true);\r\n static readonly gridStyleProperty = new ContainerStyleProperty(Versions.v1_5, \"gridStyle\");\r\n static readonly horizontalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"horizontalCellContentAlignment\",\r\n HorizontalAlignment\r\n );\r\n static readonly verticalCellContentAlignmentProperty = new EnumProperty(\r\n Versions.v1_5,\r\n \"verticalCellContentAlignment\",\r\n VerticalAlignment\r\n );\r\n\r\n @property(Table._columnsProperty)\r\n private _columns: TableColumnDefinition[] = [];\r\n\r\n @property(Table.firstRowAsHeadersProperty)\r\n firstRowAsHeaders: boolean = true;\r\n\r\n @property(Table.showGridLinesProperty)\r\n showGridLines: boolean = true;\r\n\r\n @property(Table.gridStyleProperty)\r\n get gridStyle(): string | undefined {\r\n const style = this.getValue(Table.gridStyleProperty);\r\n\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n set gridStyle(value: string | undefined) {\r\n this.setValue(Table.gridStyleProperty, value);\r\n }\r\n\r\n @property(Table.horizontalCellContentAlignmentProperty)\r\n horizontalCellContentAlignment?: HorizontalAlignment;\r\n\r\n @property(Table.verticalCellContentAlignmentProperty)\r\n verticalCellContentAlignment?: VerticalAlignment;\r\n\r\n //#endregion\r\n\r\n private ensureRowsHaveEnoughCells() {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());\r\n }\r\n }\r\n\r\n private removeCellsFromColumn(columnIndex: number) {\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).removeCellAt(columnIndex);\r\n }\r\n }\r\n\r\n protected getCollectionPropertyName(): string {\r\n return \"rows\";\r\n }\r\n\r\n protected createItemInstance(typeName: string): TableRow | undefined {\r\n return !typeName || typeName === \"TableRow\" ? new TableRow() : undefined;\r\n }\r\n\r\n protected internalParse(source: PropertyBag, context: SerializationContext) {\r\n super.internalParse(source, context);\r\n\r\n this.ensureRowsHaveEnoughCells();\r\n }\r\n\r\n protected internalRender(): HTMLElement | undefined {\r\n if (this.getItemCount() > 0) {\r\n let totalWeights: number = 0;\r\n\r\n for (const column of this._columns) {\r\n if (column.width.unit === SizeUnit.Weight) {\r\n totalWeights += column.width.physicalSize;\r\n }\r\n }\r\n\r\n for (const column of this._columns) {\r\n if (column.width.unit === SizeUnit.Pixel) {\r\n column.computedWidth = new SizeAndUnit(\r\n column.width.physicalSize,\r\n SizeUnit.Pixel\r\n );\r\n } else {\r\n column.computedWidth = new SizeAndUnit(\r\n (100 / totalWeights) * column.width.physicalSize,\r\n SizeUnit.Weight\r\n );\r\n }\r\n }\r\n\r\n const tableElement = document.createElement(\"div\");\r\n tableElement.setAttribute(\"role\", \"table\");\r\n tableElement.style.display = \"flex\";\r\n tableElement.style.flexDirection = \"column\";\r\n\r\n if (this.showGridLines) {\r\n const styleDefinition = this.hostConfig.containerStyles.getStyleByName(\r\n this.gridStyle\r\n );\r\n\r\n if (styleDefinition.borderColor) {\r\n const borderColor = stringToCssColor(styleDefinition.borderColor);\r\n\r\n if (borderColor) {\r\n tableElement.style.borderTop = \"1px solid \" + borderColor;\r\n tableElement.style.borderLeft = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n\r\n const cellSpacing = this.hostConfig.table.cellSpacing;\r\n\r\n for (let i = 0; i < this.getItemCount(); i++) {\r\n const renderedRow = this.getItemAt(i).render();\r\n\r\n if (renderedRow) {\r\n if (i > 0 && !this.showGridLines && cellSpacing > 0) {\r\n const separatorRow = document.createElement(\"div\");\r\n separatorRow.setAttribute(\"aria-hidden\", \"true\");\r\n separatorRow.style.height = cellSpacing + \"px\";\r\n\r\n tableElement.appendChild(separatorRow);\r\n }\r\n\r\n tableElement.appendChild(renderedRow);\r\n }\r\n }\r\n\r\n return tableElement;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n addColumn(column: TableColumnDefinition) {\r\n this._columns.push(column);\r\n\r\n this.ensureRowsHaveEnoughCells();\r\n }\r\n\r\n removeColumn(column: TableColumnDefinition) {\r\n const index = this._columns.indexOf(column);\r\n\r\n if (index >= 0) {\r\n this.removeCellsFromColumn(index);\r\n\r\n this._columns.splice(index, 1);\r\n }\r\n }\r\n\r\n getColumnCount(): number {\r\n return this._columns.length;\r\n }\r\n\r\n getColumnAt(index: number): TableColumnDefinition {\r\n return this._columns[index];\r\n }\r\n\r\n addRow(row: TableRow) {\r\n this.internalAddItem(row);\r\n\r\n row.ensureHasEnoughCells(this.getColumnCount());\r\n }\r\n\r\n indexOf(cardElement: CardElement): number {\r\n return cardElement instanceof TableRow ? this.internalIndexOf(cardElement) : -1;\r\n }\r\n\r\n getJsonTypeName(): string {\r\n return \"Table\";\r\n }\r\n}\r\n\r\nGlobalRegistry.defaultElements.register(\"Table\", Table, Versions.v1_5);\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { ActivityResponse, IActivityRequest } from \"./activity-request\";\r\n\r\nexport abstract class ChannelAdapter {\r\n abstract sendRequestAsync(request: IActivityRequest): Promise;\r\n}\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {\r\n Authentication,\r\n AuthCardButton,\r\n ExecuteAction,\r\n TokenExchangeResource\r\n} from \"./card-elements\";\r\n\r\nexport enum ActivityRequestTrigger {\r\n Automatic = \"automatic\",\r\n Manual = \"manual\"\r\n}\r\n\r\nexport interface IActivityRequest {\r\n readonly action: ExecuteAction;\r\n readonly trigger: ActivityRequestTrigger;\r\n readonly attemptNumber: number;\r\n readonly consecutiveRefreshes: number;\r\n\r\n authCode?: string;\r\n authToken?: string;\r\n\r\n retryAsync(): void;\r\n}\r\n\r\nexport class ActivityRequestError {\r\n constructor(readonly code?: string, readonly message?: string) {}\r\n}\r\n\r\nexport abstract class ActivityResponse {\r\n constructor(readonly request: IActivityRequest) {}\r\n}\r\n\r\nexport class SuccessResponse extends ActivityResponse {\r\n constructor(readonly request: IActivityRequest, readonly rawContent?: string) {\r\n super(request);\r\n }\r\n}\r\n\r\nexport class ErrorResponse extends ActivityResponse {\r\n constructor(readonly request: IActivityRequest, readonly error: ActivityRequestError) {\r\n super(request);\r\n }\r\n}\r\n\r\nexport class LoginRequestResponse extends ActivityResponse {\r\n private _auth: Authentication;\r\n readonly signinButton?: AuthCardButton;\r\n\r\n constructor(readonly request: IActivityRequest, auth: Authentication) {\r\n super(request);\r\n this._auth = auth;\r\n\r\n for (const button of this._auth.buttons) {\r\n if (button.type === \"signin\" && button.value !== undefined) {\r\n try {\r\n new URL(button.value);\r\n\r\n this.signinButton = button;\r\n\r\n break;\r\n } catch (e) {\r\n // Ignore parsing error\r\n }\r\n }\r\n }\r\n }\r\n\r\n get tokenExchangeResource(): TokenExchangeResource | undefined {\r\n return this._auth.tokenExchangeResource;\r\n }\r\n}\r\n", "// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport * as Enums from \"./enums\";\r\nimport * as Utils from \"./utils\";\r\nimport { GlobalSettings } from \"./shared\";\r\nimport { ChannelAdapter } from \"./channel-adapter\";\r\nimport {\r\n ActivityResponse,\r\n IActivityRequest,\r\n ActivityRequestTrigger,\r\n SuccessResponse,\r\n ErrorResponse,\r\n LoginRequestResponse\r\n} from \"./activity-request\";\r\nimport { Strings } from \"./strings\";\r\nimport {\r\n SubmitAction,\r\n ExecuteAction,\r\n SerializationContext,\r\n AdaptiveCard,\r\n Action,\r\n Input,\r\n TokenExchangeResource,\r\n AuthCardButton\r\n} from \"./card-elements\";\r\nimport { Versions } from \"./serialization\";\r\nimport { HostConfig } from \"./host-config\";\r\n\r\nfunction logEvent(level: Enums.LogLevel, message?: any, ...optionalParams: any[]) {\r\n if (GlobalSettings.applets.logEnabled) {\r\n if (GlobalSettings.applets.onLogEvent) {\r\n GlobalSettings.applets.onLogEvent(level, message, optionalParams);\r\n } else {\r\n /* eslint-disable no-console */\r\n switch (level) {\r\n case Enums.LogLevel.Warning:\r\n console.warn(message, optionalParams);\r\n break;\r\n case Enums.LogLevel.Error:\r\n console.error(message, optionalParams);\r\n break;\r\n default:\r\n console.log(message, optionalParams);\r\n break;\r\n }\r\n /* eslint-enable no-console */\r\n }\r\n }\r\n}\r\n\r\nclass ActivityRequest implements IActivityRequest {\r\n constructor(\r\n readonly action: ExecuteAction,\r\n readonly trigger: ActivityRequestTrigger,\r\n readonly consecutiveRefreshes: number\r\n ) {}\r\n\r\n authCode?: string;\r\n authToken?: string;\r\n attemptNumber: number = 0;\r\n\r\n onSend: (sender: ActivityRequest) => void;\r\n\r\n // eslint-disable-next-line @typescript-eslint/require-await\r\n async retryAsync(): Promise {\r\n if (this.onSend) {\r\n this.onSend(this);\r\n }\r\n }\r\n}\r\n\r\nexport class AdaptiveApplet {\r\n private static readonly _submitMagicCodeActionId = \"submitMagicCode\";\r\n private static readonly _cancelMagicCodeAuthActionId = \"cancelMagicCodeAuth\";\r\n\r\n private _card?: AdaptiveCard;\r\n private _cardPayload: any;\r\n private _allowAutomaticCardUpdate: boolean = false;\r\n private _refreshButtonHostElement: HTMLElement;\r\n private _cardHostElement: HTMLElement;\r\n private _progressOverlay?: HTMLElement;\r\n\r\n private displayCard(card: AdaptiveCard) {\r\n if (card.renderedElement) {\r\n Utils.clearElementChildren(this._cardHostElement);\r\n\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n\r\n this._cardHostElement.appendChild(card.renderedElement);\r\n } else {\r\n throw new Error(\"displayCard: undefined card.\");\r\n }\r\n }\r\n\r\n private showManualRefreshButton(refreshAction: ExecuteAction) {\r\n const displayBuiltInManualRefreshButton = this.onShowManualRefreshButton\r\n ? this.onShowManualRefreshButton(this)\r\n : true;\r\n\r\n if (displayBuiltInManualRefreshButton) {\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n\r\n let renderedRefreshButton: HTMLElement | undefined = undefined;\r\n\r\n if (this.onRenderManualRefreshButton) {\r\n renderedRefreshButton = this.onRenderManualRefreshButton(this);\r\n } else {\r\n let message = Strings.runtime.refreshThisCard();\r\n\r\n if (GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {\r\n let autoRefreshPausedMessage = Strings.runtime.automaticRefreshPaused();\r\n\r\n if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== \" \") {\r\n autoRefreshPausedMessage += \" \";\r\n }\r\n\r\n message = Strings.runtime.clckToRestartAutomaticRefresh();\r\n }\r\n\r\n const cardPayload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.2\",\r\n body: [\r\n {\r\n type: \"RichTextBlock\",\r\n horizontalAlignment: \"right\",\r\n inlines: [\r\n {\r\n type: \"TextRun\",\r\n text: message,\r\n selectAction: {\r\n type: \"Action.Submit\",\r\n id: \"refreshCard\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n\r\n const card = new AdaptiveCard();\r\n card.parse(cardPayload, new SerializationContext(Versions.v1_2));\r\n card.onExecuteAction = (action: Action) => {\r\n if (action.id === \"refreshCard\") {\r\n Utils.clearElementChildren(this._refreshButtonHostElement);\r\n\r\n this.internalExecuteAction(\r\n refreshAction,\r\n ActivityRequestTrigger.Automatic,\r\n 0\r\n );\r\n }\r\n };\r\n\r\n renderedRefreshButton = card.render();\r\n }\r\n\r\n if (renderedRefreshButton) {\r\n Utils.clearElementChildren(this._refreshButtonHostElement);\r\n\r\n this._refreshButtonHostElement.appendChild(renderedRefreshButton);\r\n\r\n this._refreshButtonHostElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n }\r\n\r\n private createActivityRequest(\r\n action: ExecuteAction,\r\n trigger: ActivityRequestTrigger,\r\n consecutiveRefreshes: number\r\n ): ActivityRequest | undefined {\r\n if (this.card) {\r\n const request = new ActivityRequest(action, trigger, consecutiveRefreshes);\r\n request.onSend = (sender: ActivityRequest) => {\r\n sender.attemptNumber++;\r\n\r\n void this.internalSendActivityRequestAsync(request);\r\n };\r\n\r\n const cancel = this.onPrepareActivityRequest\r\n ? !this.onPrepareActivityRequest(this, request, action)\r\n : false;\r\n\r\n return cancel ? undefined : request;\r\n } else {\r\n throw new Error(\"createActivityRequest: no card has been set.\");\r\n }\r\n }\r\n\r\n private createMagicCodeInputCard(attemptNumber: number): AdaptiveCard {\r\n const payload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.0\",\r\n body: [\r\n {\r\n type: \"TextBlock\",\r\n color: \"attention\",\r\n text: attemptNumber === 1 ? undefined : \"That didn't work... let's try again.\",\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"TextBlock\",\r\n text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"',\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"Input.Text\",\r\n id: \"magicCode\",\r\n placeholder: \"Enter magic code\"\r\n },\r\n {\r\n type: \"ActionSet\",\r\n horizontalAlignment: \"center\",\r\n actions: [\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._submitMagicCodeActionId,\r\n title: \"Submit\"\r\n },\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._cancelMagicCodeAuthActionId,\r\n title: \"Cancel\"\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n\r\n const card = new AdaptiveCard();\r\n card.parse(payload);\r\n\r\n return card;\r\n }\r\n\r\n private cancelAutomaticRefresh() {\r\n if (this._allowAutomaticCardUpdate) {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n \"Automatic card refresh has been cancelled as a result of the user interacting with the card.\"\r\n );\r\n }\r\n\r\n this._allowAutomaticCardUpdate = false;\r\n }\r\n\r\n private createSerializationContext(): SerializationContext {\r\n return this.onCreateSerializationContext\r\n ? this.onCreateSerializationContext(this)\r\n : new SerializationContext();\r\n }\r\n\r\n private internalSetCard(payload: any, consecutiveRefreshes: number) {\r\n if (typeof payload === \"object\" && payload[\"type\"] === \"AdaptiveCard\") {\r\n this._cardPayload = payload;\r\n }\r\n\r\n if (this._cardPayload) {\r\n try {\r\n const card = new AdaptiveCard();\r\n\r\n if (this.hostConfig) {\r\n card.hostConfig = this.hostConfig;\r\n }\r\n\r\n const serializationContext = this.createSerializationContext();\r\n\r\n card.parse(this._cardPayload, serializationContext);\r\n\r\n const doChangeCard = this.onCardChanging\r\n ? this.onCardChanging(this, this._cardPayload)\r\n : true;\r\n\r\n if (doChangeCard) {\r\n this._card = card;\r\n\r\n if (\r\n this._card.authentication &&\r\n this._card.authentication.tokenExchangeResource &&\r\n this.onPrefetchSSOToken\r\n ) {\r\n this.onPrefetchSSOToken(\r\n this,\r\n this._card.authentication.tokenExchangeResource\r\n );\r\n }\r\n\r\n this._card.onExecuteAction = (action: Action) => {\r\n // If the user takes an action, cancel any pending automatic refresh\r\n this.cancelAutomaticRefresh();\r\n\r\n this.internalExecuteAction(action, ActivityRequestTrigger.Manual, 0);\r\n };\r\n this._card.onInputValueChanged = (_input: Input) => {\r\n // If the user modifies an input, cancel any pending automatic refresh\r\n this.cancelAutomaticRefresh();\r\n };\r\n\r\n this._card.render();\r\n\r\n if (this._card.renderedElement) {\r\n this.displayCard(this._card);\r\n\r\n if (this.onCardChanged) {\r\n this.onCardChanged(this);\r\n }\r\n\r\n if (this._card.refresh) {\r\n if (\r\n GlobalSettings.applets.refresh.mode ===\r\n Enums.RefreshMode.Automatic &&\r\n consecutiveRefreshes <\r\n GlobalSettings.applets.refresh\r\n .maximumConsecutiveAutomaticRefreshes\r\n ) {\r\n if (\r\n GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <=\r\n 0\r\n ) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Triggering automatic card refresh number \" +\r\n (consecutiveRefreshes + 1)\r\n );\r\n\r\n this.internalExecuteAction(\r\n this._card.refresh.action,\r\n ActivityRequestTrigger.Automatic,\r\n consecutiveRefreshes + 1\r\n );\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Scheduling automatic card refresh number \" +\r\n (consecutiveRefreshes + 1) +\r\n \" in \" +\r\n GlobalSettings.applets.refresh\r\n .timeBetweenAutomaticRefreshes +\r\n \"ms\"\r\n );\r\n\r\n const action = this._card.refresh.action;\r\n\r\n this._allowAutomaticCardUpdate = true;\r\n\r\n window.setTimeout(() => {\r\n if (this._allowAutomaticCardUpdate) {\r\n this.internalExecuteAction(\r\n action,\r\n ActivityRequestTrigger.Automatic,\r\n consecutiveRefreshes + 1\r\n );\r\n }\r\n }, GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);\r\n }\r\n } else if (\r\n GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled\r\n ) {\r\n if (consecutiveRefreshes > 0) {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n \"Stopping automatic refreshes after \" +\r\n consecutiveRefreshes +\r\n \" consecutive refreshes.\"\r\n );\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n \"The card has a refresh section, but automatic refreshes are disabled.\"\r\n );\r\n }\r\n\r\n if (\r\n GlobalSettings.applets.refresh\r\n .allowManualRefreshesAfterAutomaticRefreshes ||\r\n GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual\r\n ) {\r\n logEvent(Enums.LogLevel.Info, \"Showing manual refresh button.\");\r\n\r\n this.showManualRefreshButton(this._card.refresh.action);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n // Ignore all errors\r\n logEvent(Enums.LogLevel.Error, \"setCard: \" + error);\r\n }\r\n }\r\n }\r\n\r\n private internalExecuteAction(\r\n action: Action,\r\n trigger: ActivityRequestTrigger,\r\n consecutiveRefreshes: number\r\n ) {\r\n if (action instanceof ExecuteAction) {\r\n if (this.channelAdapter) {\r\n const request = this.createActivityRequest(action, trigger, consecutiveRefreshes);\r\n\r\n if (request) {\r\n void request.retryAsync();\r\n }\r\n } else {\r\n throw new Error(\"internalExecuteAction: No channel adapter set.\");\r\n }\r\n }\r\n\r\n if (this.onAction) {\r\n this.onAction(this, action);\r\n }\r\n }\r\n\r\n private createProgressOverlay(request: ActivityRequest): HTMLElement | undefined {\r\n if (!this._progressOverlay) {\r\n if (this.onCreateProgressOverlay) {\r\n this._progressOverlay = this.onCreateProgressOverlay(this, request);\r\n } else {\r\n this._progressOverlay = document.createElement(\"div\");\r\n this._progressOverlay.className = \"aaf-progress-overlay\";\r\n\r\n const spinner = document.createElement(\"div\");\r\n spinner.className = \"aaf-spinner\";\r\n spinner.style.width = \"28px\";\r\n spinner.style.height = \"28px\";\r\n\r\n this._progressOverlay.appendChild(spinner);\r\n }\r\n }\r\n\r\n return this._progressOverlay;\r\n }\r\n\r\n private removeProgressOverlay(request: IActivityRequest) {\r\n if (this.onRemoveProgressOverlay) {\r\n this.onRemoveProgressOverlay(this, request);\r\n }\r\n\r\n if (this._progressOverlay !== undefined) {\r\n this.renderedElement.removeChild(this._progressOverlay);\r\n\r\n this._progressOverlay = undefined;\r\n }\r\n }\r\n\r\n private activityRequestSucceeded(\r\n response: SuccessResponse,\r\n parsedContent: string | AdaptiveCard | undefined\r\n ) {\r\n if (this.onActivityRequestSucceeded) {\r\n this.onActivityRequestSucceeded(this, response, parsedContent);\r\n }\r\n }\r\n\r\n private activityRequestFailed(response: ErrorResponse): number {\r\n return this.onActivityRequestFailed\r\n ? this.onActivityRequestFailed(this, response)\r\n : GlobalSettings.applets.defaultTimeBetweenRetryAttempts;\r\n }\r\n\r\n private showAuthCodeInputDialog(request: ActivityRequest) {\r\n const showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog\r\n ? this.onShowAuthCodeInputDialog(this, request)\r\n : true;\r\n\r\n if (showBuiltInAuthCodeInputCard) {\r\n const authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);\r\n authCodeInputCard.render();\r\n authCodeInputCard.onExecuteAction = (submitMagicCodeAction: Action) => {\r\n if (this.card && submitMagicCodeAction instanceof SubmitAction) {\r\n switch (submitMagicCodeAction.id) {\r\n case AdaptiveApplet._submitMagicCodeActionId:\r\n let authCode: string | undefined = undefined;\r\n\r\n if (\r\n submitMagicCodeAction.data &&\r\n typeof (submitMagicCodeAction.data)[\"magicCode\"] === \"string\"\r\n ) {\r\n authCode = (submitMagicCodeAction.data)[\"magicCode\"];\r\n }\r\n\r\n if (authCode) {\r\n this.displayCard(this.card);\r\n\r\n request.authCode = authCode;\r\n void request.retryAsync();\r\n } else {\r\n alert(\"Please enter the magic code you received.\");\r\n }\r\n\r\n break;\r\n case AdaptiveApplet._cancelMagicCodeAuthActionId:\r\n logEvent(Enums.LogLevel.Warning, \"Authentication cancelled by user.\");\r\n\r\n this.displayCard(this.card);\r\n\r\n break;\r\n default:\r\n logEvent(\r\n Enums.LogLevel.Error,\r\n \"Unexpected action taken from magic code input card (id = \" +\r\n submitMagicCodeAction.id +\r\n \")\"\r\n );\r\n\r\n alert(Strings.magicCodeInputCard.somethingWentWrong());\r\n\r\n break;\r\n }\r\n }\r\n };\r\n\r\n this.displayCard(authCodeInputCard);\r\n }\r\n }\r\n\r\n private async internalSendActivityRequestAsync(request: ActivityRequest) {\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendActivityRequestAsync: channelAdapter is not set.\");\r\n }\r\n\r\n const overlay = this.createProgressOverlay(request);\r\n\r\n if (overlay !== undefined) {\r\n this.renderedElement.appendChild(overlay);\r\n }\r\n\r\n let done = false;\r\n\r\n while (!done) {\r\n let response: ActivityResponse | undefined = undefined;\r\n\r\n if (request.attemptNumber === 1) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Sending activity request to channel (attempt \" + request.attemptNumber + \")\"\r\n );\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Re-sending activity request to channel (attempt \" + request.attemptNumber + \")\"\r\n );\r\n }\r\n\r\n try {\r\n response = await this.channelAdapter.sendRequestAsync(request);\r\n } catch (error) {\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error);\r\n\r\n this.removeProgressOverlay(request);\r\n\r\n done = true;\r\n }\r\n\r\n if (response) {\r\n if (response instanceof SuccessResponse) {\r\n this.removeProgressOverlay(request);\r\n\r\n if (response.rawContent === undefined) {\r\n throw new Error(\r\n \"internalSendActivityRequestAsync: Action.Execute result is undefined\"\r\n );\r\n }\r\n\r\n let parsedContent = response.rawContent;\r\n\r\n try {\r\n parsedContent = JSON.parse(response.rawContent);\r\n } catch {\r\n // Leave parseContent as is\r\n }\r\n\r\n if (typeof parsedContent === \"string\") {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"The activity request returned a string after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\"\r\n );\r\n\r\n this.activityRequestSucceeded(response, parsedContent);\r\n } else if (\r\n typeof parsedContent === \"object\" &&\r\n parsedContent[\"type\"] === \"AdaptiveCard\"\r\n ) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"The activity request returned an Adaptive Card after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\"\r\n );\r\n\r\n this.internalSetCard(parsedContent, request.consecutiveRefreshes);\r\n this.activityRequestSucceeded(response, this.card);\r\n } else {\r\n throw new Error(\r\n \"internalSendActivityRequestAsync: Action.Execute result is of unsupported type (\" +\r\n typeof response.rawContent +\r\n \")\"\r\n );\r\n }\r\n\r\n done = true;\r\n } else if (response instanceof ErrorResponse) {\r\n const retryIn: number = this.activityRequestFailed(response);\r\n\r\n if (\r\n retryIn >= 0 &&\r\n request.attemptNumber < GlobalSettings.applets.maximumRetryAttempts\r\n ) {\r\n logEvent(\r\n Enums.LogLevel.Warning,\r\n `Activity request failed: ${response.error.message}. Retrying in ${retryIn}ms`\r\n );\r\n\r\n request.attemptNumber++;\r\n\r\n await new Promise((resolve, _reject) => {\r\n window.setTimeout(() => {\r\n resolve();\r\n }, retryIn);\r\n });\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Error,\r\n `Activity request failed: ${response.error.message}. Giving up after ${request.attemptNumber} attempt(s)`\r\n );\r\n\r\n this.removeProgressOverlay(request);\r\n\r\n done = true;\r\n }\r\n } else if (response instanceof LoginRequestResponse) {\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"The activity request returned a LoginRequestResponse after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\"\r\n );\r\n\r\n if (request.attemptNumber <= GlobalSettings.applets.maximumRetryAttempts) {\r\n let attemptOAuth = true;\r\n\r\n if (response.tokenExchangeResource && this.onSSOTokenNeeded) {\r\n // Attempt to use SSO. The host will return true if it can handle SSO, in which case\r\n // we bypass OAuth\r\n attemptOAuth = !this.onSSOTokenNeeded(\r\n this,\r\n request,\r\n response.tokenExchangeResource\r\n );\r\n }\r\n\r\n if (attemptOAuth) {\r\n // Attempt to use OAuth\r\n this.removeProgressOverlay(request);\r\n\r\n if (response.signinButton === undefined) {\r\n throw new Error(\r\n \"internalSendActivityRequestAsync: the login request doesn't contain a valid signin URL.\"\r\n );\r\n }\r\n\r\n logEvent(\r\n Enums.LogLevel.Info,\r\n \"Login required at \" + response.signinButton.value\r\n );\r\n\r\n if (this.onShowSigninPrompt) {\r\n // Bypass the built-in auth prompt if the host app handles it\r\n this.onShowSigninPrompt(this, request, response.signinButton);\r\n } else {\r\n this.showAuthCodeInputDialog(request);\r\n\r\n const left =\r\n window.screenX +\r\n (window.outerWidth - GlobalSettings.applets.authPromptWidth) /\r\n 2;\r\n const top =\r\n window.screenY +\r\n (window.outerHeight - GlobalSettings.applets.authPromptHeight) /\r\n 2;\r\n\r\n window.open(\r\n response.signinButton.value,\r\n response.signinButton.title\r\n ? response.signinButton.title\r\n : \"Sign in\",\r\n `width=${GlobalSettings.applets.authPromptWidth},height=${GlobalSettings.applets.authPromptHeight},left=${left},top=${top}`\r\n );\r\n }\r\n }\r\n } else {\r\n logEvent(\r\n Enums.LogLevel.Error,\r\n \"Authentication failed. Giving up after \" +\r\n request.attemptNumber +\r\n \" attempt(s)\"\r\n );\r\n\r\n alert(Strings.magicCodeInputCard.authenticationFailed());\r\n }\r\n\r\n // Exit the loop. After a LoginRequestResponse, the host app is responsible for retrying the request\r\n break;\r\n } else {\r\n throw new Error(\"Unhandled response type: \" + JSON.stringify(response));\r\n }\r\n }\r\n }\r\n }\r\n\r\n readonly renderedElement: HTMLElement;\r\n\r\n hostConfig?: HostConfig;\r\n channelAdapter?: ChannelAdapter;\r\n\r\n onCardChanging?: (sender: AdaptiveApplet, card: any) => boolean;\r\n onCardChanged?: (sender: AdaptiveApplet) => void;\r\n onPrefetchSSOToken?: (\r\n sender: AdaptiveApplet,\r\n tokenExchangeResource: TokenExchangeResource\r\n ) => void;\r\n onSSOTokenNeeded?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest,\r\n tokenExchangeResource: TokenExchangeResource\r\n ) => boolean;\r\n onPrepareActivityRequest?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest,\r\n action: ExecuteAction\r\n ) => boolean;\r\n onActivityRequestSucceeded?: (\r\n sender: AdaptiveApplet,\r\n response: SuccessResponse,\r\n parsedContent: string | AdaptiveCard | undefined\r\n ) => void;\r\n onActivityRequestFailed?: (sender: AdaptiveApplet, response: ErrorResponse) => number;\r\n onCreateSerializationContext?: (sender: AdaptiveApplet) => SerializationContext;\r\n onCreateProgressOverlay?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest\r\n ) => HTMLElement | undefined;\r\n onRemoveProgressOverlay?: (sender: AdaptiveApplet, request: IActivityRequest) => void;\r\n onRenderManualRefreshButton?: (sender: AdaptiveApplet) => HTMLElement | undefined;\r\n onAction?: (sender: AdaptiveApplet, action: Action) => void;\r\n onShowManualRefreshButton?: (sender: AdaptiveApplet) => boolean;\r\n onShowAuthCodeInputDialog?: (sender: AdaptiveApplet, request: IActivityRequest) => boolean;\r\n onShowSigninPrompt?: (\r\n sender: AdaptiveApplet,\r\n request: IActivityRequest,\r\n signinButton: AuthCardButton\r\n ) => void;\r\n\r\n constructor() {\r\n this.renderedElement = document.createElement(\"div\");\r\n this.renderedElement.className = \"aaf-cardHost\";\r\n this.renderedElement.style.position = \"relative\";\r\n this.renderedElement.style.display = \"flex\";\r\n this.renderedElement.style.flexDirection = \"column\";\r\n\r\n this._cardHostElement = document.createElement(\"div\");\r\n\r\n this._refreshButtonHostElement = document.createElement(\"div\");\r\n this._refreshButtonHostElement.className = \"aaf-refreshButtonHost\";\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n\r\n this.renderedElement.appendChild(this._cardHostElement);\r\n this.renderedElement.appendChild(this._refreshButtonHostElement);\r\n }\r\n\r\n refreshCard() {\r\n if (this._card && this._card.refresh) {\r\n this.internalExecuteAction(this._card.refresh.action, ActivityRequestTrigger.Manual, 0);\r\n }\r\n }\r\n\r\n setCard(payload: any) {\r\n this.internalSetCard(payload, 0);\r\n }\r\n\r\n get card(): AdaptiveCard | undefined {\r\n return this._card;\r\n }\r\n}\r\n", "// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport * from \"./strings\";\r\nexport * from \"./enums\";\r\nexport * from \"./shared\";\r\nexport * from \"./utils\";\r\nexport * from \"./serialization\";\r\nexport * from \"./host-capabilities\";\r\nexport * from \"./host-config\";\r\nexport * from \"./registry\";\r\nexport * from \"./card-object\";\r\nexport * from \"./card-elements\";\r\nexport * from \"./table\";\r\nexport * from \"./channel-adapter\";\r\nexport * from \"./activity-request\";\r\nexport * from \"./adaptive-applet\";\r\n\r\nexport { IAdaptiveCard, ICardElement } from \"./schema\";\r\n"],
+ "mappings": ";;;;;;;;;;AAIA,QAAA;;MAAA,WAAA;AAAA,iBAAAA,WAAA;QA+FA;AA9FoB,QAAAA,SAAA,SAAS;UACrB,oBAAoB,SAAC,UAAgB;AACjC,mBAAA,yBAAA,OAAyB,UAAQ,sCAAA;UAAjC;UACJ,mBAAmB,SAAC,UAAgB;AAChC,mBAAA,wBAAA,OAAwB,UAAQ,sCAAA;UAAhC;UACJ,uBAAuB,SAAC,UAAgB;AACpC,mBAAA,iBAAA,OAAiB,UAAQ,mCAAA;UAAzB;UACJ,sBAAsB,SAAC,UAAgB;AACnC,mBAAA,gBAAA,OAAgB,UAAQ,mCAAA;UAAxB;UACJ,sBAAsB,SAAC,OAAY,cAAoB;AACnD,mBAAA,kBAAA,OAAkB,OAAK,kBAAA,EAAA,OAAmB,cAAY,IAAA;UAAtD;UACJ,sBAAsB,WAAA;AAClB,mBAAA;UAAA;UACJ,oBAAoB,SAAC,cAAoB;AACrC,mBAAA,yBAAA,OAAyB,cAAY,2BAAA;UAArC;UACJ,oBAAoB,SAAC,qBAA2B;AAC5C,mBAAA,wCAAA,OAAwC,qBAAmB,IAAA;UAA3D;UACJ,sBAAsB,SAAC,eAAqB;AACxC,mBAAA,2BAAA,OAA2B,eAAa,IAAA;UAAxC;UACJ,2BAA2B,SACvB,OACA,cACA,oBACA,aAAmB;AAEnB,mBAAA,UAAA,OAAU,OAAK,kBAAA,EAAA,OAAmB,cAAY,4BAAA,EAAA,OAA6B,oBAAkB,8BAAA,EAAA,OAA+B,aAAW,GAAA;UAAvI;UACJ,sBAAsB,SAClB,cACA,oBACA,aAAmB;AAEnB,mBAAA,aAAA,OAAa,cAAY,4BAAA,EAAA,OAA6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A,iBAAA,2BAAA,OAAA;;;",
+ "names": ["Strings", "ContainerStyle", "ActionStyle", "ActionMode", "Size", "ImageSize", "SizeUnit", "TextSize", "TextWeight", "FontType", "Spacing", "TextColor", "HorizontalAlignment", "VerticalAlignment", "ActionAlignment", "ImageStyle", "ShowCardActionMode", "Orientation", "FillMode", "ActionIconPlacement", "InputTextStyle", "ValidationPhase", "ValidationEvent", "ContainerFitStatus", "TypeErrorType", "RefreshMode", "LogLevel", "GlobalSettings", "StringWithSubstitutions", "SpacingDefinition", "PaddingDefinition", "SizeAndUnit", "UUID", "_a", "Version", "Versions", "BaseSerializationContext", "SimpleSerializationContext", "PropertyDefinition", "StringProperty", "BoolProperty", "NumProperty", "PixelSizeProperty", "StringArrayProperty", "ValueSetProperty", "EnumProperty", "SerializableObjectProperty", "SerializableObjectCollectionProperty", "CustomProperty", "SerializableObjectSchema", "SerializableObject", "HostCapabilities", "ColorDefinition", "TextColorDefinition", "AdaptiveCardConfig", "ImageSetConfig", "MediaConfig", "TableConfig", "BaseTextDefinition", "TextStyleDefinition", "TextStyleSet", "TextBlockConfig", "RequiredInputLabelTextDefinition", "InputLabelConfig", "InputConfig", "FactTextDefinition", "FactTitleDefinition", "FactSetConfig", "ShowCardActionConfig", "ActionsConfig", "ColorSetDefinition", "ContainerStyleDefinition", "BuiltInContainerStyleDefinition", "ContainerStyleSet", "FontTypeDefinition", "FontTypeSet", "HostConfig", "ElementSingletonBehavior", "CardObjectRegistry", "GlobalRegistry", "ValidationResults", "CardObject", "AbstractTextFormatter", "DateFormatter", "TimeFormatter", "Constants", "MenuItem", "Collection", "PopupControl", "PopupMenu", "CardElement", "ActionProperty", "BaseTextBlock", "TextBlock", "_b", "_a", "anchor", "TextRun", "RichTextBlock", "Fact", "FactSet", "ImageDimensionProperty", "Image", "CardElementContainer", "ImageSet", "ContentSource", "CaptionSource", "MediaSource", "MediaPlayer", "HTML5MediaPlayer", "CustomMediaPlayer", "IFrameMediaMediaPlayer", "VimeoPlayer", "DailymotionPlayer", "YouTubePlayer", "Media", "Input", "TextInput", "ToggleInput", "Choice", "ChoiceSetInput", "NumberInput", "DateInput", "TimeProperty", "TimeInput", "Action", "SubmitActionBase", "SubmitAction", "ExecuteAction", "OpenUrlAction", "ToggleVisibilityAction", "StringWithSubstitutionProperty", "HttpHeader", "HttpAction", "ShowCardAction", "OverflowAction", "i", "ActionCollection", "_i", "action", "ActionSet", "ContainerStyleProperty", "StylableCardElementContainer", "ContainerBase", "BackgroundImage", "Container", "Column", "ColumnSet", "ContainerWithActions", "RefreshActionProperty", "RefreshDefinition", "AuthCardButton", "TokenExchangeResource", "Authentication", "AdaptiveCard", "InlineAdaptiveCard", "SerializationContext", "TableColumnDefinition", "StylableContainer", "TableCell", "TableRow", "Table", "ChannelAdapter", "ActivityRequestTrigger", "ActivityRequestError", "ActivityResponse", "SuccessResponse", "ErrorResponse", "LoginRequestResponse", "ActivityRequest", "AdaptiveApplet"]
+}
diff --git a/docs/.vitepress/cache/deps/apex-QXTPZBD5.js b/docs/.vitepress/cache/deps/apex-QXTPZBD5.js
new file mode 100644
index 0000000..eb7fbde
--- /dev/null
+++ b/docs/.vitepress/cache/deps/apex-QXTPZBD5.js
@@ -0,0 +1,328 @@
+import "./chunk-6PJEDKO5.js";
+
+// node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js
+var conf = {
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+ comments: {
+ lineComment: "//",
+ blockComment: ["/*", "*/"]
+ },
+ brackets: [
+ ["{", "}"],
+ ["[", "]"],
+ ["(", ")"]
+ ],
+ autoClosingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: '"', close: '"' },
+ { open: "'", close: "'" }
+ ],
+ surroundingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: '"', close: '"' },
+ { open: "'", close: "'" },
+ { open: "<", close: ">" }
+ ],
+ folding: {
+ markers: {
+ start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")
+ }
+ }
+};
+var keywords = [
+ "abstract",
+ "activate",
+ "and",
+ "any",
+ "array",
+ "as",
+ "asc",
+ "assert",
+ "autonomous",
+ "begin",
+ "bigdecimal",
+ "blob",
+ "boolean",
+ "break",
+ "bulk",
+ "by",
+ "case",
+ "cast",
+ "catch",
+ "char",
+ "class",
+ "collect",
+ "commit",
+ "const",
+ "continue",
+ "convertcurrency",
+ "decimal",
+ "default",
+ "delete",
+ "desc",
+ "do",
+ "double",
+ "else",
+ "end",
+ "enum",
+ "exception",
+ "exit",
+ "export",
+ "extends",
+ "false",
+ "final",
+ "finally",
+ "float",
+ "for",
+ "from",
+ "future",
+ "get",
+ "global",
+ "goto",
+ "group",
+ "having",
+ "hint",
+ "if",
+ "implements",
+ "import",
+ "in",
+ "inner",
+ "insert",
+ "instanceof",
+ "int",
+ "interface",
+ "into",
+ "join",
+ "last_90_days",
+ "last_month",
+ "last_n_days",
+ "last_week",
+ "like",
+ "limit",
+ "list",
+ "long",
+ "loop",
+ "map",
+ "merge",
+ "native",
+ "new",
+ "next_90_days",
+ "next_month",
+ "next_n_days",
+ "next_week",
+ "not",
+ "null",
+ "nulls",
+ "number",
+ "object",
+ "of",
+ "on",
+ "or",
+ "outer",
+ "override",
+ "package",
+ "parallel",
+ "pragma",
+ "private",
+ "protected",
+ "public",
+ "retrieve",
+ "return",
+ "returning",
+ "rollback",
+ "savepoint",
+ "search",
+ "select",
+ "set",
+ "short",
+ "sort",
+ "stat",
+ "static",
+ "strictfp",
+ "super",
+ "switch",
+ "synchronized",
+ "system",
+ "testmethod",
+ "then",
+ "this",
+ "this_month",
+ "this_week",
+ "throw",
+ "throws",
+ "today",
+ "tolabel",
+ "tomorrow",
+ "transaction",
+ "transient",
+ "trigger",
+ "true",
+ "try",
+ "type",
+ "undelete",
+ "update",
+ "upsert",
+ "using",
+ "virtual",
+ "void",
+ "volatile",
+ "webservice",
+ "when",
+ "where",
+ "while",
+ "yesterday"
+];
+var uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1);
+var keywordsWithCaseVariations = [];
+keywords.forEach((lowercase) => {
+ keywordsWithCaseVariations.push(lowercase);
+ keywordsWithCaseVariations.push(lowercase.toUpperCase());
+ keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
+});
+var language = {
+ defaultToken: "",
+ tokenPostfix: ".apex",
+ keywords: keywordsWithCaseVariations,
+ operators: [
+ "=",
+ ">",
+ "<",
+ "!",
+ "~",
+ "?",
+ ":",
+ "==",
+ "<=",
+ ">=",
+ "!=",
+ "&&",
+ "||",
+ "++",
+ "--",
+ "+",
+ "-",
+ "*",
+ "/",
+ "&",
+ "|",
+ "^",
+ "%",
+ "<<",
+ ">>",
+ ">>>",
+ "+=",
+ "-=",
+ "*=",
+ "/=",
+ "&=",
+ "|=",
+ "^=",
+ "%=",
+ "<<=",
+ ">>=",
+ ">>>="
+ ],
+ symbols: /[=>](?!@symbols)/, "@brackets"],
+ [
+ /@symbols/,
+ {
+ cases: {
+ "@operators": "delimiter",
+ "@default": ""
+ }
+ }
+ ],
+ [/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"],
+ [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"],
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"],
+ [/(@digits)[fFdD]/, "number.float"],
+ [/(@digits)[lL]?/, "number"],
+ [/[;,.]/, "delimiter"],
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
+ [/"/, "string", '@string."'],
+ [/'/, "string", "@string.'"],
+ [/'[^\\']'/, "string"],
+ [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
+ [/'/, "string.invalid"]
+ ],
+ whitespace: [
+ [/[ \t\r\n]+/, ""],
+ [/\/\*\*(?!\/)/, "comment.doc", "@apexdoc"],
+ [/\/\*/, "comment", "@comment"],
+ [/\/\/.*$/, "comment"]
+ ],
+ comment: [
+ [/[^\/*]+/, "comment"],
+ [/\*\//, "comment", "@pop"],
+ [/[\/*]/, "comment"]
+ ],
+ apexdoc: [
+ [/[^\/*]+/, "comment.doc"],
+ [/\*\//, "comment.doc", "@pop"],
+ [/[\/*]/, "comment.doc"]
+ ],
+ string: [
+ [/[^\\"']+/, "string"],
+ [/@escapes/, "string.escape"],
+ [/\\./, "string.escape.invalid"],
+ [
+ /["']/,
+ {
+ cases: {
+ "$#==$S2": { token: "string", next: "@pop" },
+ "@default": "string"
+ }
+ }
+ ]
+ ]
+ }
+};
+export {
+ conf,
+ language
+};
+/*! Bundled license information:
+
+monaco-editor/esm/vs/basic-languages/apex/apex.js:
+ (*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*)
+*/
+//# sourceMappingURL=apex-QXTPZBD5.js.map
diff --git a/docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map b/docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map
new file mode 100644
index 0000000..8f5dfe5
--- /dev/null
+++ b/docs/.vitepress/cache/deps/apex-QXTPZBD5.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js"],
+ "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/apex/apex.ts\nvar conf = {\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\n comments: {\n lineComment: \"//\",\n blockComment: [\"/*\", \"*/\"]\n },\n brackets: [\n [\"{\", \"}\"],\n [\"[\", \"]\"],\n [\"(\", \")\"]\n ],\n autoClosingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" }\n ],\n surroundingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n { open: \"<\", close: \">\" }\n ],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:))\")\n }\n }\n};\nvar keywords = [\n \"abstract\",\n \"activate\",\n \"and\",\n \"any\",\n \"array\",\n \"as\",\n \"asc\",\n \"assert\",\n \"autonomous\",\n \"begin\",\n \"bigdecimal\",\n \"blob\",\n \"boolean\",\n \"break\",\n \"bulk\",\n \"by\",\n \"case\",\n \"cast\",\n \"catch\",\n \"char\",\n \"class\",\n \"collect\",\n \"commit\",\n \"const\",\n \"continue\",\n \"convertcurrency\",\n \"decimal\",\n \"default\",\n \"delete\",\n \"desc\",\n \"do\",\n \"double\",\n \"else\",\n \"end\",\n \"enum\",\n \"exception\",\n \"exit\",\n \"export\",\n \"extends\",\n \"false\",\n \"final\",\n \"finally\",\n \"float\",\n \"for\",\n \"from\",\n \"future\",\n \"get\",\n \"global\",\n \"goto\",\n \"group\",\n \"having\",\n \"hint\",\n \"if\",\n \"implements\",\n \"import\",\n \"in\",\n \"inner\",\n \"insert\",\n \"instanceof\",\n \"int\",\n \"interface\",\n \"into\",\n \"join\",\n \"last_90_days\",\n \"last_month\",\n \"last_n_days\",\n \"last_week\",\n \"like\",\n \"limit\",\n \"list\",\n \"long\",\n \"loop\",\n \"map\",\n \"merge\",\n \"native\",\n \"new\",\n \"next_90_days\",\n \"next_month\",\n \"next_n_days\",\n \"next_week\",\n \"not\",\n \"null\",\n \"nulls\",\n \"number\",\n \"object\",\n \"of\",\n \"on\",\n \"or\",\n \"outer\",\n \"override\",\n \"package\",\n \"parallel\",\n \"pragma\",\n \"private\",\n \"protected\",\n \"public\",\n \"retrieve\",\n \"return\",\n \"returning\",\n \"rollback\",\n \"savepoint\",\n \"search\",\n \"select\",\n \"set\",\n \"short\",\n \"sort\",\n \"stat\",\n \"static\",\n \"strictfp\",\n \"super\",\n \"switch\",\n \"synchronized\",\n \"system\",\n \"testmethod\",\n \"then\",\n \"this\",\n \"this_month\",\n \"this_week\",\n \"throw\",\n \"throws\",\n \"today\",\n \"tolabel\",\n \"tomorrow\",\n \"transaction\",\n \"transient\",\n \"trigger\",\n \"true\",\n \"try\",\n \"type\",\n \"undelete\",\n \"update\",\n \"upsert\",\n \"using\",\n \"virtual\",\n \"void\",\n \"volatile\",\n \"webservice\",\n \"when\",\n \"where\",\n \"while\",\n \"yesterday\"\n];\nvar uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1);\nvar keywordsWithCaseVariations = [];\nkeywords.forEach((lowercase) => {\n keywordsWithCaseVariations.push(lowercase);\n keywordsWithCaseVariations.push(lowercase.toUpperCase());\n keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));\n});\nvar language = {\n defaultToken: \"\",\n tokenPostfix: \".apex\",\n keywords: keywordsWithCaseVariations,\n operators: [\n \"=\",\n \">\",\n \"<\",\n \"!\",\n \"~\",\n \"?\",\n \":\",\n \"==\",\n \"<=\",\n \">=\",\n \"!=\",\n \"&&\",\n \"||\",\n \"++\",\n \"--\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"&\",\n \"|\",\n \"^\",\n \"%\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+=\",\n \"-=\",\n \"*=\",\n \"/=\",\n \"&=\",\n \"|=\",\n \"^=\",\n \"%=\",\n \"<<=\",\n \">>=\",\n \">>>=\"\n ],\n symbols: /[=>](?!@symbols)/, \"@brackets\"],\n [\n /@symbols/,\n {\n cases: {\n \"@operators\": \"delimiter\",\n \"@default\": \"\"\n }\n }\n ],\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, \"annotation\"],\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, \"number.float\"],\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, \"number.float\"],\n [/(@digits)[fFdD]/, \"number.float\"],\n [/(@digits)[lL]?/, \"number\"],\n [/[;,.]/, \"delimiter\"],\n [/\"([^\"\\\\]|\\\\.)*$/, \"string.invalid\"],\n [/'([^'\\\\]|\\\\.)*$/, \"string.invalid\"],\n [/\"/, \"string\", '@string.\"'],\n [/'/, \"string\", \"@string.'\"],\n [/'[^\\\\']'/, \"string\"],\n [/(')(@escapes)(')/, [\"string\", \"string.escape\", \"string\"]],\n [/'/, \"string.invalid\"]\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, \"\"],\n [/\\/\\*\\*(?!\\/)/, \"comment.doc\", \"@apexdoc\"],\n [/\\/\\*/, \"comment\", \"@comment\"],\n [/\\/\\/.*$/, \"comment\"]\n ],\n comment: [\n [/[^\\/*]+/, \"comment\"],\n [/\\*\\//, \"comment\", \"@pop\"],\n [/[\\/*]/, \"comment\"]\n ],\n apexdoc: [\n [/[^\\/*]+/, \"comment.doc\"],\n [/\\*\\//, \"comment.doc\", \"@pop\"],\n [/[\\/*]/, \"comment.doc\"]\n ],\n string: [\n [/[^\\\\\"']+/, \"string\"],\n [/@escapes/, \"string.escape\"],\n [/\\\\./, \"string.escape.invalid\"],\n [\n /[\"']/,\n {\n cases: {\n \"$#==$S2\": { token: \"string\", next: \"@pop\" },\n \"@default\": \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AA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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AAA,UACE,OAAO;AAAA,YACL,WAAW,EAAE,OAAO,UAAU,MAAM,OAAO;AAAA,YAC3C,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
+ "names": []
+}
diff --git a/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js b/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js
new file mode 100644
index 0000000..302ff84
--- /dev/null
+++ b/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js
@@ -0,0 +1,83 @@
+import "./chunk-6PJEDKO5.js";
+
+// node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js
+var conf = {
+ comments: {
+ lineComment: "#"
+ }
+};
+var language = {
+ defaultToken: "keyword",
+ ignoreCase: true,
+ tokenPostfix: ".azcli",
+ str: /[^#\s]/,
+ tokenizer: {
+ root: [
+ { include: "@comment" },
+ [
+ /\s-+@str*\s*/,
+ {
+ cases: {
+ "@eos": { token: "key.identifier", next: "@popall" },
+ "@default": { token: "key.identifier", next: "@type" }
+ }
+ }
+ ],
+ [
+ /^-+@str*\s*/,
+ {
+ cases: {
+ "@eos": { token: "key.identifier", next: "@popall" },
+ "@default": { token: "key.identifier", next: "@type" }
+ }
+ }
+ ]
+ ],
+ type: [
+ { include: "@comment" },
+ [
+ /-+@str*\s*/,
+ {
+ cases: {
+ "@eos": { token: "key.identifier", next: "@popall" },
+ "@default": "key.identifier"
+ }
+ }
+ ],
+ [
+ /@str+\s*/,
+ {
+ cases: {
+ "@eos": { token: "string", next: "@popall" },
+ "@default": "string"
+ }
+ }
+ ]
+ ],
+ comment: [
+ [
+ /#.*$/,
+ {
+ cases: {
+ "@eos": { token: "comment", next: "@popall" }
+ }
+ }
+ ]
+ ]
+ }
+};
+export {
+ conf,
+ language
+};
+/*! Bundled license information:
+
+monaco-editor/esm/vs/basic-languages/azcli/azcli.js:
+ (*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*)
+*/
+//# sourceMappingURL=azcli-AKNZCCZ4.js.map
diff --git a/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map b/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map
new file mode 100644
index 0000000..c9a449f
--- /dev/null
+++ b/docs/.vitepress/cache/deps/azcli-AKNZCCZ4.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js"],
+ "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/azcli/azcli.ts\nvar conf = {\n comments: {\n lineComment: \"#\"\n }\n};\nvar language = {\n defaultToken: \"keyword\",\n ignoreCase: true,\n tokenPostfix: \".azcli\",\n str: /[^#\\s]/,\n tokenizer: {\n root: [\n { include: \"@comment\" },\n [\n /\\s-+@str*\\s*/,\n {\n cases: {\n \"@eos\": { token: \"key.identifier\", next: \"@popall\" },\n \"@default\": { token: \"key.identifier\", next: \"@type\" }\n }\n }\n ],\n [\n /^-+@str*\\s*/,\n {\n cases: {\n \"@eos\": { token: \"key.identifier\", next: \"@popall\" },\n \"@default\": { token: \"key.identifier\", next: \"@type\" }\n }\n }\n ]\n ],\n type: [\n { include: \"@comment\" },\n [\n /-+@str*\\s*/,\n {\n cases: {\n \"@eos\": { token: \"key.identifier\", next: \"@popall\" },\n \"@default\": \"key.identifier\"\n }\n }\n ],\n [\n /@str+\\s*/,\n {\n cases: {\n \"@eos\": { token: \"string\", next: \"@popall\" },\n \"@default\": \"string\"\n }\n }\n ]\n ],\n comment: [\n [\n /#.*$/,\n {\n cases: {\n \"@eos\": { token: \"comment\", next: \"@popall\" }\n }\n }\n ]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"],
+ "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,UAAU;AAAA,IACR,aAAa;AAAA,EACf;AACF;AACA,IAAI,WAAW;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,KAAK;AAAA,EACL,WAAW;AAAA,IACT,MAAM;AAAA,MACJ,EAAE,SAAS,WAAW;AAAA,MACtB;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,kBAAkB,MAAM,UAAU;AAAA,YACnD,YAAY,EAAE,OAAO,kBAAkB,MAAM,QAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,kBAAkB,MAAM,UAAU;AAAA,YACnD,YAAY,EAAE,OAAO,kBAAkB,MAAM,QAAQ;AAAA,UACvD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,EAAE,SAAS,WAAW;AAAA,MACtB;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,kBAAkB,MAAM,UAAU;AAAA,YACnD,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,UAAU,MAAM,UAAU;AAAA,YAC3C,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,QACE;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL,QAAQ,EAAE,OAAO,WAAW,MAAM,UAAU;AAAA,UAC9C;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
+ "names": []
+}
diff --git a/docs/.vitepress/cache/deps/bat-KITOMZVG.js b/docs/.vitepress/cache/deps/bat-KITOMZVG.js
new file mode 100644
index 0000000..06e09e4
--- /dev/null
+++ b/docs/.vitepress/cache/deps/bat-KITOMZVG.js
@@ -0,0 +1,104 @@
+import "./chunk-6PJEDKO5.js";
+
+// node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.js
+var conf = {
+ comments: {
+ lineComment: "REM"
+ },
+ brackets: [
+ ["{", "}"],
+ ["[", "]"],
+ ["(", ")"]
+ ],
+ autoClosingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: '"', close: '"' }
+ ],
+ surroundingPairs: [
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: '"', close: '"' }
+ ],
+ folding: {
+ markers: {
+ start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"),
+ end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")
+ }
+ }
+};
+var language = {
+ defaultToken: "",
+ ignoreCase: true,
+ tokenPostfix: ".bat",
+ brackets: [
+ { token: "delimiter.bracket", open: "{", close: "}" },
+ { token: "delimiter.parenthesis", open: "(", close: ")" },
+ { token: "delimiter.square", open: "[", close: "]" }
+ ],
+ keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,
+ symbols: /[=> `\\b${text}\\b`;
+var identifierStart = "[_a-zA-Z]";
+var identifierContinue = "[_a-zA-Z0-9]";
+var identifier = bounded(`${identifierStart}${identifierContinue}*`);
+var keywords = [
+ "targetScope",
+ "resource",
+ "module",
+ "param",
+ "var",
+ "output",
+ "for",
+ "in",
+ "if",
+ "existing"
+];
+var namedLiterals = ["true", "false", "null"];
+var nonCommentWs = `[ \\t\\r\\n]`;
+var numericLiteral = `[0-9]+`;
+var conf = {
+ comments: {
+ lineComment: "//",
+ blockComment: ["/*", "*/"]
+ },
+ brackets: [
+ ["{", "}"],
+ ["[", "]"],
+ ["(", ")"]
+ ],
+ surroundingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: "'", close: "'" },
+ { open: "'''", close: "'''" }
+ ],
+ autoClosingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: "'", close: "'", notIn: ["string", "comment"] },
+ { open: "'''", close: "'''", notIn: ["string", "comment"] }
+ ],
+ autoCloseBefore: ":.,=}])' \n ",
+ indentationRules: {
+ increaseIndentPattern: new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),
+ decreaseIndentPattern: new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")
+ }
+};
+var language = {
+ defaultToken: "",
+ tokenPostfix: ".bicep",
+ brackets: [
+ { open: "{", close: "}", token: "delimiter.curly" },
+ { open: "[", close: "]", token: "delimiter.square" },
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
+ ],
+ symbols: /[=> `\\\\b${text}\\\\b`;\nvar identifierStart = \"[_a-zA-Z]\";\nvar identifierContinue = \"[_a-zA-Z0-9]\";\nvar identifier = bounded(`${identifierStart}${identifierContinue}*`);\nvar keywords = [\n \"targetScope\",\n \"resource\",\n \"module\",\n \"param\",\n \"var\",\n \"output\",\n \"for\",\n \"in\",\n \"if\",\n \"existing\"\n];\nvar namedLiterals = [\"true\", \"false\", \"null\"];\nvar nonCommentWs = `[ \\\\t\\\\r\\\\n]`;\nvar numericLiteral = `[0-9]+`;\nvar conf = {\n comments: {\n lineComment: \"//\",\n blockComment: [\"/*\", \"*/\"]\n },\n brackets: [\n [\"{\", \"}\"],\n [\"[\", \"]\"],\n [\"(\", \")\"]\n ],\n surroundingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"'\", close: \"'\" },\n { open: \"'''\", close: \"'''\" }\n ],\n autoClosingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"'\", close: \"'\", notIn: [\"string\", \"comment\"] },\n { open: \"'''\", close: \"'''\", notIn: [\"string\", \"comment\"] }\n ],\n autoCloseBefore: \":.,=}])' \\n\t\",\n indentationRules: {\n increaseIndentPattern: new RegExp(\"^((?!\\\\/\\\\/).)*(\\\\{[^}\\\"'`]*|\\\\([^)\\\"'`]*|\\\\[[^\\\\]\\\"'`]*)$\"),\n decreaseIndentPattern: new RegExp(\"^((?!.*?\\\\/\\\\*).*\\\\*/)?\\\\s*[\\\\}\\\\]].*$\")\n }\n};\nvar language = {\n defaultToken: \"\",\n tokenPostfix: \".bicep\",\n brackets: [\n { open: \"{\", close: \"}\", token: \"delimiter.curly\" },\n { open: \"[\", close: \"]\", token: \"delimiter.square\" },\n { open: \"(\", close: \")\", token: \"delimiter.parenthesis\" }\n ],\n symbols: /[=>"]
+ ],
+ autoClosingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: "<", close: ">" },
+ { open: "'", close: "'" },
+ { open: '"', close: '"' },
+ { open: "(*", close: "*)" }
+ ],
+ surroundingPairs: [
+ { open: "{", close: "}" },
+ { open: "[", close: "]" },
+ { open: "(", close: ")" },
+ { open: "<", close: ">" },
+ { open: "'", close: "'" },
+ { open: '"', close: '"' },
+ { open: "(*", close: "*)" }
+ ]
+};
+var language = {
+ defaultToken: "",
+ tokenPostfix: ".cameligo",
+ ignoreCase: true,
+ brackets: [
+ { open: "{", close: "}", token: "delimiter.curly" },
+ { open: "[", close: "]", token: "delimiter.square" },
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
+ { open: "<", close: ">", token: "delimiter.angle" }
+ ],
+ keywords: [
+ "abs",
+ "assert",
+ "block",
+ "Bytes",
+ "case",
+ "Crypto",
+ "Current",
+ "else",
+ "failwith",
+ "false",
+ "for",
+ "fun",
+ "if",
+ "in",
+ "let",
+ "let%entry",
+ "let%init",
+ "List",
+ "list",
+ "Map",
+ "map",
+ "match",
+ "match%nat",
+ "mod",
+ "not",
+ "operation",
+ "Operation",
+ "of",
+ "record",
+ "Set",
+ "set",
+ "sender",
+ "skip",
+ "source",
+ "String",
+ "then",
+ "to",
+ "true",
+ "type",
+ "with"
+ ],
+ typeKeywords: ["int", "unit", "string", "tz", "nat", "bool"],
+ operators: [
+ "=",
+ ">",
+ "<",
+ "<=",
+ ">=",
+ "<>",
+ ":",
+ ":=",
+ "and",
+ "mod",
+ "or",
+ "+",
+ "-",
+ "*",
+ "/",
+ "@",
+ "&",
+ "^",
+ "%",
+ "->",
+ "<-",
+ "&&",
+ "||"
+ ],
+ symbols: /[=><:@\^&|+\-*\/\^%]+/,
+ tokenizer: {
+ root: [
+ [
+ /[a-zA-Z_][\w]*/,
+ {
+ cases: {
+ "@keywords": { token: "keyword.$0" },
+ "@default": "identifier"
+ }
+ }
+ ],
+ { include: "@whitespace" },
+ [/[{}()\[\]]/, "@brackets"],
+ [/[<>](?!@symbols)/, "@brackets"],
+ [
+ /@symbols/,
+ {
+ cases: {
+ "@operators": "delimiter",
+ "@default": ""
+ }
+ }
+ ],
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
+ [/\$[0-9a-fA-F]{1,16}/, "number.hex"],
+ [/\d+/, "number"],
+ [/[;,.]/, "delimiter"],
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
+ [/'/, "string", "@string"],
+ [/'[^\\']'/, "string"],
+ [/'/, "string.invalid"],
+ [/\#\d+/, "string"]
+ ],
+ comment: [
+ [/[^\(\*]+/, "comment"],
+ [/\*\)/, "comment", "@pop"],
+ [/\(\*/, "comment"]
+ ],
+ string: [
+ [/[^\\']+/, "string"],
+ [/\\./, "string.escape.invalid"],
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
+ ],
+ whitespace: [
+ [/[ \t\r\n]+/, "white"],
+ [/\(\*/, "comment", "@comment"],
+ [/\/\/.*$/, "comment"]
+ ]
+ }
+};
+export {
+ conf,
+ language
+};
+/*! Bundled license information:
+
+monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js:
+ (*!-----------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)
+ * Released under the MIT license
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
+ *-----------------------------------------------------------------------------*)
+*/
+//# sourceMappingURL=cameligo-47AYWHA2.js.map
diff --git a/docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map b/docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map
new file mode 100644
index 0000000..dcbe86d
--- /dev/null
+++ b/docs/.vitepress/cache/deps/cameligo-47AYWHA2.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../../node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js"],
+ "sourcesContent": ["/*!-----------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Version: 0.41.0(38e1e3d097f84e336c311d071a9ffb5191d4ffd1)\n * Released under the MIT license\n * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt\n *-----------------------------------------------------------------------------*/\n\n// src/basic-languages/cameligo/cameligo.ts\nvar conf = {\n comments: {\n lineComment: \"//\",\n blockComment: [\"(*\", \"*)\"]\n },\n brackets: [\n [\"{\", \"}\"],\n [\"[\", \"]\"],\n [\"(\", \")\"],\n [\"<\", \">\"]\n ],\n autoClosingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"<\", close: \">\" },\n { open: \"'\", close: \"'\" },\n { open: '\"', close: '\"' },\n { open: \"(*\", close: \"*)\" }\n ],\n surroundingPairs: [\n { open: \"{\", close: \"}\" },\n { open: \"[\", close: \"]\" },\n { open: \"(\", close: \")\" },\n { open: \"<\", close: \">\" },\n { open: \"'\", close: \"'\" },\n { open: '\"', close: '\"' },\n { open: \"(*\", close: \"*)\" }\n ]\n};\nvar language = {\n defaultToken: \"\",\n tokenPostfix: \".cameligo\",\n ignoreCase: true,\n brackets: [\n { open: \"{\", close: \"}\", token: \"delimiter.curly\" },\n { open: \"[\", close: \"]\", token: \"delimiter.square\" },\n { open: \"(\", close: \")\", token: \"delimiter.parenthesis\" },\n { open: \"<\", close: \">\", token: \"delimiter.angle\" }\n ],\n keywords: [\n \"abs\",\n \"assert\",\n \"block\",\n \"Bytes\",\n \"case\",\n \"Crypto\",\n \"Current\",\n \"else\",\n \"failwith\",\n \"false\",\n \"for\",\n \"fun\",\n \"if\",\n \"in\",\n \"let\",\n \"let%entry\",\n \"let%init\",\n \"List\",\n \"list\",\n \"Map\",\n \"map\",\n \"match\",\n \"match%nat\",\n \"mod\",\n \"not\",\n \"operation\",\n \"Operation\",\n \"of\",\n \"record\",\n \"Set\",\n \"set\",\n \"sender\",\n \"skip\",\n \"source\",\n \"String\",\n \"then\",\n \"to\",\n \"true\",\n \"type\",\n \"with\"\n ],\n typeKeywords: [\"int\", \"unit\", \"string\", \"tz\", \"nat\", \"bool\"],\n operators: [\n \"=\",\n \">\",\n \"<\",\n \"<=\",\n \">=\",\n \"<>\",\n \":\",\n \":=\",\n \"and\",\n \"mod\",\n \"or\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"@\",\n \"&\",\n \"^\",\n \"%\",\n \"->\",\n \"<-\",\n \"&&\",\n \"||\"\n ],\n symbols: /[=><:@\\^&|+\\-*\\/\\^%]+/,\n tokenizer: {\n root: [\n [\n /[a-zA-Z_][\\w]*/,\n {\n cases: {\n \"@keywords\": { token: \"keyword.$0\" },\n \"@default\": \"identifier\"\n }\n }\n ],\n { include: \"@whitespace\" },\n [/[{}()\\[\\]]/, \"@brackets\"],\n [/[<>](?!@symbols)/, \"@brackets\"],\n [\n /@symbols/,\n {\n cases: {\n \"@operators\": \"delimiter\",\n \"@default\": \"\"\n }\n }\n ],\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, \"number.float\"],\n [/\\$[0-9a-fA-F]{1,16}/, \"number.hex\"],\n [/\\d+/, \"number\"],\n [/[;,.]/, \"delimiter\"],\n [/'([^'\\\\]|\\\\.)*$/, \"string.invalid\"],\n [/'/, \"string\", \"@string\"],\n [/'[^\\\\']'/, \"string\"],\n [/'/, \"string.invalid\"],\n [/\\#\\d+/, \"string\"]\n ],\n comment: [\n [/[^\\(\\*]+/, \"comment\"],\n [/\\*\\)/, \"comment\", \"@pop\"],\n [/\\(\\*/, \"comment\"]\n ],\n string: [\n [/[^\\\\']+/, \"string\"],\n [/\\\\./, \"string.escape.invalid\"],\n [/'/, { token: \"string.quote\", bracket: \"@close\", next: \"@pop\" }]\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, \"white\"],\n [/\\(\\*/, \"comment\", \"@comment\"],\n [/\\/\\/.*$/, \"comment\"]\n ]\n }\n};\nexport {\n conf,\n language\n};\n"],
+ "mappings": ";;;AAQA,IAAI,OAAO;AAAA,EACT,UAAU;AAAA,IACR,aAAa;AAAA,IACb,cAAc,CAAC,MAAM,IAAI;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,IACR,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,EACX;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,KAAK,OAAO,IAAI;AAAA,IACxB,EAAE,MAAM,MAAM,OA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AA,IAClE;AAAA,IACA,YAAY;AAAA,MACV,CAAC,cAAc,OAAO;AAAA,MACtB,CAAC,QAAQ,WAAW,UAAU;AAAA,MAC9B,CAAC,WAAW,SAAS;AAAA,IACvB;AAAA,EACF;AACF;",
+ "names": []
+}
diff --git a/docs/.vitepress/cache/deps/chunk-V634PGSD.js b/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js
similarity index 96%
rename from docs/.vitepress/cache/deps/chunk-V634PGSD.js
rename to docs/.vitepress/cache/deps/chunk-3C4OEVM2.js
index 0d9dca7..12eea52 100644
--- a/docs/.vitepress/cache/deps/chunk-V634PGSD.js
+++ b/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js
@@ -34,7 +34,7 @@ var isString = (val) => typeof val === "string";
var isSymbol = (val) => typeof val === "symbol";
var isObject = (val) => val !== null && typeof val === "object";
var isPromise = (val) => {
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
};
var objectToString = Object.prototype.toString;
var toTypeString = (value) => objectToString.call(value);
@@ -65,12 +65,13 @@ var hyphenateRE = /\B([A-Z])/g;
var hyphenate = cacheStringFunction(
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
);
-var capitalize = cacheStringFunction(
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
-);
-var toHandlerKey = cacheStringFunction(
- (str) => str ? `on${capitalize(str)}` : ``
-);
+var capitalize = cacheStringFunction((str) => {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+});
+var toHandlerKey = cacheStringFunction((str) => {
+ const s = str ? `on${capitalize(str)}` : ``;
+ return s;
+});
var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
var invokeArrayFns = (fns, arg) => {
for (let i = 0; i < fns.length; i++) {
@@ -96,8 +97,8 @@ var _globalThis;
var getGlobalThis = () => {
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
};
-var GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
-var isGloballyWhitelisted = makeMap(GLOBALS_WHITE_LISTED);
+var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
+var isGloballyAllowed = makeMap(GLOBALS_ALLOWED);
function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
@@ -111,9 +112,7 @@ function normalizeStyle(value) {
}
}
return res;
- } else if (isString(value)) {
- return value;
- } else if (isObject(value)) {
+ } else if (isString(value) || isObject(value)) {
return value;
}
}
@@ -456,7 +455,7 @@ function cleanupEffect(effect2) {
}
}
function effect(fn, options) {
- if (fn.effect) {
+ if (fn.effect instanceof ReactiveEffect) {
fn = fn.effect.fn;
}
const _effect = new ReactiveEffect(fn);
@@ -535,7 +534,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
} else if (key === "length" && isArray(target)) {
const newLength = Number(newValue);
depsMap.forEach((dep, key2) => {
- if (key2 === "length" || key2 >= newLength) {
+ if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
deps.push(dep);
}
});
@@ -625,10 +624,6 @@ var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
var builtInSymbols = new Set(
Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
);
-var get$1 = createGetter();
-var shallowGet = createGetter(false, true);
-var readonlyGet = createGetter(true);
-var shallowReadonlyGet = createGetter(true, true);
var arrayInstrumentations = createArrayInstrumentations();
function createArrayInstrumentations() {
const instrumentations = {};
@@ -661,8 +656,13 @@ function hasOwnProperty2(key) {
track(obj, "has", key);
return obj.hasOwnProperty(key);
}
-function createGetter(isReadonly2 = false, shallow = false) {
- return function get2(target, key, receiver) {
+var BaseReactiveHandler = class {
+ constructor(_isReadonly = false, _shallow = false) {
+ this._isReadonly = _isReadonly;
+ this._shallow = _shallow;
+ }
+ get(target, key, receiver) {
+ const isReadonly2 = this._isReadonly, shallow = this._shallow;
if (key === "__v_isReactive") {
return !isReadonly2;
} else if (key === "__v_isReadonly") {
@@ -698,17 +698,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
return isReadonly2 ? readonly(res) : reactive(res);
}
return res;
- };
-}
-var set$1 = createSetter();
-var shallowSet = createSetter(true);
-function createSetter(shallow = false) {
- return function set2(target, key, value, receiver) {
+ }
+};
+var MutableReactiveHandler = class extends BaseReactiveHandler {
+ constructor(shallow = false) {
+ super(false, shallow);
+ }
+ set(target, key, value, receiver) {
let oldValue = target[key];
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
return false;
}
- if (!shallow) {
+ if (!this._shallow) {
if (!isShallow(value) && !isReadonly(value)) {
oldValue = toRaw(oldValue);
value = toRaw(value);
@@ -728,37 +729,36 @@ function createSetter(shallow = false) {
}
}
return result;
- };
-}
-function deleteProperty(target, key) {
- const hadKey = hasOwn(target, key);
- const oldValue = target[key];
- const result = Reflect.deleteProperty(target, key);
- if (result && hadKey) {
- trigger(target, "delete", key, void 0, oldValue);
}
- return result;
-}
-function has$1(target, key) {
- const result = Reflect.has(target, key);
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
- track(target, "has", key);
+ deleteProperty(target, key) {
+ const hadKey = hasOwn(target, key);
+ const oldValue = target[key];
+ const result = Reflect.deleteProperty(target, key);
+ if (result && hadKey) {
+ trigger(target, "delete", key, void 0, oldValue);
+ }
+ return result;
+ }
+ has(target, key) {
+ const result = Reflect.has(target, key);
+ if (!isSymbol(key) || !builtInSymbols.has(key)) {
+ track(target, "has", key);
+ }
+ return result;
+ }
+ ownKeys(target) {
+ track(
+ target,
+ "iterate",
+ isArray(target) ? "length" : ITERATE_KEY
+ );
+ return Reflect.ownKeys(target);
}
- return result;
-}
-function ownKeys(target) {
- track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
- return Reflect.ownKeys(target);
-}
-var mutableHandlers = {
- get: get$1,
- set: set$1,
- deleteProperty,
- has: has$1,
- ownKeys
};
-var readonlyHandlers = {
- get: readonlyGet,
+var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
+ constructor(shallow = false) {
+ super(true, shallow);
+ }
set(target, key) {
if (true) {
warn(
@@ -767,7 +767,7 @@ var readonlyHandlers = {
);
}
return true;
- },
+ }
deleteProperty(target, key) {
if (true) {
warn(
@@ -778,21 +778,12 @@ var readonlyHandlers = {
return true;
}
};
-var shallowReactiveHandlers = extend(
- {},
- mutableHandlers,
- {
- get: shallowGet,
- set: shallowSet
- }
-);
-var shallowReadonlyHandlers = extend(
- {},
- readonlyHandlers,
- {
- get: shallowReadonlyGet
- }
+var mutableHandlers = new MutableReactiveHandler();
+var readonlyHandlers = new ReadonlyReactiveHandler();
+var shallowReactiveHandlers = new MutableReactiveHandler(
+ true
);
+var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
var toShallow = (value) => value;
var getProto = (v) => Reflect.getPrototypeOf(v);
function get(target, key, isReadonly2 = false, isShallow3 = false) {
@@ -800,7 +791,7 @@ function get(target, key, isReadonly2 = false, isShallow3 = false) {
const rawTarget = toRaw(target);
const rawKey = toRaw(key);
if (!isReadonly2) {
- if (key !== rawKey) {
+ if (hasChanged(key, rawKey)) {
track(rawTarget, "get", key);
}
track(rawTarget, "get", rawKey);
@@ -820,7 +811,7 @@ function has(key, isReadonly2 = false) {
const rawTarget = toRaw(target);
const rawKey = toRaw(key);
if (!isReadonly2) {
- if (key !== rawKey) {
+ if (hasChanged(key, rawKey)) {
track(rawTarget, "has", key);
}
track(rawTarget, "has", rawKey);
@@ -941,7 +932,7 @@ function createReadonlyMethod(type) {
toRaw(this)
);
}
- return type === "delete" ? false : this;
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
};
}
function createInstrumentations() {
@@ -1352,11 +1343,7 @@ function toRef(source, key, defaultValue) {
}
function propertyToRef(source, key, defaultValue) {
const val = source[key];
- return isRef(val) ? val : new ObjectRefImpl(
- source,
- key,
- defaultValue
- );
+ return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
}
var ComputedRefImpl = class {
constructor(getter, _setter, isReadonly2, isSSR) {
@@ -1652,8 +1639,13 @@ function findInsertionIndex(id) {
let end = queue.length;
while (start < end) {
const middle = start + end >>> 1;
- const middleJobId = getId(queue[middle]);
- middleJobId < id ? start = middle + 1 : end = middle;
+ const middleJob = queue[middle];
+ const middleJobId = getId(middleJob);
+ if (middleJobId < id || middleJobId === id && middleJob.pre) {
+ start = middle + 1;
+ } else {
+ end = middle;
+ }
}
return start;
}
@@ -2220,9 +2212,19 @@ function renderComponentRoot(instance) {
try {
if (vnode.shapeFlag & 4) {
const proxyToUse = withProxy || proxy;
+ const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
+ get(target, key, receiver) {
+ warn2(
+ `Property '${String(
+ key
+ )}' was accessed via 'this'. Avoid using 'this' in templates.`
+ );
+ return Reflect.get(target, key, receiver);
+ }
+ }) : proxyToUse;
result = normalizeVNode(
render2.call(
- proxyToUse,
+ thisProxy,
proxyToUse,
renderCache,
props,
@@ -2456,6 +2458,60 @@ function updateHOCHostEl({ vnode, parent }, el) {
parent = parent.parent;
}
}
+var COMPONENTS = "components";
+var DIRECTIVES = "directives";
+function resolveComponent(name, maybeSelfReference) {
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
+}
+var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
+function resolveDynamicComponent(component) {
+ if (isString(component)) {
+ return resolveAsset(COMPONENTS, component, false) || component;
+ } else {
+ return component || NULL_DYNAMIC_COMPONENT;
+ }
+}
+function resolveDirective(name) {
+ return resolveAsset(DIRECTIVES, name);
+}
+function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
+ const instance = currentRenderingInstance || currentInstance;
+ if (instance) {
+ const Component = instance.type;
+ if (type === COMPONENTS) {
+ const selfName = getComponentName(
+ Component,
+ false
+ /* do not include inferred name to avoid breaking existing code */
+ );
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
+ return Component;
+ }
+ }
+ const res = (
+ // local registration
+ // check instance[type] first which is resolved for options API
+ resolve(instance[type] || Component[type], name) || // global registration
+ resolve(instance.appContext[type], name)
+ );
+ if (!res && maybeSelfReference) {
+ return Component;
+ }
+ if (warnMissing && !res) {
+ const extra = type === COMPONENTS ? `
+If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
+ warn2(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
+ }
+ return res;
+ } else if (true) {
+ warn2(
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
+ );
+ }
+}
+function resolve(registry, name) {
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
+}
var isSuspense = (type) => type.__isSuspense;
var SuspenseImpl = {
name: "Suspense",
@@ -2769,14 +2825,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
parentComponent: parentComponent2,
container: container2
} = suspense;
+ let delayEnter = false;
if (suspense.isHydrating) {
suspense.isHydrating = false;
} else if (!resume) {
- const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
+ delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
if (delayEnter) {
activeBranch.transition.afterLeave = () => {
if (pendingId === suspense.pendingId) {
move(pendingBranch, container2, anchor2, 0);
+ queuePostFlushCb(effects);
}
};
}
@@ -2802,7 +2860,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
}
parent = parent.parent;
}
- if (!hasUnresolvedAncestor) {
+ if (!hasUnresolvedAncestor && !delayEnter) {
queuePostFlushCb(effects);
}
suspense.effects = [];
@@ -2988,7 +3046,7 @@ function normalizeSuspenseSlot(s) {
}
if (isArray(s)) {
const singleChild = filterSingleRoot(s);
- if (!singleChild) {
+ if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
warn2(` slots expect a single root node.`);
}
s = singleChild;
@@ -3125,6 +3183,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
let onCleanup = (fn) => {
cleanup = effect2.onStop = () => {
callWithErrorHandling(fn, instance, 4);
+ cleanup = effect2.onStop = void 0;
};
};
let ssrCleanup;
@@ -3153,9 +3212,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
}
if (cb) {
const newValue = effect2.run();
- if (deep || forceTrigger || (isMultiSource ? newValue.some(
- (v, i) => hasChanged(v, oldValue[i])
- ) : hasChanged(newValue, oldValue)) || false) {
+ if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
if (cleanup) {
cleanup();
}
@@ -3326,6 +3383,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
}
}
}
+var leaveCbKey = Symbol("_leaveCb");
+var enterCbKey = Symbol("_enterCb");
function useTransitionState() {
const state = {
isMounted: false,
@@ -3448,9 +3507,9 @@ var BaseTransitionImpl = {
oldInnerChild
);
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
- el._leaveCb = () => {
+ el[leaveCbKey] = () => {
earlyRemove();
- el._leaveCb = void 0;
+ el[leaveCbKey] = void 0;
delete enterHooks.delayedLeave;
};
enterHooks.delayedLeave = delayedLeave;
@@ -3521,15 +3580,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
return;
}
}
- if (el._leaveCb) {
- el._leaveCb(
+ if (el[leaveCbKey]) {
+ el[leaveCbKey](
true
/* cancelled */
);
}
const leavingVNode = leavingVNodesCache[key];
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
- leavingVNode.el._leaveCb();
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
+ leavingVNode.el[leaveCbKey]();
}
callHook3(hook, [el]);
},
@@ -3547,7 +3606,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
}
}
let called = false;
- const done = el._enterCb = (cancelled) => {
+ const done = el[enterCbKey] = (cancelled) => {
if (called)
return;
called = true;
@@ -3559,7 +3618,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
if (hooks.delayedLeave) {
hooks.delayedLeave();
}
- el._enterCb = void 0;
+ el[enterCbKey] = void 0;
};
if (hook) {
callAsyncHook(hook, [el, done]);
@@ -3569,8 +3628,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
},
leave(el, remove2) {
const key2 = String(vnode.key);
- if (el._enterCb) {
- el._enterCb(
+ if (el[enterCbKey]) {
+ el[enterCbKey](
true
/* cancelled */
);
@@ -3580,7 +3639,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
}
callHook3(onBeforeLeave, [el]);
let called = false;
- const done = el._leaveCb = (cancelled) => {
+ const done = el[leaveCbKey] = (cancelled) => {
if (called)
return;
called = true;
@@ -3590,7 +3649,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
} else {
callHook3(onAfterLeave, [el]);
}
- el._leaveCb = void 0;
+ el[leaveCbKey] = void 0;
if (leavingVNodesCache[key2] === vnode) {
delete leavingVNodesCache[key2];
}
@@ -3616,7 +3675,11 @@ function emptyPlaceholder(vnode) {
}
}
function getKeepAliveChild(vnode) {
- return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
+ return isKeepAlive(vnode) ? (
+ // #7121 ensure get the child component subtree in case
+ // it's been replaced during HMR
+ vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
+ ) : vnode;
}
function setTransitionHooks(vnode, hooks) {
if (vnode.shapeFlag & 6 && vnode.component) {
@@ -4090,60 +4153,6 @@ var onRenderTracked = createHook(
function onErrorCaptured(hook, target = currentInstance) {
injectHook("ec", hook, target);
}
-var COMPONENTS = "components";
-var DIRECTIVES = "directives";
-function resolveComponent(name, maybeSelfReference) {
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
-}
-var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
-function resolveDynamicComponent(component) {
- if (isString(component)) {
- return resolveAsset(COMPONENTS, component, false) || component;
- } else {
- return component || NULL_DYNAMIC_COMPONENT;
- }
-}
-function resolveDirective(name) {
- return resolveAsset(DIRECTIVES, name);
-}
-function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
- const instance = currentRenderingInstance || currentInstance;
- if (instance) {
- const Component = instance.type;
- if (type === COMPONENTS) {
- const selfName = getComponentName(
- Component,
- false
- /* do not include inferred name to avoid breaking existing code */
- );
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
- return Component;
- }
- }
- const res = (
- // local registration
- // check instance[type] first which is resolved for options API
- resolve(instance[type] || Component[type], name) || // global registration
- resolve(instance.appContext[type], name)
- );
- if (!res && maybeSelfReference) {
- return Component;
- }
- if (warnMissing && !res) {
- const extra = type === COMPONENTS ? `
-If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
- warn2(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
- }
- return res;
- } else if (true) {
- warn2(
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
- );
- }
-}
-function resolve(registry, name) {
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
-}
function renderList(source, renderItem, cache, index) {
let ret;
const cached = cache && cache[index];
@@ -4435,7 +4444,7 @@ var RuntimeCompiledPublicInstanceProxyHandlers = extend(
return PublicInstanceProxyHandlers.get(target, key, target);
},
has(_, key) {
- const has2 = key[0] !== "_" && !isGloballyWhitelisted(key);
+ const has2 = key[0] !== "_" && !isGloballyAllowed(key);
if (!has2 && PublicInstanceProxyHandlers.has(_, key)) {
warn2(
`Property ${JSON.stringify(
@@ -5110,12 +5119,12 @@ function createAppAPI(render2, hydrate2) {
},
set() {
warn2(
- `app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.`
+ `app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
);
}
});
}
- const installedPlugins = /* @__PURE__ */ new Set();
+ const installedPlugins = /* @__PURE__ */ new WeakSet();
let isMounted = false;
const app = context.app = {
_uid: uid$1++,
@@ -5199,10 +5208,7 @@ function createAppAPI(render2, hydrate2) {
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
);
}
- const vnode = createVNode(
- rootComponent,
- rootProps
- );
+ const vnode = createVNode(rootComponent, rootProps);
vnode.appContext = context;
if (true) {
context.reload = () => {
@@ -5670,6 +5676,9 @@ function assertType(value, type) {
};
}
function getInvalidTypeMessage(name, value, expectedTypes) {
+ if (expectedTypes.length === 0) {
+ return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
+ }
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
const expectedType = expectedTypes[0];
const receivedType = toRawType(value);
@@ -5794,7 +5803,7 @@ var updateSlots = (instance, children, optimized) => {
}
if (needDeletionCheck) {
for (const key in slots) {
- if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
+ if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
delete slots[key];
}
}
@@ -5937,6 +5946,20 @@ function createHydrationFunctions(rendererInternals) {
const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
let domType = node.nodeType;
vnode.el = node;
+ if (true) {
+ if (!("__vnode" in node)) {
+ Object.defineProperty(node, "__vnode", {
+ value: vnode,
+ enumerable: false
+ });
+ }
+ if (!("__vueParentComponent" in node)) {
+ Object.defineProperty(node, "__vueParentComponent", {
+ value: parentComponent,
+ enumerable: false
+ });
+ }
+ }
if (patchFlag === -2) {
optimized = false;
vnode.dynamicChildren = null;
@@ -5956,8 +5979,10 @@ function createHydrationFunctions(rendererInternals) {
hasMismatch = true;
warn2(
`Hydration text mismatch:
-- Client: ${JSON.stringify(node.data)}
-- Server: ${JSON.stringify(vnode.children)}`
+- Server rendered: ${JSON.stringify(
+ node.data
+ )}
+- Client rendered: ${JSON.stringify(vnode.children)}`
);
node.data = vnode.children;
}
@@ -5965,7 +5990,14 @@ function createHydrationFunctions(rendererInternals) {
}
break;
case Comment:
- if (domType !== 8 || isFragmentStart) {
+ if (isTemplateNode(node)) {
+ nextNode = nextSibling(node);
+ replaceNode(
+ vnode.el = node.content.firstChild,
+ node,
+ parentComponent
+ );
+ } else if (domType !== 8 || isFragmentStart) {
nextNode = onMismatch();
} else {
nextNode = nextSibling(node);
@@ -6008,7 +6040,7 @@ function createHydrationFunctions(rendererInternals) {
break;
default:
if (shapeFlag & 1) {
- if (domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
+ if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
nextNode = onMismatch();
} else {
nextNode = hydrateElement(
@@ -6023,6 +6055,13 @@ function createHydrationFunctions(rendererInternals) {
} else if (shapeFlag & 6) {
vnode.slotScopeIds = slotScopeIds;
const container = parentNode(node);
+ if (isFragmentStart) {
+ nextNode = locateClosingAnchor(node);
+ } else if (isComment(node) && node.data === "teleport start") {
+ nextNode = locateClosingAnchor(node, node.data, "teleport end");
+ } else {
+ nextNode = nextSibling(node);
+ }
mountComponent(
vnode,
container,
@@ -6032,10 +6071,6 @@ function createHydrationFunctions(rendererInternals) {
isSVGContainer(container),
optimized
);
- nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
- if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
- nextNode = nextSibling(nextNode);
- }
if (isAsyncWrapper(vnode)) {
let subTree;
if (isFragmentStart) {
@@ -6085,16 +6120,17 @@ function createHydrationFunctions(rendererInternals) {
};
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
optimized = optimized || !!vnode.dynamicChildren;
- const { type, props, patchFlag, shapeFlag, dirs } = vnode;
- const forcePatchValue = type === "input" && dirs || type === "option";
+ const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
+ const forcePatch = type === "input" || type === "option";
if (true) {
if (dirs) {
invokeDirectiveHook(vnode, null, parentComponent, "created");
}
if (props) {
- if (forcePatchValue || !optimized || patchFlag & (16 | 32)) {
+ if (forcePatch || !optimized || patchFlag & (16 | 32)) {
for (const key in props) {
- if (forcePatchValue && key.endsWith("value") || isOn(key) && !isReservedProp(key)) {
+ if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
+ key[0] === ".") {
patchProp2(
el,
key,
@@ -6122,12 +6158,23 @@ function createHydrationFunctions(rendererInternals) {
if (vnodeHooks = props && props.onVnodeBeforeMount) {
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
}
+ let needCallTransitionHooks = false;
+ if (isTemplateNode(el)) {
+ needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
+ const content = el.content.firstChild;
+ if (needCallTransitionHooks) {
+ transition.beforeEnter(content);
+ }
+ replaceNode(content, el, parentComponent);
+ vnode.el = el = content;
+ }
if (dirs) {
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
}
- if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
+ if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
queueEffectWithSuspense(() => {
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
+ needCallTransitionHooks && transition.enter(el);
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
}, parentSuspense);
}
@@ -6160,8 +6207,8 @@ function createHydrationFunctions(rendererInternals) {
hasMismatch = true;
warn2(
`Hydration text content mismatch in <${vnode.type}>:
-- Client: ${el.textContent}
-- Server: ${vnode.children}`
+- Server rendered: ${el.textContent}
+- Client rendered: ${vnode.children}`
);
el.textContent = vnode.children;
}
@@ -6245,7 +6292,7 @@ function createHydrationFunctions(rendererInternals) {
);
vnode.el = null;
if (isFragment) {
- const end = locateClosingAsyncAnchor(node);
+ const end = locateClosingAnchor(node);
while (true) {
const next2 = nextSibling(node);
if (next2 && next2 !== end) {
@@ -6270,14 +6317,14 @@ function createHydrationFunctions(rendererInternals) {
);
return next;
};
- const locateClosingAsyncAnchor = (node) => {
+ const locateClosingAnchor = (node, open = "[", close = "]") => {
let match = 0;
while (node) {
node = nextSibling(node);
if (node && isComment(node)) {
- if (node.data === "[")
+ if (node.data === open)
match++;
- if (node.data === "]") {
+ if (node.data === close) {
if (match === 0) {
return nextSibling(node);
} else {
@@ -6288,6 +6335,22 @@ function createHydrationFunctions(rendererInternals) {
}
return node;
};
+ const replaceNode = (newNode, oldNode, parentComponent) => {
+ const parentNode2 = oldNode.parentNode;
+ if (parentNode2) {
+ parentNode2.replaceChild(newNode, oldNode);
+ }
+ let parent = parentComponent;
+ while (parent) {
+ if (parent.vnode.el === oldNode) {
+ parent.vnode.el = parent.subTree.el = newNode;
+ }
+ parent = parent.parent;
+ }
+ };
+ const isTemplateNode = (node) => {
+ return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
+ };
return [hydrate2, hydrateNode];
}
var supported;
@@ -6635,7 +6698,7 @@ function baseCreateRenderer(options, createHydrationFns) {
if (dirs) {
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
}
- const needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
+ const needCallTransitionHooks = needTransition(parentSuspense, transition);
if (needCallTransitionHooks) {
transition.beforeEnter(el);
}
@@ -7540,8 +7603,8 @@ function baseCreateRenderer(options, createHydrationFns) {
moveStaticNode(vnode, container, anchor);
return;
}
- const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
- if (needTransition) {
+ const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
+ if (needTransition2) {
if (moveType === 0) {
transition.beforeEnter(el);
hostInsert(el, container, anchor);
@@ -7761,6 +7824,9 @@ function baseCreateRenderer(options, createHydrationFns) {
function toggleRecurse({ effect: effect2, update }, allowed) {
effect2.allowRecurse = update.allowRecurse = allowed;
}
+function needTransition(parentSuspense, transition) {
+ return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
+}
function traverseStaticChildren(n1, n2, shallow = false) {
const ch1 = n1.children;
const ch2 = n2.children;
@@ -7853,6 +7919,7 @@ var resolveTarget = (props, select) => {
}
};
var TeleportImpl = {
+ name: "Teleport",
__isTeleport: true,
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
const {
@@ -7941,6 +8008,10 @@ var TeleportImpl = {
internals,
1
);
+ } else {
+ if (n2.props && n1.props && n2.props.to !== n1.props.to) {
+ n2.props.to = n1.props.to;
+ }
}
} else {
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
@@ -7981,19 +8052,18 @@ var TeleportImpl = {
if (target) {
hostRemove(targetAnchor);
}
- if (doRemove || !isTeleportDisabled(props)) {
- hostRemove(anchor);
- if (shapeFlag & 16) {
- for (let i = 0; i < children.length; i++) {
- const child = children[i];
- unmount(
- child,
- parentComponent,
- parentSuspense,
- true,
- !!child.dynamicChildren
- );
- }
+ doRemove && hostRemove(anchor);
+ if (shapeFlag & 16) {
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
+ for (let i = 0; i < children.length; i++) {
+ const child = children[i];
+ unmount(
+ child,
+ parentComponent,
+ parentSuspense,
+ shouldRemove,
+ !!child.dynamicChildren
+ );
}
}
},
@@ -8077,7 +8147,7 @@ function updateCssVars(vnode) {
const ctx = vnode.ctx;
if (ctx && ctx.ut) {
let node = vnode.children[0].el;
- while (node !== vnode.targetAnchor) {
+ while (node && node !== vnode.targetAnchor) {
if (node.nodeType === 1)
node.setAttribute("data-v-owner", ctx.uid);
node = node.nextSibling;
@@ -8270,7 +8340,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
if (shapeFlag & 4 && isProxy(type)) {
type = toRaw(type);
warn2(
- `Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
+ `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
`
Component that was made reactive: `,
type
@@ -8733,9 +8803,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
if (__VUE_OPTIONS_API__ && true) {
setCurrentInstance(instance);
pauseTracking();
- applyOptions(instance);
- resetTracking();
- unsetCurrentInstance();
+ try {
+ applyOptions(instance);
+ } finally {
+ resetTracking();
+ unsetCurrentInstance();
+ }
}
if (!Component.render && instance.render === NOOP && !isSSR) {
if (!compile && Component.template) {
@@ -9112,7 +9185,7 @@ function isMemoSame(cached, memo) {
}
return true;
}
-var version = "3.3.4";
+var version = "3.3.9";
var _ssrUtils = {
createComponentInstance,
setupComponent,
@@ -9192,19 +9265,333 @@ var nodeOps = {
];
}
};
-function patchClass(el, value, isSVG) {
- const transitionClasses = el._vtc;
- if (transitionClasses) {
- value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
+var TRANSITION = "transition";
+var ANIMATION = "animation";
+var vtcKey = Symbol("_vtc");
+var Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
+Transition.displayName = "Transition";
+var DOMTransitionPropsValidators = {
+ name: String,
+ type: String,
+ css: {
+ type: Boolean,
+ default: true
+ },
+ duration: [String, Number, Object],
+ enterFromClass: String,
+ enterActiveClass: String,
+ enterToClass: String,
+ appearFromClass: String,
+ appearActiveClass: String,
+ appearToClass: String,
+ leaveFromClass: String,
+ leaveActiveClass: String,
+ leaveToClass: String
+};
+var TransitionPropsValidators = Transition.props = extend(
+ {},
+ BaseTransitionPropsValidators,
+ DOMTransitionPropsValidators
+);
+var callHook2 = (hook, args = []) => {
+ if (isArray(hook)) {
+ hook.forEach((h2) => h2(...args));
+ } else if (hook) {
+ hook(...args);
}
- if (value == null) {
- el.removeAttribute("class");
- } else if (isSVG) {
- el.setAttribute("class", value);
- } else {
- el.className = value;
+};
+var hasExplicitCallback = (hook) => {
+ return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
+};
+function resolveTransitionProps(rawProps) {
+ const baseProps = {};
+ for (const key in rawProps) {
+ if (!(key in DOMTransitionPropsValidators)) {
+ baseProps[key] = rawProps[key];
+ }
}
-}
+ if (rawProps.css === false) {
+ return baseProps;
+ }
+ const {
+ name = "v",
+ type,
+ duration,
+ enterFromClass = `${name}-enter-from`,
+ enterActiveClass = `${name}-enter-active`,
+ enterToClass = `${name}-enter-to`,
+ appearFromClass = enterFromClass,
+ appearActiveClass = enterActiveClass,
+ appearToClass = enterToClass,
+ leaveFromClass = `${name}-leave-from`,
+ leaveActiveClass = `${name}-leave-active`,
+ leaveToClass = `${name}-leave-to`
+ } = rawProps;
+ const durations = normalizeDuration(duration);
+ const enterDuration = durations && durations[0];
+ const leaveDuration = durations && durations[1];
+ const {
+ onBeforeEnter,
+ onEnter,
+ onEnterCancelled,
+ onLeave,
+ onLeaveCancelled,
+ onBeforeAppear = onBeforeEnter,
+ onAppear = onEnter,
+ onAppearCancelled = onEnterCancelled
+ } = baseProps;
+ const finishEnter = (el, isAppear, done) => {
+ removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
+ removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
+ done && done();
+ };
+ const finishLeave = (el, done) => {
+ el._isLeaving = false;
+ removeTransitionClass(el, leaveFromClass);
+ removeTransitionClass(el, leaveToClass);
+ removeTransitionClass(el, leaveActiveClass);
+ done && done();
+ };
+ const makeEnterHook = (isAppear) => {
+ return (el, done) => {
+ const hook = isAppear ? onAppear : onEnter;
+ const resolve2 = () => finishEnter(el, isAppear, done);
+ callHook2(hook, [el, resolve2]);
+ nextFrame(() => {
+ removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
+ addTransitionClass(el, isAppear ? appearToClass : enterToClass);
+ if (!hasExplicitCallback(hook)) {
+ whenTransitionEnds(el, type, enterDuration, resolve2);
+ }
+ });
+ };
+ };
+ return extend(baseProps, {
+ onBeforeEnter(el) {
+ callHook2(onBeforeEnter, [el]);
+ addTransitionClass(el, enterFromClass);
+ addTransitionClass(el, enterActiveClass);
+ },
+ onBeforeAppear(el) {
+ callHook2(onBeforeAppear, [el]);
+ addTransitionClass(el, appearFromClass);
+ addTransitionClass(el, appearActiveClass);
+ },
+ onEnter: makeEnterHook(false),
+ onAppear: makeEnterHook(true),
+ onLeave(el, done) {
+ el._isLeaving = true;
+ const resolve2 = () => finishLeave(el, done);
+ addTransitionClass(el, leaveFromClass);
+ forceReflow();
+ addTransitionClass(el, leaveActiveClass);
+ nextFrame(() => {
+ if (!el._isLeaving) {
+ return;
+ }
+ removeTransitionClass(el, leaveFromClass);
+ addTransitionClass(el, leaveToClass);
+ if (!hasExplicitCallback(onLeave)) {
+ whenTransitionEnds(el, type, leaveDuration, resolve2);
+ }
+ });
+ callHook2(onLeave, [el, resolve2]);
+ },
+ onEnterCancelled(el) {
+ finishEnter(el, false);
+ callHook2(onEnterCancelled, [el]);
+ },
+ onAppearCancelled(el) {
+ finishEnter(el, true);
+ callHook2(onAppearCancelled, [el]);
+ },
+ onLeaveCancelled(el) {
+ finishLeave(el);
+ callHook2(onLeaveCancelled, [el]);
+ }
+ });
+}
+function normalizeDuration(duration) {
+ if (duration == null) {
+ return null;
+ } else if (isObject(duration)) {
+ return [NumberOf(duration.enter), NumberOf(duration.leave)];
+ } else {
+ const n = NumberOf(duration);
+ return [n, n];
+ }
+}
+function NumberOf(val) {
+ const res = toNumber(val);
+ if (true) {
+ assertNumber(res, " explicit duration");
+ }
+ return res;
+}
+function addTransitionClass(el, cls) {
+ cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
+ (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
+}
+function removeTransitionClass(el, cls) {
+ cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
+ const _vtc = el[vtcKey];
+ if (_vtc) {
+ _vtc.delete(cls);
+ if (!_vtc.size) {
+ el[vtcKey] = void 0;
+ }
+ }
+}
+function nextFrame(cb) {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(cb);
+ });
+}
+var endId = 0;
+function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
+ const id = el._endId = ++endId;
+ const resolveIfNotStale = () => {
+ if (id === el._endId) {
+ resolve2();
+ }
+ };
+ if (explicitTimeout) {
+ return setTimeout(resolveIfNotStale, explicitTimeout);
+ }
+ const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
+ if (!type) {
+ return resolve2();
+ }
+ const endEvent = type + "end";
+ let ended = 0;
+ const end = () => {
+ el.removeEventListener(endEvent, onEnd);
+ resolveIfNotStale();
+ };
+ const onEnd = (e) => {
+ if (e.target === el && ++ended >= propCount) {
+ end();
+ }
+ };
+ setTimeout(() => {
+ if (ended < propCount) {
+ end();
+ }
+ }, timeout + 1);
+ el.addEventListener(endEvent, onEnd);
+}
+function getTransitionInfo(el, expectedType) {
+ const styles = window.getComputedStyle(el);
+ const getStyleProperties = (key) => (styles[key] || "").split(", ");
+ const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
+ const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
+ const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
+ const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
+ const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
+ const animationTimeout = getTimeout(animationDelays, animationDurations);
+ let type = null;
+ let timeout = 0;
+ let propCount = 0;
+ if (expectedType === TRANSITION) {
+ if (transitionTimeout > 0) {
+ type = TRANSITION;
+ timeout = transitionTimeout;
+ propCount = transitionDurations.length;
+ }
+ } else if (expectedType === ANIMATION) {
+ if (animationTimeout > 0) {
+ type = ANIMATION;
+ timeout = animationTimeout;
+ propCount = animationDurations.length;
+ }
+ } else {
+ timeout = Math.max(transitionTimeout, animationTimeout);
+ type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
+ propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
+ }
+ const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
+ getStyleProperties(`${TRANSITION}Property`).toString()
+ );
+ return {
+ type,
+ timeout,
+ propCount,
+ hasTransform
+ };
+}
+function getTimeout(delays, durations) {
+ while (delays.length < durations.length) {
+ delays = delays.concat(delays);
+ }
+ return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
+}
+function toMs(s) {
+ if (s === "auto")
+ return 0;
+ return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
+}
+function forceReflow() {
+ return document.body.offsetHeight;
+}
+function patchClass(el, value, isSVG) {
+ const transitionClasses = el[vtcKey];
+ if (transitionClasses) {
+ value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
+ }
+ if (value == null) {
+ el.removeAttribute("class");
+ } else if (isSVG) {
+ el.setAttribute("class", value);
+ } else {
+ el.className = value;
+ }
+}
+var vShowOldKey = Symbol("_vod");
+var vShow = {
+ beforeMount(el, { value }, { transition }) {
+ el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
+ if (transition && value) {
+ transition.beforeEnter(el);
+ } else {
+ setDisplay(el, value);
+ }
+ },
+ mounted(el, { value }, { transition }) {
+ if (transition && value) {
+ transition.enter(el);
+ }
+ },
+ updated(el, { value, oldValue }, { transition }) {
+ if (!value === !oldValue)
+ return;
+ if (transition) {
+ if (value) {
+ transition.beforeEnter(el);
+ setDisplay(el, true);
+ transition.enter(el);
+ } else {
+ transition.leave(el, () => {
+ setDisplay(el, false);
+ });
+ }
+ } else {
+ setDisplay(el, value);
+ }
+ },
+ beforeUnmount(el, { value }) {
+ setDisplay(el, value);
+ }
+};
+function setDisplay(el, value) {
+ el.style.display = value ? el[vShowOldKey] : "none";
+}
+function initVShowForSSR() {
+ vShow.getSSRProps = ({ value }) => {
+ if (!value) {
+ return { style: { display: "none" } };
+ }
+ };
+}
function patchStyle(el, prev, next) {
const style = el.style;
const isCssString = isString(next);
@@ -9228,7 +9615,7 @@ function patchStyle(el, prev, next) {
} else if (prev) {
el.removeAttribute("style");
}
- if ("_vod" in el) {
+ if (vShowOldKey in el) {
style.display = currentDisplay;
}
}
@@ -9354,8 +9741,9 @@ function addEventListener(el, event, handler, options) {
function removeEventListener(el, event, handler, options) {
el.removeEventListener(event, handler, options);
}
+var veiKey = Symbol("_vei");
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
- const invokers = el._vei || (el._vei = {});
+ const invokers = el[veiKey] || (el[veiKey] = {});
const existingInvoker = invokers[rawName];
if (nextValue && existingInvoker) {
existingInvoker.value = nextValue;
@@ -9497,6 +9885,7 @@ var VueElement = class _VueElement extends BaseClass {
this._connected = false;
this._resolved = false;
this._numberProps = null;
+ this._ob = null;
if (this.shadowRoot && hydrate2) {
hydrate2(this._createVNode(), this.shadowRoot);
} else {
@@ -9523,6 +9912,10 @@ var VueElement = class _VueElement extends BaseClass {
}
disconnectedCallback() {
this._connected = false;
+ if (this._ob) {
+ this._ob.disconnect();
+ this._ob = null;
+ }
nextTick(() => {
if (!this._connected) {
render(null, this.shadowRoot);
@@ -9538,11 +9931,12 @@ var VueElement = class _VueElement extends BaseClass {
for (let i = 0; i < this.attributes.length; i++) {
this._setAttr(this.attributes[i].name);
}
- new MutationObserver((mutations) => {
+ this._ob = new MutationObserver((mutations) => {
for (const m of mutations) {
this._setAttr(m.attributeName);
}
- }).observe(this, { attributes: true });
+ });
+ this._ob.observe(this, { attributes: true });
const resolve2 = (def2, isAsync = false) => {
const { props, styles } = def2;
let numberProps;
@@ -9669,364 +10063,101 @@ var VueElement = class _VueElement extends BaseClass {
}
return vnode;
}
- _applyStyles(styles) {
- if (styles) {
- styles.forEach((css) => {
- const s = document.createElement("style");
- s.textContent = css;
- this.shadowRoot.appendChild(s);
- if (true) {
- (this._styles || (this._styles = [])).push(s);
- }
- });
- }
- }
-};
-function useCssModule(name = "$style") {
- {
- const instance = getCurrentInstance();
- if (!instance) {
- warn2(`useCssModule must be called inside setup()`);
- return EMPTY_OBJ;
- }
- const modules = instance.type.__cssModules;
- if (!modules) {
- warn2(`Current instance does not have CSS modules injected.`);
- return EMPTY_OBJ;
- }
- const mod = modules[name];
- if (!mod) {
- warn2(`Current instance does not have CSS module named "${name}".`);
- return EMPTY_OBJ;
- }
- return mod;
- }
-}
-function useCssVars(getter) {
- const instance = getCurrentInstance();
- if (!instance) {
- warn2(`useCssVars is called without current active component instance.`);
- return;
- }
- const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
- Array.from(
- document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
- ).forEach((node) => setVarsOnNode(node, vars));
- };
- const setVars = () => {
- const vars = getter(instance.proxy);
- setVarsOnVNode(instance.subTree, vars);
- updateTeleports(vars);
- };
- watchPostEffect(setVars);
- onMounted(() => {
- const ob = new MutationObserver(setVars);
- ob.observe(instance.subTree.el.parentNode, { childList: true });
- onUnmounted(() => ob.disconnect());
- });
-}
-function setVarsOnVNode(vnode, vars) {
- if (vnode.shapeFlag & 128) {
- const suspense = vnode.suspense;
- vnode = suspense.activeBranch;
- if (suspense.pendingBranch && !suspense.isHydrating) {
- suspense.effects.push(() => {
- setVarsOnVNode(suspense.activeBranch, vars);
- });
- }
- }
- while (vnode.component) {
- vnode = vnode.component.subTree;
- }
- if (vnode.shapeFlag & 1 && vnode.el) {
- setVarsOnNode(vnode.el, vars);
- } else if (vnode.type === Fragment) {
- vnode.children.forEach((c) => setVarsOnVNode(c, vars));
- } else if (vnode.type === Static) {
- let { el, anchor } = vnode;
- while (el) {
- setVarsOnNode(el, vars);
- if (el === anchor)
- break;
- el = el.nextSibling;
- }
- }
-}
-function setVarsOnNode(el, vars) {
- if (el.nodeType === 1) {
- const style = el.style;
- for (const key in vars) {
- style.setProperty(`--${key}`, vars[key]);
- }
- }
-}
-var TRANSITION = "transition";
-var ANIMATION = "animation";
-var Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
-Transition.displayName = "Transition";
-var DOMTransitionPropsValidators = {
- name: String,
- type: String,
- css: {
- type: Boolean,
- default: true
- },
- duration: [String, Number, Object],
- enterFromClass: String,
- enterActiveClass: String,
- enterToClass: String,
- appearFromClass: String,
- appearActiveClass: String,
- appearToClass: String,
- leaveFromClass: String,
- leaveActiveClass: String,
- leaveToClass: String
-};
-var TransitionPropsValidators = Transition.props = extend(
- {},
- BaseTransitionPropsValidators,
- DOMTransitionPropsValidators
-);
-var callHook2 = (hook, args = []) => {
- if (isArray(hook)) {
- hook.forEach((h2) => h2(...args));
- } else if (hook) {
- hook(...args);
- }
-};
-var hasExplicitCallback = (hook) => {
- return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
-};
-function resolveTransitionProps(rawProps) {
- const baseProps = {};
- for (const key in rawProps) {
- if (!(key in DOMTransitionPropsValidators)) {
- baseProps[key] = rawProps[key];
- }
- }
- if (rawProps.css === false) {
- return baseProps;
- }
- const {
- name = "v",
- type,
- duration,
- enterFromClass = `${name}-enter-from`,
- enterActiveClass = `${name}-enter-active`,
- enterToClass = `${name}-enter-to`,
- appearFromClass = enterFromClass,
- appearActiveClass = enterActiveClass,
- appearToClass = enterToClass,
- leaveFromClass = `${name}-leave-from`,
- leaveActiveClass = `${name}-leave-active`,
- leaveToClass = `${name}-leave-to`
- } = rawProps;
- const durations = normalizeDuration(duration);
- const enterDuration = durations && durations[0];
- const leaveDuration = durations && durations[1];
- const {
- onBeforeEnter,
- onEnter,
- onEnterCancelled,
- onLeave,
- onLeaveCancelled,
- onBeforeAppear = onBeforeEnter,
- onAppear = onEnter,
- onAppearCancelled = onEnterCancelled
- } = baseProps;
- const finishEnter = (el, isAppear, done) => {
- removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
- removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
- done && done();
- };
- const finishLeave = (el, done) => {
- el._isLeaving = false;
- removeTransitionClass(el, leaveFromClass);
- removeTransitionClass(el, leaveToClass);
- removeTransitionClass(el, leaveActiveClass);
- done && done();
- };
- const makeEnterHook = (isAppear) => {
- return (el, done) => {
- const hook = isAppear ? onAppear : onEnter;
- const resolve2 = () => finishEnter(el, isAppear, done);
- callHook2(hook, [el, resolve2]);
- nextFrame(() => {
- removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
- addTransitionClass(el, isAppear ? appearToClass : enterToClass);
- if (!hasExplicitCallback(hook)) {
- whenTransitionEnds(el, type, enterDuration, resolve2);
- }
- });
- };
- };
- return extend(baseProps, {
- onBeforeEnter(el) {
- callHook2(onBeforeEnter, [el]);
- addTransitionClass(el, enterFromClass);
- addTransitionClass(el, enterActiveClass);
- },
- onBeforeAppear(el) {
- callHook2(onBeforeAppear, [el]);
- addTransitionClass(el, appearFromClass);
- addTransitionClass(el, appearActiveClass);
- },
- onEnter: makeEnterHook(false),
- onAppear: makeEnterHook(true),
- onLeave(el, done) {
- el._isLeaving = true;
- const resolve2 = () => finishLeave(el, done);
- addTransitionClass(el, leaveFromClass);
- forceReflow();
- addTransitionClass(el, leaveActiveClass);
- nextFrame(() => {
- if (!el._isLeaving) {
- return;
- }
- removeTransitionClass(el, leaveFromClass);
- addTransitionClass(el, leaveToClass);
- if (!hasExplicitCallback(onLeave)) {
- whenTransitionEnds(el, type, leaveDuration, resolve2);
+ _applyStyles(styles) {
+ if (styles) {
+ styles.forEach((css) => {
+ const s = document.createElement("style");
+ s.textContent = css;
+ this.shadowRoot.appendChild(s);
+ if (true) {
+ (this._styles || (this._styles = [])).push(s);
}
});
- callHook2(onLeave, [el, resolve2]);
- },
- onEnterCancelled(el) {
- finishEnter(el, false);
- callHook2(onEnterCancelled, [el]);
- },
- onAppearCancelled(el) {
- finishEnter(el, true);
- callHook2(onAppearCancelled, [el]);
- },
- onLeaveCancelled(el) {
- finishLeave(el);
- callHook2(onLeaveCancelled, [el]);
}
- });
-}
-function normalizeDuration(duration) {
- if (duration == null) {
- return null;
- } else if (isObject(duration)) {
- return [NumberOf(duration.enter), NumberOf(duration.leave)];
- } else {
- const n = NumberOf(duration);
- return [n, n];
- }
-}
-function NumberOf(val) {
- const res = toNumber(val);
- if (true) {
- assertNumber(res, " explicit duration");
}
- return res;
-}
-function addTransitionClass(el, cls) {
- cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
- (el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
-}
-function removeTransitionClass(el, cls) {
- cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
- const { _vtc } = el;
- if (_vtc) {
- _vtc.delete(cls);
- if (!_vtc.size) {
- el._vtc = void 0;
+};
+function useCssModule(name = "$style") {
+ {
+ const instance = getCurrentInstance();
+ if (!instance) {
+ warn2(`useCssModule must be called inside setup()`);
+ return EMPTY_OBJ;
}
- }
-}
-function nextFrame(cb) {
- requestAnimationFrame(() => {
- requestAnimationFrame(cb);
- });
-}
-var endId = 0;
-function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
- const id = el._endId = ++endId;
- const resolveIfNotStale = () => {
- if (id === el._endId) {
- resolve2();
+ const modules = instance.type.__cssModules;
+ if (!modules) {
+ warn2(`Current instance does not have CSS modules injected.`);
+ return EMPTY_OBJ;
}
- };
- if (explicitTimeout) {
- return setTimeout(resolveIfNotStale, explicitTimeout);
+ const mod = modules[name];
+ if (!mod) {
+ warn2(`Current instance does not have CSS module named "${name}".`);
+ return EMPTY_OBJ;
+ }
+ return mod;
}
- const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
- if (!type) {
- return resolve2();
+}
+function useCssVars(getter) {
+ const instance = getCurrentInstance();
+ if (!instance) {
+ warn2(`useCssVars is called without current active component instance.`);
+ return;
}
- const endEvent = type + "end";
- let ended = 0;
- const end = () => {
- el.removeEventListener(endEvent, onEnd);
- resolveIfNotStale();
+ const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
+ Array.from(
+ document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
+ ).forEach((node) => setVarsOnNode(node, vars));
};
- const onEnd = (e) => {
- if (e.target === el && ++ended >= propCount) {
- end();
- }
+ const setVars = () => {
+ const vars = getter(instance.proxy);
+ setVarsOnVNode(instance.subTree, vars);
+ updateTeleports(vars);
};
- setTimeout(() => {
- if (ended < propCount) {
- end();
- }
- }, timeout + 1);
- el.addEventListener(endEvent, onEnd);
+ watchPostEffect(setVars);
+ onMounted(() => {
+ const ob = new MutationObserver(setVars);
+ ob.observe(instance.subTree.el.parentNode, { childList: true });
+ onUnmounted(() => ob.disconnect());
+ });
}
-function getTransitionInfo(el, expectedType) {
- const styles = window.getComputedStyle(el);
- const getStyleProperties = (key) => (styles[key] || "").split(", ");
- const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
- const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
- const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
- const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
- const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
- const animationTimeout = getTimeout(animationDelays, animationDurations);
- let type = null;
- let timeout = 0;
- let propCount = 0;
- if (expectedType === TRANSITION) {
- if (transitionTimeout > 0) {
- type = TRANSITION;
- timeout = transitionTimeout;
- propCount = transitionDurations.length;
+function setVarsOnVNode(vnode, vars) {
+ if (vnode.shapeFlag & 128) {
+ const suspense = vnode.suspense;
+ vnode = suspense.activeBranch;
+ if (suspense.pendingBranch && !suspense.isHydrating) {
+ suspense.effects.push(() => {
+ setVarsOnVNode(suspense.activeBranch, vars);
+ });
}
- } else if (expectedType === ANIMATION) {
- if (animationTimeout > 0) {
- type = ANIMATION;
- timeout = animationTimeout;
- propCount = animationDurations.length;
+ }
+ while (vnode.component) {
+ vnode = vnode.component.subTree;
+ }
+ if (vnode.shapeFlag & 1 && vnode.el) {
+ setVarsOnNode(vnode.el, vars);
+ } else if (vnode.type === Fragment) {
+ vnode.children.forEach((c) => setVarsOnVNode(c, vars));
+ } else if (vnode.type === Static) {
+ let { el, anchor } = vnode;
+ while (el) {
+ setVarsOnNode(el, vars);
+ if (el === anchor)
+ break;
+ el = el.nextSibling;
}
- } else {
- timeout = Math.max(transitionTimeout, animationTimeout);
- type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
- propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
}
- const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
- getStyleProperties(`${TRANSITION}Property`).toString()
- );
- return {
- type,
- timeout,
- propCount,
- hasTransform
- };
}
-function getTimeout(delays, durations) {
- while (delays.length < durations.length) {
- delays = delays.concat(delays);
+function setVarsOnNode(el, vars) {
+ if (el.nodeType === 1) {
+ const style = el.style;
+ for (const key in vars) {
+ style.setProperty(`--${key}`, vars[key]);
+ }
}
- return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
-}
-function toMs(s) {
- return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
-}
-function forceReflow() {
- return document.body.offsetHeight;
}
var positionMap = /* @__PURE__ */ new WeakMap();
var newPositionMap = /* @__PURE__ */ new WeakMap();
+var moveCbKey = Symbol("_moveCb");
+var enterCbKey2 = Symbol("_enterCb");
var TransitionGroupImpl = {
name: "TransitionGroup",
props: extend({}, TransitionPropsValidators, {
@@ -10059,13 +10190,13 @@ var TransitionGroupImpl = {
const style = el.style;
addTransitionClass(el, moveClass);
style.transform = style.webkitTransform = style.transitionDuration = "";
- const cb = el._moveCb = (e) => {
+ const cb = el[moveCbKey] = (e) => {
if (e && e.target !== el) {
return;
}
if (!e || /transform$/.test(e.propertyName)) {
el.removeEventListener("transitionend", cb);
- el._moveCb = null;
+ el[moveCbKey] = null;
removeTransitionClass(el, moveClass);
}
};
@@ -10108,11 +10239,11 @@ removeMode(TransitionGroupImpl.props);
var TransitionGroup = TransitionGroupImpl;
function callPendingCbs(c) {
const el = c.el;
- if (el._moveCb) {
- el._moveCb();
+ if (el[moveCbKey]) {
+ el[moveCbKey]();
}
- if (el._enterCb) {
- el._enterCb();
+ if (el[enterCbKey2]) {
+ el[enterCbKey2]();
}
}
function recordPosition(c) {
@@ -10132,8 +10263,9 @@ function applyTranslation(c) {
}
function hasCSSTransform(el, root, moveClass) {
const clone = el.cloneNode();
- if (el._vtc) {
- el._vtc.forEach((cls) => {
+ const _vtc = el[vtcKey];
+ if (_vtc) {
+ _vtc.forEach((cls) => {
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
});
}
@@ -10159,9 +10291,10 @@ function onCompositionEnd(e) {
target.dispatchEvent(new Event("input"));
}
}
+var assignKey = Symbol("_assign");
var vModelText = {
created(el, { modifiers: { lazy, trim, number } }, vnode) {
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
const castToNumber = number || vnode.props && vnode.props.type === "number";
addEventListener(el, lazy ? "change" : "input", (e) => {
if (e.target.composing)
@@ -10173,7 +10306,7 @@ var vModelText = {
if (castToNumber) {
domValue = looseToNumber(domValue);
}
- el._assign(domValue);
+ el[assignKey](domValue);
});
if (trim) {
addEventListener(el, "change", () => {
@@ -10191,36 +10324,35 @@ var vModelText = {
el.value = value == null ? "" : value;
},
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
if (el.composing)
return;
+ const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
+ const newValue = value == null ? "" : value;
+ if (elValue === newValue) {
+ return;
+ }
if (document.activeElement === el && el.type !== "range") {
if (lazy) {
return;
}
- if (trim && el.value.trim() === value) {
+ if (trim && el.value.trim() === newValue) {
return;
}
- if ((number || el.type === "number") && looseToNumber(el.value) === value) {
- return;
- }
- }
- const newValue = value == null ? "" : value;
- if (el.value !== newValue) {
- el.value = newValue;
}
+ el.value = newValue;
}
};
var vModelCheckbox = {
// #4096 array checkboxes need to be deep traversed
deep: true,
created(el, _, vnode) {
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
addEventListener(el, "change", () => {
const modelValue = el._modelValue;
const elementValue = getValue(el);
const checked = el.checked;
- const assign = el._assign;
+ const assign = el[assignKey];
if (isArray(modelValue)) {
const index = looseIndexOf(modelValue, elementValue);
const found = index !== -1;
@@ -10247,7 +10379,7 @@ var vModelCheckbox = {
// set initial checked on mount to wait for true-value/false-value
mounted: setChecked,
beforeUpdate(el, binding, vnode) {
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
setChecked(el, binding, vnode);
}
};
@@ -10264,13 +10396,13 @@ function setChecked(el, { value, oldValue }, vnode) {
var vModelRadio = {
created(el, { value }, vnode) {
el.checked = looseEqual(value, vnode.props.value);
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
addEventListener(el, "change", () => {
- el._assign(getValue(el));
+ el[assignKey](getValue(el));
});
},
beforeUpdate(el, { value, oldValue }, vnode) {
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
if (value !== oldValue) {
el.checked = looseEqual(value, vnode.props.value);
}
@@ -10285,11 +10417,11 @@ var vModelSelect = {
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
);
- el._assign(
+ el[assignKey](
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
);
});
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
},
// set value in mounted & updated because relies on its children
// s.
@@ -10297,7 +10429,7 @@ var vModelSelect = {
setSelected(el, value);
},
beforeUpdate(el, _binding, vnode) {
- el._assign = getModelAssigner(vnode);
+ el[assignKey] = getModelAssigner(vnode);
},
updated(el, { value }) {
setSelected(el, value);
@@ -10456,51 +10588,6 @@ var withKeys = (fn, modifiers) => {
}
};
};
-var vShow = {
- beforeMount(el, { value }, { transition }) {
- el._vod = el.style.display === "none" ? "" : el.style.display;
- if (transition && value) {
- transition.beforeEnter(el);
- } else {
- setDisplay(el, value);
- }
- },
- mounted(el, { value }, { transition }) {
- if (transition && value) {
- transition.enter(el);
- }
- },
- updated(el, { value, oldValue }, { transition }) {
- if (!value === !oldValue)
- return;
- if (transition) {
- if (value) {
- transition.beforeEnter(el);
- setDisplay(el, true);
- transition.enter(el);
- } else {
- transition.leave(el, () => {
- setDisplay(el, false);
- });
- }
- } else {
- setDisplay(el, value);
- }
- },
- beforeUnmount(el, { value }) {
- setDisplay(el, value);
- }
-};
-function setDisplay(el, value) {
- el.style.display = value ? el._vod : "none";
-}
-function initVShowForSSR() {
- vShow.getSSRProps = ({ value }) => {
- if (!value) {
- return { style: { display: "none" } };
- }
- };
-}
var rendererOptions = extend({ patchProp }, nodeOps);
var renderer;
var enabledHydration = false;
@@ -10638,7 +10725,18 @@ var compile2 = () => {
};
export {
+ NOOP,
+ hasOwn,
+ isArray,
+ isDate,
+ isFunction,
+ isString,
+ isObject,
+ isPromise,
+ toRawType,
+ isPlainObject,
camelize,
+ hyphenate,
capitalize,
toHandlerKey,
normalizeStyle,
@@ -10672,6 +10770,7 @@ export {
customRef,
toRefs,
toRef,
+ computed,
warn2 as warn,
assertNumber,
callWithErrorHandling,
@@ -10685,6 +10784,9 @@ export {
popScopeId,
withScopeId,
withCtx,
+ resolveComponent,
+ resolveDynamicComponent,
+ resolveDirective,
Suspense,
watchEffect,
watchPostEffect,
@@ -10712,9 +10814,6 @@ export {
onRenderTriggered,
onRenderTracked,
onErrorCaptured,
- resolveComponent,
- resolveDynamicComponent,
- resolveDirective,
renderList,
createSlots,
renderSlot,
@@ -10760,7 +10859,7 @@ export {
getCurrentInstance,
registerRuntimeCompiler,
isRuntimeOnly,
- computed2 as computed,
+ computed2,
h,
ssrContextKey,
useSSRContext,
@@ -10771,12 +10870,13 @@ export {
ssrUtils,
resolveFilter,
compatUtils,
+ Transition,
+ vShow,
defineCustomElement,
defineSSRCustomElement,
VueElement,
useCssModule,
useCssVars,
- Transition,
TransitionGroup,
vModelText,
vModelCheckbox,
@@ -10785,7 +10885,6 @@ export {
vModelDynamic,
withModifiers,
withKeys,
- vShow,
render,
hydrate,
createApp,
@@ -10793,4 +10892,12 @@ export {
initDirectivesForSSR,
compile2 as compile
};
-//# sourceMappingURL=chunk-V634PGSD.js.map
+/*! Bundled license information:
+
+@vue/runtime-core/dist/runtime-core.esm-bundler.js:
+ (*! #__NO_SIDE_EFFECTS__ *)
+
+@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
+ (*! #__NO_SIDE_EFFECTS__ *)
+*/
+//# sourceMappingURL=chunk-3C4OEVM2.js.map
diff --git a/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js.map b/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js.map
new file mode 100644
index 0000000..a50658a
--- /dev/null
+++ b/docs/.vitepress/cache/deps/chunk-3C4OEVM2.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../../node_modules/@vue/shared/dist/shared.esm-bundler.js", "../../../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js", "../../../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js", "../../../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js", "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js"],
+ "sourcesContent": ["function makeMap(str, expectsLowerCase) {\n const map = /* @__PURE__ */ Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst onRE = /^on[^a-z]/;\nconst isOn = (key) => onRE.test(key);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {\n entries[`${key} =>`] = val2;\n return entries;\n }, {})\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()]\n };\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n", "import { extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nconst createDep = (effects) => {\n const dep = new Set(effects);\n dep.w = 0;\n dep.n = 0;\n return dep;\n};\nconst wasTracked = (dep) => (dep.w & trackOpBit) > 0;\nconst newTracked = (dep) => (dep.n & trackOpBit) > 0;\nconst initDepMarkers = ({ deps }) => {\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].w |= trackOpBit;\n }\n }\n};\nconst finalizeDepMarkers = (effect) => {\n const { deps } = effect;\n if (deps.length) {\n let ptr = 0;\n for (let i = 0; i < deps.length; i++) {\n const dep = deps[i];\n if (wasTracked(dep) && !newTracked(dep)) {\n dep.delete(effect);\n } else {\n deps[ptr++] = dep;\n }\n dep.w &= ~trackOpBit;\n dep.n &= ~trackOpBit;\n }\n deps.length = ptr;\n }\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nlet effectTrackDepth = 0;\nlet trackOpBit = 1;\nconst maxMarkerBits = 30;\nlet activeEffect;\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nclass ReactiveEffect {\n constructor(fn, scheduler = null, scope) {\n this.fn = fn;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n this.parent = void 0;\n recordEffectScope(this, scope);\n }\n run() {\n if (!this.active) {\n return this.fn();\n }\n let parent = activeEffect;\n let lastShouldTrack = shouldTrack;\n while (parent) {\n if (parent === this) {\n return;\n }\n parent = parent.parent;\n }\n try {\n this.parent = activeEffect;\n activeEffect = this;\n shouldTrack = true;\n trackOpBit = 1 << ++effectTrackDepth;\n if (effectTrackDepth <= maxMarkerBits) {\n initDepMarkers(this);\n } else {\n cleanupEffect(this);\n }\n return this.fn();\n } finally {\n if (effectTrackDepth <= maxMarkerBits) {\n finalizeDepMarkers(this);\n }\n trackOpBit = 1 << --effectTrackDepth;\n activeEffect = this.parent;\n shouldTrack = lastShouldTrack;\n this.parent = void 0;\n if (this.deferStop) {\n this.stop();\n }\n }\n }\n stop() {\n if (activeEffect === this) {\n this.deferStop = true;\n } else if (this.active) {\n cleanupEffect(this);\n if (this.onStop) {\n this.onStop();\n }\n this.active = false;\n }\n }\n}\nfunction cleanupEffect(effect2) {\n const { deps } = effect2;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect2);\n }\n deps.length = 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn);\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep());\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { effect: activeEffect, target, type, key } : void 0;\n trackEffects(dep, eventInfo);\n }\n}\nfunction trackEffects(dep, debuggerEventExtraInfo) {\n let shouldTrack2 = false;\n if (effectTrackDepth <= maxMarkerBits) {\n if (!newTracked(dep)) {\n dep.n |= trackOpBit;\n shouldTrack2 = !wasTracked(dep);\n }\n } else {\n shouldTrack2 = !dep.has(activeEffect);\n }\n if (shouldTrack2) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (!!(process.env.NODE_ENV !== \"production\") && activeEffect.onTrack) {\n activeEffect.onTrack(\n extend(\n {\n effect: activeEffect\n },\n debuggerEventExtraInfo\n )\n );\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { target, type, key, newValue, oldValue, oldTarget } : void 0;\n if (deps.length === 1) {\n if (deps[0]) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(deps[0], eventInfo);\n } else {\n triggerEffects(deps[0]);\n }\n }\n } else {\n const effects = [];\n for (const dep of deps) {\n if (dep) {\n effects.push(...dep);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(createDep(effects), eventInfo);\n } else {\n triggerEffects(createDep(effects));\n }\n }\n}\nfunction triggerEffects(dep, debuggerEventExtraInfo) {\n const effects = isArray(dep) ? dep : [...dep];\n for (const effect2 of effects) {\n if (effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n for (const effect2 of effects) {\n if (!effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n}\nfunction triggerEffect(effect2, debuggerEventExtraInfo) {\n if (effect2 !== activeEffect || effect2.allowRecurse) {\n if (!!(process.env.NODE_ENV !== \"production\") && effect2.onTrigger) {\n effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n if (effect2.scheduler) {\n effect2.scheduler();\n } else {\n effect2.run();\n }\n }\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n const res = toRaw(this)[key].apply(this, args);\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _shallow = false) {\n this._isReadonly = _isReadonly;\n this._shallow = _shallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, shallow = this._shallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return shallow;\n } else if (key === \"__v_raw\" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(shallow = false) {\n super(false, shallow);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {\n return false;\n }\n if (!this._shallow) {\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(shallow = false) {\n super(true, shallow);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(\n method,\n false,\n false\n );\n readonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n false\n );\n shallowInstrumentations2[method] = createIterableMethod(\n method,\n false,\n true\n );\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n def(value, \"__v_skip\", true);\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction trackRefValue(ref2) {\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n trackEffects(ref2.dep || (ref2.dep = createDep()), {\n target: ref2,\n type: \"get\",\n key: \"value\"\n });\n } else {\n trackEffects(ref2.dep || (ref2.dep = createDep()));\n }\n }\n}\nfunction triggerRefValue(ref2, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(dep, {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n });\n } else {\n triggerEffects(dep);\n }\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this._dirty = true;\n this.effect = new ReactiveEffect(getter, () => {\n if (!this._dirty) {\n this._dirty = true;\n triggerRefValue(this);\n }\n });\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n trackRefValue(self);\n if (self._dirty || !self._cacheable) {\n self._dirty = false;\n self._value = self.effect.run();\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n console.warn(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst tick = /* @__PURE__ */ Promise.resolve();\nconst queue = [];\nlet queued = false;\nconst scheduler = (fn) => {\n queue.push(fn);\n if (!queued) {\n queued = true;\n tick.then(flush);\n }\n};\nconst flush = () => {\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n }\n queue.length = 0;\n queued = false;\n};\nclass DeferredComputedRefImpl {\n constructor(getter) {\n this.dep = void 0;\n this._dirty = true;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = true;\n let compareTarget;\n let hasCompareTarget = false;\n let scheduled = false;\n this.effect = new ReactiveEffect(getter, (computedTrigger) => {\n if (this.dep) {\n if (computedTrigger) {\n compareTarget = this._value;\n hasCompareTarget = true;\n } else if (!scheduled) {\n const valueToCompare = hasCompareTarget ? compareTarget : this._value;\n scheduled = true;\n hasCompareTarget = false;\n scheduler(() => {\n if (this.effect.active && this._get() !== valueToCompare) {\n triggerRefValue(this);\n }\n scheduled = false;\n });\n }\n for (const e of this.dep) {\n if (e.computed instanceof DeferredComputedRefImpl) {\n e.scheduler(\n true\n /* computedTrigger */\n );\n }\n }\n }\n this._dirty = true;\n });\n this.effect.computed = this;\n }\n _get() {\n if (this._dirty) {\n this._dirty = false;\n return this._value = this.effect.run();\n }\n return this._value;\n }\n get value() {\n trackRefValue(this);\n return toRaw(this)._get();\n }\n}\nfunction deferredComputed(getter) {\n return new DeferredComputedRefImpl(getter);\n}\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n", "import { pauseTracking, resetTracking, isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, normalizeStyle } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn(msg, ...args) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorTypeStrings = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n let res;\n try {\n res = args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n return res;\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] : type;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)];\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n warn(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Set();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record)\n return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (const instance of instances) {\n const oldComp = normalizeClassComponent(instance.type);\n if (!hmrDirtyComponents.has(oldComp)) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.add(oldComp);\n }\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n hmrDirtyComponents.add(oldComp);\n instance.ceReload(newComp.styles);\n hmrDirtyComponents.delete(oldComp);\n } else if (instance.parent) {\n queueJob(instance.parent.update);\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n }\n queuePostFlushCb(() => {\n for (const instance of instances) {\n hmrDirtyComponents.delete(\n normalizeClassComponent(instance.type)\n );\n }\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools) {\n devtools.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook(hook, target) {\n var _a, _b;\n devtools = hook;\n if (devtools) {\n devtools.enabled = true;\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook(newHook, target);\n });\n setTimeout(() => {\n if (!devtools) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n props,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n let result;\n let fallthroughAttrs;\n const prev = setCurrentRenderingInstance(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n const thisProxy = !!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {\n get(target, key, receiver) {\n warn(\n `Property '${String(\n key\n )}' was accessed via 'this'. Avoid using 'this' in templates.`\n );\n return Reflect.get(target, key, receiver);\n }\n }) : proxyToUse;\n result = normalizeVNode(\n render.call(\n thisProxy,\n proxyToUse,\n renderCache,\n props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return attrs;\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n props,\n null\n /* we know it doesn't need it */\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Component inside renders non-element root node that cannot be animated.`\n );\n }\n root.transition = vnode.transition;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren);\n if (!childRoot) {\n return [vnode, void 0];\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent && parent.subTree === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n }\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n /* do not include inferred name to avoid breaking existing code */\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n create: createSuspenseBoundary,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else {\n suspense.pendingId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n suspense.pendingId++;\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n ` is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n isSVG,\n container,\n hiddenContainer,\n anchor,\n deps: 0,\n pendingId: 0,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: true,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n let delayEnter = false;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(pendingBranch, container2, anchor2, 0);\n queuePostFlushCb(effects);\n }\n };\n }\n let { anchor: anchor2 } = suspense;\n if (activeBranch) {\n anchor2 = next(activeBranch);\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor2, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor && !delayEnter) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n isSVG2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n isSVG,\n optimized\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n document.createElement(\"div\"),\n null,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n /* hydrating */\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n warn(` slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n const el = vnode.el = branch.el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n var _a;\n return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;\n}\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {\n var _a;\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow$1(source);\n } else if (isReactive(source)) {\n getter = () => source;\n deep = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return traverse(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (instance && instance.isUnmounted) {\n return;\n }\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n cleanup = effect.onStop = void 0;\n };\n };\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n onCleanup = NOOP;\n if (!cb) {\n getter();\n } else if (immediate) {\n callWithAsyncErrorHandling(cb, instance, 3, [\n getter(),\n isMultiSource ? [] : void 0,\n onCleanup\n ]);\n }\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else {\n return NOOP;\n }\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, scheduler);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n const unwatch = () => {\n effect.stop();\n if (instance && instance.scope) {\n remove(instance.scope.effects, effect);\n }\n };\n if (ssrCleanup)\n ssrCleanup.push(unwatch);\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const cur = currentInstance;\n setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n if (cur) {\n setCurrentInstance(cur);\n } else {\n unsetCurrentInstance();\n }\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n const internalInstance = currentRenderingInstance;\n if (internalInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(internalInstance) || internalInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n let prevTransitionKey;\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\"))\n break;\n }\n }\n }\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getKeepAliveChild(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n const enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(innerChild, enterHooks);\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n let transitionKeyChanged = false;\n const { getTransitionKey } = innerChild.type;\n if (getTransitionKey) {\n const key = getTransitionKey();\n if (prevTransitionKey === void 0) {\n prevTransitionKey = key;\n } else if (key !== prevTransitionKey) {\n prevTransitionKey = key;\n transitionKeyChanged = true;\n }\n }\n if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\") {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (instance.update.active !== false) {\n instance.update();\n }\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el[leaveCbKey] = () => {\n earlyRemove();\n el[leaveCbKey] = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1))\n done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el[leaveCbKey]) {\n el[leaveCbKey](\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n leavingVNode.el[leaveCbKey]();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el[enterCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el[enterCbKey] = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el[enterCbKey]) {\n el[enterCbKey](\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el[leaveCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el[leaveCbKey] = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n return resolveTransitionHooks(vnode2, props, state, instance);\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getKeepAliveChild(vnode) {\n return isKeepAlive(vnode) ? (\n // #7121 ensure get the child component subtree in case\n // it's been replaced during HMR\n !!(process.env.NODE_ENV !== \"production\") && vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0\n ) : vnode;\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128)\n keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n /* do not throw in dev if user provided error component */\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n queueJob(instance.parent.update);\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n isSVG,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && (!filter || !filter(name))) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (!current || !isSameVNodeType(cached, current)) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n unsetCurrentInstance();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, \"\"));\n warn(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n if (isArray(source) || isString(source)) {\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res)\n res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n if (name !== \"default\")\n props.name = name;\n return createVNode(\"slot\", props, fallback && fallback());\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const rendered = createBlock(\n Fragment,\n {\n key: props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key || `_${name}`\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child))\n return true;\n if (child.type === Comment)\n return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn(`Cannot mutate