From 47fd2d0aa5021a1f3deb660601e54611ae4aa193 Mon Sep 17 00:00:00 2001 From: varun7654 Date: Thu, 23 May 2024 23:49:51 -0700 Subject: [PATCH] Updates --- 200.html | 2 +- 404.html | 2 +- Problem/easy/countvowelsinsentence/index.html | 2 +- Problem/hard/dynamic/index.html | 2 +- Problem/hard/graphtheory/index.html | 4 +-- Problem/intro/intro1/index.html | 4 +-- Problem/intro/intro2/index.html | 2 +- Problem/intro/intro3/index.html | 2 +- Problem/intro/intro4/index.html | 4 +-- Problem/intro/intro5/index.html | 4 +-- Problem/intro/piecewisepractice1/index.html | 2 +- Problem/intro/piecewisepractice2/index.html | 2 +- Problem/intro/piecewisepractice3/index.html | 2 +- Problem/medium/binarysearchtree/index.html | 4 +-- Problem/medium/fibonacci/index.html | 2 +- Problem/medium/mergesort/index.html | 2 +- asset-manifest.json | 30 +++++++++--------- index.html | 2 +- manifest.json | 4 +-- privacy/index.html | 2 +- static/css/main.1c910bb7.css | 6 ++++ static/css/main.1c910bb7.css.map | 1 + static/css/main.420a9a19.css | 6 ---- static/css/main.420a9a19.css.map | 1 - static/js/20.d5160684.chunk.js | 2 -- static/js/20.d5160684.chunk.js.map | 1 - static/js/369.3d4a775d.chunk.js | 3 -- static/js/369.3d4a775d.chunk.js.map | 1 - static/js/671.20898529.chunk.js | 3 ++ static/js/671.20898529.chunk.js.LICENSE.txt | 7 +++++ static/js/671.20898529.chunk.js.map | 1 + static/js/671.5426ab3a.chunk.js | 3 -- static/js/671.5426ab3a.chunk.js.LICENSE.txt | 31 ------------------- static/js/671.5426ab3a.chunk.js.map | 1 - ...1ef71a3.chunk.js => 780.2d7a4384.chunk.js} | 4 +-- ...chunk.js.map => 780.2d7a4384.chunk.js.map} | 2 +- static/js/802.7276d5f7.chunk.js | 3 ++ ....txt => 802.7276d5f7.chunk.js.LICENSE.txt} | 0 static/js/802.7276d5f7.chunk.js.map | 1 + static/js/853.4c6c25ca.chunk.js | 2 -- static/js/853.4c6c25ca.chunk.js.map | 1 - static/js/853.cacc6adc.chunk.js | 2 ++ static/js/853.cacc6adc.chunk.js.map | 1 + static/js/main.1d687935.js | 3 ++ ...CENSE.txt => main.1d687935.js.LICENSE.txt} | 0 static/js/main.1d687935.js.map | 1 + static/js/main.f34bd028.js | 3 -- static/js/main.f34bd028.js.map | 1 - terms/index.html | 2 +- 49 files changed, 72 insertions(+), 101 deletions(-) create mode 100644 static/css/main.1c910bb7.css create mode 100644 static/css/main.1c910bb7.css.map delete mode 100644 static/css/main.420a9a19.css delete mode 100644 static/css/main.420a9a19.css.map delete mode 100644 static/js/20.d5160684.chunk.js delete mode 100644 static/js/20.d5160684.chunk.js.map delete mode 100644 static/js/369.3d4a775d.chunk.js delete mode 100644 static/js/369.3d4a775d.chunk.js.map create mode 100644 static/js/671.20898529.chunk.js create mode 100644 static/js/671.20898529.chunk.js.LICENSE.txt create mode 100644 static/js/671.20898529.chunk.js.map delete mode 100644 static/js/671.5426ab3a.chunk.js delete mode 100644 static/js/671.5426ab3a.chunk.js.LICENSE.txt delete mode 100644 static/js/671.5426ab3a.chunk.js.map rename static/js/{780.c1ef71a3.chunk.js => 780.2d7a4384.chunk.js} (79%) rename static/js/{780.c1ef71a3.chunk.js.map => 780.2d7a4384.chunk.js.map} (96%) create mode 100644 static/js/802.7276d5f7.chunk.js rename static/js/{369.3d4a775d.chunk.js.LICENSE.txt => 802.7276d5f7.chunk.js.LICENSE.txt} (100%) create mode 100644 static/js/802.7276d5f7.chunk.js.map delete mode 100644 static/js/853.4c6c25ca.chunk.js delete mode 100644 static/js/853.4c6c25ca.chunk.js.map create mode 100644 static/js/853.cacc6adc.chunk.js create mode 100644 static/js/853.cacc6adc.chunk.js.map create mode 100644 static/js/main.1d687935.js rename static/js/{main.f34bd028.js.LICENSE.txt => main.1d687935.js.LICENSE.txt} (100%) create mode 100644 static/js/main.1d687935.js.map delete mode 100644 static/js/main.f34bd028.js delete mode 100644 static/js/main.f34bd028.js.map diff --git a/200.html b/200.html index 2f00e7e..3198c40 100644 --- a/200.html +++ b/200.html @@ -1 +1 @@ -WeCode
\ No newline at end of file +WeCode
\ No newline at end of file diff --git a/404.html b/404.html index f205ecb..4bd0ea3 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ -WeCode
WeCode
WeCode
\ No newline at end of file diff --git a/Problem/easy/countvowelsinsentence/index.html b/Problem/easy/countvowelsinsentence/index.html index 6ccd063..e9fc56c 100644 --- a/Problem/easy/countvowelsinsentence/index.html +++ b/Problem/easy/countvowelsinsentence/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Count Vowels In a Sentence

Write a function that takes a sentence as a parameter and returns the number of vowels in the sentence. You can assume that the sentence will only contain lowercase letters, spaces, and punctuation.

sentence is a string that represents the sentence.

Hints

  • You'll want to use string.includes(character) to check if a character is a vowel.
  • You'll want to loop through each character in the sentence.
function countVowels(sentence) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • countVowels('hello world')3 : Not Run
  • countVowels('hello world.')3 : Not Run
  • countVowels('hello world, how are you?')8 : Not Run
  • countVowels('aeiou')5 : Not Run
  • countVowels('aeiouaeiouaeiou')15 : Not Run
  • countVowels('qwrtypsdfghjklzxcvbnm')0 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Count Vowels In a Sentence

Write a function that takes a sentence as a parameter and returns the number of vowels in the sentence. You can assume that the sentence will only contain lowercase letters, spaces, and punctuation.

sentence is a string that represents the sentence.

Hints

  • You'll want to use string.includes(character) to check if a character is a vowel.
  • You'll want to loop through each character in the sentence.
function countVowels(sentence) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
countVowels('hello world')3 : Not Run
countVowels('hello world.')3 : Not Run
countVowels('hello world, how are you?')8 : Not Run
countVowels('aeiou')5 : Not Run
countVowels('aeiouaeiouaeiou')15 : Not Run
countVowels('qwrtypsdfghjklzxcvbnm')0 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/hard/dynamic/index.html b/Problem/hard/dynamic/index.html index 845f789..defdcec 100644 --- a/Problem/hard/dynamic/index.html +++ b/Problem/hard/dynamic/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Combinatorial Optimization

The knapsack problem is a problem in combinatorial optimization. Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

Example

Consider a set of items: {A, B, C, D} with weights {10, 20, 30, 40} and values {60, 100, 120, 130}. The maximum weight that can be carried is 50. The maximum value that can be obtained is 220 by taking items A and C.

Write a function that takes an array of objects (each object containing an item's weight and value) and a maximum weight, and returns the maximum value that can be obtained by selecting a combination of items such that the total weight is less than or equal to the maximum weight. In test cases, items is an array of objects, each with a weight and value. maxWeight is the maximum weight that can be carried. The function knapsackProblem is called with these arguments and returns the maximum value that can be obtained by selecting items such that the total weight is less than or equal to maxWeight. The hidden test cases work similarly with hiddenItems1, hiddenItems2, hiddenMaxWeight1, and hiddenMaxWeight2.

function knapsackProblem(items, maxWeight) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • knapsackProblem(items1, maxWeight1)220 : Not Run
  • knapsackProblem(items2, maxWeight2)100 : Not Run
  • knapsackProblem(items3, maxWeight3)2 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Combinatorial Optimization

The knapsack problem is a problem in combinatorial optimization. Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

Example

Consider a set of items: {A, B, C, D} with weights {10, 20, 30, 40} and values {60, 100, 120, 130}. The maximum weight that can be carried is 50. The maximum value that can be obtained is 220 by taking items A and C.

Write a function that takes an array of objects (each object containing an item's weight and value) and a maximum weight, and returns the maximum value that can be obtained by selecting a combination of items such that the total weight is less than or equal to the maximum weight. In test cases, items is an array of objects, each with a weight and value. maxWeight is the maximum weight that can be carried. The function knapsackProblem is called with these arguments and returns the maximum value that can be obtained by selecting items such that the total weight is less than or equal to maxWeight. The hidden test cases work similarly with hiddenItems1, hiddenItems2, hiddenMaxWeight1, and hiddenMaxWeight2.

function knapsackProblem(items, maxWeight) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
knapsackProblem(items1, maxWeight1)220 : Not Run
knapsackProblem(items2, maxWeight2)100 : Not Run
knapsackProblem(items3, maxWeight3)2 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/hard/graphtheory/index.html b/Problem/hard/graphtheory/index.html index 9d3766a..e5af77a 100644 --- a/Problem/hard/graphtheory/index.html +++ b/Problem/hard/graphtheory/index.html @@ -1,6 +1,6 @@ -WeCode
WeCode
Graph Theory

The Travelling Salesman Problem (TSP) is a classic algorithmic problem in the field of computer science and operations research. It focuses on optimization. In this problem, a salesman is given a list of cities, and must determine the shortest possible route that allows him to visit each city once and return to his original location.

  • The number of cities is between 2 and 10.
  • The distance between any two cities is between 1 and 100.

Example

Consider a set of cities: {A, B, C, D}. The distances between each pair of cities are given in a matrix form:

        A   B   C   D
+WeCode
WeCode
Graph Theory

The Travelling Salesman Problem (TSP) is a classic algorithmic problem in the field of computer science and operations research. It focuses on optimization. In this problem, a salesman is given a list of cities, and must determine the shortest possible route that allows him to visit each city once and return to his original location.

  • The number of cities is between 2 and 10.
  • The distance between any two cities is between 1 and 100.

Example

Consider a set of cities: {A, B, C, D}. The distances between each pair of cities are given in a matrix form:

        A   B   C   D
     A   0   10  15  20
-

The shortest possible route that visits each city once and returns to the original city is A -> B -> D -> C -> A with a total distance of 80.

Write a function that takes a matrix of distances between cities and returns the shortest possible route that a salesman can take to visit each city once and return to the original city.

function travellingSalesmanProblem(distances) {
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • travellingSalesmanProblem(distances1);80 : Not Run
  • travellingSalesmanProblem(distances2);31 : Not Run
  • travellingSalesmanProblem(distances3);21 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro1/index.html b/Problem/intro/intro1/index.html index 490b01f..44d1c08 100644 --- a/Problem/intro/intro1/index.html +++ b/Problem/intro/intro1/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Learning to Code

Thought this course, we will be using JavaScript as our programming language.

You'll learn though a series of bite-sized programming challenges that will help you learn the basics of programming. The challenges are designed to be fun and engaging, and to help you learn how to think like a programmer. We'll start with the basics and gradually build up to more complex problems.

While we'll be using JavaScript, the concepts you'll learn are applicable to any programming language. We'll avoid going too deep into the language-specific details, and instead focus on the core concepts that are common to all programming languages.

Prerequisites

  • No prior programming experience is required.
  • Knowledge of algebra will be extremely helpful.
    • A lot of our problems will build on the concepts of algebra, so having a good understanding of algebra will be very helpful.
    • You don't need to be an expert, but you should be comfortable with basic algebraic concepts like variables, functions, function notation, and function composition.

What you'll learn

  • How to write javascript code.
  • How to solve problems using code.
  • How to think like a programmer.
  • How to break down complex problems into smaller, more manageable parts.
  • How to use code to solve real-world problems.
  • How to use code to automate repetitive tasks.

How to use this course

  • Each problem will be presented as a challenge that you need to solve.
  • You'll be given a problem statement, and you'll need to write a function that solves the problem.
  • You'll be given a set of test cases that your function should pass.
    • Some of the test cases will be visible to you, while others will be hidden to prevent you from basing your solution on the visible test cases. You should write your function so that it passes all the test cases.
    • You have unlimited attempts to solve each problem`.
  • Feel free to skip around and work on the problems in any order you like.
  • If you get stuck, press the "I'm stuck" button, and an AI-powered tutor will analyze your code and give you a hint to help get you unstuck!

Let's get started!

You're probably familiar with functions from algebra. In algebra, a function is a rule that assigns each input value to exactly one output value.

Take, for example:

f(x)=x+1f(x) = x + 1.

In this function, the input value is x, and the output value is x squared.

Let's try to write a function in JavaScript that does the same thing.

function f(x) {
+WeCode
WeCode
Learning to Code

Thought this course, we will be using JavaScript as our programming language.

You'll learn though a series of bite-sized programming challenges that will help you learn the basics of programming. The challenges are designed to be fun and engaging, and to help you learn how to think like a programmer. We'll start with the basics and gradually build up to more complex problems.

While we'll be using JavaScript, the concepts you'll learn are applicable to any programming language. We'll avoid going too deep into the language-specific details, and instead focus on the core concepts that are common to all programming languages.

Prerequisites

  • No prior programming experience is required.
  • Knowledge of algebra will be extremely helpful.
    • A lot of our problems will build on the concepts of algebra, so having a good understanding of algebra will be very helpful.
    • You don't need to be an expert, but you should be comfortable with basic algebraic concepts like variables, functions, function notation, and function composition.

What you'll learn

  • How to write javascript code.
  • How to solve problems using code.
  • How to think like a programmer.
  • How to break down complex problems into smaller, more manageable parts.
  • How to use code to solve real-world problems.
  • How to use code to automate repetitive tasks.

How to use this course

  • Each problem will be presented as a challenge that you need to solve.
  • You'll be given a problem statement, and you'll need to write a function that solves the problem.
  • You'll be given a set of test cases that your function should pass.
    • Some of the test cases will be visible to you, while others will be hidden to prevent you from basing your solution on the visible test cases. You should write your function so that it passes all the test cases.
    • You have unlimited attempts to solve each problem`.
  • Feel free to skip around and work on the problems in any order you like.
  • If you get stuck, press the "I'm stuck" button, and an AI-powered tutor will analyze your code and give you a hint to help get you unstuck!

Let's get started!

You're probably familiar with functions from algebra. In algebra, a function is a rule that assigns each input value to exactly one output value.

Take, for example:

f(x)=x+1f(x) = x + 1.

In this function, the input value is x, and the output value is x squared.

Let's try to write a function in JavaScript that does the same thing.

function f(x) {
     return x + 1;
 }
 

Notice that the function is defined using the function keyword. In javascript, the function keyword tells the computer that the following code is a function.

The text between the function keyword and the parentheses is the name of the function. In this case, the function is called f.

The parentheses that are immediately after the function name are where we put the input value to the function. You can think of the parentheses and variable, x inside them exactly like the variable and parentheses in the algebraic function.

The { and } are used to define the body of the function. You don't see these in math, but they tell JavaScript where the function starts and ends. So, the function begins after the { and ends after the }.

The return keyword tells the computer what the output value of the function is. When the computer sees the return keyword, it reads whatever code is after it and "returns" that value as the output of the function.

So, with the code above, we've defined a function called f that takes an input value x and returns x + 1.

If we wanted to use this function, we could call it like this:

f(3);
@@ -8,7 +8,7 @@
 

Here, we've defined a function called g that takes an input value x and returns x * 2.

So, if we called g(3), it would return 3 * 2, which is 6.

function h(a) {
     return a * a;
 }
-

Here, we've defined a function called h that takes an input value a and returns a * a. (or a squared)

So, if we called h(3), it would return 3 * 3, which is 9.

Your first challenge

Can you write the function for the following algebraic function?

f(x)=x+5f(x) = x + 5

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(1)6 : Not Run
  • f(2)7 : Not Run
  • f(3)8 : Not Run
  • f(4)9 : Not Run
  • f(-1)4 : Not Run
  • f(-2)3 : Not Run
  • f(-3)2 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro2/index.html b/Problem/intro/intro2/index.html index 7ab5b42..f4e209f 100644 --- a/Problem/intro/intro2/index.html +++ b/Problem/intro/intro2/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Constant Functions

In algebra, we can define a function that returns a constant value.

For example, we can define a function f(x)=5f(x) = 5.

This function will always return 5, no matter what value of x we pass to it.

Let's write a function that returns a constant value. Write the algebraic function from above, f(x)=5f(x) = 5, as a JavaScript function.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(0)5 : Not Run
  • f(1)5 : Not Run
  • f(2)5 : Not Run
  • f(3)5 : Not Run
  • f(-1)5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Constant Functions

In algebra, we can define a function that returns a constant value.

For example, we can define a function f(x)=5f(x) = 5.

This function will always return 5, no matter what value of x we pass to it.

Let's write a function that returns a constant value. Write the algebraic function from above, f(x)=5f(x) = 5, as a JavaScript function.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
f(0)5 : Not Run
f(1)5 : Not Run
f(2)5 : Not Run
f(3)5 : Not Run
f(-1)5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro3/index.html b/Problem/intro/intro3/index.html index 9ae52ea..53a0c11 100644 --- a/Problem/intro/intro3/index.html +++ b/Problem/intro/intro3/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Constant Functions 2

In algebra, it would be weird to define a function that has no input value. In programming, it's not so weird, and we do it all the time.

We've been writing functions that take an input value and return a value based on that input like this:

function f(x) {
+WeCode
WeCode
Constant Functions 2

In algebra, it would be weird to define a function that has no input value. In programming, it's not so weird, and we do it all the time.

We've been writing functions that take an input value and return a value based on that input like this:

function f(x) {
     return x * x + 5;
 }
 

But we can also write functions that don't take any input value at all, like this:

function f() {
diff --git a/Problem/intro/intro4/index.html b/Problem/intro/intro4/index.html
index 63cf677..41e56d7 100644
--- a/Problem/intro/intro4/index.html
+++ b/Problem/intro/intro4/index.html
@@ -1,4 +1,4 @@
-WeCode
WeCode
Multiple Inputs

Like in math, we can create a function that takes multiple input values and returns a single value.

For example, the function f(x,y)=x+yf(x, y) = x + y. Looks like this in JavaScript:

function f(x, y) {
+WeCode
WeCode
Multiple Inputs

Like in math, we can create a function that takes multiple input values and returns a single value.

For example, the function f(x,y)=x+yf(x, y) = x + y. Looks like this in JavaScript:

function f(x, y) {
     return x + y;
 }
 

Here, we've defined a function called f that takes two input values x and y and returns x + y. Notice that the input values are separated by a comma in the parentheses after f. These are required and not putting them there will cause an error.

Nothing is preventing us from writing a function that takes 3, 4, 5, or even more input values.

Here we have a function that takes 3 input values and returns the sum of the squares of the input values:

function f(x, y, z) {
@@ -10,7 +10,7 @@
 

This is the same as the function above, but it's a little more clear what we want the computer to do.

Some functions that we want to write will require parentheses to make sure the computer does exactly what we want it to do.

For example, if we have:

f(a,b,c,d)=a2+2(a+b)+cf(a, b, c, d) = a^2 + 2 * (a + b) + c

We would write the function in JavaScript like this:

function f(a, b, c) {
     return a ** 2 + 2 * (a + b) + c;
 }
-

With parentheses in the exact same places as in the algebraic function.

Also note that we use "**" to denote an exponent in JavaScript. The "^" symbol is used for something else, and we'll learn about it later.

Let's try this

Let's write a function that takes 4 inputs and calculates the following:

f(a,b,c,d)=(3(a+b)2+c)df(a, b, c, d) = (3 * (a + b) ^ 2 + c) * d

Note:

Remember, in JavaScript, we use ** to denote an exponent.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(1, 2, 3, 4)120 : Not Run
  • f(0, 0, 0, 0)0 : Not Run
  • f(1, 1, 1, 1)13 : Not Run
  • f(2, 2, 2, 2)100 : Not Run
  • f(0, 0.75, 1.5, 5)15.9375 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro5/index.html b/Problem/intro/intro5/index.html index a31ff05..67fb23f 100644 --- a/Problem/intro/intro5/index.html +++ b/Problem/intro/intro5/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Piecewise Functions

In algebra, we can define a function made up of multiple functions also known as a piecewise function.

Example 1

Take, for example, the function f(x)f(x) defined as:

f(x)={x+1if x<0x1if x0f(x) = \begin{cases} x + 1 & \text{if } x < 0 \\ x - 1 & \text{if } x \geq 0 \end{cases}

This function is defined as two separate functions, one for when x<0x < 0 and one for when x0x \geq 0.

To do this in JavaScript, we need to use an if statement.

Let's first write out a JavaScript function that does the same thing as the algebraic function above. After that, I'll explain how it works.

function f(x) {
+WeCode
WeCode
Piecewise Functions

In algebra, we can define a function made up of multiple functions also known as a piecewise function.

Example 1

Take, for example, the function f(x)f(x) defined as:

f(x)={x+1if x<0x1if x0f(x) = \begin{cases} x + 1 & \text{if } x < 0 \\ x - 1 & \text{if } x \geq 0 \end{cases}

This function is defined as two separate functions, one for when x<0x < 0 and one for when x0x \geq 0.

To do this in JavaScript, we need to use an if statement.

Let's first write out a JavaScript function that does the same thing as the algebraic function above. After that, I'll explain how it works.

function f(x) {
     if (x < 0) {
         return x + 1;
     } else {
@@ -14,7 +14,7 @@
         return x + 1;
     }
 }
-

Line 2-3

The if statement checks if x >= -3 is true. If it is, the computer runs the code inside the braces that follow the if statement.

So, if x >= -3 is true, the computer will run return x ** 2;.

Notice that we use >= to denote "greater than or equal to" in JavaScript. The same is true for <= which denotes "less than or equal to".

Line 4–5

We have another thing we haven't seen before, the else if statement. The else if statement is used when we have more than one condition to check.

Like the else statement, the else if statement only runs if the condition in the if statements that proceed it are false. Additionally, like the if statement, the else if statement checks if the condition inside the parentheses is true before running the code inside the braces that follow it.

So, if -10 < x && x < -3 is true, the computer will run return 2 * x + 1;.

Notice that the && is used to denote an "and" in JavaScript. We must use two & symbols to denote an "and" in JavaScript. The single & symbol is used for something else, and we'll learn about it later.

Also note: -10 < x < -3 isn't valid JavaScript syntax. While in algebra we could write this, in JavaScript we can only perform one comparison at a time. (We need to split the comparison into two separate comparisons, -10 < x && x < -3.)

Line 6–8

The else statement is used to catch any values of x that don't satisfy the conditions in the if and else if statements. If there were more else if statements, the else statement would only run if all the conditions in the if and else if statements were false.

So, if x >= -3 is false and -10 < x && x < -3 is false, the computer will run return x + 1;.

Let's try this

Write a function that is equivalent to the following piecewise function:

f(x)={6x+3if x>4x21if 0x42x+1if 2x<0xif x<2f(x) = \begin{cases} 6x + 3 & \text{if } x > 4 \\ x^2 - 1 & \text{if } 0 \leq x \leq 4 \\ 2x + 1 & \text{if } -2 \leq x < 0 \\ -x & \text{if } x < -2 \end{cases}

Reference:

  • <= denotes "less than or equal to" in JavaScript.
  • >= denotes "greater than or equal to" in JavaScript.
  • && denotes "and" in JavaScript.
  • ** denotes an exponent in JavaScript.
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(5)33 : Not Run
  • f(4)15 : Not Run
  • f(3)8 : Not Run
  • f(0)-1 : Not Run
  • f(-1)-1 : Not Run
  • f(-2)-3 : Not Run
  • f(-3)3 : Not Run
  • f(-4)4 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/piecewisepractice1/index.html b/Problem/intro/piecewisepractice1/index.html index 2ba4941..d1bb480 100644 --- a/Problem/intro/piecewisepractice1/index.html +++ b/Problem/intro/piecewisepractice1/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Piecewise Function Practice 1

Write a function that is equivalent to the following piecewise function:

f(x)={3x+3if x>=8x3/21if 2<x<8x/4+1if 0<=x<=2x4/43x2+2x+1if x<0f(x) = \begin{cases} -3x + 3 & \text{if } x >= 8 \\ x^{3/2} - 1 & \text{if } 2 < x < 8 \\ x/4 + 1 & \text{if } 0 <= x <= 2 \\ x^4/4 - 3x^2 + 2x + 1 & \text{if } x < 0 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(8)-21 : Not Run
  • f(7)17.520259177452132 : Not Run
  • f(6)13.696938456699069 : Not Run
  • f(5)10.180339887498949 : Not Run
  • f(4)7 : Not Run
  • f(3)4.196152422706632 : Not Run
  • f(2)1.5 : Not Run
  • f(1)1.25 : Not Run
  • f(0)1 : Not Run
  • f(-1)-3.75 : Not Run
  • f(-2)-11 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Piecewise Function Practice 1

Write a function that is equivalent to the following piecewise function:

f(x)={3x+3if x>=8x3/21if 2<x<8x/4+1if 0<=x<=2x4/43x2+2x+1if x<0f(x) = \begin{cases} -3x + 3 & \text{if } x >= 8 \\ x^{3/2} - 1 & \text{if } 2 < x < 8 \\ x/4 + 1 & \text{if } 0 <= x <= 2 \\ x^4/4 - 3x^2 + 2x + 1 & \text{if } x < 0 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
f(8)-21 : Not Run
f(7)17.520259177452132 : Not Run
f(6)13.696938456699069 : Not Run
f(5)10.180339887498949 : Not Run
f(4)7 : Not Run
f(3)4.196152422706632 : Not Run
f(2)1.5 : Not Run
f(1)1.25 : Not Run
f(0)1 : Not Run
f(-1)-3.75 : Not Run
f(-2)-11 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/piecewisepractice2/index.html b/Problem/intro/piecewisepractice2/index.html index ade6958..231f6e7 100644 --- a/Problem/intro/piecewisepractice2/index.html +++ b/Problem/intro/piecewisepractice2/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Piecewise Function Practice 2

Write a function that is equivalent to the following piecewise function:

f(x)={17x/4+2if x4x43if 6.5<x<4x2+1if 8x6.5x/2+1if x<8f(x) = \begin{cases} 17x/4 + 2 & \text{if } x \geq -4 \\ x^4 - 3 & \text{if } -6.5 < x < -4 \\ x^2 + 1 & \text{if } -8 \leq x \leq -6.5 \\ x/2 + 1 & \text{if } x < -8 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(-3)-10.75 : Not Run
  • f(-4)-15 : Not Run
  • f(-5)622 : Not Run
  • f(-6.5)43.25 : Not Run
  • f(-7)50 : Not Run
  • f(-8)65 : Not Run
  • f(-9)-3.5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Piecewise Function Practice 2

Write a function that is equivalent to the following piecewise function:

f(x)={17x/4+2if x4x43if 6.5<x<4x2+1if 8x6.5x/2+1if x<8f(x) = \begin{cases} 17x/4 + 2 & \text{if } x \geq -4 \\ x^4 - 3 & \text{if } -6.5 < x < -4 \\ x^2 + 1 & \text{if } -8 \leq x \leq -6.5 \\ x/2 + 1 & \text{if } x < -8 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
f(-3)-10.75 : Not Run
f(-4)-15 : Not Run
f(-5)622 : Not Run
f(-6.5)43.25 : Not Run
f(-7)50 : Not Run
f(-8)65 : Not Run
f(-9)-3.5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/piecewisepractice3/index.html b/Problem/intro/piecewisepractice3/index.html index 83eba0c..79382b6 100644 --- a/Problem/intro/piecewisepractice3/index.html +++ b/Problem/intro/piecewisepractice3/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Failed to load problem intro/piecewisepractice3
WeCode
Failed to load problem intro/piecewisepractice3
\ No newline at end of file diff --git a/Problem/medium/binarysearchtree/index.html b/Problem/medium/binarysearchtree/index.html index bb5476d..71309f1 100644 --- a/Problem/medium/binarysearchtree/index.html +++ b/Problem/medium/binarysearchtree/index.html @@ -1,11 +1,11 @@ -WeCode
WeCode
Binary Search Tree Traversal

Binary Search Trees (BST) are a fundamental data structure in computer science. They allow for efficient insertion, deletion, and lookup operations. One common operation performed on BSTs is traversal, where each node in the tree is visited in a specific order.

Example 1

Consider a BST with the following nodes: 8, 3, 10, 1, 6, 14, 4, 7, 13. The BST would look like this:

     8
+WeCode
WeCode
Binary Search Tree Traversal

Binary Search Trees (BST) are a fundamental data structure in computer science. They allow for efficient insertion, deletion, and lookup operations. One common operation performed on BSTs is traversal, where each node in the tree is visited in a specific order.

Example 1

Consider a BST with the following nodes: 8, 3, 10, 1, 6, 14, 4, 7, 13. The BST would look like this:

     8
     / \
    3   10
   / \   \
  1   6   14
 /     \   \
 4      7   13
-

A common traversal method is the in-order traversal, which visits the nodes in ascending order. The in-order traversal for this BST would be: 1, 3, 4, 6, 7, 8, 10, 13, 14.

In these test cases, we're creating a binary search tree with the TreeNode class. The root is the topmost node in the tree, from which all other nodes descend. In this case, the root node has a value of 8.

Let's try this

Write a function that performs an in-order traversal of a BST. The function should take the root of the BST as input and return an array of the nodes in ascending order.

function inOrderTraversal(root) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • inorderTraversal(root);1,3,4,6,7,8,10,13,14 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/medium/fibonacci/index.html b/Problem/medium/fibonacci/index.html index a7a4afd..9c2d156 100644 --- a/Problem/medium/fibonacci/index.html +++ b/Problem/medium/fibonacci/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Fibonacci Problem

The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones. So,

fn=fn1+fn2f_n = f_{n-1} + f_{n-2}

For reference, the 0th and 1st numbers in the Fibonacci sequence are 0 and 1, respectively. The sequence starts like the following:

0,1,1,2,3,5,8,13,21,34,55,...0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...

Write a function that takes in a number n and returns the nth number in the Fibonacci sequence.

function findNthFibonacci(n) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • findNthFibonacci(0)0 : Not Run
  • findNthFibonacci(1)1 : Not Run
  • findNthFibonacci(2)1 : Not Run
  • findNthFibonacci(3)2 : Not Run
  • findNthFibonacci(4)3 : Not Run
  • findNthFibonacci(5)5 : Not Run
  • findNthFibonacci(6)8 : Not Run
  • findNthFibonacci(7)13 : Not Run
  • findNthFibonacci(8)21 : Not Run
  • findNthFibonacci(9)34 : Not Run
  • findNthFibonacci(10)55 : Not Run
  • findNthFibonacci(11)89 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Fibonacci Problem

The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones. So,

fn=fn1+fn2f_n = f_{n-1} + f_{n-2}

For reference, the 0th and 1st numbers in the Fibonacci sequence are 0 and 1, respectively. The sequence starts like the following:

0,1,1,2,3,5,8,13,21,34,55,...0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...

Write a function that takes in a number n and returns the nth number in the Fibonacci sequence.

function findNthFibonacci(n) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
findNthFibonacci(0)0 : Not Run
findNthFibonacci(1)1 : Not Run
findNthFibonacci(2)1 : Not Run
findNthFibonacci(3)2 : Not Run
findNthFibonacci(4)3 : Not Run
findNthFibonacci(5)5 : Not Run
findNthFibonacci(6)8 : Not Run
findNthFibonacci(7)13 : Not Run
findNthFibonacci(8)21 : Not Run
findNthFibonacci(9)34 : Not Run
findNthFibonacci(10)55 : Not Run
findNthFibonacci(11)89 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/medium/mergesort/index.html b/Problem/medium/mergesort/index.html index 71f22c6..8be5db7 100644 --- a/Problem/medium/mergesort/index.html +++ b/Problem/medium/mergesort/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Merge Sort

The merge sort algorithm is a divide and conquer algorithm that works by dividing the input array into two halves, sorting the two halves, and then merging them back together.

It is a recursive algorithm that uses the following steps:

  1. Divide the array into two halves.
  2. Recursively sort the two halves.
    • If the array has only one element, return the array. (Base case)
    • Otherwise, divide the array into two halves and recursively sort each half
  3. Merge the two halves back together in sorted order.
    • Note you'll probably want to write a helper function to merge the two halves together.
    • The merge function should take two arrays as arguments and return a single sorted array.
    • How can you use the fact that the two halves are already sorted to merge them together efficiently?
  4. Return the sorted array.

Useful Information:

  • You can use the slice method to divide the array into two halves.
    • Example: [1, 2, 3, 4, 5].slice(0, 3) returns [1, 2, 3].
  • You can use the concat method to merge two arrays together.
    • Example: [1, 2].concat([3, 4]) returns [1, 2, 3, 4].

Write a function that sorts an array of numbers using the merge sort algorithm.

function mergeSort(arr) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • mergeSort(arr)3,9,10,27,38,43,82 : Not Run
  • mergeSort(arr)-12,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 : Not Run
  • mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
  • mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
  • mergeSort(arr)-20,3,4,6,10,14,23,35,354,453,565,657,1000,1004 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Merge Sort

The merge sort algorithm is a divide and conquer algorithm that works by dividing the input array into two halves, sorting the two halves, and then merging them back together.

It is a recursive algorithm that uses the following steps:

  1. Divide the array into two halves.
  2. Recursively sort the two halves.
    • If the array has only one element, return the array. (Base case)
    • Otherwise, divide the array into two halves and recursively sort each half
  3. Merge the two halves back together in sorted order.
    • Note you'll probably want to write a helper function to merge the two halves together.
    • The merge function should take two arrays as arguments and return a single sorted array.
    • How can you use the fact that the two halves are already sorted to merge them together efficiently?
  4. Return the sorted array.

Useful Information:

  • You can use the slice method to divide the array into two halves.
    • Example: [1, 2, 3, 4, 5].slice(0, 3) returns [1, 2, 3].
  • You can use the concat method to merge two arrays together.
    • Example: [1, 2].concat([3, 4]) returns [1, 2, 3, 4].

Write a function that sorts an array of numbers using the merge sort algorithm.

function mergeSort(arr) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
mergeSort(arr)3,9,10,27,38,43,82 : Not Run
mergeSort(arr)-12,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 : Not Run
mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
mergeSort(arr)-20,3,4,6,10,14,23,35,354,453,565,657,1000,1004 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json index d76d0d9..7a7c23b 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,20 +1,19 @@ { "files": { - "main.css": "/static/css/main.420a9a19.css", - "main.js": "/static/js/main.f34bd028.js", + "main.css": "/static/css/main.1c910bb7.css", + "main.js": "/static/js/main.1d687935.js", "static/js/786.7eeccd24.chunk.js": "/static/js/786.7eeccd24.chunk.js", "static/js/843.55b31125.chunk.js": "/static/js/843.55b31125.chunk.js", "static/js/248.7756e353.chunk.js": "/static/js/248.7756e353.chunk.js", - "static/js/853.4c6c25ca.chunk.js": "/static/js/853.4c6c25ca.chunk.js", + "static/js/853.cacc6adc.chunk.js": "/static/js/853.cacc6adc.chunk.js", "static/js/488.a8d036df.chunk.js": "/static/js/488.a8d036df.chunk.js", - "static/js/780.c1ef71a3.chunk.js": "/static/js/780.c1ef71a3.chunk.js", + "static/js/780.2d7a4384.chunk.js": "/static/js/780.2d7a4384.chunk.js", "static/js/303.87c5ac7d.chunk.js": "/static/js/303.87c5ac7d.chunk.js", - "static/js/20.d5160684.chunk.js": "/static/js/20.d5160684.chunk.js", - "static/js/369.3d4a775d.chunk.js": "/static/js/369.3d4a775d.chunk.js", + "static/js/802.7276d5f7.chunk.js": "/static/js/802.7276d5f7.chunk.js", "static/css/344.a59a9374.chunk.css": "/static/css/344.a59a9374.chunk.css", "static/js/344.b7165c0c.chunk.js": "/static/js/344.b7165c0c.chunk.js", "static/js/473.66bba9da.chunk.js": "/static/js/473.66bba9da.chunk.js", - "static/js/671.5426ab3a.chunk.js": "/static/js/671.5426ab3a.chunk.js", + "static/js/671.20898529.chunk.js": "/static/js/671.20898529.chunk.js", "static/media/KaTeX_AMS-Regular.ttf": "/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf", "static/media/KaTeX_Main-Regular.ttf": "/static/media/KaTeX_Main-Regular.9eba1d77abcf2aa6e94e.ttf", "static/media/KaTeX_Main-Bold.ttf": "/static/media/KaTeX_Main-Bold.8169508bf58f8bd92ad8.ttf", @@ -77,24 +76,23 @@ "static/media/KaTeX_Size3-Regular.woff2": "/static/media/KaTeX_Size3-Regular.e1951519f6f0596f7356.woff2", "static/media/github-mark-white.svg": "/static/media/github-mark-white.ac7f5ce28096dc43a49cbedeabffa77b.svg", "index.html": "/index.html", - "main.420a9a19.css.map": "/static/css/main.420a9a19.css.map", - "main.f34bd028.js.map": "/static/js/main.f34bd028.js.map", + "main.1c910bb7.css.map": "/static/css/main.1c910bb7.css.map", + "main.1d687935.js.map": "/static/js/main.1d687935.js.map", "786.7eeccd24.chunk.js.map": "/static/js/786.7eeccd24.chunk.js.map", "843.55b31125.chunk.js.map": "/static/js/843.55b31125.chunk.js.map", "248.7756e353.chunk.js.map": "/static/js/248.7756e353.chunk.js.map", - "853.4c6c25ca.chunk.js.map": "/static/js/853.4c6c25ca.chunk.js.map", + "853.cacc6adc.chunk.js.map": "/static/js/853.cacc6adc.chunk.js.map", "488.a8d036df.chunk.js.map": "/static/js/488.a8d036df.chunk.js.map", - "780.c1ef71a3.chunk.js.map": "/static/js/780.c1ef71a3.chunk.js.map", + "780.2d7a4384.chunk.js.map": "/static/js/780.2d7a4384.chunk.js.map", "303.87c5ac7d.chunk.js.map": "/static/js/303.87c5ac7d.chunk.js.map", - "20.d5160684.chunk.js.map": "/static/js/20.d5160684.chunk.js.map", - "369.3d4a775d.chunk.js.map": "/static/js/369.3d4a775d.chunk.js.map", + "802.7276d5f7.chunk.js.map": "/static/js/802.7276d5f7.chunk.js.map", "344.a59a9374.chunk.css.map": "/static/css/344.a59a9374.chunk.css.map", "344.b7165c0c.chunk.js.map": "/static/js/344.b7165c0c.chunk.js.map", "473.66bba9da.chunk.js.map": "/static/js/473.66bba9da.chunk.js.map", - "671.5426ab3a.chunk.js.map": "/static/js/671.5426ab3a.chunk.js.map" + "671.20898529.chunk.js.map": "/static/js/671.20898529.chunk.js.map" }, "entrypoints": [ - "static/css/main.420a9a19.css", - "static/js/main.f34bd028.js" + "static/css/main.1c910bb7.css", + "static/js/main.1d687935.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 97a8c25..20cae9d 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -WeCode
Welcome to
WeCode
Your Coding Ally
Start Learning Now
How it Works
1. Code
An attempt at solving the fibbinachi problem
2. Test
Test results for the attempt at solving the fibbinachi problem. All but the first two tests failed
3. Ask for help
The AI tutor explaining why the remaining tests failed
4. Repeat & Learn
User going back to the problem to fix the issue
Problems
A Beginner's Guide to Coding
Is this you're first time coding? If so, start at the problem below. The problems begin with requiring no prior knowledge of coding and gradually increase in difficulty. If you have experience consider starting with the easy problems.
Easy Problems
Good for beginners to start building up their skills.
Medium Problems
Medium problems are a bit more challenging than easy problems and are a good fit for people who have some experience with coding.
Hard Problems
Hard problems are a good fit for people who are comfortable programming and want some problems to challenge their critical thinking skills.
Welcome to
WeCode
Your Coding Ally
Start Learning Now
How it Works
1. Code
An attempt at solving the fibbinachi problem
2. Test
Test results for the attempt at solving the fibbinachi problem. All but the first two tests failed
3. Ask for help
The AI tutor explaining why the remaining tests failed
4. Repeat & Learn
User going back to the problem to fix the issue
Problems
A Beginner's Guide to Coding
Is this you're first time coding? If so, start at the problem below. The problems begin with requiring no prior knowledge of coding and gradually increase in difficulty. If you have experience consider starting with the easy problems.
Easy Problems
Good for beginners to start building up their skills.
Medium Problems
Medium problems are a bit more challenging than easy problems and are a good fit for people who have some experience with coding.
Hard Problems
Hard problems are a good fit for people who are comfortable programming and want some problems to challenge their critical thinking skills.
\ No newline at end of file diff --git a/manifest.json b/manifest.json index 080d6c7..80f5e97 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "WeCode", + "name": "WeCode", "icons": [ { "src": "favicon.ico", diff --git a/privacy/index.html b/privacy/index.html index c7a05c9..04cb16f 100644 --- a/privacy/index.html +++ b/privacy/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode

Privacy Policy

Effective Date: May 18th 2024

1. Introduction

Welcome to We Code ("we", "our", "us"). We are committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our website https://wecode.dacubeking.com ("We Code"). Please read this policy carefully. If you do not agree with the terms of this Privacy Policy, please do not access We Code.

2. Information We Collect

A. GitHub Authentication:

  • We use GitHub for authentication.
  • Upon logging in, we collect your GitHub ID, name, and username. This information is used to identify and display your profile on We Code.

B. User Content:

  • When you write code for byte-sized coding problems on We Code, your code and test case results are stored locally on your browser's local storage.

C. API Requests:

  • If you use the "I'm stuck" feature, the code and test cases you submit are sent to our API. We use this information to call OpenAI or Google Vertex APIs for assistance from an AI tutor.
  • We also log your user ID and a timestamp for rate-limiting purposes. No other information is saved server-side.

D. Cloudflare Analytics:

  • Our website is proxied through Cloudflare, which collects analytics data. This includes cookies placed by Cloudflare for security and performance purposes. We do not use any other cookies.

3. How We Use Your Information

A. To Provide and Improve Our Services:

  • Displaying your profile information.
  • Storing your code and test case results in local storage for your convenience.
  • Providing AI-driven assistance when you're stuck.

B. Security and Analytics:

  • Enhancing the security and performance of We Code through Cloudflare.
  • Using Cloudflare analytics to understand Site usage and improve our services.

4. Disclosure of Your Information

We do not sell, trade, or otherwise transfer your personally identifiable information to outside parties except as described below:

  • Service Providers: We may share your information with third-party vendors (such as OpenAI and Google Vertex) to perform tasks on our behalf, such as providing AI tutoring services.
  • Legal Requirements: We may disclose your information if required to do so by law or in response to valid requests by public authorities.

5. Data Security

We use administrative, technical, and physical security measures to protect your personal information. However, no transmission over the Internet or electronic storage is completely secure, so we cannot guarantee its absolute security.

6. Your Choices

A. Local Storage:

  • You can clear your browser's local storage at any time to delete your code history and test case results.

B. Cookies:

  • As we rely on Cloudflare, you can manage Cloudflare's cookies through your browser settings.

7. Changes to This Privacy Policy

We may update this Privacy Policy from time to time. We will notify you of any changes by updating the "Effective Date" at the top of this Privacy Policy. You are advised to review this Privacy Policy periodically for any changes.

8. Contact Us

If you have any questions about this Privacy Policy, please contact us at contact@dacubeking.com.

WeCode

Privacy Policy

Effective Date: May 18th 2024

1. Introduction

Welcome to We Code ("we", "our", "us"). We are committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our website https://wecode.dacubeking.com ("We Code"). Please read this policy carefully. If you do not agree with the terms of this Privacy Policy, please do not access We Code.

2. Information We Collect

A. GitHub Authentication:

  • We use GitHub for authentication.
  • Upon logging in, we collect your GitHub ID, name, and username. This information is used to identify and display your profile on We Code.

B. User Content:

  • When you write code for byte-sized coding problems on We Code, your code and test case results are stored locally on your browser's local storage.

C. API Requests:

  • If you use the "I'm stuck" feature, the code and test cases you submit are sent to our API. We use this information to call OpenAI or Google Vertex APIs for assistance from an AI tutor.
  • We also log your user ID and a timestamp for rate-limiting purposes. No other information is saved server-side.

D. Cloudflare Analytics:

  • Our website is proxied through Cloudflare, which collects analytics data. This includes cookies placed by Cloudflare for security and performance purposes. We do not use any other cookies.

3. How We Use Your Information

A. To Provide and Improve Our Services:

  • Displaying your profile information.
  • Storing your code and test case results in local storage for your convenience.
  • Providing AI-driven assistance when you're stuck.

B. Security and Analytics:

  • Enhancing the security and performance of We Code through Cloudflare.
  • Using Cloudflare analytics to understand Site usage and improve our services.

4. Disclosure of Your Information

We do not sell, trade, or otherwise transfer your personally identifiable information to outside parties except as described below:

  • Service Providers: We may share your information with third-party vendors (such as OpenAI and Google Vertex) to perform tasks on our behalf, such as providing AI tutoring services.
  • Legal Requirements: We may disclose your information if required to do so by law or in response to valid requests by public authorities.

5. Data Security

We use administrative, technical, and physical security measures to protect your personal information. However, no transmission over the Internet or electronic storage is completely secure, so we cannot guarantee its absolute security.

6. Your Choices

A. Local Storage:

  • You can clear your browser's local storage at any time to delete your code history and test case results.

B. Cookies:

  • As we rely on Cloudflare, you can manage Cloudflare's cookies through your browser settings.

7. Changes to This Privacy Policy

We may update this Privacy Policy from time to time. We will notify you of any changes by updating the "Effective Date" at the top of this Privacy Policy. You are advised to review this Privacy Policy periodically for any changes.

8. Contact Us

If you have any questions about this Privacy Policy, please contact us at contact@dacubeking.com.

\ No newline at end of file diff --git a/static/css/main.1c910bb7.css b/static/css/main.1c910bb7.css new file mode 100644 index 0000000..9cb5419 --- /dev/null +++ b/static/css/main.1c910bb7.css @@ -0,0 +1,6 @@ +body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace} + +/* +! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com +*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}h1{font-size:1.875rem;line-height:2.25rem}h1,h2{font-weight:700;margin-bottom:.25em;margin-top:1em}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem}h3,h4{font-weight:700;line-height:1.75rem;margin-bottom:.25em;margin-top:1em}h4{font-size:1.125rem}h5{font-weight:700}h5,h6{font-size:1rem;line-height:1.5rem;margin-bottom:.25em;margin-top:1em}h6{font-weight:600}ol,ul{list-style:circle;margin-left:1.5em;margin-top:0}li{margin-bottom:-.2em}p{font-size:1rem;line-height:1.5rem;margin-bottom:1em}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.absolute{position:absolute}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mb-0{margin-bottom:0}.-mb-0\.5{margin-bottom:-.125rem}.-mt-16{margin-top:-4rem}.-mt-5{margin-top:-1.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.ml-5{margin-left:1.25rem}.mr-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-\[calc\(100vh\*0\.60\)\]{height:60vh}.h-\[calc\(100vh\*0\.80\)\]{height:80vh}.h-auto{height:auto}.min-h-20{min-height:5rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-96{width:24rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-white-pink{--tw-border-opacity:1;border-color:rgb(248 230 247/var(--tw-border-opacity))}.bg-\[\#f8e6f7\]{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.bg-basically-black{--tw-bg-opacity:1;background-color:rgb(23 28 43/var(--tw-bg-opacity))}.bg-test-failed{--tw-bg-opacity:1;background-color:rgb(255 142 131/var(--tw-bg-opacity))}.bg-test-passed{--tw-bg-opacity:1;background-color:rgb(18 243 135/var(--tw-bg-opacity))}.bg-white-pink{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-8{padding:2rem}.pb-5{padding-bottom:1.25rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-lg{font-size:1.125rem}.text-lg,.text-xl{line-height:1.75rem}.text-xl{font-size:1.25rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-semibold{font-weight:600}.italic{font-style:italic}.text-\[\#abb2bf\]{--tw-text-opacity:1;color:rgb(171 178 191/var(--tw-text-opacity))}.text-basically-black{--tw-text-opacity:1;color:rgb(23 28 43/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-bright-blue{--tw-text-opacity:1;color:rgb(46 146 240/var(--tw-text-opacity))}.text-bright-purple{--tw-text-opacity:1;color:rgb(164 117 240/var(--tw-text-opacity))}.text-error-red{--tw-text-opacity:1;color:rgb(239 69 71/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.decoration-gray-600{text-decoration-color:#4b5563}.underline-offset-2{text-underline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (max-width:900px){.flex-row{flex-direction:column}@media (max-width:900px){.w-1\/2{width:100%}}}.App,body{background-color:#1c1f23}.App{color:#efe9e7}.App-header{background-color:#282c34;color:#fff;display:flex;flex-direction:row;font-size:calc(10px + 2vmin);font-weight:bolder;height:calc(10px + 5vmin);justify-content:space-between;margin-bottom:0;padding:0 1em}.App-header,.Problem{align-items:center;margin-top:0}.Problem{flex-direction:column;justify-content:center;max-width:80em;min-height:100vh;padding-bottom:10em;padding-left:1em;padding-top:0;text-align:left;width:95%}.Problem-title{margin-top:0;padding-top:1em}.Problem-user-code{justify-items:left;margin-top:0;padding-left:5em}.Problem-template-code{font-size:1.2em;font-weight:700}.Problem-desc,.Problem-template-code{margin-bottom:0;margin-top:0;padding-left:0}.Problem-desc{max-width:70em}.Problem-desc,.Problem-solution{padding-bottom:0;padding-top:0;width:95%}.Problem-solution{margin-bottom:0;margin-top:0;max-width:50em;padding-left:0}.helpButton,.nextProblemButton,.submitButton{height:2em}code[class^=hljs-]{background:#000}.Code-tutor-response{margin-bottom:0;margin-top:0;max-width:50em;padding-bottom:0;padding-left:0;padding-top:0;width:95%}code{background-color:#282c34;border-radius:3px;color:#efe9e7;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:80%;padding:.2em .4em}.katex-mathml{display:none}.wecode-header{color:#f8e6f7;font-size:1.5em;text-decoration:none}.loginButton{height:2.75em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#282c34;color:#abb2bf}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} +/*# sourceMappingURL=main.1c910bb7.css.map*/ \ No newline at end of file diff --git a/static/css/main.1c910bb7.css.map b/static/css/main.1c910bb7.css.map new file mode 100644 index 0000000..70d4679 --- /dev/null +++ b/static/css/main.1c910bb7.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.1c910bb7.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAKF,CAEA,KACE,uEAEF;;ACZA;;CAA0B,CAA1B,uCAA0B,CAA1B,qBAA0B,CAA1B,8BAA0B,CAA1B,wCAA0B,CAA1B,4BAA0B,CAA1B,uCAA0B,CAA1B,gHAA0B,CAA1B,8BAA0B,CAA1B,eAA0B,CAA1B,UAA0B,CAA1B,wBAA0B,CAA1B,QAA0B,CAA1B,uBAA0B,CAA1B,aAA0B,CAA1B,QAA0B,CAA1B,4DAA0B,CAA1B,gCAA0B,CAA1B,mCAA0B,CAA1B,mBAA0B,CAA1B,eAA0B,CAA1B,uBAA0B,CAA1B,2BAA0B,CAA1B,8CAA0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a,CACb,gBAEJ,CAEA,uBAII,eAAgB,CAChB,eACJ,CAEA,qCANI,eAAgB,CADhB,YAAa,CAEb,cAaJ,CARA,cAOI,cACJ,CAEA,gCANI,gBAAiB,CAFjB,aAAc,CAId,SAYJ,CARA,kBAGI,eAAgB,CAFhB,YAAa,CAMb,cAAe,CAFf,cAGJ,CAUA,6CACI,UACJ,CAEA,mBACI,eACJ,CAEA,qBAGI,eAAgB,CAFhB,YAAa,CAMb,cAAe,CAHf,gBAAiB,CACjB,cAAe,CAHf,aAAc,CAId,SAEJ,CAEA,KACI,wBAAyB,CAKzB,iBAAkB,CAJlB,aAAc,CAGd,2EAAqF,CADrF,aAAc,CADd,iBAIJ,CAEA,cACI,YACJ,CAEA,eAGI,aAAc,CAFd,eAAgB,CAChB,oBAEJ,CAEA,aACI,aACJ,CCxMA,cAAc,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,UAAU,eAAe,CAAC,MAAoB,kBAAiB,CAA/B,aAAgC,CAAC,0BAA0B,aAAa,CAAC,iBAAiB,CAAC,yCAAyC,aAAa,CAAC,uEAAuE,aAAa,CAAC,cAAc,aAAa,CAAC,iFAAiF,aAAa,CAAC,yIAAyI,aAAa,CAAC,8EAA8E,aAAa,CAAC,0DAA0D,aAAa,CAAC,eAAe,iBAAiB,CAAC,aAAa,eAAe,CAAC,WAAW,yBAAyB","sources":["index.css","App.css","../node_modules/highlight.js/styles/atom-one-dark.min.css"],"sourcesContent":["body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n","@import 'tailwindcss/base';\r\n@import 'tailwindcss/components';\r\n@import 'tailwindcss/utilities';\r\n\r\n@layer base {\r\n h1 {\r\n @apply text-3xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h2 {\r\n @apply text-2xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h3 {\r\n @apply text-xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h4 {\r\n @apply text-lg;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h5 {\r\n @apply text-base;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h6 {\r\n @apply text-base;\r\n @apply font-semibold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n ol,\r\n ul {\r\n margin-top: 0;\r\n list-style: circle;\r\n margin-left: 1.5em;\r\n }\r\n\r\n li {\r\n margin-bottom: -0.2em;\r\n }\r\n\r\n p {\r\n @apply text-base;\r\n margin-bottom: 1em;\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .flex-row {\r\n flex-direction: column;\r\n }\r\n\r\n @media (max-width: 900px) {\r\n .w-1\\/2 {\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\nbody {\r\n background-color: #1C1F23;\r\n}\r\n\r\n.App {\r\n background-color: #1C1F23;\r\n color: #efe9e7;\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n height: calc(10px + 5vmin);;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding: 0 1em;\r\n font-weight: bolder;\r\n}\r\n\r\n.Problem {\r\n margin-top: 0;\r\n padding-top: 0;\r\n padding-bottom: 10em;\r\n padding-left: 1em;\r\n justify-content: center;\r\n align-items: center;\r\n text-align: left;\r\n min-height: 100vh;\r\n width: 95%;\r\n max-width: 80em;\r\n flex-direction: column;\r\n}\r\n\r\n.Problem-title {\r\n margin-top: 0;\r\n padding-top: 1em;\r\n}\r\n\r\n.Problem-user-code {\r\n margin-top: 0;\r\n padding-left: 5em;\r\n justify-items: left;\r\n}\r\n\r\n.Problem-template-code {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding-left: 0;\r\n font-size: 1.2em;\r\n font-weight: bold;\r\n}\r\n\r\n.Problem-desc {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 70em;\r\n}\r\n\r\n.Problem-solution {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\n.helpButton {\r\n height: 2em;\r\n}\r\n\r\n.submitButton {\r\n height: 2em;\r\n}\r\n\r\n.nextProblemButton {\r\n height: 2em;\r\n}\r\n\r\ncode[class^=\"hljs-\"] {\r\n background: #000;\r\n}\r\n\r\n.Code-tutor-response {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\ncode {\r\n background-color: #282c34;\r\n color: #efe9e7;\r\n padding: 0.2em 0.4em;\r\n font-size: 80%;\r\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\r\n border-radius: 3px;\r\n}\r\n\r\n.katex-mathml {\r\n display: none;\r\n}\r\n\r\n.wecode-header {\r\n font-size: 1.5em;\r\n text-decoration: none;\r\n color: #f8e6f7;\r\n}\r\n\r\n.loginButton {\r\n height: 2.75em;\r\n}","pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/css/main.420a9a19.css b/static/css/main.420a9a19.css deleted file mode 100644 index 8c366e8..0000000 --- a/static/css/main.420a9a19.css +++ /dev/null @@ -1,6 +0,0 @@ -body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace} - -/* -! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com -*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}h1{font-size:1.875rem;line-height:2.25rem}h1,h2{font-weight:700;margin-bottom:.25em;margin-top:1em}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem}h3,h4{font-weight:700;line-height:1.75rem;margin-bottom:.25em;margin-top:1em}h4{font-size:1.125rem}h5{font-weight:700}h5,h6{font-size:1rem;line-height:1.5rem;margin-bottom:.25em;margin-top:1em}h6{font-weight:600}ol,ul{list-style:circle;margin-left:1.5em;margin-top:0}li{margin-bottom:-.2em}p{font-size:1rem;line-height:1.5rem;margin-bottom:1em}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.absolute{position:absolute}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-16{margin-top:-4rem}.-mt-5{margin-top:-1.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.ml-5{margin-left:1.25rem}.mr-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-\[calc\(100vh\*0\.60\)\]{height:60vh}.h-\[calc\(100vh\*0\.80\)\]{height:80vh}.h-auto{height:auto}.min-h-20{min-height:5rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-96{width:24rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-white-pink{--tw-border-opacity:1;border-color:rgb(248 230 247/var(--tw-border-opacity))}.bg-\[\#f8e6f7\]{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.bg-basically-black{--tw-bg-opacity:1;background-color:rgb(23 28 43/var(--tw-bg-opacity))}.bg-test-failed{--tw-bg-opacity:1;background-color:rgb(255 142 131/var(--tw-bg-opacity))}.bg-test-passed{--tw-bg-opacity:1;background-color:rgb(18 243 135/var(--tw-bg-opacity))}.bg-white-pink{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-8{padding:2rem}.pb-5{padding-bottom:1.25rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-lg{font-size:1.125rem}.text-lg,.text-xl{line-height:1.75rem}.text-xl{font-size:1.25rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-semibold{font-weight:600}.italic{font-style:italic}.text-\[\#abb2bf\]{--tw-text-opacity:1;color:rgb(171 178 191/var(--tw-text-opacity))}.text-basically-black{--tw-text-opacity:1;color:rgb(23 28 43/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-bright-blue{--tw-text-opacity:1;color:rgb(46 146 240/var(--tw-text-opacity))}.text-bright-purple{--tw-text-opacity:1;color:rgb(164 117 240/var(--tw-text-opacity))}.text-error-red{--tw-text-opacity:1;color:rgb(239 69 71/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.decoration-gray-600{text-decoration-color:#4b5563}.underline-offset-2{text-underline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (max-width:900px){.flex-row{flex-direction:column}@media (max-width:900px){.w-1\/2{width:100%}}}.App,body{background-color:#1c1f23}.App{color:#efe9e7}.App-header{background-color:#282c34;color:#fff;display:flex;flex-direction:row;font-size:calc(10px + 2vmin);font-weight:bolder;height:calc(10px + 5vmin);justify-content:space-between;margin-bottom:0;padding:0 1em}.App-header,.Problem{align-items:center;margin-top:0}.Problem{flex-direction:column;justify-content:center;max-width:80em;min-height:100vh;padding-bottom:10em;padding-left:1em;padding-top:0;text-align:left;width:95%}.Problem-title{margin-top:0;padding-top:1em}.Problem-user-code{justify-items:left;margin-top:0;padding-left:5em}.Problem-template-code{font-size:1.2em;font-weight:700}.Problem-desc,.Problem-template-code{margin-bottom:0;margin-top:0;padding-left:0}.Problem-desc{max-width:70em}.Problem-desc,.Problem-solution{padding-bottom:0;padding-top:0;width:95%}.Problem-solution{margin-bottom:0;margin-top:0;max-width:50em;padding-left:0}.helpButton,.nextProblemButton,.submitButton{height:2em}code[class^=hljs-]{background:#000}.Code-tutor-response{margin-bottom:0;margin-top:0;max-width:50em;padding-bottom:0;padding-left:0;padding-top:0;width:95%}code{background-color:#282c34;border-radius:3px;color:#efe9e7;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:80%;padding:.2em .4em}.katex-mathml{display:none}.wecode-header{color:#f8e6f7;font-size:1.5em;text-decoration:none}.loginButton{height:2.75em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#282c34;color:#abb2bf}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -/*# sourceMappingURL=main.420a9a19.css.map*/ \ No newline at end of file diff --git a/static/css/main.420a9a19.css.map b/static/css/main.420a9a19.css.map deleted file mode 100644 index 75d182f..0000000 --- a/static/css/main.420a9a19.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.420a9a19.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAKF,CAEA,KACE,uEAEF;;ACZA;;CAA0B,CAA1B,uCAA0B,CAA1B,qBAA0B,CAA1B,8BAA0B,CAA1B,wCAA0B,CAA1B,4BAA0B,CAA1B,uCAA0B,CAA1B,gHAA0B,CAA1B,8BAA0B,CAA1B,eAA0B,CAA1B,UAA0B,CAA1B,wBAA0B,CAA1B,QAA0B,CAA1B,uBAA0B,CAA1B,aAA0B,CAA1B,QAA0B,CAA1B,4DAA0B,CAA1B,gCAA0B,CAA1B,mCAA0B,CAA1B,mBAA0B,CAA1B,eAA0B,CAA1B,uBAA0B,CAA1B,2BAA0B,CAA1B,8CAA0B,CAA1B,mGAA0B,CAA1B,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I,eAAgB,CADhB,YAAa,CAEb,cAaJ,CARA,cAOI,cACJ,CAEA,gCANI,gBAAiB,CAFjB,aAAc,CAId,SAYJ,CARA,kBAGI,eAAgB,CAFhB,YAAa,CAMb,cAAe,CAFf,cAGJ,CAUA,6CACI,UACJ,CAEA,mBACI,eACJ,CAEA,qBAGI,eAAgB,CAFhB,YAAa,CAMb,cAAe,CAHf,gBAAiB,CACjB,cAAe,CAHf,aAAc,CAId,SAEJ,CAEA,KACI,wBAAyB,CAKzB,iBAAkB,CAJlB,aAAc,CAGd,2EAAqF,CADrF,aAAc,CADd,iBAIJ,CAEA,cACI,YACJ,CAEA,eAGI,aAAc,CAFd,eAAgB,CAChB,oBAEJ,CAEA,aACI,aACJ,CCxMA,cAAc,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,UAAU,eAAe,CAAC,MAAoB,kBAAiB,CAA/B,aAAgC,CAAC,0BAA0B,aAAa,CAAC,iBAAiB,CAAC,yCAAyC,aAAa,CAAC,uEAAuE,aAAa,CAAC,cAAc,aAAa,CAAC,iFAAiF,aAAa,CAAC,yIAAyI,aAAa,CAAC,8EAA8E,aAAa,CAAC,0DAA0D,aAAa,CAAC,eAAe,iBAAiB,CAAC,aAAa,eAAe,CAAC,WAAW,yBAAyB","sources":["index.css","App.css","../node_modules/highlight.js/styles/atom-one-dark.min.css"],"sourcesContent":["body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n","@import 'tailwindcss/base';\r\n@import 'tailwindcss/components';\r\n@import 'tailwindcss/utilities';\r\n\r\n@layer base {\r\n h1 {\r\n @apply text-3xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h2 {\r\n @apply text-2xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h3 {\r\n @apply text-xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h4 {\r\n @apply text-lg;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h5 {\r\n @apply text-base;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h6 {\r\n @apply text-base;\r\n @apply font-semibold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n ol,\r\n ul {\r\n margin-top: 0;\r\n list-style: circle;\r\n margin-left: 1.5em;\r\n }\r\n\r\n li {\r\n margin-bottom: -0.2em;\r\n }\r\n\r\n p {\r\n @apply text-base;\r\n margin-bottom: 1em;\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .flex-row {\r\n flex-direction: column;\r\n }\r\n\r\n @media (max-width: 900px) {\r\n .w-1\\/2 {\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\nbody {\r\n background-color: #1C1F23;\r\n}\r\n\r\n.App {\r\n background-color: #1C1F23;\r\n color: #efe9e7;\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n height: calc(10px + 5vmin);;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding: 0 1em;\r\n font-weight: bolder;\r\n}\r\n\r\n.Problem {\r\n margin-top: 0;\r\n padding-top: 0;\r\n padding-bottom: 10em;\r\n padding-left: 1em;\r\n justify-content: center;\r\n align-items: center;\r\n text-align: left;\r\n min-height: 100vh;\r\n width: 95%;\r\n max-width: 80em;\r\n flex-direction: column;\r\n}\r\n\r\n.Problem-title {\r\n margin-top: 0;\r\n padding-top: 1em;\r\n}\r\n\r\n.Problem-user-code {\r\n margin-top: 0;\r\n padding-left: 5em;\r\n justify-items: left;\r\n}\r\n\r\n.Problem-template-code {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding-left: 0;\r\n font-size: 1.2em;\r\n font-weight: bold;\r\n}\r\n\r\n.Problem-desc {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 70em;\r\n}\r\n\r\n.Problem-solution {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\n.helpButton {\r\n height: 2em;\r\n}\r\n\r\n.submitButton {\r\n height: 2em;\r\n}\r\n\r\n.nextProblemButton {\r\n height: 2em;\r\n}\r\n\r\ncode[class^=\"hljs-\"] {\r\n background: #000;\r\n}\r\n\r\n.Code-tutor-response {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\ncode {\r\n background-color: #282c34;\r\n color: #efe9e7;\r\n padding: 0.2em 0.4em;\r\n font-size: 80%;\r\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\r\n border-radius: 3px;\r\n}\r\n\r\n.katex-mathml {\r\n display: none;\r\n}\r\n\r\n.wecode-header {\r\n font-size: 1.5em;\r\n text-decoration: none;\r\n color: #f8e6f7;\r\n}\r\n\r\n.loginButton {\r\n height: 2.75em;\r\n}","pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/20.d5160684.chunk.js b/static/js/20.d5160684.chunk.js deleted file mode 100644 index 48c12d8..0000000 --- a/static/js/20.d5160684.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[20],{2220:(e,t,n)=>{n.d(t,{A:()=>A});var o=n(8587),r=n(8168),i=n(5043),a=n(8387),l=n(8606),s=n(4535),c=n(2876),d=n(6258),u=n(7056),p=n(2400);function f(e){return(0,p.Ay)("MuiBackdrop",e)}(0,u.A)("MuiBackdrop",["root","invisible"]);var v=n(579);const m=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],h=(0,s.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,r.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),A=i.forwardRef((function(e,t){var n,i,s;const u=(0,c.A)({props:e,name:"MuiBackdrop"}),{children:p,className:A,component:b="div",components:g={},componentsProps:y={},invisible:E=!1,open:x,slotProps:P={},slots:k={},TransitionComponent:R=d.A,transitionDuration:w}=u,T=(0,o.A)(u,m),S=(0,r.A)({},u,{component:b,invisible:E}),C=(e=>{const{classes:t,invisible:n}=e,o={root:["root",n&&"invisible"]};return(0,l.A)(o,f,t)})(S),M=null!=(n=P.root)?n:y.root;return(0,v.jsx)(R,(0,r.A)({in:x,timeout:w},T,{children:(0,v.jsx)(h,(0,r.A)({"aria-hidden":!0},M,{as:null!=(i=null!=(s=k.root)?s:g.Root)?i:b,className:(0,a.A)(C.root,A,null==M?void 0:M.className),ownerState:(0,r.A)({},S,null==M?void 0:M.ownerState),classes:C,ref:t,children:p}))}))}))},6258:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(8168),r=n(8587),i=n(5043),a=n(9998),l=n(6240),s=n(653),c=n(5849),d=n(579);const u=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{opacity:1},entered:{opacity:1}},f=i.forwardRef((function(e,t){const n=(0,l.A)(),f={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:v,appear:m=!0,children:h,easing:A,in:b,onEnter:g,onEntered:y,onEntering:E,onExit:x,onExited:P,onExiting:k,style:R,timeout:w=f,TransitionComponent:T=a.Ay}=e,S=(0,r.A)(e,u),C=i.useRef(null),M=(0,c.A)(C,h.ref,t),N=e=>t=>{if(e){const n=C.current;void 0===t?e(n):e(n,t)}},I=N(E),O=N(((e,t)=>{(0,s.q)(e);const o=(0,s.c)({style:R,timeout:w,easing:A},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",o),e.style.transition=n.transitions.create("opacity",o),g&&g(e,t)})),L=N(y),F=N(k),B=N((e=>{const t=(0,s.c)({style:R,timeout:w,easing:A},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),x&&x(e)})),D=N(P);return(0,d.jsx)(T,(0,o.A)({appear:m,in:b,nodeRef:C,onEnter:O,onEntered:L,onEntering:I,onExit:B,onExited:D,onExiting:F,addEndListener:e=>{v&&v(C.current,e)},timeout:w},S,{children:(e,t)=>i.cloneElement(h,(0,o.A)({style:(0,o.A)({opacity:0,visibility:"exited"!==e||b?void 0:"hidden"},p[e],R,h.props.style),ref:M},t))}))}))},1243:(e,t,n)=>{n.d(t,{A:()=>j});var o=n(8587),r=n(8168),i=n(5043),a=n(8387),l=n(3662),s=n(7042),c=n(2144),d=n(4626),u=n(4708),p=n(9279),f=n(6288),v=n(6336);function m(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function h(e){return parseInt((0,f.A)(e).getComputedStyle(e).paddingRight,10)||0}function A(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&m(e,r)}))}function b(e,t){let n=-1;return e.some(((e,o)=>!!t(e)&&(n=o,!0))),n}function g(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,c.A)(e);return t.body===e?(0,f.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){const e=(0,v.A)((0,c.A)(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight="".concat(h(o)+e,"px");const t=(0,c.A)(o).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(h(t)+e,"px")}))}let e;if(o.parentNode instanceof DocumentFragment)e=(0,c.A)(o).body;else{const t=o.parentElement,n=(0,f.A)(o);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:o}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:o}=e;t?n.style.setProperty(o,t):n.style.removeProperty(o)}))}}const y=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&m(e.modalRef,!1);const o=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);A(t,e.mount,e.modalRef,o,!0);const r=b(this.containers,(e=>e.container===t));return-1!==r?(this.containers[r].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:o}),n)}mount(e,t){const n=b(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];o.restore||(o.restore=g(o,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const o=b(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[o];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(n,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&m(e.modalRef,t),A(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(o,1);else{const e=r.modals[r.modals.length-1];e.modalRef&&m(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function E(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,manager:a=y,closeAfterTransition:l=!1,onTransitionEnter:f,onTransitionExited:v,children:h,onClose:A,open:b,rootRef:g}=e,E=i.useRef({}),x=i.useRef(null),P=i.useRef(null),k=(0,s.A)(P,g),[R,w]=i.useState(!b),T=function(e){return!!e&&e.props.hasOwnProperty("in")}(h);let S=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(S=!1);const C=()=>(E.current.modalRef=P.current,E.current.mount=x.current,E.current),M=()=>{a.mount(C(),{disableScrollLock:o}),P.current&&(P.current.scrollTop=0)},N=(0,d.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,c.A)(x.current).body;a.add(C(),e),P.current&&M()})),I=i.useCallback((()=>a.isTopModal(C())),[a]),O=(0,d.A)((e=>{x.current=e,e&&(b&&I()?M():P.current&&m(P.current,S))})),L=i.useCallback((()=>{a.remove(C(),S)}),[S,a]);i.useEffect((()=>()=>{L()}),[L]),i.useEffect((()=>{b?N():T&&l||L()}),[b,L,T,l,N]);const F=e=>t=>{var o;null==(o=e.onKeyDown)||o.call(e,t),"Escape"===t.key&&229!==t.which&&I()&&(n||(t.stopPropagation(),A&&A(t,"escapeKeyDown")))},B=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&A&&A(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,p.h)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const o=(0,r.A)({},n,t);return(0,r.A)({role:"presentation"},o,{onKeyDown:F(o),ref:k})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)({"aria-hidden":!0},e,{onClick:B(e),open:b})},getTransitionProps:()=>({onEnter:(0,u.A)((()=>{w(!1),f&&f()}),null==h?void 0:h.props.onEnter),onExited:(0,u.A)((()=>{w(!0),v&&v(),l&&L()}),null==h?void 0:h.props.onExited)}),rootRef:k,portalRef:O,isTopModal:I,exited:R,hasTransition:T}}var x=n(8606),P=n(579);const k=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function R(e){const t=[],n=[];return Array.from(e.querySelectorAll(k)).forEach(((e,o)=>{const r=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==r&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===r?t.push(e):n.push({documentOrder:o,tabIndex:r,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function w(){return!0}function T(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:r=!1,getTabbable:a=R,isEnabled:l=w,open:d}=e,u=i.useRef(!1),p=i.useRef(null),f=i.useRef(null),v=i.useRef(null),m=i.useRef(null),h=i.useRef(!1),A=i.useRef(null),b=(0,s.A)(t.ref,A),g=i.useRef(null);i.useEffect((()=>{d&&A.current&&(h.current=!n)}),[n,d]),i.useEffect((()=>{if(!d||!A.current)return;const e=(0,c.A)(A.current);return A.current.contains(e.activeElement)||(A.current.hasAttribute("tabIndex")||A.current.setAttribute("tabIndex","-1"),h.current&&A.current.focus()),()=>{r||(v.current&&v.current.focus&&(u.current=!0,v.current.focus()),v.current=null)}}),[d]),i.useEffect((()=>{if(!d||!A.current)return;const e=(0,c.A)(A.current),t=t=>{g.current=t,!o&&l()&&"Tab"===t.key&&e.activeElement===A.current&&t.shiftKey&&(u.current=!0,f.current&&f.current.focus())},n=()=>{const t=A.current;if(null===t)return;if(!e.hasFocus()||!l()||u.current)return void(u.current=!1);if(t.contains(e.activeElement))return;if(o&&e.activeElement!==p.current&&e.activeElement!==f.current)return;if(e.activeElement!==m.current)m.current=null;else if(null!==m.current)return;if(!h.current)return;let n=[];if(e.activeElement!==p.current&&e.activeElement!==f.current||(n=a(A.current)),n.length>0){var r,i;const e=Boolean((null==(r=g.current)?void 0:r.shiftKey)&&"Tab"===(null==(i=g.current)?void 0:i.key)),t=n[0],o=n[n.length-1];"string"!==typeof t&&"string"!==typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,o,r,l,d,a]);const y=e=>{null===v.current&&(v.current=e.relatedTarget),h.current=!0};return(0,P.jsxs)(i.Fragment,{children:[(0,P.jsx)("div",{tabIndex:d?0:-1,onFocus:y,ref:p,"data-testid":"sentinelStart"}),i.cloneElement(t,{ref:b,onFocus:e=>{null===v.current&&(v.current=e.relatedTarget),h.current=!0,m.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,P.jsx)("div",{tabIndex:d?0:-1,onFocus:y,ref:f,"data-testid":"sentinelEnd"})]})}var S=n(5990),C=n(4535),M=n(2876),N=n(2220),I=n(7056),O=n(2400);function L(e){return(0,O.Ay)("MuiModal",e)}(0,I.A)("MuiModal",["root","hidden","backdrop"]);const F=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],B=(0,C.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),D=(0,C.Ay)(N.A,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),j=i.forwardRef((function(e,t){var n,s,c,d,u,p;const f=(0,M.A)({name:"MuiModal",props:e}),{BackdropComponent:v=D,BackdropProps:m,className:h,closeAfterTransition:A=!1,children:b,container:g,component:y,components:k={},componentsProps:R={},disableAutoFocus:w=!1,disableEnforceFocus:C=!1,disableEscapeKeyDown:N=!1,disablePortal:I=!1,disableRestoreFocus:O=!1,disableScrollLock:j=!1,hideBackdrop:z=!1,keepMounted:K=!1,onBackdropClick:q,open:H,slotProps:W,slots:U}=f,Y=(0,o.A)(f,F),Q=(0,r.A)({},f,{closeAfterTransition:A,disableAutoFocus:w,disableEnforceFocus:C,disableEscapeKeyDown:N,disablePortal:I,disableRestoreFocus:O,disableScrollLock:j,hideBackdrop:z,keepMounted:K}),{getRootProps:X,getBackdropProps:_,getTransitionProps:V,portalRef:G,isTopModal:J,exited:Z,hasTransition:$}=E((0,r.A)({},Q,{rootRef:t})),ee=(0,r.A)({},Q,{exited:Z}),te=(e=>{const{open:t,exited:n,classes:o}=e,r={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,x.A)(r,L,o)})(ee),ne={};if(void 0===b.props.tabIndex&&(ne.tabIndex="-1"),$){const{onEnter:e,onExited:t}=V();ne.onEnter=e,ne.onExited=t}const oe=null!=(n=null!=(s=null==U?void 0:U.root)?s:k.Root)?n:B,re=null!=(c=null!=(d=null==U?void 0:U.backdrop)?d:k.Backdrop)?c:v,ie=null!=(u=null==W?void 0:W.root)?u:R.root,ae=null!=(p=null==W?void 0:W.backdrop)?p:R.backdrop,le=(0,l.Q)({elementType:oe,externalSlotProps:ie,externalForwardedProps:Y,getSlotProps:X,additionalProps:{ref:t,as:y},ownerState:ee,className:(0,a.A)(h,null==ie?void 0:ie.className,null==te?void 0:te.root,!ee.open&&ee.exited&&(null==te?void 0:te.hidden))}),se=(0,l.Q)({elementType:re,externalSlotProps:ae,additionalProps:m,getSlotProps:e=>_((0,r.A)({},e,{onClick:t=>{q&&q(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,a.A)(null==ae?void 0:ae.className,null==m?void 0:m.className,null==te?void 0:te.backdrop),ownerState:ee});return K||H||$&&!Z?(0,P.jsx)(S.Z,{ref:G,container:g,disablePortal:I,children:(0,P.jsxs)(oe,(0,r.A)({},le,{children:[!z&&v?(0,P.jsx)(re,(0,r.A)({},se)):null,(0,P.jsx)(T,{disableEnforceFocus:C,disableAutoFocus:w,disableRestoreFocus:O,isEnabled:J,open:H,children:i.cloneElement(b,ne)})]}))}):null}))},3336:(e,t,n)=>{n.d(t,{A:()=>b});var o=n(8587),r=n(8168),i=n(5043),a=n(8387),l=n(8606),s=n(7266),c=n(4535);const d=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var u=n(2876),p=n(7056),f=n(2400);function v(e){return(0,f.Ay)("MuiPaper",e)}(0,p.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(579);const h=["className","component","elevation","square","variant"],A=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var o;return(0,r.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,r.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,s.X4)("#fff",d(n.elevation)),", ").concat((0,s.X4)("#fff",d(n.elevation)),")")},t.vars&&{backgroundImage:null==(o=t.vars.overlays)?void 0:o[n.elevation]}))})),b=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiPaper"}),{className:i,component:s="div",elevation:c=1,square:d=!1,variant:p="elevation"}=n,f=(0,o.A)(n,h),b=(0,r.A)({},n,{component:s,elevation:c,square:d,variant:p}),g=(e=>{const{square:t,elevation:n,variant:o,classes:r}=e,i={root:["root",o,!t&&"rounded","elevation"===o&&"elevation".concat(n)]};return(0,l.A)(i,v,r)})(b);return(0,m.jsx)(A,(0,r.A)({as:s,ownerState:b,className:(0,a.A)(g.root,i),ref:t},f))}))},1020:(e,t,n)=>{n.d(t,{IJ:()=>N,Ay:()=>I});var o=n(8168),r=n(8587),i=n(5043),a=n(8387),l=n(3662),s=n(540),c=n(8606),d=n(4535),u=n(2876),p=n(950),f=n(2427),v=n(6078),m=n(5849),h=n(6328),A=n(1243),b=n(3336),g=n(7056),y=n(2400);function E(e){return(0,y.Ay)("MuiPopover",e)}(0,g.A)("MuiPopover",["root","paper"]);var x=n(579);const P=["onEntering"],k=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],R=["slotProps"];function w(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function T(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function S(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?"".concat(e,"px"):e)).join(" ")}function C(e){return"function"===typeof e?e():e}const M=(0,d.Ay)(A.A,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),N=(0,d.Ay)(b.A,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),I=i.forwardRef((function(e,t){var n,d,A;const b=(0,u.A)({props:e,name:"MuiPopover"}),{action:g,anchorEl:y,anchorOrigin:I={vertical:"top",horizontal:"left"},anchorPosition:O,anchorReference:L="anchorEl",children:F,className:B,container:D,elevation:j=8,marginThreshold:z=16,open:K,PaperProps:q={},slots:H,slotProps:W,transformOrigin:U={vertical:"top",horizontal:"left"},TransitionComponent:Y=h.A,transitionDuration:Q="auto",TransitionProps:{onEntering:X}={},disableScrollLock:_=!1}=b,V=(0,r.A)(b.TransitionProps,P),G=(0,r.A)(b,k),J=null!=(n=null==W?void 0:W.paper)?n:q,Z=i.useRef(),$=(0,m.A)(Z,J.ref),ee=(0,o.A)({},b,{anchorOrigin:I,anchorReference:L,elevation:j,marginThreshold:z,externalPaperSlotProps:J,transformOrigin:U,TransitionComponent:Y,transitionDuration:Q,TransitionProps:V}),te=(e=>{const{classes:t}=e;return(0,c.A)({root:["root"],paper:["paper"]},E,t)})(ee),ne=i.useCallback((()=>{if("anchorPosition"===L)return O;const e=C(y),t=(e&&1===e.nodeType?e:(0,f.A)(Z.current).body).getBoundingClientRect();return{top:t.top+w(t,I.vertical),left:t.left+T(t,I.horizontal)}}),[y,I.horizontal,I.vertical,O,L]),oe=i.useCallback((e=>({vertical:w(e,U.vertical),horizontal:T(e,U.horizontal)})),[U.horizontal,U.vertical]),re=i.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=oe(t);if("none"===L)return{top:null,left:null,transformOrigin:S(n)};const o=ne();let r=o.top-n.vertical,i=o.left-n.horizontal;const a=r+t.height,l=i+t.width,s=(0,v.A)(C(y)),c=s.innerHeight-z,d=s.innerWidth-z;if(null!==z&&rc){const e=a-c;r-=e,n.vertical+=e}if(null!==z&&id){const e=l-d;i-=e,n.horizontal+=e}return{top:"".concat(Math.round(r),"px"),left:"".concat(Math.round(i),"px"),transformOrigin:S(n)}}),[y,L,ne,oe,z]),[ie,ae]=i.useState(K),le=i.useCallback((()=>{const e=Z.current;if(!e)return;const t=re(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,ae(!0)}),[re]);i.useEffect((()=>(_&&window.addEventListener("scroll",le),()=>window.removeEventListener("scroll",le))),[y,_,le]);i.useEffect((()=>{K&&le()})),i.useImperativeHandle(g,(()=>K?{updatePosition:()=>{le()}}:null),[K,le]),i.useEffect((()=>{if(!K)return;const e=(0,p.A)((()=>{le()})),t=(0,v.A)(y);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[y,K,le]);let se=Q;"auto"!==Q||Y.muiSupportAuto||(se=void 0);const ce=D||(y?(0,f.A)(C(y)).body:void 0),de=null!=(d=null==H?void 0:H.root)?d:M,ue=null!=(A=null==H?void 0:H.paper)?A:N,pe=(0,l.Q)({elementType:ue,externalSlotProps:(0,o.A)({},J,{style:ie?J.style:(0,o.A)({},J.style,{opacity:0})}),additionalProps:{elevation:j,ref:$},ownerState:ee,className:(0,a.A)(te.paper,null==J?void 0:J.className)}),fe=(0,l.Q)({elementType:de,externalSlotProps:(null==W?void 0:W.root)||{},externalForwardedProps:G,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:ce,open:K},ownerState:ee,className:(0,a.A)(te.root,B)}),{slotProps:ve}=fe,me=(0,r.A)(fe,R);return(0,x.jsx)(de,(0,o.A)({},me,!(0,s.g)(de)&&{slotProps:ve,disableScrollLock:_},{children:(0,x.jsx)(Y,(0,o.A)({appear:!0,in:K,onEntering:(e,t)=>{X&&X(e,t),le()},onExited:()=>{ae(!1)},timeout:se},V,{children:(0,x.jsx)(ue,(0,o.A)({},pe,{children:F}))}))}))}))},950:(e,t,n)=>{n.d(t,{A:()=>o});const o=n(6440).A},2427:(e,t,n)=>{n.d(t,{A:()=>o});const o=n(2144).A},6078:(e,t,n)=>{n.d(t,{A:()=>o});const o=n(6288).A},4708:(e,t,n)=>{function o(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,o=new Array(n),r=0;r{}))}n.d(t,{A:()=>o})},6440:(e,t,n)=>{function o(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function o(){for(var o=arguments.length,r=new Array(o),i=0;i{e.apply(this,r)}),n)}return o.clear=()=>{clearTimeout(t)},o}n.d(t,{A:()=>o})},6336:(e,t,n)=>{function o(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}n.d(t,{A:()=>o})},6288:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(2144);function r(e){return(0,o.A)(e).defaultView||window}}}]); -//# sourceMappingURL=20.d5160684.chunk.js.map \ No newline at end of file diff --git a/static/js/20.d5160684.chunk.js.map b/static/js/20.d5160684.chunk.js.map deleted file mode 100644 index fdbc858..0000000 --- a/static/js/20.d5160684.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/20.d5160684.chunk.js","mappings":"+OAEO,SAASA,EAAwBC,GACtC,OAAOC,EAAAA,EAAAA,IAAqB,cAAeD,EAC7C,EACwBE,EAAAA,EAAAA,GAAuB,cAAe,CAAC,OAAQ,c,aCDvE,MAAMC,EAAY,CAAC,WAAY,YAAa,YAAa,aAAc,kBAAmB,YAAa,OAAQ,YAAa,QAAS,sBAAuB,sBAoBtJC,GAAeC,EAAAA,EAAAA,IAAO,MAAO,CACjCC,KAAM,cACNN,KAAM,OACNO,kBAAmBA,CAACC,EAAOC,KACzB,MAAM,WACJC,GACEF,EACJ,MAAO,CAACC,EAAOE,KAAMD,EAAWE,WAAaH,EAAOG,UAAU,GAP7CP,EASlBQ,IAAA,IAAC,WACFH,GACDG,EAAA,OAAKC,EAAAA,EAAAA,GAAS,CACbC,SAAU,QACVC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,MAAO,EACPC,OA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CA5B,Q,QAA0B,C,iBCKX,SAAS6M,IAAgC,QAAA0M,EAAA1P,UAAAR,OAAPmQ,EAAK,IAAApM,MAAAmM,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IAALD,EAAKC,GAAA5P,UAAA4P,GACpD,OAAOD,EAAME,QAAO,CAACC,EAAKC,IACZ,MAARA,EACKD,EAEF,WAAkC,QAAAE,EAAAhQ,UAAAR,OAANyQ,EAAI,IAAA1M,MAAAyM,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IAAJD,EAAIC,GAAAlQ,UAAAkQ,GACrCJ,EAAIK,MAAMjR,KAAM+Q,GAChBF,EAAKI,MAAMjR,KAAM+Q,EACnB,IACC,QACL,C,iCCde,SAASf,EAASa,GAAkB,IAC7CzY,EADiC8Y,EAAIpQ,UAAAR,OAAA,QAAA9F,IAAAsG,UAAA,GAAAA,UAAA,GAAG,IAE5C,SAASqQ,IAAmB,QAAAX,EAAA1P,UAAAR,OAANyQ,EAAI,IAAA1M,MAAAmM,GAAAE,EAAA,EAAAA,EAAAF,EAAAE,IAAJK,EAAIL,GAAA5P,UAAA4P,GAKxBU,aAAahZ,GACbA,EAAUiZ,YALIC,KAEZT,EAAKI,MAAMjR,KAAM+Q,EAAK,GAGIG,EAC9B,CAIA,OAHAC,EAAUlB,MAAQ,KAChBmB,aAAahZ,EAAQ,EAEhB+Y,CACT,C,iCCde,SAAS1S,EAAiBV,GAEvC,MAAMwT,EAAgBxT,EAAII,gBAAgBC,YAC1C,OAAOkM,KAAKkH,IAAI3B,OAAO3R,WAAaqT,EACtC,C,gECLe,SAASrV,EAAY5B,GAElC,OADY0D,EAAAA,EAAAA,GAAc1D,GACfmX,aAAe5B,MAC5B,C","sources":["../node_modules/@mui/material/Backdrop/backdropClasses.js","../node_modules/@mui/material/Backdrop/Backdrop.js","../node_modules/@mui/material/Fade/Fade.js","../node_modules/@mui/base/unstable_useModal/ModalManager.js","../node_modules/@mui/base/unstable_useModal/useModal.js","../node_modules/@mui/base/FocusTrap/FocusTrap.js","../node_modules/@mui/material/Modal/modalClasses.js","../node_modules/@mui/material/Modal/Modal.js","../node_modules/@mui/material/styles/getOverlayAlpha.js","../node_modules/@mui/material/Paper/paperClasses.js","../node_modules/@mui/material/Paper/Paper.js","../node_modules/@mui/material/Popover/popoverClasses.js","../node_modules/@mui/material/Popover/Popover.js","../node_modules/@mui/material/utils/debounce.js","../node_modules/@mui/material/utils/ownerDocument.js","../node_modules/@mui/material/utils/ownerWindow.js","../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../node_modules/@mui/utils/debounce/debounce.js","../node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.js","../node_modules/@mui/utils/ownerWindow/ownerWindow.js"],"sourcesContent":["import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"invisible\", \"open\", \"slotProps\", \"slots\", \"TransitionComponent\", \"transitionDuration\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Fade from '../Fade';\nimport { getBackdropUtilityClass } from './backdropClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n}, ownerState.invisible && {\n backgroundColor: 'transparent'\n}));\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n var _slotProps$root, _ref, _slots$root;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n components = {},\n componentsProps = {},\n invisible = false,\n open,\n slotProps = {},\n slots = {},\n TransitionComponent = Fade,\n transitionDuration\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n invisible\n });\n const classes = useUtilityClasses(ownerState);\n const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other, {\n children: /*#__PURE__*/_jsx(BackdropRoot, _extends({\n \"aria-hidden\": true\n }, rootSlotProps, {\n as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,\n className: clsx(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),\n ownerState: _extends({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),\n classes: classes,\n ref: ref,\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `slots` prop.\n * It's recommended to use the `slots` prop instead.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `slotProps` prop.\n * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Fade\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const enableStrictModeCompat = true;\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, children.ref, ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport { extractEventHandlers } from '../utils';\nimport { ModalManager, ariaHidden } from './ModalManager';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nexport function useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);\n return _extends({\n role: 'presentation'\n }, externalEventHandlers, {\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n });\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return _extends({\n 'aria-hidden': true\n }, externalEventHandlers, {\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n });\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),\n onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}","'use client';\n\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
,
")}));this.$ghostTextWidget={html:r.join(""),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var s=this.$cursorLayer.getPixelPosition(i,!0),a=this.container.getBoundingClientRect().height,l=o.length*this.lineHeight;if(l0){var c=0;l.push(o[s].length);for(var h=0;h1||Math.abs(e.$size.height-i)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,i.implement($.prototype,v),s.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=$})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/net"),r=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.$createWorkerFromOldConfig=function(t,n,i,o,r){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(o),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,o=!1,a=Object.create(r),c=[],h=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(o?setTimeout(u):u())}});h.setEmitSync=function(e){o=e};var u=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){h.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)u()})),h},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),s=function(){function e(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new i(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+r};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+r};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,o=e("./range").Range,r=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),r=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,r).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],r=e.column0;)y--;if(y>0)for(var w=0;i[w].isEmpty();)w++;for(var b=y;b>=w;b--)i[b].isEmpty()&&i.splice(b,1)}return i}}.call(r.prototype);var d=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(o?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new r(a);this.inVirtualSelectionMode=!0;for(var p=h.length;p--;){if(s)for(;p>0&&h[p].start.row==h[p-1].end.row;)p--;d.fromOrientedRange(h[p]),d.index=p,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===g||(i=g),d.toOrientedRange(h[p])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;is&&(s=n.column),ih?e.insert(i,l.stringRepeat(" ",r-h)):e.remove(new o(i.row,i.column,i.row,i.column-r+h)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,p=u==d;if(p){var g,f=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d0);u<0&&(u=0),d>=f&&(d=f-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,p),this.session.insert({row:u,column:0},m.join("\n")+"\n"),p||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var n,i,o,r=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,o=t[3].length,t):(n+i+o!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(r=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(o=t[3].length),t):[e]})).map(t?c:r?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=n||r.length,l=e.getLength(),c=t,h=t;++tc){var p=e.getLine(h).length;return new i(c,a,h,p)}}},this.openingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(o.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,o=e("../lib/dom"),r=e("../range").Range,s=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),l=a.row,c=n.widgetManager.getWidgetsAtRow(l).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():l-=t;var h,u=function(e,t,n){var i=e.getAnnotations().sort(r.comparePoints);if(i.length){var o=function(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,s=n(t,e[r]);if(s>0)i=r+1;else{if(!(s<0))return r;o=r-1}}return-(i+1)}(i,{row:t,column:-1},r.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var s=i[o];if(s&&n){if(s.row===t){do{s=i[o+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[o+=n]}while(s&&s.row==t);return a.length&&a}}}(n,l,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,h=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;h={text:[s("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var p={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},g=p.el.appendChild(o.createElement("div")),f=p.el.appendChild(o.createElement("div"));f.className="error_widget_arrow "+h.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;f.style.left=m+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",g.className="error_widget "+h.className,g.innerHTML=h.text.join("
"),g.appendChild(o.createElement("div"));var v=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(v),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(v),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},o.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var i=e("./lib/dom"),o=e("./range").Range,r=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=i.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),h=new r(new l(e),c,n),u={document:c,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),h.on("destroy",(function(){u.editor.container.env=null})),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.Range=o,t.Editor=r,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var i in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(i)&&(n.ace[i]=t[i]);n.ace.default=n.ace,e&&(e.exports=n.ace)}))},454:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var i=e("./lib/dom"),o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,u=e("./clipboard"),d={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}d.SELECTED_TEXT=d.SELECTION;var g=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=d}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return e.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,i){var o=t(e.substr(1));return i.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",o=t.guard;o=new RegExp(o,i.replace(/[^gim]/g,""));var r="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(o,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(r,n),i="E",o=0;o=0&&r.splice(s,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(l){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var r=t[2],s=t[3];if("regex"==r){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==r?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):r&&(i[r]=s)}}return n},e.prototype.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var o=i[t];return o&&(n=o[e]),!!n}),this),n},e}();o.implement(g.prototype,r);var f=function(e,t,n){void 0===n&&(n={});var i=e.getCursorPosition(),o=e.session.getLine(i.row),r=e.session.getTabString(),s=o.match(/^\s*/)[0];i.column1?(y=t[t.length-1].length,v+=t.length-1):y+=e.length,w+=e}else e&&(e.start?e.end={row:v,column:y}:e.start={row:v,column:y})})),{text:w,tabstops:l,tokens:a}},m=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},o=this.tabstops.slice(),r=0;r2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new c,m.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var v=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,h=e("./../lib/useragent"),u=function(e){return"suggest-aria-id:".concat(e)},d=h.isSafari?"menu":"listbox",p=h.isSafari?"menuitem":"option",g=h.isSafari?"aria-current":"aria-selected",f=function(e){var t=new i(e);t.$maxLines=4;var n=new o(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},m=function(e){var t=l.createElement("div"),n=f(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",d),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i,o=function(){};n.focus=o,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=o,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()}));var h=new r(-1,0,-1,1/0),m=new r(-1,0,-1,1/0);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?h.id&&(n.session.removeMarker(h.id),h.id=null):h.id=n.session.addMarker(h,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(i){if(i.x!=e.x||i.y!=e.y){(i=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;h.start.row!=t&&(h.id||n.setRow(t),y(t))}}else i=e})),n.renderer.on("beforeRender",(function(){if(i&&-1!=h.start.row){i.$pos=null;var e=i.getDocumentPosition().row;h.id||n.setRow(e),y(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow],o=document.activeElement;if(i!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),o.removeAttribute("aria-activedescendant"),n.selectedNode.removeAttribute(g),n.selectedNode.removeAttribute("id")),n.selectedNode=i,i){l.addCssClass(i,"ace_selected");var r=u(e);i.id=r,t.element.setAttribute("aria-activedescendant",r),o.setAttribute("aria-activedescendant",r),i.setAttribute("role",p),i.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),i.setAttribute("aria-label",n.getData(e).caption||n.getData(e).value),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-posinset",e+1),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute(g,"true")}}));var v=function(){y(-1)},y=function(e,t){e!==h.start.row&&(h.start.row=h.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return h.start.row},s.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,v()})),n.on("hide",v),n.on("changeSelection",v),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var w=n.session.bgTokenizer;return w.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var o=t.caption||t.value||t.name;function r(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,h=0;h<=a.length;h++)if(h!=c&&(t.matchMask&1<=h?"bottom":"top"),"top"===o?(u.bottom=e.top-this.$borderSize,u.top=u.bottom-h):"bottom"===o&&(u.top=e.top+t+this.$borderSize,u.bottom=u.top+h);var g=u.top>=0&&u.bottom<=a;if(!r&&!g)return!1;c.$maxPixelHeight=g?null:"top"===o?p:d,"top"===o?(s.style.top="",s.style.bottom=a-u.bottom+"px",n.isTopdown=!1):(s.style.top=u.top+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var f=e.left;return f+s.offsetWidth>l&&(f=l-s.offsetWidth),s.style.left=f+"px",s.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=o,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=m,t.$singleLineEditor=f,t.getAriaId=u})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,n){"use strict";var i=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var i="doc-tooltip ",o=0;o=0&&n.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var o=[],r=t;r0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,i=t.$cursorLayer.getPixelPosition(this.base,!0);i.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();i.top+=o.top-t.layerConfig.offset,i.left+=o.left-e.renderer.scrollLeft,i.left+=t.gutterWidth;var r={top:i.top,left:i.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(r.top+=t.$ghostTextWidget.el.offsetHeight);var s=e.container.getBoundingClientRect().bottom-n,a=sthis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=!this.ignoreCaption&&r.caption||r.value||r.snippet;if(a){var l,c,h=-1,u=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var p=a.toLowerCase().indexOf(o);if(p>-1)d=p;else for(var g=0;g=0&&(m<0||f0&&(-1===h&&(d+=10),d+=c,u|=1<",s.escapeHTML(e.caption),"","
",s.escapeHTML(h(e.snippet))].join(""))},id:"snippetCompleter"},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var p,g={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=r.$modes[e]),e&&(i.files||(i.files={}),v(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},v=function(e,t){t&&e&&!i.files[e]&&(i.files[e]={},r.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){m("ace/mode/"+e)}))))})))},y=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){p=e;var i=e.editor.$liveAutocompletionDelay;i?w.delay(i):b(e)}},w=s.delayedCall((function(){b(p)}),0),b=function(e){var t=e.editor,n=a.getCompletionPrefix(t),i=e.args,r=a.triggerAutocomplete(t,i);if(n&&n.length>=t.$liveAutocompletionThreshold||r){var s=o.for(t);s.autoShown=!0,s.showPopup(t)}},$=e("../editor").Editor;e("../config").defineOptions($.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(g),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(g),this.off("changeMode",f))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},4878:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var i,o=e("./lib/oop"),r=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),s=e("./editor").Editor,a=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){o.implement(this,r),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new s(new a(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var i=this.$editors.some((function(t){return t.session===e}));return i&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,o=0;o{e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(r,o),r.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},r.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},r.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=r})),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,r=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",a=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",r="(function)(\\s*)(\\*?)",a={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[o.getStartRule("doc-start"),c("no_regex"),a,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+r+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+r+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+r+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:r+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[c("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),e&&0==e.jsx||l.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}i.inherits(a,r),t.JavaScriptHighlightRules=a})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,r=e.findMatchingBracket({row:t,column:o});if(!r||r.row==t)return 0;var s=this.$getIndent(e.getLine(r.row));e.replace(new i(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o})),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator;function s(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var a=function(){this.add("string_dquotes","insertion",(function(e,t,n,i,o){if('"'==o||"'"==o){var a=o,l=i.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:a+l+a,selection:!1};var c=n.getCursorPosition(),h=i.doc.getLine(c.row).substring(c.column,c.column+1),u=new r(i,c.row,c.column),d=u.getCurrentToken();if(h==a&&(s(d,"attribute-value")||s(d,"string")))return{text:"",selection:[1,1]};if(d||(d=u.stepBackward()),!d)return;for(;s(d,"tag-whitespace")||s(d,"whitespace");)d=u.stepBackward();var p=!h||h.match(/\s/);if(s(d,"attribute-equals")&&(p||">"==h)||s(d,"decl-attribute-equals")&&(p||"?"==h))return{text:a+a,selection:[1,1]}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==r||"'"==r)&&i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==r)return o.end.column++,o})),this.add("autoclosing","insertion",(function(e,t,n,i,o){if(">"==o){var a=n.getSelectionRange().start,l=new r(i,a.row,a.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(s(c,"tag-name")||s(c,"tag-whitespace")||s(c,"attribute-name")||s(c,"attribute-equals")||s(c,"attribute-value")))return;if(s(c,"reference.attribute-value"))return;if(s(c,"attribute-value")){var h=l.getCurrentTokenColumn()+c.value.length;if(a.column/.test(i.getLine(a.row).slice(a.column)))return;for(;!s(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var d=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(s(l.stepBackward(),"end-tag-open"))return;var g=c.value;if(d==a.row&&(g=g.substring(0,a.column-p)),this.voidElements&&this.voidElements.hasOwnProperty(g.toLowerCase()))return;return{text:">",selection:[1,1]}}})),this.add("autoindent","insertion",(function(e,t,n,i,o){if("\n"==o){var a=n.getCursorPosition(),l=i.getLine(a.row),c=new r(i,a.row,a.column),h=c.getCurrentToken();if(s(h,"")&&-1!==h.type.indexOf("tag-close")){if("/>"==h.value)return;for(;h&&-1===h.type.indexOf("tag-name");)h=c.stepBackward();if(!h)return;var u=h.value,d=c.getCurrentTokenRow();if(!(h=c.stepBackward())||-1!==h.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[u]||!this.voidElements){var p=i.getTokenAt(a.row,a.column+1),g=(l=i.getLine(d),this.$getIndent(l)),f=g+i.getTabString();return p&&""==r){var s=n.getSelectionRange().start,a=new o(i,s.row,s.column),l=a.getCurrentToken()||a.stepBackward();if(!l)return;if("<"==l.value)return{text:">",selection:[1,1]}}}))};i.inherits(a,r),t.JavaScriptBehaviour=a})),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),o=e("../../range").Range,r=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){r.call(this),this.voidElements=e||{},this.optionalEndTags=i.mixin({},this.voidElements),t&&i.mixin(this.optionalEndTags,t)};i.inherits(s,r);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function l(e,t){return e.type.lastIndexOf(t+".xml")>-1}(function(){this.getFoldWidget=function(e,t,n){var i=this._getFirstTagInLine(e,n);return i?i.closing||!i.tagName&&i.selfClosing?"markbeginend"===t?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(e,n,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/"==r.value;break}return i}if(l(r,"tag-close"))return i.selfClosing="/>"==r.value,i;i.start.column+=r.value.length}return null},this._findEndTagInLine=function(e,t,n,i){for(var o=e.getTokens(t),r=0,s=0;sc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=r)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new o(r,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),r=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new o(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),o=e("./xml").FoldMode,r=e("./cstyle").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new o};i.inherits(s,r),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=this.getFoldWidgetBase(e,t,n);return i||this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,i){var o=this.getFoldWidgetRangeBase(e,t,n,i);return o||this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(s.prototype)})),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,r=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,h=function(){this.HighlightRules=r,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};i.inherits(h,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),r=o.tokens,s=o.state;if(r.length&&"comment"==r[r.length-1].type)return i;if("start"==e||"no_regex"==e)(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(h.prototype),t.Mode=h})),ace.require(["ace/mode/javascript"],(function(t){e&&(e.exports=t)}))},6120:(e,t,n)=>{e=n.nmd(e),ace.define("ace/theme/github_dark-css",["require","exports","module"],(function(e,t,n){n.exports=".ace-github-dark .ace_gutter {\n background: #24292e;\n color: #7388b5\n}\n\n.ace-github-dark .ace_print-margin {\n width: 1px;\n background: #00204b\n}\n\n.ace-github-dark {\n background-color: #24292e;\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_constant.ace_other,\n.ace-github-dark .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_marker-layer .ace_selection {\n background: #003F8E\n}\n\n.ace-github-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #24292e;\n}\n\n.ace-github-dark .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-github-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404F7D\n}\n\n.ace-github-dark .ace_marker-layer .ace_active-line {\n background: #00346E\n}\n\n.ace-github-dark .ace_gutter-active-line {\n background-color: #24292e\n}\n\n.ace-github-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #003F8E\n}\n\n.ace-github-dark .ace_invisible {\n color: #404F7D\n}\n\n.ace-github-dark .ace_keyword,\n.ace-github-dark .ace_meta,\n.ace-github-dark .ace_storage,\n.ace-github-dark .ace_storage.ace_type,\n.ace-github-dark .ace_support.ace_type {\n color: #ff7b72\n}\n\n.ace-github-dark .ace_keyword.ace_operator {\n color: #79c0ff\n}\n\n.ace-github-dark .ace_constant.ace_character,\n.ace-github-dark .ace_constant.ace_language,\n.ace-github-dark .ace_constant.ace_numeric,\n.ace-github-dark .ace_keyword.ace_other.ace_unit,\n.ace-github-dark .ace_support.ace_constant,\n.ace-github-dark .ace_variable.ace_parameter {\n color: #FFC58F\n}\n\n.ace-github-dark .ace_invalid {\n color: #FFFFFF;\n background-color: #F99DA5\n}\n\n.ace-github-dark .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #ff7b72\n}\n\n.ace-github-dark .ace_fold {\n background-color: #BBDAFF;\n border-color: #FFFFFF\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_function,\n.ace-github-dark .ace_support.ace_function,\n.ace-github-dark .ace_variable {\n color: #BBDAFF\n}\n\n.ace-github-dark .ace_support.ace_class,\n.ace-github-dark .ace_support.ace_type {\n color: #FFEEAD\n}\n\n.ace-github-dark .ace_heading,\n.ace-github-dark .ace_markup.ace_heading,\n.ace-github-dark .ace_string {\n color: #9fcef6\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_tag,\n.ace-github-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-github-dark .ace_meta.ace_tag,\n.ace-github-dark .ace_string.ace_regexp,\n.ace-github-dark .ace_variable {\n color: #FF9DA4\n}\n\n.ace-github-dark .ace_comment {\n color: #7285B7\n}\n\n.ace-github-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-github-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n\n.ace-github-dark .ace_constant.ace_buildin {\n color: #0086B3;\n}\n\n.ace-github-dark .ace_variable.ace_language {\n color: #ffffff;\n}\n "})),ace.define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-github-dark",t.cssText=e("./github_dark-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/github_dark"],(function(t){e&&(e.exports=t)}))},5388:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,i,o){"undefined"==typeof o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var r=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];"undefined"==typeof i&&(i=!0);var s=i,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var h=this.diff_compute_(e,n,s,r);return l&&h.unshift(new t.Diff(0,l)),c&&h.push(new t.Diff(0,c)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,i,o,r){var s;if(!e)return[new t.Diff(1,i)];if(!i)return[new t.Diff(n,e)];var a=e.length>i.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var h=this.diff_halfMatch_(e,i);if(h){var u=h[0],d=h[1],p=h[2],g=h[3],f=h[4],m=this.diff_main(u,p,o,r),v=this.diff_main(d,g,o,r);return m.concat([new t.Diff(0,f)],v)}return o&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,r):this.diff_bisect_(e,i,r)},t.prototype.diff_lineMode_=function(e,i,o){var r=this.diff_linesToChars_(e,i);e=r.chars1,i=r.chars2;var s=r.lineArray,a=this.diff_main(e,i,!1,o);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",d="";l=1&&h>=1){a.splice(l-c-h,c+h),l=l-c-h;for(var p=this.diff_main(u,d,!1,o),g=p.length-1;g>=0;g--)a.splice(l,0,p[g]);l+=p.length}h=0,c=0,u="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,o){for(var r=e.length,s=i.length,a=Math.ceil((r+s)/2),l=a,c=2*a,h=new Array(c),u=new Array(c),d=0;do);w++){for(var b=-w+f;b<=w-m;b+=2){for(var $=l+b,x=(_=b==-w||b!=w&&h[$-1]r)m+=2;else if(x>s)f+=2;else if(g){if((k=l+p-b)>=0&&k=(C=r-u[k]))return this.diff_bisectSplit_(e,i,_,x,o)}}for(var S=-w+v;S<=w-y;S+=2){for(var C,k=l+S,A=(C=S==-w||S!=w&&u[k-1]r)y+=2;else if(A>s)v+=2;else if(!g){if(($=l+p-S)>=0&&$=(C=r-C))return this.diff_bisectSplit_(e,i,_,x,o)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,o){var r=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(r,s,!1,o),h=this.diff_main(a,l,!1,o);return c.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function o(e){for(var t="",o=0,s=-1,a=n.length;si?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,r,s,a,h]:null}var s,a,l,c,h,u=r(n,i,Math.ceil(n.length/4)),d=r(n,i,Math.ceil(n.length/2));return u||d?(s=d?u&&u[4].length>d[4].length?u:d:u,e.length>t.length?(a=s[0],l=s[1],c=s[2],h=s[3]):(c=s[0],h=s[1],a=s[2],l=s[3]),[a,l,c,h,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,o=[],r=0,s=null,a=0,l=0,c=0,h=0,u=0;a0?o[r-1]:-1,l=0,c=0,h=0,u=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=f?(g>=d.length/2||g>=p.length/2)&&(e.splice(a,0,new t.Diff(0,p.substring(0,g))),e[a-1][1]=d.substring(0,d.length-g),e[a+1][1]=p.substring(g),a++):(f>=d.length/2||f>=p.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,f))),e[a-1][0]=1,e[a-1][1]=p.substring(0,p.length-f),e[a+1][0]=n,e[a+1][1]=d.substring(f),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),o=n.charAt(0),r=i.match(t.nonAlphaNumericRegex_),s=o.match(t.nonAlphaNumericRegex_),a=r&&i.match(t.whitespaceRegex_),l=s&&o.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),h=l&&o.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),d=h&&n.match(t.blanklineStartRegex_);return u||d?5:c||h?4:r&&!a&&l?3:a||l?2:r||s?1:0}for(var i=1;i=d&&(d=p,c=o,h=r,u=s)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=h,u?e[i+1][1]=u:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,o=[],r=0,s=null,a=0,l=!1,c=!1,h=!1,u=!1;a0?o[r-1]:-1,h=u=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,o=0,r=0,s=0,a="",l="";o1?(0!==r&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(o-r-s>0&&0==e[o-r-s-1][0]?e[o-r-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),o++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[o][1]=l.substring(l.length-i)+e[o][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),o-=r+s,e.splice(o,r+s),a.length&&(e.splice(o,0,new t.Diff(n,a)),o++),l.length&&(e.splice(o,0,new t.Diff(1,l)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,s=0,r=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(o=1;ot));i++)s=o,a=r;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,o=//g,s=/\n/g,a=0;a");switch(l){case 1:t[a]=''+c+"";break;case n:t[a]=''+c+"";break;case 0:t[a]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),o=this;function r(e,i){var r=e/t.length,s=Math.abs(n-i);return o.Match_Distance?r+s/o.Match_Distance:s?1:r}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(r(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(r(0,a),s)));var l,c,h=1<=g;v--){var y=i[e.charAt(v-1)];if(m[v]=0===p?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(u[v+1]|u[v])<<1|1|u[v+1],m[v]&h){var w=r(p,v-1);if(w<=s){if(s=w,!((a=v-1)>n))break;g=Math.max(1,2*n-a)}}}if(r(p+1,n)>s)break;u=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&"undefined"==typeof i&&"undefined"==typeof o)s=e,r=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&"undefined"==typeof o)r=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");r=e,s=o}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,h=0,u=0,d=r,p=r,g=0;g=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=p,h=u)}1!==f&&(h+=m.length),f!==n&&(u+=m.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,h.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),c+h.length-this.Match_MaxBits))||a>=u)&&(a=-1):a=this.match_main(t,h,c),-1==a)r[s]=!1,o-=e[s].length2-e[s].length1;else if(r[s]=!0,o=a-c,h==(l=-1==u?t.substring(a,a+h.length):t.substring(a,u+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+h.length);else{var d=this.diff_main(h,l,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(d)/h.length>this.Patch_DeleteThreshold)r[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var p,g=0,f=0;fs[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],r.start1-=a,r.start2-=a,r.length1+=a,r.length2+=a}if(0==(s=(r=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new t.Diff(0,i)),r.length1+=n,r.length2+=n;else if(n>s[s.length-1][1].length){a=n-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,a),r.length1+=a,r.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,o=0;o2*i?(c.length1+=d.length,s+=d.length,h=!1,c.diffs.push(new t.Diff(u,d)),r.diffs.shift()):(d=d.substring(0,i-c.length1-this.Patch_Margin),c.length1+=d.length,s+=d.length,0===u?(c.length2+=d.length,a+=d.length):h=!1,c.diffs.push(new t.Diff(u,d)),d==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var p=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new t.Diff(0,p))),h||e.splice(++o,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{var i="__lodash_hash_undefined__",o=1/0,r="[object Function]",s="[object GeneratorFunction]",a="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,h=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var v=Array.prototype,y=Function.prototype,w=Object.prototype,b=m["__core-js_shared__"],$=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=y.toString,S=w.hasOwnProperty,C=w.toString,k=RegExp("^"+x.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=m.Symbol,_=v.splice,L=W(m,"Map"),M=W(Object,"create"),T=A?A.prototype:void 0,R=T?T.toString:void 0;function E(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},I.prototype.set=function(e,t){var n=this.__data__,i=D(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new E,map:new(L||I),string:new E}},O.prototype.delete=function(e){return P(this,e).delete(e)},O.prototype.get=function(e){return P(this,e).get(e)},O.prototype.has=function(e){return P(this,e).has(e)},O.prototype.set=function(e,t){return P(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return h.test(e)&&n.push(""),e.replace(u,(function(e,t,i,o){n.push(i?o.replace(d,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var s=e.apply(this,i);return n.cache=r.set(o,s),s};return n.cache=new(z.Cache||O),n}z.Cache=O;var j=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&C.call(e)==a}e.exports=function(e,t,n){var i=null==e?void 0:F(e,t);return void 0===i?n:i}},67:(e,t,n)=>{e=n.nmd(e);var i="__lodash_hash_undefined__",o=1,r=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",v="[object Null]",y="[object Object]",w="[object Promise]",b="[object Proxy]",$="[object RegExp]",x="[object Set]",S="[object String]",C="[object Symbol]",k="[object Undefined]",A="[object WeakMap]",_="[object ArrayBuffer]",L="[object DataView]",M=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[a]=R[l]=R[_]=R[h]=R[L]=R[u]=R[d]=R[p]=R[f]=R[m]=R[y]=R[$]=R[x]=R[S]=R[A]=!1;var E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,O=E||I||Function("return this")(),D=t&&!t.nodeType&&t,F=D&&e&&!e.nodeType&&e,N=F&&F.exports===D,P=N&&E.process,W=function(){try{return P&&P.binding&&P.binding("util")}catch(e){}}(),H=W&&W.isTypedArray;function B(e,t){for(var n=-1,i=null==e?0:e.length;++nc))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,p=!0,g=n&r?new Ae:void 0;for(a.set(e,t),a.set(t,e);++d-1},Ce.prototype.set=function(e,t){var n=this.__data__,i=Me(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ke.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(ue||Ce),string:new Se}},ke.prototype.delete=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},ke.prototype.get=function(e){return Ne(this,e).get(e)},ke.prototype.has=function(e){return Ne(this,e).has(e)},ke.prototype.set=function(e,t){var n=Ne(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Ae.prototype.add=Ae.prototype.push=function(e){return this.__data__.set(e,i),this},Ae.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new Ce,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ce){var i=n.__data__;if(!ue||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ke(i)}return n.set(e,t),this.size=n.size,this};var We=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=s}function qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=H?function(e){return function(t){return e(t)}}(H):function(e){return Xe(e)&&Ye(e.length)&&!!R[Te(e)]};function Ze(e){return null!=(t=e)&&Ye(t.length)&&!Ke(t)?Le(e):Oe(e);var t}e.exports=function(e,t){return Ee(e,t)}},1497:(e,t,n)=>{"use strict";var i=n(3218);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},5173:(e,t,n)=>{e.exports=n(1497)()},3218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5494:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&this.handleMarkers(x);var A=this.editor.$options;c.editorOptions.forEach((function(t){A.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(b)&&b.forEach((function(t){"string"===typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),w&&w(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return"undefined"===typeof window?(n.g.window={},e=n(6603),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(6603),e};t.debounce=function(e,t){var n=null;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,o)}),t)}}},1869:(e,t,n)=>{"use strict";var i=n(5494);n(2734).default,n(225).default,t.Ay=i.default},225:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers($,t);for(i=0;i subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n });\n}\nif (!String.prototype.repeat) {\n defineProp(String.prototype, \"repeat\", function (count) {\n var result = \"\";\n var string = this;\n while (count > 0) {\n if (count & 1)\n result += string;\n if ((count >>= 1))\n string += string;\n }\n return result;\n });\n}\nif (!String.prototype.includes) {\n defineProp(String.prototype, \"includes\", function (str, position) {\n return this.indexOf(str, position) != -1;\n });\n}\nif (!Object.assign) {\n Object.assign = function (target) {\n if (target === undefined || target === null) {\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n Object.keys(source).forEach(function (key) {\n output[key] = source[key];\n });\n }\n }\n return output;\n };\n}\nif (!Object.values) {\n Object.values = function (o) {\n return Object.keys(o).map(function (k) {\n return o[k];\n });\n };\n}\nif (!Array.prototype.find) {\n defineProp(Array.prototype, \"find\", function (predicate) {\n var len = this.length;\n var thisArg = arguments[1];\n for (var k = 0; k < len; k++) {\n var kValue = this[k];\n if (predicate.call(thisArg, kValue, k, this)) {\n return kValue;\n }\n }\n });\n}\nif (!Array.prototype.findIndex) {\n defineProp(Array.prototype, \"findIndex\", function (predicate) {\n var len = this.length;\n var thisArg = arguments[1];\n for (var k = 0; k < len; k++) {\n var kValue = this[k];\n if (predicate.call(thisArg, kValue, k, this)) {\n return k;\n }\n }\n });\n}\nif (!Array.prototype.includes) {\n defineProp(Array.prototype, \"includes\", function (item, position) {\n return this.indexOf(item, position) != -1;\n });\n}\nif (!Array.prototype.fill) {\n defineProp(Array.prototype, \"fill\", function (value) {\n var O = this;\n var len = O.length >>> 0;\n var start = arguments[1];\n var relativeStart = start >> 0;\n var k = relativeStart < 0\n ? Math.max(len + relativeStart, 0)\n : Math.min(relativeStart, len);\n var end = arguments[2];\n var relativeEnd = end === undefined ? len : end >> 0;\n var final = relativeEnd < 0\n ? Math.max(len + relativeEnd, 0)\n : Math.min(relativeEnd, len);\n while (k < final) {\n O[k] = value;\n k++;\n }\n return O;\n });\n}\nif (!Array.of) {\n defineProp(Array, \"of\", function () {\n return Array.prototype.slice.call(arguments);\n });\n}\n\n});\n\nace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/es6-shim\"], function(require, exports, module){// vim:set ts=4 sts=4 sw=4 st:\n\"use strict\";\nrequire(\"./es6-shim\");\n\n});\n\nace.define(\"ace/lib/deep_copy\",[\"require\",\"exports\",\"module\"], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {\n if (typeof obj !== \"object\" || !obj)\n return obj;\n var copy;\n if (Array.isArray(obj)) {\n copy = [];\n for (var key = 0; key < obj.length; key++) {\n copy[key] = deepCopy(obj[key]);\n }\n return copy;\n }\n if (Object.prototype.toString.call(obj) !== \"[object Object]\")\n return obj;\n copy = {};\n for (var key in obj)\n copy[key] = deepCopy(obj[key]);\n return copy;\n};\n\n});\n\nace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\",\"ace/lib/deep_copy\"], function(require, exports, module){\"use strict\";\nexports.last = function (a) {\n return a[a.length - 1];\n};\nexports.stringReverse = function (string) {\n return string.split(\"\").reverse().join(\"\");\n};\nexports.stringRepeat = function (string, count) {\n var result = '';\n while (count > 0) {\n if (count & 1)\n result += string;\n if (count >>= 1)\n string += string;\n }\n return result;\n};\nvar trimBeginRegexp = /^\\s\\s*/;\nvar trimEndRegexp = /\\s\\s*$/;\nexports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n};\nexports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n};\nexports.copyObject = function (obj) {\n var copy = {};\n for (var key in obj) {\n copy[key] = obj[key];\n }\n return copy;\n};\nexports.copyArray = function (array) {\n var copy = [];\n for (var i = 0, l = array.length; i < l; i++) {\n if (array[i] && typeof array[i] == \"object\")\n copy[i] = this.copyObject(array[i]);\n else\n copy[i] = array[i];\n }\n return copy;\n};\nexports.deepCopy = require(\"./deep_copy\").deepCopy;\nexports.arrayToMap = function (arr) {\n var map = {};\n for (var i = 0; i < arr.length; i++) {\n map[arr[i]] = 1;\n }\n return map;\n};\nexports.createMap = function (props) {\n var map = Object.create(null);\n for (var i in props) {\n map[i] = props[i];\n }\n return map;\n};\nexports.arrayRemove = function (array, value) {\n for (var i = 0; i <= array.length; i++) {\n if (value === array[i]) {\n array.splice(i, 1);\n }\n }\n};\nexports.escapeRegExp = function (str) {\n return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1');\n};\nexports.escapeHTML = function (str) {\n return (\"\" + str).replace(/&/g, \"&\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/ 0xffff ? 2 : 1;\n};\n\n});\n\nace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nexports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n};\nexports.getOS = function () {\n if (exports.isMac) {\n return exports.OS.MAC;\n }\n else if (exports.isLinux) {\n return exports.OS.LINUX;\n }\n else {\n return exports.OS.WINDOWS;\n }\n};\nvar _navigator = typeof navigator == \"object\" ? navigator : {};\nvar os = (/mac|win|linux/i.exec(_navigator.platform) || [\"other\"])[0].toLowerCase();\nvar ua = _navigator.userAgent || \"\";\nvar appName = _navigator.appName || \"\";\nexports.isWin = (os == \"win\");\nexports.isMac = (os == \"mac\");\nexports.isLinux = (os == \"linux\");\nexports.isIE =\n (appName == \"Microsoft Internet Explorer\" || appName.indexOf(\"MSAppHost\") >= 0)\n ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/) || [])[1])\n : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/) || [])[1]); // for ie\nexports.isOldIE = exports.isIE && exports.isIE < 9;\nexports.isGecko = exports.isMozilla = ua.match(/ Gecko\\/\\d+/);\nexports.isOpera = typeof opera == \"object\" && Object.prototype.toString.call(window[\"opera\"]) == \"[object Opera]\";\nexports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\nexports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\nexports.isSafari = parseFloat(ua.split(\" Safari/\")[1]) && !exports.isChrome || undefined;\nexports.isEdge = parseFloat(ua.split(\" Edge/\")[1]) || undefined;\nexports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\nexports.isAndroid = ua.indexOf(\"Android\") >= 0;\nexports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\nexports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window[\"MSStream\"];\nif (exports.isIOS)\n exports.isMac = true;\nexports.isMobile = exports.isIOS || exports.isAndroid;\n\n});\n\nace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar useragent = require(\"./useragent\");\nvar XHTML_NS = \"http://www.w3.org/1999/xhtml\";\nexports.buildDom = function buildDom(arr, parent, refs) {\n if (typeof arr == \"string\" && arr) {\n var txt = document.createTextNode(arr);\n if (parent)\n parent.appendChild(txt);\n return txt;\n }\n if (!Array.isArray(arr)) {\n if (arr && arr.appendChild && parent)\n parent.appendChild(arr);\n return arr;\n }\n if (typeof arr[0] != \"string\" || !arr[0]) {\n var els = [];\n for (var i = 0; i < arr.length; i++) {\n var ch = buildDom(arr[i], parent, refs);\n ch && els.push(ch);\n }\n return els;\n }\n var el = document.createElement(arr[0]);\n var options = arr[1];\n var childIndex = 1;\n if (options && typeof options == \"object\" && !Array.isArray(options))\n childIndex = 2;\n for (var i = childIndex; i < arr.length; i++)\n buildDom(arr[i], el, refs);\n if (childIndex == 2) {\n Object.keys(options).forEach(function (n) {\n var val = options[n];\n if (n === \"class\") {\n el.className = Array.isArray(val) ? val.join(\" \") : val;\n }\n else if (typeof val == \"function\" || n == \"value\" || n[0] == \"$\") {\n el[n] = val;\n }\n else if (n === \"ref\") {\n if (refs)\n refs[val] = el;\n }\n else if (n === \"style\") {\n if (typeof val == \"string\")\n el.style.cssText = val;\n }\n else if (val != null) {\n el.setAttribute(n, val);\n }\n });\n }\n if (parent)\n parent.appendChild(el);\n return el;\n};\nexports.getDocumentHead = function (doc) {\n if (!doc)\n doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n};\nexports.createElement = function (tag, ns) {\n return document.createElementNS ?\n document.createElementNS(ns || XHTML_NS, tag) :\n document.createElement(tag);\n};\nexports.removeChildren = function (element) {\n element.innerHTML = \"\";\n};\nexports.createTextNode = function (textContent, element) {\n var doc = element ? element.ownerDocument : document;\n return doc.createTextNode(textContent);\n};\nexports.createFragment = function (element) {\n var doc = element ? element.ownerDocument : document;\n return doc.createDocumentFragment();\n};\nexports.hasCssClass = function (el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n};\nexports.addCssClass = function (el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n};\nexports.removeCssClass = function (el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n classes.splice(index, 1);\n }\n el.className = classes.join(\" \");\n};\nexports.toggleCssClass = function (el, name) {\n var classes = el.className.split(/\\s+/g), add = true;\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n add = false;\n classes.splice(index, 1);\n }\n if (add)\n classes.push(name);\n el.className = classes.join(\" \");\n return add;\n};\nexports.setCssClass = function (node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n }\n else {\n exports.removeCssClass(node, className);\n }\n};\nexports.hasCssString = function (id, doc) {\n var index = 0, sheets;\n doc = doc || document;\n if ((sheets = doc.querySelectorAll(\"style\"))) {\n while (index < sheets.length) {\n if (sheets[index++].id === id) {\n return true;\n }\n }\n }\n};\nexports.removeElementById = function (id, doc) {\n doc = doc || document;\n if (doc.getElementById(id)) {\n doc.getElementById(id).remove();\n }\n};\nvar strictCSP;\nvar cssCache = [];\nexports.useStrictCSP = function (value) {\n strictCSP = value;\n if (value == false)\n insertPendingStyles();\n else if (!cssCache)\n cssCache = [];\n};\nfunction insertPendingStyles() {\n var cache = cssCache;\n cssCache = null;\n cache && cache.forEach(function (item) {\n importCssString(item[0], item[1]);\n });\n}\nfunction importCssString(cssText, id, target) {\n if (typeof document == \"undefined\")\n return;\n if (cssCache) {\n if (target) {\n insertPendingStyles();\n }\n else if (target === false) {\n return cssCache.push([cssText, id]);\n }\n }\n if (strictCSP)\n return;\n var container = target;\n if (!target || !target.getRootNode) {\n container = document;\n }\n else {\n container = target.getRootNode();\n if (!container || container == target)\n container = document;\n }\n var doc = container.ownerDocument || container;\n if (id && exports.hasCssString(id, container))\n return null;\n if (id)\n cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n var style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id)\n style.id = id;\n if (container == doc)\n container = exports.getDocumentHead(doc);\n container.insertBefore(style, container.firstChild);\n}\nexports.importCssString = importCssString;\nexports.importCssStylsheet = function (uri, doc) {\n exports.buildDom([\"link\", { rel: \"stylesheet\", href: uri }], exports.getDocumentHead(doc));\n};\nexports.scrollbarWidth = function (doc) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n outer.appendChild(inner);\n var body = (doc && doc.documentElement) || (document && document.documentElement);\n if (!body)\n return 0;\n body.appendChild(outer);\n var noScrollbar = inner.offsetWidth;\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n if (noScrollbar === withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n body.removeChild(outer);\n return noScrollbar - withScrollbar;\n};\nexports.computedStyle = function (element, style) {\n return window.getComputedStyle(element, \"\") || {};\n};\nexports.setStyle = function (styles, property, value) {\n if (styles[property] !== value) {\n styles[property] = value;\n }\n};\nexports.HAS_CSS_ANIMATION = false;\nexports.HAS_CSS_TRANSFORMS = false;\nexports.HI_DPI = useragent.isWin\n ? typeof window !== \"undefined\" && window.devicePixelRatio >= 1.5\n : true;\nif (useragent.isChromeOS)\n exports.HI_DPI = false;\nif (typeof document !== \"undefined\") {\n var div = document.createElement(\"div\");\n if (exports.HI_DPI && div.style.transform !== undefined)\n exports.HAS_CSS_TRANSFORMS = true;\n if (!useragent.isEdge && typeof div.style.animationName !== \"undefined\")\n exports.HAS_CSS_ANIMATION = true;\n div = null;\n}\nif (exports.HAS_CSS_TRANSFORMS) {\n exports.translate = function (element, tx, ty) {\n element.style.transform = \"translate(\" + Math.round(tx) + \"px, \" + Math.round(ty) + \"px)\";\n };\n}\nelse {\n exports.translate = function (element, tx, ty) {\n element.style.top = Math.round(ty) + \"px\";\n element.style.left = Math.round(tx) + \"px\";\n };\n}\n\n});\n\nace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){/*\n * based on code from:\n *\n * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/requirejs for details\n */\n\"use strict\";\nvar dom = require(\"./dom\");\nexports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n xhr.send(null);\n};\nexports.loadScript = function (path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n s.src = path;\n head.appendChild(s);\n s.onload = s.onreadystatechange = function (_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort)\n callback();\n }\n };\n};\nexports.qualifyURL = function (url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n};\n\n});\n\nace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nexports.inherits = function (ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\nexports.mixin = function (obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n return obj;\n};\nexports.implement = function (proto, mixin) {\n exports.mixin(proto, mixin);\n};\n\n});\n\nace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar EventEmitter = {};\nvar stopPropagation = function () { this.propagationStopped = true; };\nvar preventDefault = function () { this.defaultPrevented = true; };\nEventEmitter._emit =\n EventEmitter._dispatchEvent = function (eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler)\n return;\n if (typeof e != \"object\" || !e)\n e = {};\n if (!e.type)\n e.type = eventName;\n if (!e.stopPropagation)\n e.stopPropagation = stopPropagation;\n if (!e.preventDefault)\n e.preventDefault = preventDefault;\n listeners = listeners.slice();\n for (var i = 0; i < listeners.length; i++) {\n listeners[i](e, this);\n if (e.propagationStopped)\n break;\n }\n if (defaultHandler && !e.defaultPrevented)\n return defaultHandler(e, this);\n };\nEventEmitter._signal = function (eventName, e) {\n var listeners = (this._eventRegistry || {})[eventName];\n if (!listeners)\n return;\n listeners = listeners.slice();\n for (var i = 0; i < listeners.length; i++)\n listeners[i](e, this);\n};\nEventEmitter.once = function (eventName, callback) {\n var _self = this;\n this.on(eventName, function newCallback() {\n _self.off(eventName, newCallback);\n callback.apply(null, arguments);\n });\n if (!callback) {\n return new Promise(function (resolve) {\n callback = resolve;\n });\n }\n};\nEventEmitter.setDefaultHandler = function (eventName, callback) {\n var handlers = this._defaultHandlers;\n if (!handlers)\n handlers = this._defaultHandlers = { _disabled_: {} };\n if (handlers[eventName]) {\n var old = handlers[eventName];\n var disabled = handlers._disabled_[eventName];\n if (!disabled)\n handlers._disabled_[eventName] = disabled = [];\n disabled.push(old);\n var i = disabled.indexOf(callback);\n if (i != -1)\n disabled.splice(i, 1);\n }\n handlers[eventName] = callback;\n};\nEventEmitter.removeDefaultHandler = function (eventName, callback) {\n var handlers = this._defaultHandlers;\n if (!handlers)\n return;\n var disabled = handlers._disabled_[eventName];\n if (handlers[eventName] == callback) {\n if (disabled)\n this.setDefaultHandler(eventName, disabled.pop());\n }\n else if (disabled) {\n var i = disabled.indexOf(callback);\n if (i != -1)\n disabled.splice(i, 1);\n }\n};\nEventEmitter.on =\n EventEmitter.addEventListener = function (eventName, callback, capturing) {\n this._eventRegistry = this._eventRegistry || {};\n var listeners = this._eventRegistry[eventName];\n if (!listeners)\n listeners = this._eventRegistry[eventName] = [];\n if (listeners.indexOf(callback) == -1)\n listeners[capturing ? \"unshift\" : \"push\"](callback);\n return callback;\n };\nEventEmitter.off =\n EventEmitter.removeListener =\n EventEmitter.removeEventListener = function (eventName, callback) {\n this._eventRegistry = this._eventRegistry || {};\n var listeners = this._eventRegistry[eventName];\n if (!listeners)\n return;\n var index = listeners.indexOf(callback);\n if (index !== -1)\n listeners.splice(index, 1);\n };\nEventEmitter.removeAllListeners = function (eventName) {\n if (!eventName)\n this._eventRegistry = this._defaultHandlers = undefined;\n if (this._eventRegistry)\n this._eventRegistry[eventName] = undefined;\n if (this._defaultHandlers)\n this._defaultHandlers[eventName] = undefined;\n};\nexports.EventEmitter = EventEmitter;\n\n});\n\nace.define(\"ace/lib/report_error\",[\"require\",\"exports\",\"module\"], function(require, exports, module){exports.reportError = function reportError(msg, data) {\n var e = new Error(msg);\n e[\"data\"] = data;\n if (typeof console == \"object\" && console.error)\n console.error(e);\n setTimeout(function () { throw e; });\n};\n\n});\n\nace.define(\"ace/lib/default_english_messages\",[\"require\",\"exports\",\"module\"], function(require, exports, module){var defaultEnglishMessages = {\n \"autocomplete.popup.aria-roledescription\": \"Autocomplete suggestions\",\n \"autocomplete.popup.aria-label\": \"Autocomplete suggestions\",\n \"autocomplete.popup.item.aria-roledescription\": \"item\",\n \"autocomplete.loading\": \"Loading...\",\n \"editor.scroller.aria-roledescription\": \"editor\",\n \"editor.scroller.aria-label\": \"Editor content, press Enter to start editing, press Escape to exit\",\n \"editor.gutter.aria-roledescription\": \"editor\",\n \"editor.gutter.aria-label\": \"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit\",\n \"error-marker.good-state\": \"Looks good!\",\n \"prompt.recently-used\": \"Recently used\",\n \"prompt.other-commands\": \"Other commands\",\n \"prompt.no-matching-commands\": \"No matching commands\",\n \"search-box.find.placeholder\": \"Search for\",\n \"search-box.find-all.text\": \"All\",\n \"search-box.replace.placeholder\": \"Replace with\",\n \"search-box.replace-next.text\": \"Replace\",\n \"search-box.replace-all.text\": \"All\",\n \"search-box.toggle-replace.title\": \"Toggle Replace mode\",\n \"search-box.toggle-regexp.title\": \"RegExp Search\",\n \"search-box.toggle-case.title\": \"CaseSensitive Search\",\n \"search-box.toggle-whole-word.title\": \"Whole Word Search\",\n \"search-box.toggle-in-selection.title\": \"Search In Selection\",\n \"search-box.search-counter\": \"$0 of $1\",\n \"text-input.aria-roledescription\": \"editor\",\n \"text-input.aria-label\": \"Cursor at row $0\",\n \"gutter.code-folding.range.aria-label\": \"Toggle code folding, rows $0 through $1\",\n \"gutter.code-folding.closed.aria-label\": \"Toggle code folding, rows $0 through $1\",\n \"gutter.code-folding.open.aria-label\": \"Toggle code folding, row $0\",\n \"gutter.code-folding.closed.title\": \"Unfold code\",\n \"gutter.code-folding.open.title\": \"Fold code\",\n \"gutter.annotation.aria-label.error\": \"Error, read annotations row $0\",\n \"gutter.annotation.aria-label.warning\": \"Warning, read annotations row $0\",\n \"gutter.annotation.aria-label.info\": \"Info, read annotations row $0\",\n \"inline-fold.closed.title\": \"Unfold code\",\n \"gutter-tooltip.aria-label.error.singular\": \"error\",\n \"gutter-tooltip.aria-label.error.plural\": \"errors\",\n \"gutter-tooltip.aria-label.warning.singular\": \"warning\",\n \"gutter-tooltip.aria-label.warning.plural\": \"warnings\",\n \"gutter-tooltip.aria-label.info.singular\": \"information message\",\n \"gutter-tooltip.aria-label.info.plural\": \"information messages\"\n};\nexports.defaultEnglishMessages = defaultEnglishMessages;\n\n});\n\nace.define(\"ace/lib/app_config\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/lib/report_error\",\"ace/lib/default_english_messages\"], function(require, exports, module){\"no use strict\";\nvar oop = require(\"./oop\");\nvar EventEmitter = require(\"./event_emitter\").EventEmitter;\nvar reportError = require(\"./report_error\").reportError;\nvar defaultEnglishMessages = require(\"./default_english_messages\").defaultEnglishMessages;\nvar optionsProvider = {\n setOptions: function (optList) {\n Object.keys(optList).forEach(function (key) {\n this.setOption(key, optList[key]);\n }, this);\n },\n getOptions: function (optionNames) {\n var result = {};\n if (!optionNames) {\n var options = this.$options;\n optionNames = Object.keys(options).filter(function (key) {\n return !options[key].hidden;\n });\n }\n else if (!Array.isArray(optionNames)) {\n result = optionNames;\n optionNames = Object.keys(result);\n }\n optionNames.forEach(function (key) {\n result[key] = this.getOption(key);\n }, this);\n return result;\n },\n setOption: function (name, value) {\n if (this[\"$\" + name] === value)\n return;\n var opt = this.$options[name];\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n if (opt.forwardTo)\n return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);\n if (!opt.handlesSet)\n this[\"$\" + name] = value;\n if (opt && opt.set)\n opt.set.call(this, value);\n },\n getOption: function (name) {\n var opt = this.$options[name];\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n if (opt.forwardTo)\n return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);\n return opt && opt.get ? opt.get.call(this) : this[\"$\" + name];\n }\n};\nfunction warn(message) {\n if (typeof console != \"undefined\" && console.warn)\n console.warn.apply(console, arguments);\n}\nvar messages;\nvar AppConfig = /** @class */ (function () {\n function AppConfig() {\n this.$defaultOptions = {};\n messages = defaultEnglishMessages;\n }\n AppConfig.prototype.defineOptions = function (obj, path, options) {\n if (!obj.$options)\n this.$defaultOptions[path] = obj.$options = {};\n Object.keys(options).forEach(function (key) {\n var opt = options[key];\n if (typeof opt == \"string\")\n opt = { forwardTo: opt };\n opt.name || (opt.name = key);\n obj.$options[opt.name] = opt;\n if (\"initialValue\" in opt)\n obj[\"$\" + opt.name] = opt.initialValue;\n });\n oop.implement(obj, optionsProvider);\n return this;\n };\n AppConfig.prototype.resetOptions = function (obj) {\n Object.keys(obj.$options).forEach(function (key) {\n var opt = obj.$options[key];\n if (\"value\" in opt)\n obj.setOption(key, opt.value);\n });\n };\n AppConfig.prototype.setDefaultValue = function (path, name, value) {\n if (!path) {\n for (path in this.$defaultOptions)\n if (this.$defaultOptions[path][name])\n break;\n if (!this.$defaultOptions[path][name])\n return false;\n }\n var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});\n if (opts[name]) {\n if (opts.forwardTo)\n this.setDefaultValue(opts.forwardTo, name, value);\n else\n opts[name].value = value;\n }\n };\n AppConfig.prototype.setDefaultValues = function (path, optionHash) {\n Object.keys(optionHash).forEach(function (key) {\n this.setDefaultValue(path, key, optionHash[key]);\n }, this);\n };\n AppConfig.prototype.setMessages = function (value) {\n messages = value;\n };\n AppConfig.prototype.nls = function (key, defaultString, params) {\n if (!messages[key]) {\n warn(\"No message found for the key '\" + key + \"' in the provided messages, trying to find a translation for the default string '\" + defaultString + \"'.\");\n if (!messages[defaultString]) {\n warn(\"No message found for the default string '\" + defaultString + \"' in the provided messages. Falling back to the default English message.\");\n }\n }\n var translated = messages[key] || messages[defaultString] || defaultString;\n if (params) {\n translated = translated.replace(/\\$(\\$|[\\d]+)/g, function (_, name) {\n if (name == \"$\")\n return \"$\";\n return params[name];\n });\n }\n return translated;\n };\n return AppConfig;\n}());\nAppConfig.prototype.warn = warn;\nAppConfig.prototype.reportError = reportError;\noop.implement(AppConfig.prototype, EventEmitter);\nexports.AppConfig = AppConfig;\n\n});\n\nace.define(\"ace/theme/textmate-css\",[\"require\",\"exports\",\"module\"], function(require, exports, module){module.exports = \".ace-tm .ace_gutter {\\n background: #f0f0f0;\\n color: #333;\\n}\\n\\n.ace-tm .ace_print-margin {\\n width: 1px;\\n background: #e8e8e8;\\n}\\n\\n.ace-tm .ace_fold {\\n background-color: #6B72E6;\\n}\\n\\n.ace-tm {\\n background-color: #FFFFFF;\\n color: black;\\n}\\n\\n.ace-tm .ace_cursor {\\n color: black;\\n}\\n \\n.ace-tm .ace_invisible {\\n color: rgb(191, 191, 191);\\n}\\n\\n.ace-tm .ace_storage,\\n.ace-tm .ace_keyword {\\n color: blue;\\n}\\n\\n.ace-tm .ace_constant {\\n color: rgb(197, 6, 11);\\n}\\n\\n.ace-tm .ace_constant.ace_buildin {\\n color: rgb(88, 72, 246);\\n}\\n\\n.ace-tm .ace_constant.ace_language {\\n color: rgb(88, 92, 246);\\n}\\n\\n.ace-tm .ace_constant.ace_library {\\n color: rgb(6, 150, 14);\\n}\\n\\n.ace-tm .ace_invalid {\\n background-color: rgba(255, 0, 0, 0.1);\\n color: red;\\n}\\n\\n.ace-tm .ace_support.ace_function {\\n color: rgb(60, 76, 114);\\n}\\n\\n.ace-tm .ace_support.ace_constant {\\n color: rgb(6, 150, 14);\\n}\\n\\n.ace-tm .ace_support.ace_type,\\n.ace-tm .ace_support.ace_class {\\n color: rgb(109, 121, 222);\\n}\\n\\n.ace-tm .ace_keyword.ace_operator {\\n color: rgb(104, 118, 135);\\n}\\n\\n.ace-tm .ace_string {\\n color: rgb(3, 106, 7);\\n}\\n\\n.ace-tm .ace_comment {\\n color: rgb(76, 136, 107);\\n}\\n\\n.ace-tm .ace_comment.ace_doc {\\n color: rgb(0, 102, 255);\\n}\\n\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\n color: rgb(128, 159, 191);\\n}\\n\\n.ace-tm .ace_constant.ace_numeric {\\n color: rgb(0, 0, 205);\\n}\\n\\n.ace-tm .ace_variable {\\n color: rgb(49, 132, 149);\\n}\\n\\n.ace-tm .ace_xml-pe {\\n color: rgb(104, 104, 91);\\n}\\n\\n.ace-tm .ace_entity.ace_name.ace_function {\\n color: #0000A2;\\n}\\n\\n\\n.ace-tm .ace_heading {\\n color: rgb(12, 7, 255);\\n}\\n\\n.ace-tm .ace_list {\\n color:rgb(185, 6, 144);\\n}\\n\\n.ace-tm .ace_meta.ace_tag {\\n color:rgb(0, 22, 142);\\n}\\n\\n.ace-tm .ace_string.ace_regex {\\n color: rgb(255, 0, 0)\\n}\\n\\n.ace-tm .ace_marker-layer .ace_selection {\\n background: rgb(181, 213, 255);\\n}\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\n box-shadow: 0 0 3px 0px white;\\n}\\n.ace-tm .ace_marker-layer .ace_step {\\n background: rgb(252, 255, 0);\\n}\\n\\n.ace-tm .ace_marker-layer .ace_stack {\\n background: rgb(164, 229, 101);\\n}\\n\\n.ace-tm .ace_marker-layer .ace_bracket {\\n margin: -1px 0 0 -1px;\\n border: 1px solid rgb(192, 192, 192);\\n}\\n\\n.ace-tm .ace_marker-layer .ace_active-line {\\n background: rgba(0, 0, 0, 0.07);\\n}\\n\\n.ace-tm .ace_gutter-active-line {\\n background-color : #dcdcdc;\\n}\\n\\n.ace-tm .ace_marker-layer .ace_selected-word {\\n background: rgb(250, 250, 255);\\n border: 1px solid rgb(200, 200, 250);\\n}\\n\\n.ace-tm .ace_indent-guide {\\n background: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\n}\\n\\n.ace-tm .ace_indent-guide-active {\\n background: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\\\") right repeat-y;\\n}\\n\";\n\n});\n\nace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/theme/textmate-css\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nexports.isDark = false;\nexports.cssClass = \"ace-tm\";\nexports.cssText = require(\"./textmate-css\");\nexports.$id = \"ace/theme/textmate\";\nvar dom = require(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass, false);\n\n});\n\nace.define(\"ace/config\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/net\",\"ace/lib/dom\",\"ace/lib/app_config\",\"ace/theme/textmate\"], function(require, exports, module){\"no use strict\";\nvar lang = require(\"./lib/lang\");\nvar net = require(\"./lib/net\");\nvar dom = require(\"./lib/dom\");\nvar AppConfig = require(\"./lib/app_config\").AppConfig;\nmodule.exports = exports = new AppConfig();\nvar options = {\n packaged: false,\n workerPath: null,\n modePath: null,\n themePath: null,\n basePath: \"\",\n suffix: \".js\",\n $moduleUrls: {},\n loadWorkerFromBlob: true,\n sharedPopups: false,\n useStrictCSP: null\n};\nexports.get = function (key) {\n if (!options.hasOwnProperty(key))\n throw new Error(\"Unknown config key: \" + key);\n return options[key];\n};\nexports.set = function (key, value) {\n if (options.hasOwnProperty(key))\n options[key] = value;\n else if (this.setDefaultValue(\"\", key, value) == false)\n throw new Error(\"Unknown config key: \" + key);\n if (key == \"useStrictCSP\")\n dom.useStrictCSP(value);\n};\nexports.all = function () {\n return lang.copyObject(options);\n};\nexports.$modes = {};\nexports.moduleUrl = function (name, component) {\n if (options.$moduleUrls[name])\n return options.$moduleUrls[name];\n var parts = name.split(\"/\");\n component = component || parts[parts.length - 2] || \"\";\n var sep = component == \"snippets\" ? \"/\" : \"-\";\n var base = parts[parts.length - 1];\n if (component == \"worker\" && sep == \"-\") {\n var re = new RegExp(\"^\" + component + \"[\\\\-_]|[\\\\-_]\" + component + \"$\", \"g\");\n base = base.replace(re, \"\");\n }\n if ((!base || base == component) && parts.length > 1)\n base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n if (path == null) {\n path = options.basePath;\n }\n else if (sep == \"/\") {\n component = sep = \"\";\n }\n if (path && path.slice(-1) != \"/\")\n path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n};\nexports.setModuleUrl = function (name, subst) {\n return options.$moduleUrls[name] = subst;\n};\nvar loader = function (moduleName, cb) {\n if (moduleName === \"ace/theme/textmate\" || moduleName === \"./theme/textmate\")\n return cb(null, require(\"./theme/textmate\"));\n if (customLoader)\n return customLoader(moduleName, cb);\n console.error(\"loader is not configured\");\n};\nvar customLoader;\nexports.setLoader = function (cb) {\n customLoader = cb;\n};\nexports.dynamicModules = Object.create(null);\nexports.$loading = {};\nexports.$loaded = {};\nexports.loadModule = function (moduleId, onLoad) {\n var loadedModule;\n if (Array.isArray(moduleId)) {\n var moduleType = moduleId[0];\n var moduleName = moduleId[1];\n }\n else if (typeof moduleId == \"string\") {\n var moduleName = moduleId;\n }\n var load = function (module) {\n if (module && !exports.$loading[moduleName])\n return onLoad && onLoad(module);\n if (!exports.$loading[moduleName])\n exports.$loading[moduleName] = [];\n exports.$loading[moduleName].push(onLoad);\n if (exports.$loading[moduleName].length > 1)\n return;\n var afterLoad = function () {\n loader(moduleName, function (err, module) {\n if (module)\n exports.$loaded[moduleName] = module;\n exports._emit(\"load.module\", { name: moduleName, module: module });\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function (onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n if (!exports.get(\"packaged\"))\n return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n reportErrorIfPathIsNotConfigured();\n };\n if (exports.dynamicModules[moduleName]) {\n exports.dynamicModules[moduleName]().then(function (module) {\n if (module.default) {\n load(module.default);\n }\n else {\n load(module);\n }\n });\n }\n else {\n try {\n loadedModule = this.$require(moduleName);\n }\n catch (e) { }\n load(loadedModule || exports.$loaded[moduleName]);\n }\n};\nexports.$require = function (moduleName) {\n if (typeof module[\"require\"] == \"function\") {\n var req = \"require\";\n return module[req](moduleName);\n }\n};\nexports.setModuleLoader = function (moduleName, onLoad) {\n exports.dynamicModules[moduleName] = onLoad;\n};\nvar reportErrorIfPathIsNotConfigured = function () {\n if (!options.basePath && !options.workerPath\n && !options.modePath && !options.themePath\n && !Object.keys(options.$moduleUrls).length) {\n console.error(\"Unable to infer path to ace from script src,\", \"use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes\", \"or with webpack use ace/webpack-resolver\");\n reportErrorIfPathIsNotConfigured = function () { };\n }\n};\nexports.version = \"1.33.2\";\n\n});\n\nace.define(\"ace/loader_build\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/config\"], function(require, exports, module) {\n\"use strict\";\n\nrequire(\"./lib/fixoldbrowsers\");\nvar config = require(\"./config\");\nconfig.setLoader(function(moduleName, cb) {\n require([moduleName], function(module) {\n cb(null, module);\n });\n});\n\nvar global = (function() {\n return this || typeof window != \"undefined\" && window;\n})();\n\nmodule.exports = function(ace) {\n config.init = init;\n config.$require = require;\n ace.require = require;\n\n if (typeof define === \"function\")\n ace.define = define;\n};\ninit(true);function init(packaged) {\n\n if (!global || !global.document)\n return;\n \n config.set(\"packaged\", packaged || require.packaged || module.packaged || (global.define && define.packaged));\n\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = (document.currentScript || document._currentScript ); // native or polyfill\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n \n if (currentScript && currentScript.src) {\n scriptUrl = currentScript.src.split(/[?#]/)[0].split(\"/\").slice(0, -1).join(\"/\") || \"\";\n }\n \n var scripts = currentDocument.getElementsByTagName(\"script\");\n for (var i=0; i [\" + this.end.row + \"/\" + this.end.column + \"]\");\n };\n Range.prototype.contains = function (row, column) {\n return this.compare(row, column) == 0;\n };\n Range.prototype.compareRange = function (range) {\n var cmp, end = range.end, start = range.start;\n cmp = this.compare(end.row, end.column);\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n if (cmp == 1) {\n return 2;\n }\n else if (cmp == 0) {\n return 1;\n }\n else {\n return 0;\n }\n }\n else if (cmp == -1) {\n return -2;\n }\n else {\n cmp = this.compare(start.row, start.column);\n if (cmp == -1) {\n return -1;\n }\n else if (cmp == 1) {\n return 42;\n }\n else {\n return 0;\n }\n }\n };\n Range.prototype.comparePoint = function (p) {\n return this.compare(p.row, p.column);\n };\n Range.prototype.containsRange = function (range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n Range.prototype.intersects = function (range) {\n var cmp = this.compareRange(range);\n return (cmp == -1 || cmp == 0 || cmp == 1);\n };\n Range.prototype.isEnd = function (row, column) {\n return this.end.row == row && this.end.column == column;\n };\n Range.prototype.isStart = function (row, column) {\n return this.start.row == row && this.start.column == column;\n };\n Range.prototype.setStart = function (row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n }\n else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n Range.prototype.setEnd = function (row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n }\n else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n Range.prototype.inside = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n }\n else {\n return true;\n }\n }\n return false;\n };\n Range.prototype.insideStart = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n }\n else {\n return true;\n }\n }\n return false;\n };\n Range.prototype.insideEnd = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n }\n else {\n return true;\n }\n }\n return false;\n };\n Range.prototype.compare = function (row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);\n }\n }\n if (row < this.start.row)\n return -1;\n if (row > this.end.row)\n return 1;\n if (this.start.row === row)\n return column >= this.start.column ? 0 : -1;\n if (this.end.row === row)\n return column <= this.end.column ? 0 : 1;\n return 0;\n };\n Range.prototype.compareStart = function (row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n }\n else {\n return this.compare(row, column);\n }\n };\n Range.prototype.compareEnd = function (row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n }\n else {\n return this.compare(row, column);\n }\n };\n Range.prototype.compareInside = function (row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n }\n else if (this.start.row == row && this.start.column == column) {\n return -1;\n }\n else {\n return this.compare(row, column);\n }\n };\n Range.prototype.clipRows = function (firstRow, lastRow) {\n if (this.end.row > lastRow)\n var end = { row: lastRow + 1, column: 0 };\n else if (this.end.row < firstRow)\n var end = { row: firstRow, column: 0 };\n if (this.start.row > lastRow)\n var start = { row: lastRow + 1, column: 0 };\n else if (this.start.row < firstRow)\n var start = { row: firstRow, column: 0 };\n return Range.fromPoints(start || this.start, end || this.end);\n };\n Range.prototype.extend = function (row, column) {\n var cmp = this.compare(row, column);\n if (cmp == 0)\n return this;\n else if (cmp == -1)\n var start = { row: row, column: column };\n else\n var end = { row: row, column: column };\n return Range.fromPoints(start || this.start, end || this.end);\n };\n Range.prototype.isEmpty = function () {\n return (this.start.row === this.end.row && this.start.column === this.end.column);\n };\n Range.prototype.isMultiLine = function () {\n return (this.start.row !== this.end.row);\n };\n Range.prototype.clone = function () {\n return Range.fromPoints(this.start, this.end);\n };\n Range.prototype.collapseRows = function () {\n if (this.end.column == 0)\n return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);\n else\n return new Range(this.start.row, 0, this.end.row, 0);\n };\n Range.prototype.toScreenRange = function (session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);\n };\n Range.prototype.moveBy = function (row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n return Range;\n}());\nRange.fromPoints = function (start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n};\nRange.comparePoints = function (p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\nexports.Range = Range;\n\n});\n\nace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./oop\");\nvar Keys = {\n MODIFIER_KEYS: {\n 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta',\n 91: 'MetaLeft', 92: 'MetaRight', 93: 'ContextMenu'\n },\n KEY_MODS: {\n \"ctrl\": 1, \"alt\": 2, \"option\": 2, \"shift\": 4,\n \"super\": 8, \"meta\": 8, \"command\": 8, \"cmd\": 8,\n \"control\": 1\n },\n FUNCTION_KEYS: {\n 8: \"Backspace\",\n 9: \"Tab\",\n 13: \"Return\",\n 19: \"Pause\",\n 27: \"Esc\",\n 32: \"Space\",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"Left\",\n 38: \"Up\",\n 39: \"Right\",\n 40: \"Down\",\n 44: \"Print\",\n 45: \"Insert\",\n 46: \"Delete\",\n '-13': \"NumpadEnter\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n PRINTABLE_KEYS: {\n 32: ' ', 59: ';', 61: '=', 107: '+', 109: '-', 110: '.',\n 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',\n 219: '[', 220: '\\\\', 221: ']', 222: \"'\", 111: '/', 106: '*'\n }\n};\nvar codeToKeyCode = {\n Command: 224,\n Backspace: 8,\n Tab: 9,\n Return: 13,\n Enter: 13,\n Pause: 19,\n Escape: 27,\n PageUp: 33,\n PageDown: 34,\n End: 35,\n Home: 36,\n Insert: 45,\n Delete: 46,\n ArrowLeft: 37,\n ArrowUp: 38,\n ArrowRight: 39,\n ArrowDown: 40,\n Backquote: 192,\n Minus: 189,\n Equal: 187,\n BracketLeft: 219,\n Backslash: 220,\n BracketRight: 221,\n Semicolon: 186,\n Quote: 222,\n Comma: 188,\n Period: 190,\n Slash: 191,\n Space: 32,\n NumpadAdd: 107,\n NumpadDecimal: 110,\n NumpadSubtract: 109,\n NumpadDivide: 111,\n NumpadMultiply: 106\n};\nfor (var i = 0; i < 10; i++) {\n codeToKeyCode[\"Digit\" + i] = 48 + i;\n codeToKeyCode[\"Numpad\" + i] = 96 + i;\n Keys.PRINTABLE_KEYS[48 + i] = \"\" + i;\n Keys.FUNCTION_KEYS[96 + i] = \"Numpad\" + i;\n}\nfor (var i = 65; i < 91; i++) {\n var chr = String.fromCharCode(i + 32);\n codeToKeyCode[\"Key\" + chr.toUpperCase()] = i;\n Keys.PRINTABLE_KEYS[i] = chr;\n}\nfor (var i = 1; i < 13; i++) {\n codeToKeyCode[\"F\" + i] = 111 + i;\n Keys.FUNCTION_KEYS[111 + i] = \"F\" + i;\n}\nvar modifiers = {\n Shift: 16,\n Control: 17,\n Alt: 18,\n Meta: 224\n};\nfor (var mod in modifiers) {\n codeToKeyCode[mod] = codeToKeyCode[mod + \"Left\"]\n = codeToKeyCode[mod + \"Right\"] = modifiers[mod];\n}\nexports.$codeToKeyCode = codeToKeyCode;\nKeys.PRINTABLE_KEYS[173] = '-';\nfor (var j in Keys.FUNCTION_KEYS) {\n var name = Keys.FUNCTION_KEYS[j].toLowerCase();\n Keys[name] = parseInt(j, 10);\n}\nfor (var j in Keys.PRINTABLE_KEYS) {\n var name = Keys.PRINTABLE_KEYS[j].toLowerCase();\n Keys[name] = parseInt(j, 10);\n}\noop.mixin(Keys, Keys.MODIFIER_KEYS);\noop.mixin(Keys, Keys.PRINTABLE_KEYS);\noop.mixin(Keys, Keys.FUNCTION_KEYS);\nKeys.enter = Keys[\"return\"];\nKeys.escape = Keys.esc;\nKeys.del = Keys[\"delete\"];\n(function () {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n for (var i = Math.pow(2, mods.length); i--;) {\n Keys.KEY_MODS[i] = mods.filter(function (x) {\n return i & Keys.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n})();\nKeys.KEY_MODS[0] = \"\";\nKeys.KEY_MODS[-1] = \"input-\";\noop.mixin(exports, Keys);\nexports.default = exports;\nexports.keyCodeToString = function (keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\")\n keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n};\n\n});\n\nace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\"; var keys = require(\"./keys\");\nvar useragent = require(\"./useragent\");\nvar pressedKeys = null;\nvar ts = 0;\nvar activeListenerOptions;\nfunction detectListenerOptionsSupport() {\n activeListenerOptions = false;\n try {\n document.createComment(\"\").addEventListener(\"test\", function () { }, {\n get passive() {\n activeListenerOptions = { passive: false };\n return true;\n }\n });\n }\n catch (e) { }\n}\nfunction getListenerOptions() {\n if (activeListenerOptions == undefined)\n detectListenerOptionsSupport();\n return activeListenerOptions;\n}\nfunction EventListener(elem, type, callback) {\n this.elem = elem;\n this.type = type;\n this.callback = callback;\n}\nEventListener.prototype.destroy = function () {\n removeListener(this.elem, this.type, this.callback);\n this.elem = this.type = this.callback = undefined;\n};\nvar addListener = exports.addListener = function (elem, type, callback, /**@type{any?}*/ destroyer) {\n elem.addEventListener(type, callback, getListenerOptions());\n if (destroyer)\n destroyer.$toDestroy.push(new EventListener(elem, type, callback));\n};\nvar removeListener = exports.removeListener = function (elem, type, callback) {\n elem.removeEventListener(type, callback, getListenerOptions());\n};\nexports.stopEvent = function (e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n};\nexports.stopPropagation = function (e) {\n if (e.stopPropagation)\n e.stopPropagation();\n};\nexports.preventDefault = function (e) {\n if (e.preventDefault)\n e.preventDefault();\n};\nexports.getButton = function (e) {\n if (e.type == \"dblclick\")\n return 0;\n if (e.type == \"contextmenu\" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))\n return 2;\n return e.button;\n};\nexports.capture = function (el, eventHandler, releaseCaptureHandler) {\n var ownerDocument = el && el.ownerDocument || document;\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n removeListener(ownerDocument, \"mousemove\", eventHandler);\n removeListener(ownerDocument, \"mouseup\", onMouseUp);\n removeListener(ownerDocument, \"dragstart\", onMouseUp);\n }\n addListener(ownerDocument, \"mousemove\", eventHandler);\n addListener(ownerDocument, \"mouseup\", onMouseUp);\n addListener(ownerDocument, \"dragstart\", onMouseUp);\n return onMouseUp;\n};\nexports.addMouseWheelListener = function (el, callback, destroyer) {\n addListener(el, \"wheel\", function (e) {\n var factor = 0.15;\n var deltaX = e.deltaX || 0;\n var deltaY = e.deltaY || 0;\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = deltaX * factor;\n e.wheelY = deltaY * factor;\n break;\n case e.DOM_DELTA_LINE:\n var linePixels = 15;\n e.wheelX = deltaX * linePixels;\n e.wheelY = deltaY * linePixels;\n break;\n case e.DOM_DELTA_PAGE:\n var pagePixels = 150;\n e.wheelX = deltaX * pagePixels;\n e.wheelY = deltaY * pagePixels;\n break;\n }\n callback(e);\n }, destroyer);\n};\nexports.addMultiMouseDownListener = function (elements, timeouts, eventHandler, callbackName, destroyer) {\n var clicks = 0;\n var startX, startY, timer;\n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n }\n else if (e.detail > 1) {\n clicks++;\n if (clicks > 4)\n clicks = 1;\n }\n else {\n clicks = 1;\n }\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick)\n clicks = 1;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function () { timer = null; }, timeouts[clicks - 1] || 600);\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n e._clicks = clicks;\n eventHandler[callbackName](\"mousedown\", e);\n if (clicks > 4)\n clicks = 0;\n else if (clicks > 1)\n return eventHandler[callbackName](eventNames[clicks], e);\n }\n if (!Array.isArray(elements))\n elements = [elements];\n elements.forEach(function (el) {\n addListener(el, \"mousedown\", onMousedown, destroyer);\n });\n};\nfunction getModifierHash(e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n}\nexports.getModifierString = function (e) {\n return keys.KEY_MODS[getModifierHash(e)];\n};\nfunction normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n if (!keyCode && e.code) {\n keyCode = keys.$codeToKeyCode[e.code] || keyCode;\n }\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\")))\n hashId |= 8;\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3)\n pressedKeys.altGr = 0;\n else\n return;\n }\n if (keyCode === 18 || keyCode === 17) {\n var location = e.location;\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1)\n ts = e.timeStamp;\n }\n else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50)\n pressedKeys.altGr = true;\n }\n }\n }\n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n if (!hashId && keyCode === 13) {\n if (e.location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented)\n return;\n }\n }\n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented)\n return;\n else\n hashId &= ~8;\n }\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n return callback(e, hashId, keyCode);\n}\nexports.addCommandKeyListener = function (el, callback, destroyer) {\n var lastDefaultPrevented = null;\n addListener(el, \"keydown\", function (e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n }, destroyer);\n addListener(el, \"keypress\", function (e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n }, destroyer);\n addListener(el, \"keyup\", function (e) {\n pressedKeys[e.keyCode] = null;\n }, destroyer);\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n};\nfunction resetPressedKeys() {\n pressedKeys = Object.create(null);\n}\nif (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n exports.nextTick = function (callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + (postMessageId++);\n var listener = function (e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n removeListener(win, \"message\", listener);\n callback();\n }\n };\n addListener(win, \"message\", listener);\n win.postMessage(messageName, \"*\");\n };\n}\nexports.$idleBlocked = false;\nexports.onIdle = function (cb, timeout) {\n return setTimeout(function handler() {\n if (!exports.$idleBlocked) {\n cb();\n }\n else {\n setTimeout(handler, 100);\n }\n }, timeout);\n};\nexports.$idleBlockId = null;\nexports.blockIdle = function (delay) {\n if (exports.$idleBlockId)\n clearTimeout(exports.$idleBlockId);\n exports.$idleBlocked = true;\n exports.$idleBlockId = setTimeout(function () {\n exports.$idleBlocked = false;\n }, delay || 100);\n};\nexports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame\n || window[\"mozRequestAnimationFrame\"]\n || window[\"webkitRequestAnimationFrame\"]\n || window[\"msRequestAnimationFrame\"]\n || window[\"oRequestAnimationFrame\"]);\nif (exports.nextFrame)\n exports.nextFrame = exports.nextFrame.bind(window);\nelse\n exports.nextFrame = function (callback) {\n setTimeout(callback, 17);\n };\n\n});\n\nace.define(\"ace/clipboard\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar $cancelT;\nmodule.exports = {\n lineMode: false,\n pasteCancelled: function () {\n if ($cancelT && $cancelT > Date.now() - 50)\n return true;\n return $cancelT = false;\n },\n cancel: function () {\n $cancelT = Date.now();\n }\n};\n\n});\n\nace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/config\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/clipboard\",\"ace/lib/keys\"], function(require, exports, module){\"use strict\";\nvar event = require(\"../lib/event\");\nvar nls = require(\"../config\").nls;\nvar useragent = require(\"../lib/useragent\");\nvar dom = require(\"../lib/dom\");\nvar lang = require(\"../lib/lang\");\nvar clipboard = require(\"../clipboard\");\nvar BROKEN_SETDATA = useragent.isChrome < 18;\nvar USE_IE_MIME_TYPE = useragent.isIE;\nvar HAS_FOCUS_ARGS = useragent.isChrome > 63;\nvar MAX_LINE_LENGTH = 400;\nvar KEYS = require(\"../lib/keys\");\nvar MODS = KEYS.KEY_MODS;\nvar isIOS = useragent.isIOS;\nvar valueResetRegex = isIOS ? /\\s/ : /\\n/;\nvar isMobile = useragent.isMobile;\nvar TextInput;\nTextInput = function (parentNode, host) {\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", \"false\");\n text.style.opacity = \"0\";\n parentNode.insertBefore(text, parentNode.firstChild);\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var sendingText = false;\n var tempStyle = '';\n if (!isMobile)\n text.style.fontSize = \"1px\";\n var commandMode = false;\n var ignoreFocusEvents = false;\n var lastValue = \"\";\n var lastSelectionStart = 0;\n var lastSelectionEnd = 0;\n var lastRestoreEnd = 0;\n var rowStart = Number.MAX_SAFE_INTEGER;\n var rowEnd = Number.MIN_SAFE_INTEGER;\n var numberOfExtraLines = 0;\n try {\n var isFocused = document.activeElement === text;\n }\n catch (e) { }\n this.setNumberOfExtraLines = function (number) {\n rowStart = Number.MAX_SAFE_INTEGER;\n rowEnd = Number.MIN_SAFE_INTEGER;\n if (number < 0) {\n numberOfExtraLines = 0;\n return;\n }\n numberOfExtraLines = number;\n };\n this.setAriaOptions = function (options) {\n if (options.activeDescendant) {\n text.setAttribute(\"aria-haspopup\", \"true\");\n text.setAttribute(\"aria-autocomplete\", options.inline ? \"both\" : \"list\");\n text.setAttribute(\"aria-activedescendant\", options.activeDescendant);\n }\n else {\n text.setAttribute(\"aria-haspopup\", \"false\");\n text.setAttribute(\"aria-autocomplete\", \"both\");\n text.removeAttribute(\"aria-activedescendant\");\n }\n if (options.role) {\n text.setAttribute(\"role\", options.role);\n }\n if (options.setLabel) {\n text.setAttribute(\"aria-roledescription\", nls(\"text-input.aria-roledescription\", \"editor\"));\n if (host.session) {\n var row = host.session.selection.cursor.row;\n text.setAttribute(\"aria-label\", nls(\"text-input.aria-label\", \"Cursor at row $0\", [row + 1]));\n }\n }\n };\n this.setAriaOptions({ role: \"textbox\" });\n event.addListener(text, \"blur\", function (e) {\n if (ignoreFocusEvents)\n return;\n host.onBlur(e);\n isFocused = false;\n }, host);\n event.addListener(text, \"focus\", function (e) {\n if (ignoreFocusEvents)\n return;\n isFocused = true;\n if (useragent.isEdge) {\n try {\n if (!document.hasFocus())\n return;\n }\n catch (e) { }\n }\n host.onFocus(e);\n if (useragent.isEdge)\n setTimeout(resetSelection);\n else\n resetSelection();\n }, host);\n this.$focusScroll = false;\n this.focus = function () {\n this.setAriaOptions({\n setLabel: host.renderer.enableKeyboardAccessibility\n });\n if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == \"browser\")\n return text.focus({ preventScroll: true });\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n try {\n var isTransformed = text.getBoundingClientRect().top != 0;\n }\n catch (e) {\n return;\n }\n var ancestors = [];\n if (isTransformed) {\n var t = text.parentElement;\n while (t && t.nodeType == 1) {\n ancestors.push(t);\n t.setAttribute(\"ace_nocontext\", \"true\");\n if (!t.parentElement && t.getRootNode)\n t = t.getRootNode()[\"host\"];\n else\n t = t.parentElement;\n }\n }\n text.focus({ preventScroll: true });\n if (isTransformed) {\n ancestors.forEach(function (p) {\n p.removeAttribute(\"ace_nocontext\");\n });\n }\n setTimeout(function () {\n text.style.position = \"\";\n if (text.style.top == \"0px\")\n text.style.top = top;\n }, 0);\n };\n this.blur = function () {\n text.blur();\n };\n this.isFocused = function () {\n return isFocused;\n };\n host.on(\"beforeEndOperation\", function () {\n var curOp = host.curOp;\n var commandName = curOp && curOp.command && curOp.command.name;\n if (commandName == \"insertstring\")\n return;\n var isUserAction = commandName && (curOp.docChanged || curOp.selectionChanged);\n if (inComposition && isUserAction) {\n lastValue = text.value = \"\";\n onCompositionEnd();\n }\n resetSelection();\n });\n var positionToSelection = function (row, column) {\n var selection = column;\n for (var i = 1; i <= row - rowStart && i < 2 * numberOfExtraLines + 1; i++) {\n selection += host.session.getLine(row - i).length + 1;\n }\n return selection;\n };\n var resetSelection = isIOS\n ? function (value) {\n if (!isFocused || (copied && !value) || sendingText)\n return;\n if (!value)\n value = \"\";\n var newValue = \"\\n ab\" + value + \"cde fg\\n\";\n if (newValue != text.value)\n text.value = lastValue = newValue;\n var selectionStart = 4;\n var selectionEnd = 4 + (value.length || (host.selection.isEmpty() ? 0 : 1));\n if (lastSelectionStart != selectionStart || lastSelectionEnd != selectionEnd) {\n text.setSelectionRange(selectionStart, selectionEnd);\n }\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n }\n : function () {\n if (inComposition || sendingText)\n return;\n if (!isFocused && !afterContextMenu)\n return;\n inComposition = true;\n var selectionStart = 0;\n var selectionEnd = 0;\n var line = \"\";\n if (host.session) {\n var selection = host.selection;\n var range = selection.getRange();\n var row = selection.cursor.row;\n if (row === rowEnd + 1) {\n rowStart = rowEnd + 1;\n rowEnd = rowStart + 2 * numberOfExtraLines;\n }\n else if (row === rowStart - 1) {\n rowEnd = rowStart - 1;\n rowStart = rowEnd - 2 * numberOfExtraLines;\n }\n else if (row < rowStart - 1 || row > rowEnd + 1) {\n rowStart = row > numberOfExtraLines ? row - numberOfExtraLines : 0;\n rowEnd = row > numberOfExtraLines ? row + numberOfExtraLines : 2 * numberOfExtraLines;\n }\n var lines = [];\n for (var i = rowStart; i <= rowEnd; i++) {\n lines.push(host.session.getLine(i));\n }\n line = lines.join('\\n');\n selectionStart = positionToSelection(range.start.row, range.start.column);\n selectionEnd = positionToSelection(range.end.row, range.end.column);\n if (range.start.row < rowStart) {\n var prevLine = host.session.getLine(rowStart - 1);\n selectionStart = range.start.row < rowStart - 1 ? 0 : selectionStart;\n selectionEnd += prevLine.length + 1;\n line = prevLine + \"\\n\" + line;\n }\n else if (range.end.row > rowEnd) {\n var nextLine = host.session.getLine(rowEnd + 1);\n selectionEnd = range.end.row > rowEnd + 1 ? nextLine.length : range.end.column;\n selectionEnd += line.length + 1;\n line = line + \"\\n\" + nextLine;\n }\n else if (isMobile && row > 0) {\n line = \"\\n\" + line;\n selectionEnd += 1;\n selectionStart += 1;\n }\n if (line.length > MAX_LINE_LENGTH) {\n if (selectionStart < MAX_LINE_LENGTH && selectionEnd < MAX_LINE_LENGTH) {\n line = line.slice(0, MAX_LINE_LENGTH);\n }\n else {\n line = \"\\n\";\n if (selectionStart == selectionEnd) {\n selectionStart = selectionEnd = 0;\n }\n else {\n selectionStart = 0;\n selectionEnd = 1;\n }\n }\n }\n var newValue = line + \"\\n\\n\";\n if (newValue != lastValue) {\n text.value = lastValue = newValue;\n lastSelectionStart = lastSelectionEnd = newValue.length;\n }\n }\n if (afterContextMenu) {\n lastSelectionStart = text.selectionStart;\n lastSelectionEnd = text.selectionEnd;\n }\n if (lastSelectionEnd != selectionEnd\n || lastSelectionStart != selectionStart\n || text.selectionEnd != lastSelectionEnd // on ie edge selectionEnd changes silently after the initialization\n ) {\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n }\n catch (e) { }\n }\n inComposition = false;\n };\n this.resetSelection = resetSelection;\n if (isFocused)\n host.onFocus();\n var isAllSelected = function (text) {\n return text.selectionStart === 0 && text.selectionEnd >= lastValue.length\n && text.value === lastValue && lastValue\n && text.selectionEnd !== lastSelectionEnd;\n };\n var onSelect = function (e) {\n if (inComposition)\n return;\n if (copied) {\n copied = false;\n }\n else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n }\n else if (isMobile && text.selectionStart != lastSelectionStart) {\n resetSelection();\n }\n };\n var inputHandler = null;\n this.setInputHandler = function (cb) { inputHandler = cb; };\n this.getInputHandler = function () { return inputHandler; };\n var afterContextMenu = false;\n var sendText = function (value, fromInput) {\n if (afterContextMenu)\n afterContextMenu = false;\n if (pasted) {\n resetSelection();\n if (value)\n host.onPaste(value);\n pasted = false;\n return \"\";\n }\n else {\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n var extendLeft = lastSelectionStart;\n var extendRight = lastValue.length - lastSelectionEnd;\n var inserted = value;\n var restoreStart = value.length - selectionStart;\n var restoreEnd = value.length - selectionEnd;\n var i = 0;\n while (extendLeft > 0 && lastValue[i] == value[i]) {\n i++;\n extendLeft--;\n }\n inserted = inserted.slice(i);\n i = 1;\n while (extendRight > 0 && lastValue.length - i > lastSelectionStart - 1 && lastValue[lastValue.length - i] == value[value.length - i]) {\n i++;\n extendRight--;\n }\n restoreStart -= i - 1;\n restoreEnd -= i - 1;\n var endIndex = inserted.length - i + 1;\n if (endIndex < 0) {\n extendLeft = -endIndex;\n endIndex = 0;\n }\n inserted = inserted.slice(0, endIndex);\n if (!fromInput && !inserted && !restoreStart && !extendLeft && !extendRight && !restoreEnd)\n return \"\";\n sendingText = true;\n var shouldReset = false;\n if (useragent.isAndroid && inserted == \". \") {\n inserted = \" \";\n shouldReset = true;\n }\n if (inserted && !extendLeft && !extendRight && !restoreStart && !restoreEnd || commandMode) {\n host.onTextInput(inserted);\n }\n else {\n host.onTextInput(inserted, {\n extendLeft: extendLeft,\n extendRight: extendRight,\n restoreStart: restoreStart,\n restoreEnd: restoreEnd\n });\n }\n sendingText = false;\n lastValue = value;\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n lastRestoreEnd = restoreEnd;\n return shouldReset ? \"\\n\" : inserted;\n }\n };\n var onInput = function (e) {\n if (inComposition)\n return onCompositionUpdate();\n if (e && e.inputType) {\n if (e.inputType == \"historyUndo\")\n return host.execCommand(\"undo\");\n if (e.inputType == \"historyRedo\")\n return host.execCommand(\"redo\");\n }\n var data = text.value;\n var inserted = sendText(data, true);\n if (data.length > MAX_LINE_LENGTH + 100\n || valueResetRegex.test(inserted)\n || isMobile && lastSelectionStart < 1 && lastSelectionStart == lastSelectionEnd) {\n resetSelection();\n }\n };\n var handleClipboardData = function (e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window[\"clipboardData\"];\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n }\n else {\n return clipboardData.getData(mime);\n }\n }\n catch (e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n var doCopy = function (e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n if (handleClipboardData(e, data)) {\n if (isIOS) {\n resetSelection(data);\n copied = data;\n setTimeout(function () {\n copied = false;\n }, 10);\n }\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n }\n else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function () {\n copied = false;\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n var onCut = function (e) {\n doCopy(e, true);\n };\n var onCopy = function (e) {\n doCopy(e, false);\n };\n var onPaste = function (e) {\n var data = handleClipboardData(e);\n if (clipboard.pasteCancelled())\n return;\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n event.addCommandKeyListener(text, function (e, hashId, keyCode) {\n if (inComposition)\n return;\n return host.onCommandKey(e, hashId, keyCode);\n }, host);\n event.addListener(text, \"select\", onSelect, host);\n event.addListener(text, \"input\", onInput, host);\n event.addListener(text, \"cut\", onCut, host);\n event.addListener(text, \"copy\", onCopy, host);\n event.addListener(text, \"paste\", onPaste, host);\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) {\n event.addListener(parentNode, \"keydown\", function (e) {\n if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)\n return;\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n case 86:\n onPaste(e);\n break;\n case 88:\n onCut(e);\n break;\n }\n }, host);\n }\n var onCompositionStart = function (e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly)\n return;\n inComposition = {};\n if (commandMode)\n return;\n if (e.data)\n inComposition.useTextareaForIME = false;\n setTimeout(onCompositionUpdate, 0);\n host._signal(\"compositionStart\");\n host.on(\"mousedown\", cancelComposition);\n var range = host.getSelectionRange();\n range.end.row = range.start.row;\n range.end.column = range.start.column;\n inComposition.markerRange = range;\n inComposition.selectionStart = lastSelectionStart;\n host.onCompositionStart(inComposition);\n if (inComposition.useTextareaForIME) {\n lastValue = text.value = \"\";\n lastSelectionStart = 0;\n lastSelectionEnd = 0;\n }\n else {\n if (text.msGetInputContext)\n inComposition.context = text.msGetInputContext();\n if (text.getInputContext)\n inComposition.context = text.getInputContext();\n }\n };\n var onCompositionUpdate = function () {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n if (commandMode)\n return cancelComposition();\n if (inComposition.useTextareaForIME) {\n host.onCompositionUpdate(text.value);\n }\n else {\n var data = text.value;\n sendText(data);\n if (inComposition.markerRange) {\n if (inComposition.context) {\n inComposition.markerRange.start.column = inComposition.selectionStart\n = inComposition.context.compositionStartOffset;\n }\n inComposition.markerRange.end.column = inComposition.markerRange.start.column\n + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd;\n }\n }\n };\n var onCompositionEnd = function (e) {\n if (!host.onCompositionEnd || host.$readOnly)\n return;\n inComposition = false;\n host.onCompositionEnd();\n host.off(\"mousedown\", cancelComposition);\n if (e)\n onInput();\n };\n function cancelComposition() {\n ignoreFocusEvents = true;\n text.blur();\n text.focus();\n ignoreFocusEvents = false;\n }\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50).schedule.bind(null, null);\n function onKeyup(e) {\n if (e.keyCode == 27 && text.value.length < text.selectionStart) {\n if (!inComposition)\n lastValue = text.value;\n lastSelectionStart = lastSelectionEnd = -1;\n resetSelection();\n }\n syncComposition();\n }\n event.addListener(text, \"compositionstart\", onCompositionStart, host);\n event.addListener(text, \"compositionupdate\", onCompositionUpdate, host);\n event.addListener(text, \"keyup\", onKeyup, host);\n event.addListener(text, \"keydown\", syncComposition, host);\n event.addListener(text, \"compositionend\", onCompositionEnd, host);\n this.getElement = function () {\n return text;\n };\n this.setCommandMode = function (value) {\n commandMode = value;\n text.readOnly = false;\n };\n this.setReadOnly = function (readOnly) {\n if (!commandMode)\n text.readOnly = readOnly;\n };\n this.setCopyWithEmptySelection = function (value) {\n };\n this.onContextMenu = function (e) {\n afterContextMenu = true;\n resetSelection();\n host._emit(\"nativecontextmenu\", { target: host, domEvent: e });\n this.moveToMouse(e, true);\n };\n this.moveToMouse = function (e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + (useragent.isIE ? \"opacity:0.1;\" : \"\")\n + \"text-indent: -\" + (lastSelectionStart + lastSelectionEnd) * host.renderer.characterWidth * 0.5 + \"px;\";\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight - 2;\n var move = function (e) {\n dom.translate(text, e.clientX - left - 2, Math.min(e.clientY - top - 2, maxTop));\n };\n move(e);\n if (e.type != \"mousedown\")\n return;\n host.renderer.$isMousePressed = true;\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n host.renderer.$isMousePressed = false;\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$moveTextAreaToCursor();\n }, 0);\n }\n var onContextMenu = function (e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu, host);\n event.addListener(text, \"mousedown\", function (e) {\n e.preventDefault();\n onContextMenuClose();\n }, host);\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu, host);\n event.addListener(text, \"contextmenu\", onContextMenu, host);\n if (isIOS)\n addIosSelectionHandler(parentNode, host, text);\n function addIosSelectionHandler(parentNode, host, text) {\n var typingResetTimeout = null;\n var typing = false;\n text.addEventListener(\"keydown\", function (e) {\n if (typingResetTimeout)\n clearTimeout(typingResetTimeout);\n typing = true;\n }, true);\n text.addEventListener(\"keyup\", function (e) {\n typingResetTimeout = setTimeout(function () {\n typing = false;\n }, 100);\n }, true);\n var detectArrowKeys = function (e) {\n if (document.activeElement !== text)\n return;\n if (typing || inComposition || host.$mouseHandler.isMousePressed)\n return;\n if (copied) {\n return;\n }\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n var key = null;\n var modifier = 0;\n if (selectionStart == 0) {\n key = KEYS.up;\n }\n else if (selectionStart == 1) {\n key = KEYS.home;\n }\n else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd] == \"\\n\") {\n key = KEYS.end;\n }\n else if (selectionStart < lastSelectionStart && lastValue[selectionStart - 1] == \" \") {\n key = KEYS.left;\n modifier = MODS.option;\n }\n else if (selectionStart < lastSelectionStart\n || (selectionStart == lastSelectionStart\n && lastSelectionEnd != lastSelectionStart\n && selectionStart == selectionEnd)) {\n key = KEYS.left;\n }\n else if (selectionEnd > lastSelectionEnd && lastValue.slice(0, selectionEnd).split(\"\\n\").length > 2) {\n key = KEYS.down;\n }\n else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd - 1] == \" \") {\n key = KEYS.right;\n modifier = MODS.option;\n }\n else if (selectionEnd > lastSelectionEnd\n || (selectionEnd == lastSelectionEnd\n && lastSelectionEnd != lastSelectionStart\n && selectionStart == selectionEnd)) {\n key = KEYS.right;\n }\n if (selectionStart !== selectionEnd)\n modifier |= MODS.shift;\n if (key) {\n var result = host.onCommandKey({}, modifier, key);\n if (!result && host.commands) {\n key = KEYS.keyCodeToString(key);\n var command = host.commands.findKeyCommand(modifier, key);\n if (command)\n host.execCommand(command);\n }\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n resetSelection(\"\");\n }\n };\n document.addEventListener(\"selectionchange\", detectArrowKeys);\n host.on(\"destroy\", function () {\n document.removeEventListener(\"selectionchange\", detectArrowKeys);\n });\n }\n this.destroy = function () {\n if (text.parentElement)\n text.parentElement.removeChild(text);\n };\n};\nexports.TextInput = TextInput;\nexports.$setUserAgentForTests = function (_isMobile, _isIOS) {\n isMobile = _isMobile;\n isIOS = _isIOS;\n};\n\n});\n\nace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar useragent = require(\"../lib/useragent\");\nvar DRAG_OFFSET = 0; // pixels\nvar SCROLL_COOLDOWN_T = 550; // milliseconds\nvar DefaultHandlers = /** @class */ (function () {\n function DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\",\n \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n exports.forEach(function (x) {\n mouseHandler[x] = this[x];\n }, this);\n mouseHandler[\"selectByLines\"] = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler[\"selectByWords\"] = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n }\n DefaultHandlers.prototype.onMouseDown = function (ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n var button = ev.getButton();\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n if (selectionEmpty || button == 1)\n editor.selection.moveToPosition(pos);\n if (button == 2) {\n editor.textInput.onContextMenu(ev.domEvent);\n if (!useragent.isMozilla)\n ev.preventDefault();\n }\n return;\n }\n this.mousedownEvent.time = Date.now();\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n if (this.$focusTimeout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n DefaultHandlers.prototype.startSelect = function (pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n if (!this.mousedownEvent)\n return;\n if (this.mousedownEvent.getShiftKey())\n editor.selection.selectToPosition(pos);\n else if (!waitForClickSelection)\n editor.selection.moveToPosition(pos);\n if (!waitForClickSelection)\n this.select();\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n };\n DefaultHandlers.prototype.select = function () {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n }\n else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n }\n else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n };\n DefaultHandlers.prototype.extendSelectionBy = function (unitName) {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column)\n cursor = range.start;\n }\n else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column)\n cursor = range.end;\n }\n else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n }\n else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n };\n DefaultHandlers.prototype.selectByLinesEnd = function () {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n };\n DefaultHandlers.prototype.focusWait = function () {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimeout)\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n DefaultHandlers.prototype.onDoubleClick = function (ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n var range = session.getBracketRange(pos);\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n this.setState(\"select\");\n }\n else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n this.$clickSelection = range;\n this.select();\n };\n DefaultHandlers.prototype.onTripleClick = function (ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n }\n else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n this.select();\n };\n DefaultHandlers.prototype.onQuadClick = function (ev) {\n var editor = this.editor;\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n DefaultHandlers.prototype.onMouseWheel = function (ev) {\n if (ev.getAccelKey())\n return;\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n var editor = this.editor;\n if (!this.$lastScroll)\n this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 };\n var prevScroll = this.$lastScroll;\n var t = ev.domEvent.timeStamp;\n var dt = t - prevScroll.t;\n var vx = dt ? ev.wheelX / dt : prevScroll.vx;\n var vy = dt ? ev.wheelY / dt : prevScroll.vy;\n if (dt < SCROLL_COOLDOWN_T) {\n vx = (vx + prevScroll.vx) / 2;\n vy = (vy + prevScroll.vy) / 2;\n }\n var direction = Math.abs(vx / vy);\n var canScroll = false;\n if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0))\n canScroll = true;\n if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed))\n canScroll = true;\n if (canScroll) {\n prevScroll.allowed = t;\n }\n else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) {\n var isSlower = Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx)\n && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy);\n if (isSlower) {\n canScroll = true;\n prevScroll.allowed = t;\n }\n else {\n prevScroll.allowed = 0;\n }\n }\n prevScroll.t = t;\n prevScroll.vx = vx;\n prevScroll.vy = vy;\n if (canScroll) {\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n return DefaultHandlers;\n}());\nDefaultHandlers.prototype.selectEnd = DefaultHandlers.prototype.selectByLinesEnd;\nDefaultHandlers.prototype.selectAllEnd = DefaultHandlers.prototype.selectByLinesEnd;\nDefaultHandlers.prototype.selectByWordsEnd = DefaultHandlers.prototype.selectByLinesEnd;\nexports.DefaultHandlers = DefaultHandlers;\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\nfunction calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row)\n var cmp = 2 * cursor.column - range.start.column - range.end.column;\n else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)\n var cmp = cursor.column - 4;\n else\n var cmp = 2 * cursor.row - range.start.row - range.end.row;\n if (cmp < 0)\n return { cursor: range.start, anchor: range.end };\n else\n return { cursor: range.end, anchor: range.start };\n}\n\n});\n\nace.define(\"ace/lib/scroll\",[\"require\",\"exports\",\"module\"], function(require, exports, module){exports.preventParentScroll = function preventParentScroll(event) {\n event.stopPropagation();\n var target = event.currentTarget;\n var contentOverflows = target.scrollHeight > target.clientHeight;\n if (!contentOverflows) {\n event.preventDefault();\n }\n};\n\n});\n\nace.define(\"ace/tooltip\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/range\",\"ace/lib/scroll\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar dom = require(\"./lib/dom\");\nvar event = require(\"./lib/event\");\nvar Range = require(\"./range\").Range;\nvar preventParentScroll = require(\"./lib/scroll\").preventParentScroll;\nvar CLASSNAME = \"ace_tooltip\";\nvar Tooltip = /** @class */ (function () {\n function Tooltip(parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n }\n Tooltip.prototype.$init = function () {\n this.$element = dom.createElement(\"div\");\n this.$element.className = CLASSNAME;\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n Tooltip.prototype.getElement = function () {\n return this.$element || this.$init();\n };\n Tooltip.prototype.setText = function (text) {\n this.getElement().textContent = text;\n };\n Tooltip.prototype.setHtml = function (html) {\n this.getElement().innerHTML = html;\n };\n Tooltip.prototype.setPosition = function (x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n Tooltip.prototype.setClassName = function (className) {\n dom.addCssClass(this.getElement(), className);\n };\n Tooltip.prototype.setTheme = function (theme) {\n this.$element.className = CLASSNAME + \" \" +\n (theme.isDark ? \"ace_dark \" : \"\") + (theme.cssClass || \"\");\n };\n Tooltip.prototype.show = function (text, x, y) {\n if (text != null)\n this.setText(text);\n if (x != null && y != null)\n this.setPosition(x, y);\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n Tooltip.prototype.hide = function (e) {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.getElement().className = CLASSNAME;\n this.isOpen = false;\n }\n };\n Tooltip.prototype.getHeight = function () {\n return this.getElement().offsetHeight;\n };\n Tooltip.prototype.getWidth = function () {\n return this.getElement().offsetWidth;\n };\n Tooltip.prototype.destroy = function () {\n this.isOpen = false;\n if (this.$element && this.$element.parentNode) {\n this.$element.parentNode.removeChild(this.$element);\n }\n };\n return Tooltip;\n}());\nvar PopupManager = /** @class */ (function () {\n function PopupManager() {\n this.popups = [];\n }\n PopupManager.prototype.addPopup = function (popup) {\n this.popups.push(popup);\n this.updatePopups();\n };\n PopupManager.prototype.removePopup = function (popup) {\n var index = this.popups.indexOf(popup);\n if (index !== -1) {\n this.popups.splice(index, 1);\n this.updatePopups();\n }\n };\n PopupManager.prototype.updatePopups = function () {\n var e_1, _a, e_2, _b;\n this.popups.sort(function (a, b) { return b.priority - a.priority; });\n var visiblepopups = [];\n try {\n for (var _c = __values(this.popups), _d = _c.next(); !_d.done; _d = _c.next()) {\n var popup = _d.value;\n var shouldDisplay = true;\n try {\n for (var visiblepopups_1 = (e_2 = void 0, __values(visiblepopups)), visiblepopups_1_1 = visiblepopups_1.next(); !visiblepopups_1_1.done; visiblepopups_1_1 = visiblepopups_1.next()) {\n var visiblePopup = visiblepopups_1_1.value;\n if (this.doPopupsOverlap(visiblePopup, popup)) {\n shouldDisplay = false;\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (visiblepopups_1_1 && !visiblepopups_1_1.done && (_b = visiblepopups_1.return)) _b.call(visiblepopups_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (shouldDisplay) {\n visiblepopups.push(popup);\n }\n else {\n popup.hide();\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n PopupManager.prototype.doPopupsOverlap = function (popupA, popupB) {\n var rectA = popupA.getElement().getBoundingClientRect();\n var rectB = popupB.getElement().getBoundingClientRect();\n return (rectA.left < rectB.right && rectA.right > rectB.left && rectA.top < rectB.bottom && rectA.bottom\n > rectB.top);\n };\n return PopupManager;\n}());\nvar popupManager = new PopupManager();\nexports.popupManager = popupManager;\nexports.Tooltip = Tooltip;\nvar HoverTooltip = /** @class */ (function (_super) {\n __extends(HoverTooltip, _super);\n function HoverTooltip(parentNode) {\n if (parentNode === void 0) { parentNode = document.body; }\n var _this = _super.call(this, parentNode) || this;\n _this.timeout = undefined;\n _this.lastT = 0;\n _this.idleTime = 350;\n _this.lastEvent = undefined;\n _this.onMouseOut = _this.onMouseOut.bind(_this);\n _this.onMouseMove = _this.onMouseMove.bind(_this);\n _this.waitForHover = _this.waitForHover.bind(_this);\n _this.hide = _this.hide.bind(_this);\n var el = _this.getElement();\n el.style.whiteSpace = \"pre-wrap\";\n el.style.pointerEvents = \"auto\";\n el.addEventListener(\"mouseout\", _this.onMouseOut);\n el.tabIndex = -1;\n el.addEventListener(\"blur\", function () {\n if (!el.contains(document.activeElement))\n this.hide();\n }.bind(_this));\n el.addEventListener(\"wheel\", preventParentScroll);\n return _this;\n }\n HoverTooltip.prototype.addToEditor = function (editor) {\n editor.on(\"mousemove\", this.onMouseMove);\n editor.on(\"mousedown\", this.hide);\n editor.renderer.getMouseEventTarget().addEventListener(\"mouseout\", this.onMouseOut, true);\n };\n HoverTooltip.prototype.removeFromEditor = function (editor) {\n editor.off(\"mousemove\", this.onMouseMove);\n editor.off(\"mousedown\", this.hide);\n editor.renderer.getMouseEventTarget().removeEventListener(\"mouseout\", this.onMouseOut, true);\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n };\n HoverTooltip.prototype.onMouseMove = function (e, editor) {\n this.lastEvent = e;\n this.lastT = Date.now();\n var isMousePressed = editor.$mouseHandler.isMousePressed;\n if (this.isOpen) {\n var pos = this.lastEvent && this.lastEvent.getDocumentPosition();\n if (!this.range\n || !this.range.contains(pos.row, pos.column)\n || isMousePressed\n || this.isOutsideOfText(this.lastEvent)) {\n this.hide();\n }\n }\n if (this.timeout || isMousePressed)\n return;\n this.lastEvent = e;\n this.timeout = setTimeout(this.waitForHover, this.idleTime);\n };\n HoverTooltip.prototype.waitForHover = function () {\n if (this.timeout)\n clearTimeout(this.timeout);\n var dt = Date.now() - this.lastT;\n if (this.idleTime - dt > 10) {\n this.timeout = setTimeout(this.waitForHover, this.idleTime - dt);\n return;\n }\n this.timeout = null;\n if (this.lastEvent && !this.isOutsideOfText(this.lastEvent)) {\n this.$gatherData(this.lastEvent, this.lastEvent.editor);\n }\n };\n HoverTooltip.prototype.isOutsideOfText = function (e) {\n var editor = e.editor;\n var docPos = e.getDocumentPosition();\n var line = editor.session.getLine(docPos.row);\n if (docPos.column == line.length) {\n var screenPos = editor.renderer.pixelToScreenCoordinates(e.clientX, e.clientY);\n var clippedPos = editor.session.documentToScreenPosition(docPos.row, docPos.column);\n if (clippedPos.column != screenPos.column\n || clippedPos.row != screenPos.row) {\n return true;\n }\n }\n return false;\n };\n HoverTooltip.prototype.setDataProvider = function (value) {\n this.$gatherData = value;\n };\n HoverTooltip.prototype.showForRange = function (editor, range, domNode, startingEvent) {\n var MARGIN = 10;\n if (startingEvent && startingEvent != this.lastEvent)\n return;\n if (this.isOpen && document.activeElement == this.getElement())\n return;\n var renderer = editor.renderer;\n if (!this.isOpen) {\n popupManager.addPopup(this);\n this.$registerCloseEvents();\n this.setTheme(renderer.theme);\n }\n this.isOpen = true;\n this.addMarker(range, editor.session);\n this.range = Range.fromPoints(range.start, range.end);\n var position = renderer.textToScreenCoordinates(range.start.row, range.start.column);\n var rect = renderer.scroller.getBoundingClientRect();\n if (position.pageX < rect.left)\n position.pageX = rect.left;\n var element = this.getElement();\n element.innerHTML = \"\";\n element.appendChild(domNode);\n element.style.maxHeight = \"\";\n element.style.display = \"block\";\n var labelHeight = element.clientHeight;\n var labelWidth = element.clientWidth;\n var spaceBelow = window.innerHeight - position.pageY - renderer.lineHeight;\n var isAbove = true;\n if (position.pageY - labelHeight < 0 && position.pageY < spaceBelow) {\n isAbove = false;\n }\n element.style.maxHeight = (isAbove ? position.pageY : spaceBelow) - MARGIN + \"px\";\n element.style.top = isAbove ? \"\" : position.pageY + renderer.lineHeight + \"px\";\n element.style.bottom = isAbove ? window.innerHeight - position.pageY + \"px\" : \"\";\n element.style.left = Math.min(position.pageX, window.innerWidth - labelWidth - MARGIN) + \"px\";\n };\n HoverTooltip.prototype.addMarker = function (range, session) {\n if (this.marker) {\n this.$markerSession.removeMarker(this.marker);\n }\n this.$markerSession = session;\n this.marker = session && session.addMarker(range, \"ace_highlight-marker\", \"text\");\n };\n HoverTooltip.prototype.hide = function (e) {\n if (!e && document.activeElement == this.getElement())\n return;\n if (e && e.target && (e.type != \"keydown\" || e.ctrlKey || e.metaKey) && this.$element.contains(e.target))\n return;\n this.lastEvent = null;\n if (this.timeout)\n clearTimeout(this.timeout);\n this.timeout = null;\n this.addMarker(null);\n if (this.isOpen) {\n this.$removeCloseEvents();\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n popupManager.removePopup(this);\n }\n };\n HoverTooltip.prototype.$registerCloseEvents = function () {\n window.addEventListener(\"keydown\", this.hide, true);\n window.addEventListener(\"wheel\", this.hide, true);\n window.addEventListener(\"mousedown\", this.hide, true);\n };\n HoverTooltip.prototype.$removeCloseEvents = function () {\n window.removeEventListener(\"keydown\", this.hide, true);\n window.removeEventListener(\"wheel\", this.hide, true);\n window.removeEventListener(\"mousedown\", this.hide, true);\n };\n HoverTooltip.prototype.onMouseOut = function (e) {\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.lastEvent = null;\n if (!this.isOpen)\n return;\n if (!e.relatedTarget || this.getElement().contains(e.relatedTarget))\n return;\n if (e && e.currentTarget.contains(e.relatedTarget))\n return;\n if (!e.relatedTarget.classList.contains(\"ace_content\"))\n this.hide();\n };\n return HoverTooltip;\n}(Tooltip));\nexports.HoverTooltip = HoverTooltip;\n\n});\n\nace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/tooltip\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar dom = require(\"../lib/dom\");\nvar event = require(\"../lib/event\");\nvar Tooltip = require(\"../tooltip\").Tooltip;\nvar nls = require(\"../config\").nls;\nfunction GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor);\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function (e) {\n if (!editor.isFocused() || e.getButton() != 0)\n return;\n var gutterRegion = gutter.getRegion(e);\n if (gutterRegion == \"foldWidgets\")\n return;\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n if (e.getShiftKey())\n selection.selectTo(row, 0);\n else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n var tooltipTimeout, mouseEvent;\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var maxRow = editor.session.getLength();\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))\n return hideTooltip();\n }\n tooltip.showTooltip(row);\n if (!tooltip.isOpen)\n return;\n editor.on(\"mousewheel\", hideTooltip);\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n }\n else {\n var gutterRow = mouseEvent.getGutterRow();\n var gutterCell = gutter.$lines.get(gutterRow);\n if (gutterCell) {\n var gutterElement = gutterCell.element.querySelector(\".ace_gutter_annotation\");\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n else {\n moveTooltip(mouseEvent);\n }\n }\n }\n function hideTooltip() {\n if (tooltipTimeout)\n tooltipTimeout = clearTimeout(tooltipTimeout);\n if (tooltip.isOpen) {\n tooltip.hideTooltip();\n editor.off(\"mousewheel\", hideTooltip);\n }\n }\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function (e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\"))\n return hideTooltip();\n if (tooltip.isOpen && mouseHandler.$tooltipFollowsMouse)\n moveTooltip(e);\n mouseEvent = e;\n if (tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function () {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed)\n showTooltip();\n else\n hideTooltip();\n }, 50);\n });\n event.addListener(editor.renderer.$gutter, \"mouseout\", function (e) {\n mouseEvent = null;\n if (!tooltip.isOpen || tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function () {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n }, editor);\n editor.on(\"changeSession\", hideTooltip);\n editor.on(\"input\", hideTooltip);\n}\nexports.GutterHandler = GutterHandler;\nvar GutterTooltip = /** @class */ (function (_super) {\n __extends(GutterTooltip, _super);\n function GutterTooltip(editor) {\n var _this = _super.call(this, editor.container) || this;\n _this.editor = editor;\n return _this;\n }\n GutterTooltip.prototype.setPosition = function (x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n if (x + width > windowWidth) {\n x -= (x + width) - windowWidth;\n }\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n Object.defineProperty(GutterTooltip, \"annotationLabels\", {\n get: function () {\n return {\n error: {\n singular: nls(\"gutter-tooltip.aria-label.error.singular\", \"error\"),\n plural: nls(\"gutter-tooltip.aria-label.error.plural\", \"errors\")\n },\n warning: {\n singular: nls(\"gutter-tooltip.aria-label.warning.singular\", \"warning\"),\n plural: nls(\"gutter-tooltip.aria-label.warning.plural\", \"warnings\")\n },\n info: {\n singular: nls(\"gutter-tooltip.aria-label.info.singular\", \"information message\"),\n plural: nls(\"gutter-tooltip.aria-label.info.plural\", \"information messages\")\n }\n };\n },\n enumerable: false,\n configurable: true\n });\n GutterTooltip.prototype.showTooltip = function (row) {\n var gutter = this.editor.renderer.$gutterLayer;\n var annotationsInRow = gutter.$annotations[row];\n var annotation;\n if (annotationsInRow)\n annotation = { text: Array.from(annotationsInRow.text), type: Array.from(annotationsInRow.type) };\n else\n annotation = { text: [], type: [] };\n var fold = gutter.session.getFoldLine(row);\n if (fold && gutter.$showFoldedAnnotations) {\n var annotationsInFold = { error: [], warning: [], info: [] };\n var mostSevereAnnotationInFoldType;\n for (var i = row + 1; i <= fold.end.row; i++) {\n if (!gutter.$annotations[i])\n continue;\n for (var j = 0; j < gutter.$annotations[i].text.length; j++) {\n var annotationType = gutter.$annotations[i].type[j];\n annotationsInFold[annotationType].push(gutter.$annotations[i].text[j]);\n if (annotationType === \"error\") {\n mostSevereAnnotationInFoldType = \"error_fold\";\n continue;\n }\n if (annotationType === \"warning\") {\n mostSevereAnnotationInFoldType = \"warning_fold\";\n continue;\n }\n }\n }\n if (mostSevereAnnotationInFoldType === \"error_fold\" || mostSevereAnnotationInFoldType === \"warning_fold\") {\n var summaryFoldedAnnotations = \"\".concat(GutterTooltip.annotationsToSummaryString(annotationsInFold), \" in folded code.\");\n annotation.text.push(summaryFoldedAnnotations);\n annotation.type.push(mostSevereAnnotationInFoldType);\n }\n }\n if (annotation.text.length === 0)\n return this.hide();\n var annotationMessages = { error: [], warning: [], info: [] };\n var iconClassName = gutter.$useSvgGutterIcons ? \"ace_icon_svg\" : \"ace_icon\";\n for (var i = 0; i < annotation.text.length; i++) {\n var line = \" \").concat(annotation.text[i]);\n annotationMessages[annotation.type[i].replace(\"_fold\", \"\")].push(line);\n }\n var tooltipContent = [].concat(annotationMessages.error, annotationMessages.warning, annotationMessages.info).join(\"
\");\n this.setHtml(tooltipContent);\n this.$element.setAttribute(\"aria-live\", \"polite\");\n if (!this.isOpen) {\n this.setTheme(this.editor.renderer.theme);\n this.setClassName(\"ace_gutter-tooltip\");\n }\n this.show();\n this.editor._signal(\"showGutterTooltip\", this);\n };\n GutterTooltip.prototype.hideTooltip = function () {\n this.$element.removeAttribute(\"aria-live\");\n this.hide();\n this.editor._signal(\"hideGutterTooltip\", this);\n };\n GutterTooltip.annotationsToSummaryString = function (annotations) {\n var e_1, _a;\n var summary = [];\n var annotationTypes = ['error', 'warning', 'info'];\n try {\n for (var annotationTypes_1 = __values(annotationTypes), annotationTypes_1_1 = annotationTypes_1.next(); !annotationTypes_1_1.done; annotationTypes_1_1 = annotationTypes_1.next()) {\n var annotationType = annotationTypes_1_1.value;\n if (!annotations[annotationType].length)\n continue;\n var label = annotations[annotationType].length === 1 ? GutterTooltip.annotationLabels[annotationType].singular : GutterTooltip.annotationLabels[annotationType].plural;\n summary.push(\"\".concat(annotations[annotationType].length, \" \").concat(label));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (annotationTypes_1_1 && !annotationTypes_1_1.done && (_a = annotationTypes_1.return)) _a.call(annotationTypes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return summary.join(\", \");\n };\n return GutterTooltip;\n}(Tooltip));\nexports.GutterTooltip = GutterTooltip;\n\n});\n\nace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar MouseEvent = /** @class */ (function () {\n function MouseEvent(domEvent, editor) { this.speed; this.wheelX; this.wheelY;\n this.domEvent = domEvent;\n this.editor = editor;\n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n this.$pos = null;\n this.$inSelection = null;\n this.propagationStopped = false;\n this.defaultPrevented = false;\n }\n MouseEvent.prototype.stopPropagation = function () {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n MouseEvent.prototype.preventDefault = function () {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n MouseEvent.prototype.stop = function () {\n this.stopPropagation();\n this.preventDefault();\n };\n MouseEvent.prototype.getDocumentPosition = function () {\n if (this.$pos)\n return this.$pos;\n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n MouseEvent.prototype.getGutterRow = function () {\n var documentRow = this.getDocumentPosition().row;\n var screenRow = this.editor.session.documentToScreenRow(documentRow, 0);\n var screenTopRow = this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row, 0);\n return screenRow - screenTopRow;\n };\n MouseEvent.prototype.inSelection = function () {\n if (this.$inSelection !== null)\n return this.$inSelection;\n var editor = this.editor;\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty())\n this.$inSelection = false;\n else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n return this.$inSelection;\n };\n MouseEvent.prototype.getButton = function () {\n return event.getButton(this.domEvent);\n };\n MouseEvent.prototype.getShiftKey = function () {\n return this.domEvent.shiftKey;\n };\n MouseEvent.prototype.getAccelKey = function () {\n return useragent.isMac ? this.domEvent.metaKey : this.domEvent.ctrlKey;\n };\n return MouseEvent;\n}());\nexports.MouseEvent = MouseEvent;\n\n});\n\nace.define(\"ace/mouse/dragdrop_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar AUTOSCROLL_DELAY = 200;\nvar SCROLL_CURSOR_DELAY = 200;\nvar SCROLL_CURSOR_HYSTERESIS = 5;\nfunction DragdropHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var dragImage = dom.createElement(\"div\");\n dragImage.style.cssText = \"top:-100px;position:absolute;z-index:2147483647;opacity:0.5\";\n dragImage.textContent = \"\\xa0\";\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n exports.forEach(function (x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.on(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor, counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n this.onDragStart = function (e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function () {\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n range = editor.getSelectionRange();\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n editor.container.appendChild(dragImage);\n dataTransfer.setDragImage && dataTransfer.setDragImage(dragImage, 0, 0);\n setTimeout(function () {\n editor.container.removeChild(dragImage);\n });\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n isInternal = true;\n this.setState(\"drag\");\n };\n this.onDragEnd = function (e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\")\n editor.session.remove(editor.getSelectionRange());\n editor.$resetCursorStyle();\n }\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n this.onDragEnter = function (e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker)\n addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n this.onDragOver = function (e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n if (onMouseMoveTimer !== null)\n onMouseMoveTimer = null;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n this.onDragLeave = function (e) {\n counter--;\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n this.onDrop = function (e) {\n if (!dragCursor)\n return;\n var dataTransfer = e.dataTransfer;\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n }\n else {\n range = editor.moveText(range, dragCursor);\n }\n break;\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n }\n else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n clearDragMarker();\n return event.preventDefault(e);\n };\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler), editor);\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.moveCursorToPosition(cursor);\n cursorMovedTime = now;\n cursorPointOnCaretMoved = { x: x, y: y };\n }\n else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n }\n else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = { row: cursor.row, column: cursor.column };\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);\n }\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);\n }\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n if (vScroll || (hScroll && !vMovement)) {\n if (!autoScrollStartTime)\n autoScrollStartTime = now;\n else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)\n editor.renderer.scrollCursorIntoView(scrollCursor);\n }\n else {\n autoScrollStartTime = null;\n }\n }\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused())\n editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.selection.fromOrientedRange(range);\n if (editor.isFocused() && !isInternal)\n editor.$resetCursorStyle();\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n var onMouseMoveTimer = null;\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function () {\n if (onMouseMoveTimer != null && dragSelectionMarker)\n clearDragMarker();\n }, 20);\n }\n }\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function (type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n }\n catch (e) { }\n var dropEffect = \"none\";\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n else if (moveAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"move\";\n else if (copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n return dropEffect;\n }\n}\n(function () {\n this.dragWait = function () {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay())\n this.startDrag();\n };\n this.dragWaitEnd = function () {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n this.dragReadyEnd = function (e) {\n this.editor.$resetCursorStyle();\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n this.startDrag = function () {\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n this.onMouseDrag = function (e) {\n var target = this.editor.container;\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3)\n target.dragDrop();\n }\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n this.onMouseDown = function (e) {\n if (!this.$dragEnabled)\n return;\n this.mousedownEvent = e;\n var editor = this.editor;\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))\n return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget)\n eventTarget.unselectable = \"on\";\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n this.setState(\"dragWait\");\n }\n else {\n this.startDrag();\n }\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n}).call(DragdropHandler.prototype);\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\nexports.DragdropHandler = DragdropHandler;\n\n});\n\nace.define(\"ace/mouse/touch_handler\",[\"require\",\"exports\",\"module\",\"ace/mouse/mouse_event\",\"ace/lib/event\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar MouseEvent = require(\"./mouse_event\").MouseEvent;\nvar event = require(\"../lib/event\");\nvar dom = require(\"../lib/dom\");\nexports.addTouchListeners = function (el, editor) {\n var mode = \"scroll\";\n var startX;\n var startY;\n var touchStartT;\n var lastT;\n var longTouchTimer;\n var animationTimer;\n var animationSteps = 0;\n var pos;\n var clickCount = 0;\n var vX = 0;\n var vY = 0;\n var pressed;\n var contextMenu;\n function createContextMenu() {\n var clipboard = window.navigator && window.navigator.clipboard;\n var isOpen = false;\n var updateMenu = function () {\n var selected = editor.getCopyText();\n var hasUndo = editor.session.getUndoManager().hasUndo();\n contextMenu.replaceChild(dom.buildDom(isOpen ? [\"span\",\n !selected && [\"span\", { class: \"ace_mobile-button\", action: \"selectall\" }, \"Select All\"],\n selected && [\"span\", { class: \"ace_mobile-button\", action: \"copy\" }, \"Copy\"],\n selected && [\"span\", { class: \"ace_mobile-button\", action: \"cut\" }, \"Cut\"],\n clipboard && [\"span\", { class: \"ace_mobile-button\", action: \"paste\" }, \"Paste\"],\n hasUndo && [\"span\", { class: \"ace_mobile-button\", action: \"undo\" }, \"Undo\"],\n [\"span\", { class: \"ace_mobile-button\", action: \"find\" }, \"Find\"],\n [\"span\", { class: \"ace_mobile-button\", action: \"openCommandPalette\" }, \"Palette\"]\n ] : [\"span\"]), contextMenu.firstChild);\n };\n var handleClick = function (e) {\n var action = e.target.getAttribute(\"action\");\n if (action == \"more\" || !isOpen) {\n isOpen = !isOpen;\n return updateMenu();\n }\n if (action == \"paste\") {\n clipboard.readText().then(function (text) {\n editor.execCommand(action, text);\n });\n }\n else if (action) {\n if (action == \"cut\" || action == \"copy\") {\n if (clipboard)\n clipboard.writeText(editor.getCopyText());\n else\n document.execCommand(\"copy\");\n }\n editor.execCommand(action);\n }\n contextMenu.firstChild.style.display = \"none\";\n isOpen = false;\n if (action != \"openCommandPalette\")\n editor.focus();\n };\n contextMenu = dom.buildDom([\"div\",\n {\n class: \"ace_mobile-menu\",\n ontouchstart: function (e) {\n mode = \"menu\";\n e.stopPropagation();\n e.preventDefault();\n editor.textInput.focus();\n },\n ontouchend: function (e) {\n e.stopPropagation();\n e.preventDefault();\n handleClick(e);\n },\n onclick: handleClick\n },\n [\"span\"],\n [\"span\", { class: \"ace_mobile-button\", action: \"more\" }, \"...\"]\n ], editor.container);\n }\n function showContextMenu() {\n if (!contextMenu)\n createContextMenu();\n var cursor = editor.selection.cursor;\n var pagePos = editor.renderer.textToScreenCoordinates(cursor.row, cursor.column);\n var leftOffset = editor.renderer.textToScreenCoordinates(0, 0).pageX;\n var scrollLeft = editor.renderer.scrollLeft;\n var rect = editor.container.getBoundingClientRect();\n contextMenu.style.top = pagePos.pageY - rect.top - 3 + \"px\";\n if (pagePos.pageX - rect.left < rect.width - 70) {\n contextMenu.style.left = \"\";\n contextMenu.style.right = \"10px\";\n }\n else {\n contextMenu.style.right = \"\";\n contextMenu.style.left = leftOffset + scrollLeft - rect.left + \"px\";\n }\n contextMenu.style.display = \"\";\n contextMenu.firstChild.style.display = \"none\";\n editor.on(\"input\", hideContextMenu);\n }\n function hideContextMenu(e) {\n if (contextMenu)\n contextMenu.style.display = \"none\";\n editor.off(\"input\", hideContextMenu);\n }\n function handleLongTap() {\n longTouchTimer = null;\n clearTimeout(longTouchTimer);\n var range = editor.selection.getRange();\n var inSelection = range.contains(pos.row, pos.column);\n if (range.isEmpty() || !inSelection) {\n editor.selection.moveToPosition(pos);\n editor.selection.selectWord();\n }\n mode = \"wait\";\n showContextMenu();\n }\n function switchToSelectionMode() {\n longTouchTimer = null;\n clearTimeout(longTouchTimer);\n editor.selection.moveToPosition(pos);\n var range = clickCount >= 2\n ? editor.selection.getLineRange(pos.row)\n : editor.session.getBracketRange(pos);\n if (range && !range.isEmpty()) {\n editor.selection.setRange(range);\n }\n else {\n editor.selection.selectWord();\n }\n mode = \"wait\";\n }\n event.addListener(el, \"contextmenu\", function (e) {\n if (!pressed)\n return;\n var textarea = editor.textInput.getElement();\n textarea.focus();\n }, editor);\n event.addListener(el, \"touchstart\", function (e) {\n var touches = e.touches;\n if (longTouchTimer || touches.length > 1) {\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n touchStartT = -1;\n mode = \"zoom\";\n return;\n }\n pressed = editor.$mouseHandler.isMousePressed = true;\n var h = editor.renderer.layerConfig.lineHeight;\n var w = editor.renderer.layerConfig.lineHeight;\n var t = e.timeStamp;\n lastT = t;\n var touchObj = touches[0];\n var x = touchObj.clientX;\n var y = touchObj.clientY;\n if (Math.abs(startX - x) + Math.abs(startY - y) > h)\n touchStartT = -1;\n startX = e.clientX = x;\n startY = e.clientY = y;\n vX = vY = 0;\n var ev = new MouseEvent(e, editor);\n pos = ev.getDocumentPosition();\n if (t - touchStartT < 500 && touches.length == 1 && !animationSteps) {\n clickCount++;\n e.preventDefault();\n e.button = 0;\n switchToSelectionMode();\n }\n else {\n clickCount = 0;\n var cursor = editor.selection.cursor;\n var anchor = editor.selection.isEmpty() ? cursor : editor.selection.anchor;\n var cursorPos = editor.renderer.$cursorLayer.getPixelPosition(cursor, true);\n var anchorPos = editor.renderer.$cursorLayer.getPixelPosition(anchor, true);\n var rect = editor.renderer.scroller.getBoundingClientRect();\n var offsetTop = editor.renderer.layerConfig.offset;\n var offsetLeft = editor.renderer.scrollLeft;\n var weightedDistance = function (x, y) {\n x = x / w;\n y = y / h - 0.75;\n return x * x + y * y;\n };\n if (e.clientX < rect.left) {\n mode = \"zoom\";\n return;\n }\n var diff1 = weightedDistance(e.clientX - rect.left - cursorPos.left + offsetLeft, e.clientY - rect.top - cursorPos.top + offsetTop);\n var diff2 = weightedDistance(e.clientX - rect.left - anchorPos.left + offsetLeft, e.clientY - rect.top - anchorPos.top + offsetTop);\n if (diff1 < 3.5 && diff2 < 3.5)\n mode = diff1 > diff2 ? \"cursor\" : \"anchor\";\n if (diff2 < 3.5)\n mode = \"anchor\";\n else if (diff1 < 3.5)\n mode = \"cursor\";\n else\n mode = \"scroll\";\n longTouchTimer = setTimeout(handleLongTap, 450);\n }\n touchStartT = t;\n }, editor);\n event.addListener(el, \"touchend\", function (e) {\n pressed = editor.$mouseHandler.isMousePressed = false;\n if (animationTimer)\n clearInterval(animationTimer);\n if (mode == \"zoom\") {\n mode = \"\";\n animationSteps = 0;\n }\n else if (longTouchTimer) {\n editor.selection.moveToPosition(pos);\n animationSteps = 0;\n showContextMenu();\n }\n else if (mode == \"scroll\") {\n animate();\n hideContextMenu();\n }\n else {\n showContextMenu();\n }\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n }, editor);\n event.addListener(el, \"touchmove\", function (e) {\n if (longTouchTimer) {\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n }\n var touches = e.touches;\n if (touches.length > 1 || mode == \"zoom\")\n return;\n var touchObj = touches[0];\n var wheelX = startX - touchObj.clientX;\n var wheelY = startY - touchObj.clientY;\n if (mode == \"wait\") {\n if (wheelX * wheelX + wheelY * wheelY > 4)\n mode = \"cursor\";\n else\n return e.preventDefault();\n }\n startX = touchObj.clientX;\n startY = touchObj.clientY;\n e.clientX = touchObj.clientX;\n e.clientY = touchObj.clientY;\n var t = e.timeStamp;\n var dt = t - lastT;\n lastT = t;\n if (mode == \"scroll\") {\n var mouseEvent = new MouseEvent(e, editor);\n mouseEvent.speed = 1;\n mouseEvent.wheelX = wheelX;\n mouseEvent.wheelY = wheelY;\n if (10 * Math.abs(wheelX) < Math.abs(wheelY))\n wheelX = 0;\n if (10 * Math.abs(wheelY) < Math.abs(wheelX))\n wheelY = 0;\n if (dt != 0) {\n vX = wheelX / dt;\n vY = wheelY / dt;\n }\n editor._emit(\"mousewheel\", mouseEvent);\n if (!mouseEvent.propagationStopped) {\n vX = vY = 0;\n }\n }\n else {\n var ev = new MouseEvent(e, editor);\n var pos = ev.getDocumentPosition();\n if (mode == \"cursor\")\n editor.selection.moveCursorToPosition(pos);\n else if (mode == \"anchor\")\n editor.selection.setSelectionAnchor(pos.row, pos.column);\n editor.renderer.scrollCursorIntoView(pos);\n e.preventDefault();\n }\n }, editor);\n function animate() {\n animationSteps += 60;\n animationTimer = setInterval(function () {\n if (animationSteps-- <= 0) {\n clearInterval(animationTimer);\n animationTimer = null;\n }\n if (Math.abs(vX) < 0.01)\n vX = 0;\n if (Math.abs(vY) < 0.01)\n vY = 0;\n if (animationSteps < 20)\n vX = 0.9 * vX;\n if (animationSteps < 20)\n vY = 0.9 * vY;\n var oldScrollTop = editor.session.getScrollTop();\n editor.renderer.scrollBy(10 * vX, 10 * vY);\n if (oldScrollTop == editor.session.getScrollTop())\n animationSteps = 0;\n }, 10);\n }\n};\n\n});\n\nace.define(\"ace/mouse/mouse_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/mouse/default_handlers\",\"ace/mouse/default_gutter_handler\",\"ace/mouse/mouse_event\",\"ace/mouse/dragdrop_handler\",\"ace/mouse/touch_handler\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar DefaultHandlers = require(\"./default_handlers\").DefaultHandlers;\nvar DefaultGutterHandler = require(\"./default_gutter_handler\").GutterHandler;\nvar MouseEvent = require(\"./mouse_event\").MouseEvent;\nvar DragdropHandler = require(\"./dragdrop_handler\").DragdropHandler;\nvar addTouchListeners = require(\"./touch_handler\").addTouchListeners;\nvar config = require(\"../config\");\nvar MouseHandler = /** @class */ (function () {\n function MouseHandler(editor) { this.$dragDelay; this.$dragEnabled; this.$mouseMoved; this.mouseEvent; this.$focusTimeout;\n var _self = this;\n this.editor = editor;\n new DefaultHandlers(this);\n new DefaultGutterHandler(this);\n new DragdropHandler(this);\n var focusEditor = function (e) {\n var windowBlurred = !document.hasFocus || !document.hasFocus()\n || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement());\n if (windowBlurred)\n window.focus();\n editor.focus();\n setTimeout(function () {\n if (!editor.isFocused())\n editor.focus();\n });\n };\n var mouseTarget = editor.renderer.getMouseEventTarget();\n event.addListener(mouseTarget, \"click\", this.onMouseEvent.bind(this, \"click\"), editor);\n event.addListener(mouseTarget, \"mousemove\", this.onMouseMove.bind(this, \"mousemove\"), editor);\n event.addMultiMouseDownListener([\n mouseTarget,\n editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner,\n editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner,\n editor.textInput && editor.textInput.getElement()\n ].filter(Boolean), [400, 300, 250], this, \"onMouseEvent\", editor);\n event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, \"mousewheel\"), editor);\n addTouchListeners(editor.container, editor);\n var gutterEl = editor.renderer.$gutter;\n event.addListener(gutterEl, \"mousedown\", this.onMouseEvent.bind(this, \"guttermousedown\"), editor);\n event.addListener(gutterEl, \"click\", this.onMouseEvent.bind(this, \"gutterclick\"), editor);\n event.addListener(gutterEl, \"dblclick\", this.onMouseEvent.bind(this, \"gutterdblclick\"), editor);\n event.addListener(gutterEl, \"mousemove\", this.onMouseEvent.bind(this, \"guttermousemove\"), editor);\n event.addListener(mouseTarget, \"mousedown\", focusEditor, editor);\n event.addListener(gutterEl, \"mousedown\", focusEditor, editor);\n if (useragent.isIE && editor.renderer.scrollBarV) {\n event.addListener(editor.renderer.scrollBarV.element, \"mousedown\", focusEditor, editor);\n event.addListener(editor.renderer.scrollBarH.element, \"mousedown\", focusEditor, editor);\n }\n editor.on(\"mousemove\", function (e) {\n if (_self.state || _self.$dragDelay || !_self.$dragEnabled)\n return;\n var character = editor.renderer.screenToTextCoordinates(e.x, e.y);\n var range = editor.session.selection.getRange();\n var renderer = editor.renderer;\n if (!range.isEmpty() && range.insideStart(character.row, character.column)) {\n renderer.setCursorStyle(\"default\");\n }\n else {\n renderer.setCursorStyle(\"\");\n }\n }, //@ts-expect-error TODO: seems mistyping - should be boolean\n editor);\n }\n MouseHandler.prototype.onMouseEvent = function (name, e) {\n if (!this.editor.session)\n return;\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n MouseHandler.prototype.onMouseMove = function (name, e) {\n var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;\n if (!listeners || !listeners.length)\n return;\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n MouseHandler.prototype.onMouseWheel = function (name, e) {\n var mouseEvent = new MouseEvent(e, this.editor);\n mouseEvent.speed = this.$scrollSpeed * 2;\n mouseEvent.wheelX = e.wheelX;\n mouseEvent.wheelY = e.wheelY;\n this.editor._emit(name, mouseEvent);\n };\n MouseHandler.prototype.setState = function (state) {\n this.state = state;\n };\n MouseHandler.prototype.captureMouse = function (ev, mouseMoveHandler) {\n this.x = ev.x;\n this.y = ev.y;\n this.isMousePressed = true;\n var editor = this.editor;\n var renderer = this.editor.renderer;\n renderer.$isMousePressed = true;\n var self = this;\n var onMouseMove = function (e) {\n if (!e)\n return;\n if (useragent.isWebKit && !e.which && self.releaseMouse)\n return self.releaseMouse();\n self.x = e.clientX;\n self.y = e.clientY;\n mouseMoveHandler && mouseMoveHandler(e);\n self.mouseEvent = new MouseEvent(e, self.editor);\n self.$mouseMoved = true;\n };\n var onCaptureEnd = function (e) {\n editor.off(\"beforeEndOperation\", onOperationEnd);\n clearInterval(timerId);\n if (editor.session)\n onCaptureInterval();\n self[self.state + \"End\"] && self[self.state + \"End\"](e);\n self.state = \"\";\n self.isMousePressed = renderer.$isMousePressed = false;\n if (renderer.$keepTextAreaAtCursor)\n renderer.$moveTextAreaToCursor();\n self.$onCaptureMouseMove = self.releaseMouse = null;\n e && self.onMouseEvent(\"mouseup\", e);\n editor.endOperation();\n };\n var onCaptureInterval = function () {\n self[self.state] && self[self.state]();\n self.$mouseMoved = false;\n };\n if (useragent.isOldIE && ev.domEvent.type == \"dblclick\") {\n return setTimeout(function () { onCaptureEnd(ev); });\n }\n var onOperationEnd = function (e) {\n if (!self.releaseMouse)\n return;\n if (editor.curOp.command.name && editor.curOp.selectionChanged) {\n self[self.state + \"End\"] && self[self.state + \"End\"]();\n self.state = \"\";\n self.releaseMouse();\n }\n };\n editor.on(\"beforeEndOperation\", onOperationEnd);\n editor.startOperation({ command: { name: \"mouse\" } });\n self.$onCaptureMouseMove = onMouseMove;\n self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);\n var timerId = setInterval(onCaptureInterval, 20);\n };\n MouseHandler.prototype.cancelContextMenu = function () {\n var stop = function (e) {\n if (e && e.domEvent && e.domEvent.type != \"contextmenu\")\n return;\n this.editor.off(\"nativecontextmenu\", stop);\n if (e && e.domEvent)\n event.stopEvent(e.domEvent);\n }.bind(this);\n setTimeout(stop, 10);\n this.editor.on(\"nativecontextmenu\", stop);\n };\n MouseHandler.prototype.destroy = function () {\n if (this.releaseMouse)\n this.releaseMouse();\n };\n return MouseHandler;\n}());\nMouseHandler.prototype.releaseMouse = null;\nconfig.defineOptions(MouseHandler.prototype, \"mouseHandler\", {\n scrollSpeed: { initialValue: 2 },\n dragDelay: { initialValue: (useragent.isMac ? 150 : 0) },\n dragEnabled: { initialValue: true },\n focusTimeout: { initialValue: 0 },\n tooltipFollowsMouse: { initialValue: true }\n});\nexports.MouseHandler = MouseHandler;\n\n});\n\nace.define(\"ace/mouse/fold_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar FoldHandler = /** @class */ (function () {\n function FoldHandler(editor) {\n editor.on(\"click\", function (e) {\n var position = e.getDocumentPosition();\n var session = editor.session;\n var fold = session.getFoldAt(position.row, position.column, 1);\n if (fold) {\n if (e.getAccelKey())\n session.removeFold(fold);\n else\n session.expandFold(fold);\n e.stop();\n }\n var target = e.domEvent && e.domEvent.target;\n if (target && dom.hasCssClass(target, \"ace_inline_button\")) {\n if (dom.hasCssClass(target, \"ace_toggle_wrap\")) {\n session.setOption(\"wrap\", !session.getUseWrapMode());\n editor.renderer.scrollCursorIntoView();\n }\n }\n });\n editor.on(\"gutterclick\", function (e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n if (session.foldWidgets && session.foldWidgets[row])\n editor.session.onFoldWidgetClick(row, e);\n if (!editor.isFocused())\n editor.focus();\n e.stop();\n }\n });\n editor.on(\"gutterdblclick\", function (e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n var data = session.getParentFoldRangeData(row, true);\n var range = data.range || data.firstRange;\n if (range) {\n row = range.start.row;\n var fold = session.getFoldAt(row, session.getLine(row).length, 1);\n if (fold) {\n session.removeFold(fold);\n }\n else {\n session.addFold(\"...\", range);\n editor.renderer.scrollCursorIntoView({ row: range.start.row, column: 0 });\n }\n }\n e.stop();\n }\n });\n }\n return FoldHandler;\n}());\nexports.FoldHandler = FoldHandler;\n\n});\n\nace.define(\"ace/keyboard/keybinding\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/event\"], function(require, exports, module){\"use strict\";\nvar keyUtil = require(\"../lib/keys\");\nvar event = require(\"../lib/event\");\nvar KeyBinding = /** @class */ (function () {\n function KeyBinding(editor) {\n this.$editor = editor;\n this.$data = { editor: editor };\n this.$handlers = [];\n this.setDefaultHandler(editor.commands);\n }\n KeyBinding.prototype.setDefaultHandler = function (kb) {\n this.removeKeyboardHandler(this.$defaultHandler);\n this.$defaultHandler = kb;\n this.addKeyboardHandler(kb, 0);\n };\n KeyBinding.prototype.setKeyboardHandler = function (kb) {\n var h = this.$handlers;\n if (h[h.length - 1] == kb)\n return;\n while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler)\n this.removeKeyboardHandler(h[h.length - 1]);\n this.addKeyboardHandler(kb, 1);\n };\n KeyBinding.prototype.addKeyboardHandler = function (kb, pos) {\n if (!kb)\n return;\n if (typeof kb == \"function\" && !kb.handleKeyboard)\n kb.handleKeyboard = kb;\n var i = this.$handlers.indexOf(kb);\n if (i != -1)\n this.$handlers.splice(i, 1);\n if (pos == undefined)\n this.$handlers.push(kb);\n else\n this.$handlers.splice(pos, 0, kb);\n if (i == -1 && kb.attach)\n kb.attach(this.$editor);\n };\n KeyBinding.prototype.removeKeyboardHandler = function (kb) {\n var i = this.$handlers.indexOf(kb);\n if (i == -1)\n return false;\n this.$handlers.splice(i, 1);\n kb.detach && kb.detach(this.$editor);\n return true;\n };\n KeyBinding.prototype.getKeyboardHandler = function () {\n return this.$handlers[this.$handlers.length - 1];\n };\n KeyBinding.prototype.getStatusText = function () {\n var data = this.$data;\n var editor = data.editor;\n return this.$handlers.map(function (h) {\n return h.getStatusText && h.getStatusText(editor, data) || \"\";\n }).filter(Boolean).join(\" \");\n };\n KeyBinding.prototype.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {\n var toExecute;\n var success = false;\n var commands = this.$editor.commands;\n for (var i = this.$handlers.length; i--;) {\n toExecute = this.$handlers[i].handleKeyboard(\n this.$data, hashId, keyString, keyCode, e);\n if (!toExecute || !toExecute.command)\n continue;\n if (toExecute.command == \"null\") {\n success = true;\n }\n else {\n success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);\n }\n if (success && e && hashId != -1 &&\n toExecute[\"passEvent\"] != true && toExecute.command[\"passEvent\"] != true) {\n event.stopEvent(e);\n }\n if (success)\n break;\n }\n if (!success && hashId == -1) {\n toExecute = { command: \"insertstring\" };\n success = commands.exec(\"insertstring\", this.$editor, keyString);\n }\n if (success && this.$editor._signal)\n this.$editor._signal(\"keyboardActivity\", toExecute);\n return success;\n };\n KeyBinding.prototype.onCommandKey = function (e, hashId, keyCode) {\n var keyString = keyUtil.keyCodeToString(keyCode);\n return this.$callKeyboardHandlers(hashId, keyString, keyCode, e);\n };\n KeyBinding.prototype.onTextInput = function (text) {\n return this.$callKeyboardHandlers(-1, text);\n };\n return KeyBinding;\n}());\nexports.KeyBinding = KeyBinding;\n\n});\n\nace.define(\"ace/lib/bidiutil\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar ArabicAlefBetIntervalsBegine = ['\\u0621', '\\u0641'];\nvar ArabicAlefBetIntervalsEnd = ['\\u063A', '\\u064a'];\nvar dir = 0, hiLevel = 0;\nvar lastArabic = false, hasUBAT_AL = false, hasUBAT_B = false, hasUBAT_S = false, hasBlockSep = false, hasSegSep = false;\nvar impTab_LTR = [ [0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]\n];\nvar impTab_RTL = [ [2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1]\n];\nvar LTR = 0, RTL = 1;\nvar L = 0;\nvar R = 1;\nvar EN = 2;\nvar AN = 3;\nvar ON = 4;\nvar B = 5;\nvar S = 6;\nvar AL = 7;\nvar WS = 8;\nvar CS = 9;\nvar ES = 10;\nvar ET = 11;\nvar NSM = 12;\nvar LRE = 13;\nvar RLE = 14;\nvar PDF = 15;\nvar LRO = 16;\nvar RLO = 17;\nvar BN = 18;\nvar UnicodeTBL00 = [\n BN, BN, BN, BN, BN, BN, BN, BN, BN, S, B, S, WS, B, BN, BN,\n BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, B, B, B, S,\n WS, ON, ON, ET, ET, ET, ON, ON, ON, ON, ON, ES, CS, ES, CS, CS,\n EN, EN, EN, EN, EN, EN, EN, EN, EN, EN, CS, ON, ON, ON, ON, ON,\n ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,\n L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, ON,\n ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,\n L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, BN,\n BN, BN, BN, BN, BN, B, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN,\n BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN,\n CS, ON, ET, ET, ET, ET, ON, ON, ON, ON, L, ON, ON, BN, ON, ON,\n ET, ET, EN, EN, ON, L, ON, ON, ON, EN, L, ON, ON, ON, ON, ON\n];\nvar UnicodeTBL20 = [\n WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, BN, BN, BN, L, R,\n ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON,\n ON, ON, ON, ON, ON, ON, ON, ON, WS, B, LRE, RLE, PDF, LRO, RLO, CS,\n ET, ET, ET, ET, ET, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON,\n ON, ON, ON, ON, CS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON,\n ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, WS\n];\nfunction _computeLevels(chars, levels, len, charTypes) {\n var impTab = dir ? impTab_RTL : impTab_LTR, prevState = null, newClass = null, newLevel = null, newState = 0, action = null, cond = null, condPos = -1, i = null, ix = null, classes = [];\n if (!charTypes) {\n for (i = 0, charTypes = []; i < len; i++) {\n charTypes[i] = _getCharacterType(chars[i]);\n }\n }\n hiLevel = dir;\n lastArabic = false;\n hasUBAT_AL = false;\n hasUBAT_B = false;\n hasUBAT_S = false;\n for (ix = 0; ix < len; ix++) {\n prevState = newState;\n classes[ix] = newClass = _getCharClass(chars, charTypes, classes, ix);\n newState = impTab[prevState][newClass];\n action = newState & 0xF0;\n newState &= 0x0F;\n levels[ix] = newLevel = impTab[newState][5];\n if (action > 0) {\n if (action == 0x10) {\n for (i = condPos; i < ix; i++) {\n levels[i] = 1;\n }\n condPos = -1;\n }\n else {\n condPos = -1;\n }\n }\n cond = impTab[newState][6];\n if (cond) {\n if (condPos == -1) {\n condPos = ix;\n }\n }\n else {\n if (condPos > -1) {\n for (i = condPos; i < ix; i++) {\n levels[i] = newLevel;\n }\n condPos = -1;\n }\n }\n if (charTypes[ix] == B) {\n levels[ix] = 0;\n }\n hiLevel |= newLevel;\n }\n if (hasUBAT_S) {\n for (i = 0; i < len; i++) {\n if (charTypes[i] == S) {\n levels[i] = dir;\n for (var j = i - 1; j >= 0; j--) {\n if (charTypes[j] == WS) {\n levels[j] = dir;\n }\n else {\n break;\n }\n }\n }\n }\n }\n}\nfunction _invertLevel(lev, levels, _array) {\n if (hiLevel < lev) {\n return;\n }\n if (lev == 1 && dir == RTL && !hasUBAT_B) {\n _array.reverse();\n return;\n }\n var len = _array.length, start = 0, end, lo, hi, tmp;\n while (start < len) {\n if (levels[start] >= lev) {\n end = start + 1;\n while (end < len && levels[end] >= lev) {\n end++;\n }\n for (lo = start, hi = end - 1; lo < hi; lo++, hi--) {\n tmp = _array[lo];\n _array[lo] = _array[hi];\n _array[hi] = tmp;\n }\n start = end;\n }\n start++;\n }\n}\nfunction _getCharClass(chars, types, classes, ix) {\n var cType = types[ix], wType, nType, len, i;\n switch (cType) {\n case L:\n case R:\n lastArabic = false;\n case ON:\n case AN:\n return cType;\n case EN:\n return lastArabic ? AN : EN;\n case AL:\n lastArabic = true;\n hasUBAT_AL = true;\n return R;\n case WS:\n return ON;\n case CS:\n if (ix < 1 || (ix + 1) >= types.length ||\n ((wType = classes[ix - 1]) != EN && wType != AN) ||\n ((nType = types[ix + 1]) != EN && nType != AN)) {\n return ON;\n }\n if (lastArabic) {\n nType = AN;\n }\n return nType == wType ? nType : ON;\n case ES:\n wType = ix > 0 ? classes[ix - 1] : B;\n if (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN) {\n return EN;\n }\n return ON;\n case ET:\n if (ix > 0 && classes[ix - 1] == EN) {\n return EN;\n }\n if (lastArabic) {\n return ON;\n }\n i = ix + 1;\n len = types.length;\n while (i < len && types[i] == ET) {\n i++;\n }\n if (i < len && types[i] == EN) {\n return EN;\n }\n return ON;\n case NSM:\n len = types.length;\n i = ix + 1;\n while (i < len && types[i] == NSM) {\n i++;\n }\n if (i < len) {\n var c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E;\n wType = types[i];\n if (rtlCandidate && (wType == R || wType == AL)) {\n return R;\n }\n }\n if (ix < 1 || (wType = types[ix - 1]) == B) {\n return ON;\n }\n return classes[ix - 1];\n case B:\n lastArabic = false;\n hasUBAT_B = true;\n return dir;\n case S:\n hasUBAT_S = true;\n return ON;\n case LRE:\n case RLE:\n case LRO:\n case RLO:\n case PDF:\n lastArabic = false;\n case BN:\n return ON;\n }\n}\nfunction _getCharacterType(ch) {\n var uc = ch.charCodeAt(0), hi = uc >> 8;\n if (hi == 0) {\n return ((uc > 0x00BF) ? L : UnicodeTBL00[uc]);\n }\n else if (hi == 5) {\n return (/[\\u0591-\\u05f4]/.test(ch) ? R : L);\n }\n else if (hi == 6) {\n if (/[\\u0610-\\u061a\\u064b-\\u065f\\u06d6-\\u06e4\\u06e7-\\u06ed]/.test(ch))\n return NSM;\n else if (/[\\u0660-\\u0669\\u066b-\\u066c]/.test(ch))\n return AN;\n else if (uc == 0x066A)\n return ET;\n else if (/[\\u06f0-\\u06f9]/.test(ch))\n return EN;\n else\n return AL;\n }\n else if (hi == 0x20 && uc <= 0x205F) {\n return UnicodeTBL20[uc & 0xFF];\n }\n else if (hi == 0xFE) {\n return (uc >= 0xFE70 ? AL : ON);\n }\n return ON;\n}\nfunction _isArabicDiacritics(ch) {\n return (ch >= '\\u064b' && ch <= '\\u0655');\n}\nexports.L = L;\nexports.R = R;\nexports.EN = EN;\nexports.ON_R = 3;\nexports.AN = 4;\nexports.R_H = 5;\nexports.B = 6;\nexports.RLE = 7;\nexports.DOT = \"\\xB7\";\nexports.doBidiReorder = function (text, textCharTypes, isRtl) {\n if (text.length < 2)\n return {};\n var chars = text.split(\"\"), logicalFromVisual = new Array(chars.length), bidiLevels = new Array(chars.length), levels = [];\n dir = isRtl ? RTL : LTR;\n _computeLevels(chars, levels, chars.length, textCharTypes);\n for (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++)\n ;\n _invertLevel(2, levels, logicalFromVisual);\n _invertLevel(1, levels, logicalFromVisual);\n for (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width\n if (textCharTypes[i] === AN) {\n levels[i] = exports.AN;\n }\n else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE)\n || textCharTypes[i] === ON || textCharTypes[i] === BN)) {\n levels[i] = exports.ON_R;\n }\n else if ((i > 0 && chars[i - 1] === '\\u0644') && /\\u0622|\\u0623|\\u0625|\\u0627/.test(chars[i])) {\n levels[i - 1] = levels[i] = exports.R_H;\n i++;\n }\n }\n if (chars[chars.length - 1] === exports.DOT)\n levels[chars.length - 1] = exports.B;\n if (chars[0] === '\\u202B')\n levels[0] = exports.RLE;\n for (var i = 0; i < logicalFromVisual.length; i++) {\n bidiLevels[i] = levels[logicalFromVisual[i]];\n }\n return { 'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels };\n};\nexports.hasBidiCharacters = function (text, textCharTypes) {\n var ret = false;\n for (var i = 0; i < text.length; i++) {\n textCharTypes[i] = _getCharacterType(text.charAt(i));\n if (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL || textCharTypes[i] == AN))\n ret = true;\n }\n return ret;\n};\nexports.getVisualFromLogicalIdx = function (logIdx, rowMap) {\n for (var i = 0; i < rowMap.logicalFromVisual.length; i++) {\n if (rowMap.logicalFromVisual[i] == logIdx)\n return i;\n }\n return 0;\n};\n\n});\n\nace.define(\"ace/bidihandler\",[\"require\",\"exports\",\"module\",\"ace/lib/bidiutil\",\"ace/lib/lang\"], function(require, exports, module){\"use strict\";\nvar bidiUtil = require(\"./lib/bidiutil\");\nvar lang = require(\"./lib/lang\");\nvar bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac\\u202B]/;\nvar BidiHandler = /** @class */ (function () {\n function BidiHandler(session) {\n this.session = session;\n this.bidiMap = {};\n this.currentRow = null;\n this.bidiUtil = bidiUtil;\n this.charWidths = [];\n this.EOL = \"\\xAC\";\n this.showInvisibles = true;\n this.isRtlDir = false;\n this.$isRtl = false;\n this.line = \"\";\n this.wrapIndent = 0;\n this.EOF = \"\\xB6\";\n this.RLE = \"\\u202B\";\n this.contentWidth = 0;\n this.fontMetrics = null;\n this.rtlLineOffset = 0;\n this.wrapOffset = 0;\n this.isMoveLeftOperation = false;\n this.seenBidi = bidiRE.test(session.getValue());\n }\n BidiHandler.prototype.isBidiRow = function (screenRow, docRow, splitIndex) {\n if (!this.seenBidi)\n return false;\n if (screenRow !== this.currentRow) {\n this.currentRow = screenRow;\n this.updateRowLine(docRow, splitIndex);\n this.updateBidiMap();\n }\n return this.bidiMap.bidiLevels;\n };\n BidiHandler.prototype.onChange = function (delta) {\n if (!this.seenBidi) {\n if (delta.action == \"insert\" && bidiRE.test(delta.lines.join(\"\\n\"))) {\n this.seenBidi = true;\n this.currentRow = null;\n }\n }\n else {\n this.currentRow = null;\n }\n };\n BidiHandler.prototype.getDocumentRow = function () {\n var docRow = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n if (index >= 0)\n docRow = this.session.$docRowCache[index];\n }\n return docRow;\n };\n BidiHandler.prototype.getSplitIndex = function () {\n var splitIndex = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n while (this.currentRow - splitIndex > 0) {\n currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);\n if (currentIndex !== prevIndex)\n break;\n prevIndex = currentIndex;\n splitIndex++;\n }\n }\n else {\n splitIndex = this.currentRow;\n }\n return splitIndex;\n };\n BidiHandler.prototype.updateRowLine = function (docRow, splitIndex) {\n if (docRow === undefined)\n docRow = this.getDocumentRow();\n var isLastRow = (docRow === this.session.getLength() - 1), endOfLine = isLastRow ? this.EOF : this.EOL;\n this.wrapIndent = 0;\n this.line = this.session.getLine(docRow);\n this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE;\n if (this.session.$useWrapMode) {\n var splits = this.session.$wrapData[docRow];\n if (splits) {\n if (splitIndex === undefined)\n splitIndex = this.getSplitIndex();\n if (splitIndex > 0 && splits.length) {\n this.wrapIndent = splits.indent;\n this.wrapOffset = this.wrapIndent * this.charWidths[bidiUtil.L];\n this.line = (splitIndex < splits.length) ?\n this.line.substring(splits[splitIndex - 1], splits[splitIndex]) :\n this.line.substring(splits[splits.length - 1]);\n }\n else {\n this.line = this.line.substring(0, splits[splitIndex]);\n }\n if (splitIndex == splits.length) {\n this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT;\n }\n }\n }\n else {\n this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT;\n }\n var session = this.session, shift = 0, size;\n this.line = this.line.replace(/\\t|[\\u1100-\\u2029, \\u202F-\\uFFE6]/g, function (ch, i) {\n if (ch === '\\t' || session.isFullWidth(ch.charCodeAt(0))) {\n size = (ch === '\\t') ? session.getScreenTabSize(i + shift) : 2;\n shift += size - 1;\n return lang.stringRepeat(bidiUtil.DOT, size);\n }\n return ch;\n });\n if (this.isRtlDir) {\n this.fontMetrics.$main.textContent = (this.line.charAt(this.line.length - 1) == bidiUtil.DOT) ? this.line.substr(0, this.line.length - 1) : this.line;\n this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width;\n }\n };\n BidiHandler.prototype.updateBidiMap = function () {\n var textCharTypes = [];\n if (bidiUtil.hasBidiCharacters(this.line, textCharTypes) || this.isRtlDir) {\n this.bidiMap = bidiUtil.doBidiReorder(this.line, textCharTypes, this.isRtlDir);\n }\n else {\n this.bidiMap = {};\n }\n };\n BidiHandler.prototype.markAsDirty = function () {\n this.currentRow = null;\n };\n BidiHandler.prototype.updateCharacterWidths = function (fontMetrics) {\n if (this.characterWidth === fontMetrics.$characterSize.width)\n return;\n this.fontMetrics = fontMetrics;\n var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;\n var bidiCharWidth = fontMetrics.$measureCharWidth(\"\\u05d4\");\n this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;\n this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;\n this.charWidths[bidiUtil.R_H] = bidiCharWidth * 0.45;\n this.charWidths[bidiUtil.B] = this.charWidths[bidiUtil.RLE] = 0;\n this.currentRow = null;\n };\n BidiHandler.prototype.setShowInvisibles = function (showInvisibles) {\n this.showInvisibles = showInvisibles;\n this.currentRow = null;\n };\n BidiHandler.prototype.setEolChar = function (eolChar) {\n this.EOL = eolChar;\n };\n BidiHandler.prototype.setContentWidth = function (width) {\n this.contentWidth = width;\n };\n BidiHandler.prototype.isRtlLine = function (row) {\n if (this.$isRtl)\n return true;\n if (row != undefined)\n return (this.session.getLine(row).charAt(0) == this.RLE);\n else\n return this.isRtlDir;\n };\n BidiHandler.prototype.setRtlDirection = function (editor, isRtlDir) {\n var cursor = editor.getCursorPosition();\n for (var row = editor.selection.getSelectionAnchor().row; row <= cursor.row; row++) {\n if (!isRtlDir && editor.session.getLine(row).charAt(0) === editor.session.$bidiHandler.RLE)\n editor.session.doc.removeInLine(row, 0, 1);\n else if (isRtlDir && editor.session.getLine(row).charAt(0) !== editor.session.$bidiHandler.RLE)\n editor.session.doc.insert({ column: 0, row: row }, editor.session.$bidiHandler.RLE);\n }\n };\n BidiHandler.prototype.getPosLeft = function (col) {\n col -= this.wrapIndent;\n var leftBoundary = (this.line.charAt(0) === this.RLE) ? 1 : 0;\n var logicalIdx = (col > leftBoundary) ? (this.session.getOverwrite() ? col : col - 1) : leftBoundary;\n var visualIdx = bidiUtil.getVisualFromLogicalIdx(logicalIdx, this.bidiMap), levels = this.bidiMap.bidiLevels, left = 0;\n if (!this.session.getOverwrite() && col <= leftBoundary && levels[visualIdx] % 2 !== 0)\n visualIdx++;\n for (var i = 0; i < visualIdx; i++) {\n left += this.charWidths[levels[i]];\n }\n if (!this.session.getOverwrite() && (col > leftBoundary) && (levels[visualIdx] % 2 === 0))\n left += this.charWidths[levels[visualIdx]];\n if (this.wrapIndent)\n left += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;\n if (this.isRtlDir)\n left += this.rtlLineOffset;\n return left;\n };\n BidiHandler.prototype.getSelections = function (startCol, endCol) {\n var map = this.bidiMap, levels = map.bidiLevels, level, selections = [], offset = 0, selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent, isSelected = false, isSelectedPrev = false, selectionStart = 0;\n if (this.wrapIndent)\n offset += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;\n for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {\n logIdx = map.logicalFromVisual[visIdx];\n level = levels[visIdx];\n isSelected = (logIdx >= selColMin) && (logIdx < selColMax);\n if (isSelected && !isSelectedPrev) {\n selectionStart = offset;\n }\n else if (!isSelected && isSelectedPrev) {\n selections.push({ left: selectionStart, width: offset - selectionStart });\n }\n offset += this.charWidths[level];\n isSelectedPrev = isSelected;\n }\n if (isSelected && (visIdx === levels.length)) {\n selections.push({ left: selectionStart, width: offset - selectionStart });\n }\n if (this.isRtlDir) {\n for (var i = 0; i < selections.length; i++) {\n selections[i].left += this.rtlLineOffset;\n }\n }\n return selections;\n };\n BidiHandler.prototype.offsetToCol = function (posX) {\n if (this.isRtlDir)\n posX -= this.rtlLineOffset;\n var logicalIdx = 0, posX = Math.max(posX, 0), offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels, charWidth = this.charWidths[levels[visualIdx]];\n if (this.wrapIndent)\n posX -= this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;\n while (posX > offset + charWidth / 2) {\n offset += charWidth;\n if (visualIdx === levels.length - 1) {\n charWidth = 0;\n break;\n }\n charWidth = this.charWidths[levels[++visualIdx]];\n }\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)) {\n if (posX < offset)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)) {\n logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]\n : this.bidiMap.logicalFromVisual[visualIdx - 1]);\n }\n else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))\n || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))) {\n logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];\n }\n else {\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n if (logicalIdx === 0 && this.isRtlDir)\n logicalIdx++;\n return (logicalIdx + this.wrapIndent);\n };\n return BidiHandler;\n}());\nexports.BidiHandler = BidiHandler;\n\n});\n\nace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Range = require(\"./range\").Range;\nvar Selection = /** @class */ (function () {\n function Selection(session) {\n this.session = session;\n this.doc = session.getDocument();\n this.clearSelection();\n this.cursor = this.lead = this.doc.createAnchor(0, 0);\n this.anchor = this.doc.createAnchor(0, 0);\n this.$silent = false;\n var self = this;\n this.cursor.on(\"change\", function (e) {\n self.$cursorChanged = true;\n if (!self.$silent)\n self._emit(\"changeCursor\");\n if (!self.$isEmpty && !self.$silent)\n self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)\n self.$desiredColumn = null;\n });\n this.anchor.on(\"change\", function () {\n self.$anchorChanged = true;\n if (!self.$isEmpty && !self.$silent)\n self._emit(\"changeSelection\");\n });\n }\n Selection.prototype.isEmpty = function () {\n return this.$isEmpty || (this.anchor.row == this.lead.row &&\n this.anchor.column == this.lead.column);\n };\n Selection.prototype.isMultiLine = function () {\n return !this.$isEmpty && this.anchor.row != this.cursor.row;\n };\n Selection.prototype.getCursor = function () {\n return this.lead.getPosition();\n };\n Selection.prototype.setAnchor = function (row, column) {\n this.$isEmpty = false;\n this.anchor.setPosition(row, column);\n };\n Selection.prototype.getAnchor = function () {\n if (this.$isEmpty)\n return this.getSelectionLead();\n return this.anchor.getPosition();\n };\n Selection.prototype.getSelectionLead = function () {\n return this.lead.getPosition();\n };\n Selection.prototype.isBackwards = function () {\n var anchor = this.anchor;\n var lead = this.lead;\n return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));\n };\n Selection.prototype.getRange = function () {\n var anchor = this.anchor;\n var lead = this.lead;\n if (this.$isEmpty)\n return Range.fromPoints(lead, lead);\n return this.isBackwards()\n ? Range.fromPoints(lead, anchor)\n : Range.fromPoints(anchor, lead);\n };\n Selection.prototype.clearSelection = function () {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n this._emit(\"changeSelection\");\n }\n };\n Selection.prototype.selectAll = function () {\n this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE);\n };\n Selection.prototype.setRange = function (range, reverse) {\n var start = reverse ? range.end : range.start;\n var end = reverse ? range.start : range.end;\n this.$setSelection(start.row, start.column, end.row, end.column);\n };\n Selection.prototype.$setSelection = function (anchorRow, anchorColumn, cursorRow, cursorColumn) {\n if (this.$silent)\n return;\n var wasEmpty = this.$isEmpty;\n var wasMultiselect = this.inMultiSelectMode;\n this.$silent = true;\n this.$cursorChanged = this.$anchorChanged = false;\n this.anchor.setPosition(anchorRow, anchorColumn);\n this.cursor.setPosition(cursorRow, cursorColumn);\n this.$isEmpty = !Range.comparePoints(this.anchor, this.cursor);\n this.$silent = false;\n if (this.$cursorChanged)\n this._emit(\"changeCursor\");\n if (this.$cursorChanged || this.$anchorChanged || wasEmpty != this.$isEmpty || wasMultiselect)\n this._emit(\"changeSelection\");\n };\n Selection.prototype.$moveSelection = function (mover) {\n var lead = this.lead;\n if (this.$isEmpty)\n this.setSelectionAnchor(lead.row, lead.column);\n mover.call(this);\n };\n Selection.prototype.selectTo = function (row, column) {\n this.$moveSelection(function () {\n this.moveCursorTo(row, column);\n });\n };\n Selection.prototype.selectToPosition = function (pos) {\n this.$moveSelection(function () {\n this.moveCursorToPosition(pos);\n });\n };\n Selection.prototype.moveTo = function (row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n Selection.prototype.moveToPosition = function (pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n Selection.prototype.selectUp = function () {\n this.$moveSelection(this.moveCursorUp);\n };\n Selection.prototype.selectDown = function () {\n this.$moveSelection(this.moveCursorDown);\n };\n Selection.prototype.selectRight = function () {\n this.$moveSelection(this.moveCursorRight);\n };\n Selection.prototype.selectLeft = function () {\n this.$moveSelection(this.moveCursorLeft);\n };\n Selection.prototype.selectLineStart = function () {\n this.$moveSelection(this.moveCursorLineStart);\n };\n Selection.prototype.selectLineEnd = function () {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n Selection.prototype.selectFileEnd = function () {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n Selection.prototype.selectFileStart = function () {\n this.$moveSelection(this.moveCursorFileStart);\n };\n Selection.prototype.selectWordRight = function () {\n this.$moveSelection(this.moveCursorWordRight);\n };\n Selection.prototype.selectWordLeft = function () {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n Selection.prototype.getWordRange = function (row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n return this.session.getWordRange(row, column);\n };\n Selection.prototype.selectWord = function () {\n this.setSelectionRange(this.getWordRange());\n };\n Selection.prototype.selectAWord = function () {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n Selection.prototype.getLineRange = function (row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n var foldLine = this.session.getFoldLine(rowStart);\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n }\n else {\n rowEnd = rowStart;\n }\n if (excludeLastChar === true)\n return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);\n else\n return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n Selection.prototype.selectLine = function () {\n this.setSelectionRange(this.getLineRange());\n };\n Selection.prototype.moveCursorUp = function () {\n this.moveCursorBy(-1, 0);\n };\n Selection.prototype.moveCursorDown = function () {\n this.moveCursorBy(1, 0);\n };\n Selection.prototype.wouldMoveIntoSoftTab = function (cursor, tabSize, direction) {\n var start = cursor.column;\n var end = cursor.column + tabSize;\n if (direction < 0) {\n start = cursor.column - tabSize;\n end = cursor.column;\n }\n return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(\" \").length - 1 == tabSize;\n };\n Selection.prototype.moveCursorLeft = function () {\n var cursor = this.lead.getPosition(), fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n }\n else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, -tabSize);\n }\n else {\n this.moveCursorBy(0, -1);\n }\n }\n };\n Selection.prototype.moveCursorRight = function () {\n var cursor = this.lead.getPosition(), fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n }\n else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, tabSize);\n }\n else {\n this.moveCursorBy(0, 1);\n }\n }\n };\n Selection.prototype.moveCursorLineStart = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(row, null, firstColumnPosition.row, firstColumnPosition.column);\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)\n firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n Selection.prototype.moveCursorLineEnd = function () {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0)\n lineEnd.column = textEnd;\n }\n }\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n Selection.prototype.moveCursorFileEnd = function () {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n Selection.prototype.moveCursorFileStart = function () {\n this.moveCursorTo(0, 0);\n };\n Selection.prototype.moveCursorLongWordRight = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n if (this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1)\n this.moveCursorWordRight();\n return;\n }\n if (this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n this.moveCursorTo(row, column);\n };\n Selection.prototype.moveCursorLongWordLeft = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n var str = this.session.getFoldStringAt(row, column, -1);\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n var leftOfCursor = lang.stringReverse(str);\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n if (this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0)\n this.moveCursorWordLeft();\n return;\n }\n if (this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n this.moveCursorTo(row, column);\n };\n Selection.prototype.$shortWordEndIndex = function (rightOfCursor) {\n var index = 0, ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n tokenRe.lastIndex = 0;\n if (this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n }\n else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index++;\n if (index < 1) {\n tokenRe.lastIndex = 0;\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index++;\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n }\n else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index++;\n if (index > 2)\n break;\n }\n }\n }\n }\n }\n tokenRe.lastIndex = 0;\n return index;\n };\n Selection.prototype.moveCursorShortWordRight = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold)\n return this.moveCursorTo(fold.end.row, fold.end.column);\n if (column == line.length) {\n var l = this.doc.getLength();\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n if (!/^\\s+/.test(rightOfCursor))\n rightOfCursor = \"\";\n column = 0;\n }\n var index = this.$shortWordEndIndex(rightOfCursor);\n this.moveCursorTo(row, column + index);\n };\n Selection.prototype.moveCursorShortWordLeft = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1))\n return this.moveCursorTo(fold.start.row, fold.start.column);\n var line = this.session.getLine(row).substring(0, column);\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n column = line.length;\n if (!/\\s+$/.test(line))\n line = \"\";\n }\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n return this.moveCursorTo(row, column - index);\n };\n Selection.prototype.moveCursorWordRight = function () {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordRight();\n else\n this.moveCursorShortWordRight();\n };\n Selection.prototype.moveCursorWordLeft = function () {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordLeft();\n else\n this.moveCursorShortWordLeft();\n };\n Selection.prototype.moveCursorBy = function (rows, chars) {\n var screenPos = this.session.documentToScreenPosition(this.lead.row, this.lead.column);\n var offsetX;\n if (chars === 0) {\n if (rows !== 0) {\n if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {\n offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);\n screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);\n }\n else {\n offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];\n }\n }\n if (this.$desiredColumn)\n screenPos.column = this.$desiredColumn;\n else\n this.$desiredColumn = screenPos.column;\n }\n if (rows != 0 && this.session.lineWidgets && this.session.lineWidgets[this.lead.row]) {\n var widget = this.session.lineWidgets[this.lead.row];\n if (rows < 0)\n rows -= widget.rowsAbove || 0;\n else if (rows > 0)\n rows += widget.rowCount - (widget.rowsAbove || 0);\n }\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);\n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n }\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n Selection.prototype.moveCursorToPosition = function (position) {\n this.moveCursorTo(position.row, position.column);\n };\n Selection.prototype.moveCursorTo = function (row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n this.$keepDesiredColumnOnChange = true;\n var line = this.session.getLine(row);\n if (/[\\uDC00-\\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) {\n if (this.lead.row == row && this.lead.column == column + 1)\n column = column - 1;\n else\n column = column + 1;\n }\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n if (!keepDesiredColumn)\n this.$desiredColumn = null;\n };\n Selection.prototype.moveCursorToScreen = function (row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n Selection.prototype.detach = function () {\n this.lead.detach();\n this.anchor.detach();\n };\n Selection.prototype.fromOrientedRange = function (range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n Selection.prototype.toOrientedRange = function (range) {\n var r = this.getRange();\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n }\n else {\n range = r;\n }\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n Selection.prototype.getRangeOfMovements = function (func) {\n var start = this.getCursor();\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start, end);\n }\n catch (e) {\n return Range.fromPoints(start, start);\n }\n finally {\n this.moveCursorToPosition(start);\n }\n };\n Selection.prototype.toJSON = function () {\n if (this.rangeCount) { var data = this.ranges.map(function (r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n }\n else { var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n return data;\n };\n Selection.prototype.fromJSON = function (data) {\n if (data.start == undefined) {\n if (this.rangeList && data.length > 1) {\n this.toSingleRange(data[0]);\n for (var i = data.length; i--;) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards)\n r.cursor = r.start;\n this.addRange(r, true);\n }\n return;\n }\n else {\n data = data[0];\n }\n }\n if (this.rangeList)\n this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n Selection.prototype.isEqual = function (data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount)\n return false;\n if (!data.length || !this.ranges)\n return this.getRange().isEqual(data);\n for (var i = this.ranges.length; i--;) {\n if (!this.ranges[i].isEqual(data[i]))\n return false;\n }\n return true;\n };\n return Selection;\n}());\nSelection.prototype.setSelectionAnchor = Selection.prototype.setAnchor;\nSelection.prototype.getSelectionAnchor = Selection.prototype.getAnchor;\nSelection.prototype.setSelectionRange = Selection.prototype.setRange;\noop.implement(Selection.prototype, EventEmitter);\nexports.Selection = Selection;\n\n});\n\nace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/report_error\"], function(require, exports, module){\"use strict\";\nvar reportError = require(\"./lib/report_error\").reportError;\nvar MAX_TOKEN_COUNT = 2000;\nvar Tokenizer = /** @class */ (function () {\n function Tokenizer(rules) {\n this.splitRegex;\n this.states = rules;\n this.regExps = {};\n this.matchMappings = {};\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = { defaultToken: \"text\" };\n var flag = \"g\";\n var splitterRurles = [];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken)\n mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive && flag.indexOf(\"i\") === -1)\n flag += \"i\";\n if (rule.unicode && flag.indexOf(\"u\") === -1)\n flag += \"u\";\n if (rule.regex == null)\n continue;\n if (rule.regex instanceof RegExp)\n rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n }\n else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", {\n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n }\n else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n }\n else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1)\n rule.onMatch = this.$applyToken;\n else\n rule.onMatch = rule.token;\n }\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function (match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n }\n else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n if (!rule.splitRegex && typeof rule.token != \"string\")\n splitterRurles.push(rule); // flag will be known only at the very end\n }\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch)\n rule.onMatch = null;\n }\n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n splitterRurles.forEach(function (rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n }\n Tokenizer.prototype.$setMaxTokenCount = function (m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n Tokenizer.prototype.$applyToken = function (str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\")\n return [{ type: types, value: str }];\n var tokens = [];\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n return tokens;\n };\n Tokenizer.prototype.$arrayTokens = function (str) {\n if (!str)\n return [];\n var values = this.splitRegex.exec(str);\n if (!values)\n return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n return tokens;\n };\n Tokenizer.prototype.removeCapturingGroups = function (src) {\n var r = src.replace(/\\\\.|\\[(?:\\\\.|[^\\\\\\]])*|\\(\\?[:=!<]|(\\()/g, function (x, y) { return y ? \"(?:\" : x; });\n return r;\n };\n Tokenizer.prototype.createSplitterRegexp = function (src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function (m, esc, parenOpen, parenClose, square, index) {\n if (inChClass) {\n inChClass = square != \"]\";\n }\n else if (square) {\n inChClass = true;\n }\n else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index + 1;\n lastCapture.stack = -1;\n }\n stack--;\n }\n else if (parenOpen) {\n stack++;\n if (parenOpen.length != 1) {\n lastCapture.stack = stack;\n lastCapture.start = index;\n }\n }\n return m;\n });\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end)))\n src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n if (src.charAt(0) != \"^\")\n src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\")\n src += \"$\";\n return new RegExp(src, (flag || \"\").replace(\"g\", \"\"));\n };\n Tokenizer.prototype.getLineTokens = function (line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n if (startState === \"#tmp\") {\n stack.shift();\n startState = stack.shift();\n }\n }\n else\n var stack = [];\n var currentState = /**@type{string}*/ (startState) || \"start\";\n var state = this.states[currentState];\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n var match, tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n var token = { type: null, value: \"\" };\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n if (token.type == type) {\n token.value += skipped;\n }\n else {\n if (token.type)\n tokens.push(token);\n token = { type: type, value: skipped };\n }\n }\n for (var i = 0; i < match.length - 2; i++) {\n if (match[i + 1] === undefined)\n continue;\n rule = state[mapping[i]];\n if (rule.onMatch)\n type = rule.onMatch(value, currentState, stack, line);\n else\n type = rule.token;\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n }\n else {\n currentState = rule.next(currentState, stack);\n }\n state = this.states[currentState];\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n if (rule.consumeLineEnd)\n lastIndex = index;\n break;\n }\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n }\n else {\n if (token.type)\n tokens.push(token);\n token = { type: type, value: value };\n }\n }\n else if (type) {\n if (token.type)\n tokens.push(token);\n token = { type: null, value: \"\" };\n for (var i = 0; i < type.length; i++)\n tokens.push(type[i]);\n }\n }\n if (lastIndex == line.length)\n break;\n lastIndex = index;\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n while (lastIndex < line.length) {\n if (token.type)\n tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 500),\n type: \"overflow\"\n };\n }\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n if (token.type)\n tokens.push(token);\n if (stack.length > 1) {\n if (stack[0] !== currentState)\n stack.unshift(\"#tmp\", currentState);\n }\n return {\n tokens: tokens,\n state: stack.length ? stack : currentState\n };\n };\n return Tokenizer;\n}());\nTokenizer.prototype.reportError = reportError;\nexports.Tokenizer = Tokenizer;\n\n});\n\nace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/deep_copy\"], function(require, exports, module){\"use strict\";\nvar deepCopy = require(\"../lib/deep_copy\").deepCopy;\nvar TextHighlightRules;\nTextHighlightRules = function () {\n this.$rules = {\n \"start\": [{\n token: \"empty_line\",\n regex: '^$'\n }, {\n defaultToken: \"text\"\n }]\n };\n};\n(function () {\n this.addRules = function (rules, prefix) {\n if (!prefix) {\n for (var key in rules)\n this.$rules[key] = rules[key];\n return;\n }\n for (var key in rules) {\n var state = rules[key];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0)\n rule.next = prefix + rule.next;\n }\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)\n rule.nextState = prefix + rule.nextState;\n }\n }\n this.$rules[prefix + key] = state;\n }\n };\n this.getRules = function () {\n return this.$rules;\n };\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\"\n ? new HighlightRules().getRules()\n : HighlightRules;\n if (states) {\n for (var i = 0; i < states.length; i++)\n states[i] = prefix + states[i];\n }\n else {\n states = [];\n for (var key in embedRules)\n states.push(prefix + key);\n }\n this.addRules(embedRules, prefix);\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n for (var i = 0; i < states.length; i++)\n addRules.apply(this.$rules[states[i]], deepCopy(escapeRules));\n }\n if (!this.$embeds)\n this.$embeds = [];\n this.$embeds.push(prefix);\n };\n this.getEmbeds = function () {\n return this.$embeds;\n };\n var pushState = function (currentState, stack) {\n if (currentState != \"start\" || stack.length)\n stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n var popState = function (currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n this.normalizeRules = function () {\n var id = 0;\n var rules = this.$rules;\n function processState(key) {\n var state = rules[key];\n state[\"processed\"] = true;\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next)\n rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n var next = rule.next || rule.push;\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\")\n stateName = stateName[0] || \"\";\n if (rules[stateName])\n stateName += id++;\n }\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n }\n else if (next == \"pop\") {\n rule.next = popState;\n }\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push)\n rules[r].push.apply(rules[r], rule.rules[r]);\n }\n else {\n rules[r] = rule.rules[r];\n }\n }\n }\n var includeName = typeof rule == \"string\" ? rule : rule.include;\n if (includeName) {\n if (includeName === \"$self\")\n includeName = \"start\";\n if (Array.isArray(includeName))\n toInsert = includeName.map(function (x) { return rules[x]; });\n else\n toInsert = rules[includeName];\n }\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape)\n args = args.filter(function (x) { return !x.next; });\n state.splice.apply(state, args);\n i--;\n }\n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive);\n delete rule.defaultToken;\n }\n }\n }\n Object.keys(rules).forEach(processState, this);\n };\n this.createKeywordMapper = function (map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n this.$keywordList = [];\n Object.keys(map).forEach(function (className) {\n var a = map[className];\n var list = a.split(splitChar || \"|\");\n for (var i = list.length; i--;) {\n var word = list[i];\n this.$keywordList.push(word);\n if (ignoreCase)\n word = word.toLowerCase();\n keywords[word] = className;\n }\n }, this);\n map = null;\n return ignoreCase\n ? function (value) { return keywords[value.toLowerCase()] || defaultToken; }\n : function (value) { return keywords[value] || defaultToken; };\n };\n this.getKeywords = function () {\n return this.$keywords;\n };\n}).call(TextHighlightRules.prototype);\nexports.TextHighlightRules = TextHighlightRules;\n\n});\n\nace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar Behaviour;\nBehaviour = function () {\n this.$behaviours = {};\n};\n(function () {\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n this.$behaviours[name][action] = callback;\n };\n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n };\n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n };\n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n }\n else {\n var behaviours = mode.getBehaviours(filter);\n }\n this.addBehaviours(behaviours);\n };\n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n }\n else {\n var ret = {};\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n return ret;\n }\n };\n}).call(Behaviour.prototype);\nexports.Behaviour = Behaviour;\n\n});\n\nace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"./range\").Range;\nvar TokenIterator = /** @class */ (function () {\n function TokenIterator(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n }\n TokenIterator.prototype.stepBackward = function () {\n this.$tokenIndex -= 1;\n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n return this.$rowTokens[this.$tokenIndex];\n };\n TokenIterator.prototype.stepForward = function () {\n this.$tokenIndex += 1;\n var rowCount;\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount)\n rowCount = this.$session.getLength();\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n return this.$rowTokens[this.$tokenIndex];\n };\n TokenIterator.prototype.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n };\n TokenIterator.prototype.getCurrentTokenRow = function () {\n return this.$row;\n };\n TokenIterator.prototype.getCurrentTokenColumn = function () {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined)\n return column;\n column = 0;\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n return column;\n };\n TokenIterator.prototype.getCurrentTokenPosition = function () {\n return { row: this.$row, column: this.getCurrentTokenColumn() };\n };\n TokenIterator.prototype.getCurrentTokenRange = function () {\n var token = this.$rowTokens[this.$tokenIndex];\n var column = this.getCurrentTokenColumn();\n return new Range(this.$row, column, this.$row, column + token.value.length);\n };\n return TokenIterator;\n}());\nexports.TokenIterator = TokenIterator;\n\n});\n\nace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Behaviour = require(\"../behaviour\").Behaviour;\nvar TokenIterator = require(\"../../token_iterator\").TokenIterator;\nvar lang = require(\"../../lib/lang\");\nvar SAFE_INSERT_IN_TOKENS = [\"text\", \"paren.rparen\", \"rparen\", \"paren\", \"punctuation.operator\"];\nvar SAFE_INSERT_BEFORE_TOKENS = [\"text\", \"paren.rparen\", \"rparen\", \"paren\", \"punctuation.operator\", \"comment\"];\nvar context;\nvar contextCache = {};\nvar defaultQuotes = { '\"': '\"', \"'\": \"'\" };\nvar initContext = function (editor) {\n var id = -1;\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount)\n contextCache = { rangeCount: editor.multiSelect.rangeCount };\n }\n if (contextCache[id])\n return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n};\nvar getWrapped = function (selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [\n 0,\n selection.start.column + 1,\n rowDiff,\n selection.end.column + (rowDiff ? 0 : 1)\n ]\n };\n};\nvar CstyleBehaviour;\nCstyleBehaviour = function (options) {\n options = options || {};\n this.add(\"braces\", \"insertion\", function (state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n var token = session.getTokenAt(cursor.row, cursor.column);\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n }\n else if (token && /(?:string)\\.quasi|\\.xml/.test(token.type)) {\n var excludeTokens = [\n /tag\\-(?:open|name)/, /attribute\\-name/\n ];\n if (excludeTokens.some(function (el) { return el.test(token.type); }) || /(string)\\.quasi/.test(token.type)\n && token.value[cursor.column - token.start - 1] !== '$')\n return;\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n }\n else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options.braces) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n }\n else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n }\n else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', { column: cursor.column + 1, row: cursor.row });\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({ row: cursor.row, column: cursor.column + 1 }, '}');\n if (!openBracePos)\n return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n }\n else if (closing) {\n var next_indent = this.$getIndent(line);\n }\n else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n var indent = next_indent + session.getTabString();\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n }\n else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n this.add(\"braces\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar == '}') {\n range.end.column++;\n return range;\n }\n else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n this.add(\"parens\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n }\n else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n }\n else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', { column: cursor.column + 1, row: cursor.row });\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n this.add(\"parens\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"brackets\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n }\n else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n }\n else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', { column: cursor.column + 1, row: cursor.row });\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n this.add(\"brackets\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n if (text.length == 1 && quotes[text]) {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)\n return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n }\n else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column - 1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type))\n return null;\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n var pair;\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type))\n pair = false;\n }\n else {\n if (stringBefore && !stringAfter)\n return null; // wrap string with different quote\n if (stringBefore && stringAfter)\n return null; // do not pair quotes inside strings\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(rightChar);\n var pairQuotesAfter = session.$mode.$pairQuotesAfter;\n var shouldPairQuotes = pairQuotesAfter && pairQuotesAfter[quote] && pairQuotesAfter[quote].test(leftChar);\n if ((!shouldPairQuotes && isWordBefore) || isWordAfter)\n return null; // before or after alphanumeric\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar))\n return null; // there is rightChar and it isn't closing\n var charBefore = line[cursor.column - 2];\n if (leftChar == quote && (charBefore == quote || wordRe.test(charBefore)))\n return null;\n pair = true;\n }\n return {\n text: pair ? quote + quote : \"\",\n selection: [1, 1]\n };\n }\n }\n });\n this.add(\"string_dquotes\", \"deletion\", function (state, action, editor, session, range) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && quotes.hasOwnProperty(selected)) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n if (options.closeDocComment !== false) {\n this.add(\"doc comment end\", \"insertion\", function (state, action, editor, session, text) {\n if (state === \"doc-start\" && (text === \"\\n\" || text === \"\\r\\n\") && editor.selection.isEmpty()) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var nextLine = session.doc.getLine(cursor.row + 1);\n var indent = this.$getIndent(line);\n if (/\\s*\\*/.test(nextLine)) {\n if (/^\\s*\\*/.test(line)) {\n return {\n text: text + indent + \"* \",\n selection: [1, 3 + indent.length, 1, 3 + indent.length]\n };\n }\n else {\n return {\n text: text + indent + \" * \",\n selection: [1, 3 + indent.length, 1, 3 + indent.length]\n };\n }\n }\n if (/\\/\\*\\*/.test(line.substring(0, cursor.column))) {\n return {\n text: text + indent + \" * \" + text + \" \" + indent + \"*/\",\n selection: [1, 4 + indent.length, 1, 4 + indent.length]\n };\n }\n }\n });\n }\n};\nCstyleBehaviour.isSaneInsertion = function (editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n if (/[)}\\]]/.test(editor.session.getLine(cursor.row)[cursor.column]))\n return true;\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS))\n return false;\n }\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row ||\n this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n};\nCstyleBehaviour[\"$matchTokenType\"] = function (token, types) {\n return types.indexOf(token.type || token) > -1;\n};\nCstyleBehaviour[\"recordAutoInsert\"] = function (editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this[\"isAutoInsertedClosing\"](cursor, line, context.autoInsertedLineEnd[0]))\n context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n};\nCstyleBehaviour[\"recordMaybeInsert\"] = function (editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this[\"isMaybeInsertedClosing\"](cursor, line))\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n};\nCstyleBehaviour[\"isAutoInsertedClosing\"] = function (cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 &&\n cursor.row === context.autoInsertedRow &&\n bracket === context.autoInsertedLineEnd[0] &&\n line.substr(cursor.column) === context.autoInsertedLineEnd;\n};\nCstyleBehaviour[\"isMaybeInsertedClosing\"] = function (cursor, line) {\n return context.maybeInsertedBrackets > 0 &&\n cursor.row === context.maybeInsertedRow &&\n line.substr(cursor.column) === context.maybeInsertedLineEnd &&\n line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n};\nCstyleBehaviour[\"popAutoInsertedClosing\"] = function () {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n};\nCstyleBehaviour[\"clearMaybeInsertedClosing\"] = function () {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n};\noop.inherits(CstyleBehaviour, Behaviour);\nexports.CstyleBehaviour = CstyleBehaviour;\n\n});\n\nace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar wordChars = [48, 9, 8, 25, 5, 0, 2, 25, 48, 0, 11, 0, 5, 0, 6, 22, 2, 30, 2, 457, 5, 11, 15, 4, 8, 0, 2, 0, 18, 116, 2, 1, 3, 3, 9, 0, 2, 2, 2, 0, 2, 19, 2, 82, 2, 138, 2, 4, 3, 155, 12, 37, 3, 0, 8, 38, 10, 44, 2, 0, 2, 1, 2, 1, 2, 0, 9, 26, 6, 2, 30, 10, 7, 61, 2, 9, 5, 101, 2, 7, 3, 9, 2, 18, 3, 0, 17, 58, 3, 100, 15, 53, 5, 0, 6, 45, 211, 57, 3, 18, 2, 5, 3, 11, 3, 9, 2, 1, 7, 6, 2, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 0, 4, 3, 3, 8, 3, 1, 3, 3, 9, 0, 5, 1, 2, 4, 3, 11, 16, 2, 2, 5, 5, 1, 3, 21, 2, 6, 2, 1, 2, 1, 2, 1, 3, 0, 2, 4, 5, 1, 3, 2, 4, 0, 8, 3, 2, 0, 8, 15, 12, 2, 2, 8, 2, 2, 2, 21, 2, 6, 2, 1, 2, 4, 3, 9, 2, 2, 2, 2, 3, 0, 16, 3, 3, 9, 18, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 3, 8, 3, 1, 3, 2, 9, 1, 5, 1, 2, 4, 3, 9, 2, 0, 17, 1, 2, 5, 4, 2, 2, 3, 4, 1, 2, 0, 2, 1, 4, 1, 4, 2, 4, 11, 5, 4, 4, 2, 2, 3, 3, 0, 7, 0, 15, 9, 18, 2, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 4, 7, 2, 2, 2, 3, 8, 1, 2, 1, 7, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 3, 8, 2, 2, 2, 3, 8, 1, 8, 0, 2, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 15, 4, 7, 2, 2, 2, 3, 10, 0, 9, 3, 3, 9, 11, 5, 3, 1, 2, 17, 4, 23, 2, 8, 2, 0, 3, 6, 4, 0, 5, 5, 2, 0, 2, 7, 19, 1, 14, 57, 6, 14, 2, 9, 40, 1, 2, 0, 3, 1, 2, 0, 3, 0, 7, 3, 2, 6, 2, 2, 2, 0, 2, 0, 3, 1, 2, 12, 2, 2, 3, 4, 2, 0, 2, 5, 3, 9, 3, 1, 35, 0, 24, 1, 7, 9, 12, 0, 2, 0, 2, 0, 5, 9, 2, 35, 5, 19, 2, 5, 5, 7, 2, 35, 10, 0, 58, 73, 7, 77, 3, 37, 11, 42, 2, 0, 4, 328, 2, 3, 3, 6, 2, 0, 2, 3, 3, 40, 2, 3, 3, 32, 2, 3, 3, 6, 2, 0, 2, 3, 3, 14, 2, 56, 2, 3, 3, 66, 5, 0, 33, 15, 17, 84, 13, 619, 3, 16, 2, 25, 6, 74, 22, 12, 2, 6, 12, 20, 12, 19, 13, 12, 2, 2, 2, 1, 13, 51, 3, 29, 4, 0, 5, 1, 3, 9, 34, 2, 3, 9, 7, 87, 9, 42, 6, 69, 11, 28, 4, 11, 5, 11, 11, 39, 3, 4, 12, 43, 5, 25, 7, 10, 38, 27, 5, 62, 2, 28, 3, 10, 7, 9, 14, 0, 89, 75, 5, 9, 18, 8, 13, 42, 4, 11, 71, 55, 9, 9, 4, 48, 83, 2, 2, 30, 14, 230, 23, 280, 3, 5, 3, 37, 3, 5, 3, 7, 2, 0, 2, 0, 2, 0, 2, 30, 3, 52, 2, 6, 2, 0, 4, 2, 2, 6, 4, 3, 3, 5, 5, 12, 6, 2, 2, 6, 67, 1, 20, 0, 29, 0, 14, 0, 17, 4, 60, 12, 5, 0, 4, 11, 18, 0, 5, 0, 3, 9, 2, 0, 4, 4, 7, 0, 2, 0, 2, 0, 2, 3, 2, 10, 3, 3, 6, 4, 5, 0, 53, 1, 2684, 46, 2, 46, 2, 132, 7, 6, 15, 37, 11, 53, 10, 0, 17, 22, 10, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 31, 48, 0, 470, 1, 36, 5, 2, 4, 6, 1, 5, 85, 3, 1, 3, 2, 2, 89, 2, 3, 6, 40, 4, 93, 18, 23, 57, 15, 513, 6581, 75, 20939, 53, 1164, 68, 45, 3, 268, 4, 27, 21, 31, 3, 13, 13, 1, 2, 24, 9, 69, 11, 1, 38, 8, 3, 102, 3, 1, 111, 44, 25, 51, 13, 68, 12, 9, 7, 23, 4, 0, 5, 45, 3, 35, 13, 28, 4, 64, 15, 10, 39, 54, 10, 13, 3, 9, 7, 22, 4, 1, 5, 66, 25, 2, 227, 42, 2, 1, 3, 9, 7, 11171, 13, 22, 5, 48, 8453, 301, 3, 61, 3, 105, 39, 6, 13, 4, 6, 11, 2, 12, 2, 4, 2, 0, 2, 1, 2, 1, 2, 107, 34, 362, 19, 63, 3, 53, 41, 11, 5, 15, 17, 6, 13, 1, 25, 2, 33, 4, 2, 134, 20, 9, 8, 25, 5, 0, 2, 25, 12, 88, 4, 5, 3, 5, 3, 5, 3, 2];\nvar code = 0;\nvar str = [];\nfor (var i = 0; i < wordChars.length; i += 2) {\n str.push(code += wordChars[i]);\n if (wordChars[i + 1])\n str.push(45, code += wordChars[i + 1]);\n}\nexports.wordChars = String.fromCharCode.apply(null, str);\n\n});\n\nace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/config\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour/cstyle\",\"ace/unicode\",\"ace/lib/lang\",\"ace/token_iterator\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar config = require(\"../config\");\nvar Tokenizer = require(\"../tokenizer\").Tokenizer;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar CstyleBehaviour = require(\"./behaviour/cstyle\").CstyleBehaviour;\nvar unicode = require(\"../unicode\");\nvar lang = require(\"../lib/lang\");\nvar TokenIterator = require(\"../token_iterator\").TokenIterator;\nvar Range = require(\"../range\").Range;\nvar Mode;\nMode = function () {\n this.HighlightRules = TextHighlightRules;\n};\n(function () {\n this.$defaultBehaviour = new CstyleBehaviour();\n this.tokenRe = new RegExp(\"^[\" + unicode.wordChars + \"\\\\$_]+\", \"g\");\n this.nonTokenRe = new RegExp(\"^(?:[^\" + unicode.wordChars + \"\\\\$_]|\\\\s])+\", \"g\");\n this.getTokenizer = function () {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n return this.$tokenizer;\n };\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n this.toggleCommentLines = function (state, session, startRow, endRow) {\n var doc = session.doc;\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n if (!this.lineCommentStart) {\n if (!this.blockComment)\n return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n var comment = function (line, i) {\n if (testRemove(line, i))\n return;\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({ row: i, column: line.length }, lineCommentEnd);\n doc.insertInLine({ row: i, column: minIndent }, lineCommentStart);\n }\n };\n var uncomment = function (line, i) {\n var m;\n if (m = line.match(regexpEnd))\n doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart))\n doc.removeInLine(i, m[1].length, m[0].length);\n };\n var testRemove = function (line, row) {\n if (regexpStart.test(line))\n return true;\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\")\n return true;\n }\n };\n }\n else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n }\n else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n insertAtTabStop = session.getUseSoftTabs();\n var uncomment = function (line, i) {\n var m = line.match(regexpStart);\n if (!m)\n return;\n var start = m[1].length, end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \")\n end--;\n doc.removeInLine(i, start, end);\n };\n var commentWithSpace = lineCommentStart + \" \";\n var comment = function (line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent))\n doc.insertInLine({ row: i, column: minIndent }, commentWithSpace);\n else\n doc.insertInLine({ row: i, column: minIndent }, lineCommentStart);\n }\n };\n var testRemove = function (line, i) {\n return regexpStart.test(line);\n };\n var shouldInsertSpace = function (line, before, after) {\n var spaces = 0;\n while (before-- && line.charAt(before) == \" \")\n spaces++;\n if (spaces % tabSize != 0)\n return false;\n var spaces = 0;\n while (line.charAt(after++) == \" \")\n spaces++;\n if (tabSize > 2)\n return spaces % tabSize != tabSize - 1;\n else\n return spaces % tabSize == 0;\n };\n }\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++)\n fun(doc.getLine(i), i);\n }\n var minEmptyLength = Infinity;\n iter(function (line, i) {\n var indent = line.search(/\\S/);\n if (indent !== -1) {\n if (indent < minIndent)\n minIndent = indent;\n if (shouldRemove && !testRemove(line, i))\n shouldRemove = false;\n }\n else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n if (insertAtTabStop && minIndent % tabSize != 0)\n minIndent = Math.floor(minIndent / tabSize) * tabSize;\n iter(shouldRemove ? uncomment : comment);\n };\n this.toggleBlockComment = function (state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment)\n return;\n if (!comment.start && comment[0])\n comment = comment[0];\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n token = iterator.stepBackward();\n }\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n token = iterator.stepForward();\n }\n if (endRange)\n session.remove(endRange);\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n }\n else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n if (initialRange.start.row == startRow)\n initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow)\n initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n this.getNextLineIndent = function (state, line, tab) {\n return this.$getIndent(line);\n };\n this.checkOutdent = function (state, line, input) {\n return false;\n };\n this.autoOutdent = function (state, doc, row) {\n };\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n this.createWorker = function (session) {\n return null;\n };\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n for (var i in mapping) {\n if (mapping[i]) {\n var Mode = mapping[i];\n var id = Mode.prototype.$id;\n var mode = config.$modes[id];\n if (!mode)\n config.$modes[id] = mode = new Mode();\n if (!config.$modes[i])\n config.$modes[i] = mode;\n this.$embeds.push(i);\n this.$modes[i] = mode;\n }\n }\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\",\n \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n var _loop_1 = function (i) {\n (function (scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n scope[delegations[i]] =\n function () {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n }(this_1));\n };\n var this_1 = this;\n for (var i = 0; i < delegations.length; i++) {\n _loop_1(i);\n }\n };\n this.$delegator = function (method, args, defaultHandler) {\n var state = args[0] || \"start\";\n if (typeof state != \"string\") {\n if (Array.isArray(state[2])) {\n var language = state[2][state[2].length - 1];\n var mode = this.$modes[language];\n if (mode)\n return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1)));\n }\n state = state[0] || \"start\";\n }\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]])\n continue;\n var split = state.split(this.$embeds[i]);\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n this.transformAction = function (state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n this.getKeywords = function (append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer[\"rules\"];\n var completionKeywords = [];\n for (var rule in rules) {\n var ruleItr = rules[rule];\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token))\n completionKeywords.push(ruleItr[r].regex);\n }\n else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {\n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n this.completionKeywords = completionKeywords;\n }\n if (!append)\n return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n this.$createKeywordList = function () {\n if (!this.$highlightRules)\n this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n this.getCompletions = function (state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function (word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n this.$id = \"ace/mode/text\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n});\n\nace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nfunction throwDeltaError(delta, errorText) {\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n}\nfunction positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length &&\n position.column >= 0 && position.column <= docLines[position.row].length;\n}\nfunction validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\")\n throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array))\n throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end)\n throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start))\n throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end))\n throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)\n throwDeltaError(delta, \"delta.range must match delta lines\");\n}\nexports.applyDelta = function (docLines, delta, doNotValidate) {\n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n }\n else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n break;\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n }\n else {\n docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn));\n }\n break;\n }\n};\n\n});\n\nace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Anchor = /** @class */ (function () {\n function Anchor(doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n if (typeof row != \"number\")\n this.setPosition(row.row, row.column);\n else\n this.setPosition(row, column);\n }\n Anchor.prototype.getPosition = function () {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n Anchor.prototype.getDocument = function () {\n return this.document;\n };\n Anchor.prototype.onChange = function (delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row)\n return;\n if (delta.start.row > this.row)\n return;\n var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n Anchor.prototype.setPosition = function (row, column, noClip) {\n var pos;\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n }\n else {\n pos = this.$clipPositionToDocument(row, column);\n }\n if (this.row == pos.row && this.column == pos.column)\n return;\n var old = {\n row: this.row,\n column: this.column\n };\n this.row = pos.row;\n this.column = pos.column;\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n Anchor.prototype.detach = function () {\n this.document.off(\"change\", this.$onChange);\n };\n Anchor.prototype.attach = function (doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n Anchor.prototype.$clipPositionToDocument = function (row, column) {\n var pos = {};\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n }\n else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n }\n else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n if (column < 0)\n pos.column = 0;\n return pos;\n };\n return Anchor;\n}());\nAnchor.prototype.$insertRight = false;\noop.implement(Anchor.prototype, EventEmitter);\nfunction $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);\n}\nfunction $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n}\nexports.Anchor = Anchor;\n\n});\n\nace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar applyDelta = require(\"./apply_delta\").applyDelta;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Range = require(\"./range\").Range;\nvar Anchor = require(\"./anchor\").Anchor;\nvar Document = /** @class */ (function () {\n function Document(textOrLines) {\n this.$lines = [\"\"];\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n }\n else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({ row: 0, column: 0 }, textOrLines);\n }\n else {\n this.insert({ row: 0, column: 0 }, textOrLines);\n }\n }\n Document.prototype.setValue = function (text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({ row: 0, column: 0 }, text || \"\");\n };\n Document.prototype.getValue = function () {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n Document.prototype.createAnchor = function (row, column) {\n return new Anchor(this, row, column);\n };\n Document.prototype.$detectNewLine = function (text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n this._signal(\"changeNewLineMode\");\n };\n Document.prototype.getNewLineCharacter = function () {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n case \"unix\":\n return \"\\n\";\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n Document.prototype.setNewLineMode = function (newLineMode) {\n if (this.$newLineMode === newLineMode)\n return;\n this.$newLineMode = newLineMode;\n this._signal(\"changeNewLineMode\");\n };\n Document.prototype.getNewLineMode = function () {\n return this.$newLineMode;\n };\n Document.prototype.isNewLine = function (text) {\n return (text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\");\n };\n Document.prototype.getLine = function (row) {\n return this.$lines[row] || \"\";\n };\n Document.prototype.getLines = function (firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n Document.prototype.getAllLines = function () {\n return this.getLines(0, this.getLength());\n };\n Document.prototype.getLength = function () {\n return this.$lines.length;\n };\n Document.prototype.getTextRange = function (range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n Document.prototype.getLinesForRange = function (range) {\n var lines;\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n }\n else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l)\n lines[l] = lines[l].substring(0, range.end.column);\n }\n return lines;\n };\n Document.prototype.insertLines = function (row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n Document.prototype.removeLines = function (firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n Document.prototype.insertNewLine = function (position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n Document.prototype.insert = function (position, text) {\n if (this.getLength() <= 1)\n this.$detectNewLine(text);\n return this.insertMergedLines(position, this.$split(text));\n };\n Document.prototype.insertInLine = function (position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n return this.clonePos(end);\n };\n Document.prototype.clippedPos = function (row, column) {\n var length = this.getLength();\n if (row === undefined) {\n row = length;\n }\n else if (row < 0) {\n row = 0;\n }\n else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n var line = this.getLine(row);\n if (column == undefined)\n column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return { row: row, column: column };\n };\n Document.prototype.clonePos = function (pos) {\n return { row: pos.row, column: pos.column };\n };\n Document.prototype.pos = function (row, column) {\n return { row: row, column: column };\n };\n Document.prototype.$clipPosition = function (position) {\n var length = this.getLength();\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n }\n else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n return position;\n };\n Document.prototype.insertFullLines = function (row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n }\n else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n this.insertMergedLines({ row: row, column: column }, lines);\n };\n Document.prototype.insertMergedLines = function (position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n return this.clonePos(end);\n };\n Document.prototype.remove = function (range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({ start: start, end: end })\n });\n return this.clonePos(start);\n };\n Document.prototype.removeInLine = function (row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({ start: start, end: end })\n }, true);\n return this.clonePos(start);\n };\n Document.prototype.removeFullLines = function (firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow);\n var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0);\n var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow);\n var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length);\n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n Document.prototype.removeNewLine = function (row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n Document.prototype.replace = function (range, text) {\n if (!(range instanceof Range))\n range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty())\n return range.start;\n if (text == this.getTextRange(range))\n return range.end;\n this.remove(range);\n var end;\n if (text) {\n end = this.insert(range.start, text);\n }\n else {\n end = range.start;\n }\n return end;\n };\n Document.prototype.applyDeltas = function (deltas) {\n for (var i = 0; i < deltas.length; i++) {\n this.applyDelta(deltas[i]);\n }\n };\n Document.prototype.revertDeltas = function (deltas) {\n for (var i = deltas.length - 1; i >= 0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n Document.prototype.applyDelta = function (delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]\n : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n if (isInsert && delta.lines.length > 20000) {\n this.$splitAndapplyLargeDelta(delta, 20000);\n }\n else {\n applyDelta(this.$lines, delta, doNotValidate);\n this._signal(\"change\", delta);\n }\n };\n Document.prototype.$safeApplyDelta = function (delta) {\n var docLength = this.$lines.length;\n if (delta.action == \"remove\" && delta.start.row < docLength && delta.end.row < docLength\n || delta.action == \"insert\" && delta.start.row <= docLength) {\n this.applyDelta(delta);\n }\n };\n Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {\n var lines = delta.lines;\n var l = lines.length - MAX + 1;\n var row = delta.start.row;\n var column = delta.start.column;\n for (var from = 0, to = 0; from < l; from = to) {\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n }\n delta.lines = lines.slice(from);\n delta.start.row = row + from;\n delta.start.column = column;\n this.applyDelta(delta, true);\n };\n Document.prototype.revertDelta = function (delta) {\n this.$safeApplyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: (delta.action == \"insert\" ? \"remove\" : \"insert\"),\n lines: delta.lines.slice()\n });\n };\n Document.prototype.indexToPosition = function (index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0)\n return { row: i, column: index + lines[i].length + newlineLength };\n }\n return { row: l - 1, column: index + lines[l - 1].length + newlineLength };\n };\n Document.prototype.positionToIndex = function (pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n for (var i = startRow || 0; i < row; ++i)\n index += lines[i].length + newlineLength;\n return index + pos.column;\n };\n Document.prototype.$split = function (text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n return Document;\n}());\nDocument.prototype.$autoNewLine = \"\";\nDocument.prototype.$newLineMode = \"auto\";\noop.implement(Document.prototype, EventEmitter);\nexports.Document = Document;\n\n});\n\nace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar BackgroundTokenizer = /** @class */ (function () {\n function BackgroundTokenizer(tokenizer, session) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n var self = this;\n this.$worker = function () {\n if (!self.running) {\n return;\n }\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n var startLine = currentLine;\n while (self.lines[currentLine])\n currentLine++;\n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n processedLines++;\n if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) {\n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n self.currentLine = currentLine;\n if (endLine == -1)\n endLine = currentLine;\n if (startLine <= endLine)\n self.fireUpdateEvent(startLine, endLine);\n };\n }\n BackgroundTokenizer.prototype.setTokenizer = function (tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n this.start(0);\n };\n BackgroundTokenizer.prototype.setDocument = function (doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n this.stop();\n };\n BackgroundTokenizer.prototype.fireUpdateEvent = function (firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n this._signal(\"update\", { data: data });\n };\n BackgroundTokenizer.prototype.start = function (startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n BackgroundTokenizer.prototype.scheduleStart = function () {\n if (!this.running)\n this.running = setTimeout(this.$worker, 700);\n };\n BackgroundTokenizer.prototype.$updateOnChange = function (delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n if (len === 0) {\n this.lines[startRow] = null;\n }\n else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n }\n else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n this.stop();\n };\n BackgroundTokenizer.prototype.stop = function () {\n if (this.running)\n clearTimeout(this.running);\n this.running = false;\n };\n BackgroundTokenizer.prototype.getTokens = function (row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n BackgroundTokenizer.prototype.getState = function (row) {\n if (this.currentLine == row)\n this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n BackgroundTokenizer.prototype.$tokenizeRow = function (row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n var data = this.tokenizer.getLineTokens(line, state, row);\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1)\n this.currentLine = row + 1;\n }\n else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n return this.lines[row] = data.tokens;\n };\n BackgroundTokenizer.prototype.cleanup = function () {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.removeAllListeners();\n };\n return BackgroundTokenizer;\n}());\noop.implement(BackgroundTokenizer.prototype, EventEmitter);\nexports.BackgroundTokenizer = BackgroundTokenizer;\n\n});\n\nace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar lang = require(\"./lib/lang\");\nvar Range = require(\"./range\").Range;\nvar SearchHighlight = /** @class */ (function () {\n function SearchHighlight(regExp, clazz, type) {\n if (type === void 0) { type = \"text\"; }\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type;\n }\n SearchHighlight.prototype.setRegexp = function (regExp) {\n if (this.regExp + \"\" == regExp + \"\")\n return;\n this.regExp = regExp;\n this.cache = [];\n };\n SearchHighlight.prototype.update = function (html, markerLayer, session, config) {\n if (!this.regExp)\n return;\n var start = config.firstRow, end = config.lastRow;\n var renderedMarkerRanges = {};\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES)\n ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function (match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n for (var j = ranges.length; j--;) {\n var rangeToAddMarkerTo = ranges[j].toScreenRange(session);\n var rangeAsString = rangeToAddMarkerTo.toString();\n if (renderedMarkerRanges[rangeAsString])\n continue;\n renderedMarkerRanges[rangeAsString] = true;\n markerLayer.drawSingleLineMarker(html, rangeToAddMarkerTo, this.clazz, config);\n }\n }\n };\n return SearchHighlight;\n}());\nSearchHighlight.prototype.MAX_RANGES = 500;\nexports.SearchHighlight = SearchHighlight;\n\n});\n\nace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar UndoManager = /** @class */ (function () {\n function UndoManager() {\n this.$keepRedoStack;\n this.$maxRev = 0;\n this.$fromUndo = false;\n this.$undoDepth = Infinity;\n this.reset();\n }\n UndoManager.prototype.addSession = function (session) {\n this.$session = session;\n };\n UndoManager.prototype.add = function (delta, allowMerge, session) {\n if (this.$fromUndo)\n return;\n if (delta == this.$lastDelta)\n return;\n if (!this.$keepRedoStack)\n this.$redoStack.length = 0;\n if (allowMerge === false || !this.lastDeltas) {\n this.lastDeltas = [];\n var undoStackLength = this.$undoStack.length;\n if (undoStackLength > this.$undoDepth - 1) {\n this.$undoStack.splice(0, undoStackLength - this.$undoDepth + 1);\n }\n this.$undoStack.push(this.lastDeltas);\n delta.id = this.$rev = ++this.$maxRev;\n }\n if (delta.action == \"remove\" || delta.action == \"insert\")\n this.$lastDelta = delta;\n this.lastDeltas.push(delta);\n };\n UndoManager.prototype.addSelection = function (selection, rev) {\n this.selections.push({\n value: selection,\n rev: rev || this.$rev\n });\n };\n UndoManager.prototype.startNewGroup = function () {\n this.lastDeltas = null;\n return this.$rev;\n };\n UndoManager.prototype.markIgnored = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n var stack = this.$undoStack;\n for (var i = stack.length; i--;) {\n var delta = stack[i][0];\n if (delta.id <= from)\n break;\n if (delta.id < to)\n delta.ignore = true;\n }\n this.lastDeltas = null;\n };\n UndoManager.prototype.getSelection = function (rev, after) {\n var stack = this.selections;\n for (var i = stack.length; i--;) {\n var selection = stack[i];\n if (selection.rev < rev) {\n if (after)\n selection = stack[i + 1];\n return selection;\n }\n }\n };\n UndoManager.prototype.getRevision = function () {\n return this.$rev;\n };\n UndoManager.prototype.getDeltas = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n var stack = this.$undoStack;\n var end = null, start = 0;\n for (var i = stack.length; i--;) {\n var delta = stack[i][0];\n if (delta.id < to && !end)\n end = i + 1;\n if (delta.id <= from) {\n start = i + 1;\n break;\n }\n }\n return stack.slice(start, end);\n };\n UndoManager.prototype.getChangedRanges = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n };\n UndoManager.prototype.getChangedLines = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n };\n UndoManager.prototype.undo = function (session, dontSelect) {\n this.lastDeltas = null;\n var stack = this.$undoStack;\n if (!rearrangeUndoStack(stack, stack.length))\n return;\n if (!session)\n session = this.$session;\n if (this.$redoStackBaseRev !== this.$rev && this.$redoStack.length)\n this.$redoStack = [];\n this.$fromUndo = true;\n var deltaSet = stack.pop();\n var undoSelectionRange = null;\n if (deltaSet) {\n undoSelectionRange = session.undoChanges(deltaSet, dontSelect);\n this.$redoStack.push(deltaSet);\n this.$syncRev();\n }\n this.$fromUndo = false;\n return undoSelectionRange;\n };\n UndoManager.prototype.redo = function (session, dontSelect) {\n this.lastDeltas = null;\n if (!session)\n session = this.$session;\n this.$fromUndo = true;\n if (this.$redoStackBaseRev != this.$rev) {\n var diff = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1);\n rebaseRedoStack(this.$redoStack, diff);\n this.$redoStackBaseRev = this.$rev;\n this.$redoStack.forEach(function (x) {\n x[0].id = ++this.$maxRev;\n }, this);\n }\n var deltaSet = this.$redoStack.pop();\n var redoSelectionRange = null;\n if (deltaSet) {\n redoSelectionRange = session.redoChanges(deltaSet, dontSelect);\n this.$undoStack.push(deltaSet);\n this.$syncRev();\n }\n this.$fromUndo = false;\n return redoSelectionRange;\n };\n UndoManager.prototype.$syncRev = function () {\n var stack = this.$undoStack;\n var nextDelta = stack[stack.length - 1];\n var id = nextDelta && nextDelta[0].id || 0;\n this.$redoStackBaseRev = id;\n this.$rev = id;\n };\n UndoManager.prototype.reset = function () {\n this.lastDeltas = null;\n this.$lastDelta = null;\n this.$undoStack = [];\n this.$redoStack = [];\n this.$rev = 0;\n this.mark = 0;\n this.$redoStackBaseRev = this.$rev;\n this.selections = [];\n };\n UndoManager.prototype.canUndo = function () {\n return this.$undoStack.length > 0;\n };\n UndoManager.prototype.canRedo = function () {\n return this.$redoStack.length > 0;\n };\n UndoManager.prototype.bookmark = function (rev) {\n if (rev == undefined)\n rev = this.$rev;\n this.mark = rev;\n };\n UndoManager.prototype.isAtBookmark = function () {\n return this.$rev === this.mark;\n };\n UndoManager.prototype.toJSON = function () {\n return {\n $redoStack: this.$redoStack,\n $undoStack: this.$undoStack\n };\n };\n UndoManager.prototype.fromJSON = function (json) {\n this.reset();\n this.$undoStack = json.$undoStack;\n this.$redoStack = json.$redoStack;\n };\n UndoManager.prototype.$prettyPrint = function (delta) {\n if (delta)\n return stringifyDelta(delta);\n return stringifyDelta(this.$undoStack) + \"\\n---\\n\" + stringifyDelta(this.$redoStack);\n };\n return UndoManager;\n}());\nUndoManager.prototype.hasUndo = UndoManager.prototype.canUndo;\nUndoManager.prototype.hasRedo = UndoManager.prototype.canRedo;\nUndoManager.prototype.isClean = UndoManager.prototype.isAtBookmark;\nUndoManager.prototype.markClean = UndoManager.prototype.bookmark;\nfunction rearrangeUndoStack(stack, pos) {\n for (var i = pos; i--;) {\n var deltaSet = stack[i];\n if (deltaSet && !deltaSet[0].ignore) {\n while (i < pos - 1) {\n var swapped = swapGroups(stack[i], stack[i + 1]);\n stack[i] = swapped[0];\n stack[i + 1] = swapped[1];\n i++;\n }\n return true;\n }\n }\n}\nvar Range = require(\"./range\").Range;\nvar cmp = Range.comparePoints;\nvar comparePoints = Range.comparePoints;\nfunction $updateMarkers(delta) {\n var isInsert = delta.action == \"insert\";\n var start = delta.start;\n var end = delta.end;\n var rowShift = (end.row - start.row) * (isInsert ? 1 : -1);\n var colShift = (end.column - start.column) * (isInsert ? 1 : -1);\n if (isInsert)\n end = start;\n for (var i in this.marks) {\n var point = this.marks[i];\n var cmp = comparePoints(point, start);\n if (cmp < 0) {\n continue; // delta starts after the range\n }\n if (cmp === 0) {\n if (isInsert) {\n if (point.bias == 1) {\n cmp = 1;\n }\n else {\n point.bias == -1;\n continue;\n }\n }\n }\n var cmp2 = isInsert ? cmp : comparePoints(point, end);\n if (cmp2 > 0) {\n point.row += rowShift;\n point.column += point.row == end.row ? colShift : 0;\n continue;\n }\n if (!isInsert && cmp2 <= 0) {\n point.row = start.row;\n point.column = start.column;\n if (cmp2 === 0)\n point.bias = 1;\n }\n }\n}\nfunction clonePos(pos) {\n return { row: pos.row, column: pos.column };\n}\nfunction cloneDelta(d) {\n return {\n start: clonePos(d.start),\n end: clonePos(d.end),\n action: d.action,\n lines: d.lines.slice()\n };\n}\nfunction stringifyDelta(d) {\n d = d || this;\n if (Array.isArray(d)) {\n return d.map(stringifyDelta).join(\"\\n\");\n }\n var type = \"\";\n if (d.action) {\n type = d.action == \"insert\" ? \"+\" : \"-\";\n type += \"[\" + d.lines + \"]\";\n }\n else if (d.value) {\n if (Array.isArray(d.value)) {\n type = d.value.map(stringifyRange).join(\"\\n\");\n }\n else {\n type = stringifyRange(d.value);\n }\n }\n if (d.start) {\n type += stringifyRange(d);\n }\n if (d.id || d.rev) {\n type += \"\\t(\" + (d.id || d.rev) + \")\";\n }\n return type;\n}\nfunction stringifyRange(r) {\n return r.start.row + \":\" + r.start.column\n + \"=>\" + r.end.row + \":\" + r.end.column;\n}\nfunction swap(d1, d2) {\n var i1 = d1.action == \"insert\";\n var i2 = d2.action == \"insert\";\n if (i1 && i2) {\n if (cmp(d2.start, d1.end) >= 0) {\n shift(d2, d1, -1);\n }\n else if (cmp(d2.start, d1.start) <= 0) {\n shift(d1, d2, +1);\n }\n else {\n return null;\n }\n }\n else if (i1 && !i2) {\n if (cmp(d2.start, d1.end) >= 0) {\n shift(d2, d1, -1);\n }\n else if (cmp(d2.end, d1.start) <= 0) {\n shift(d1, d2, -1);\n }\n else {\n return null;\n }\n }\n else if (!i1 && i2) {\n if (cmp(d2.start, d1.start) >= 0) {\n shift(d2, d1, +1);\n }\n else if (cmp(d2.start, d1.start) <= 0) {\n shift(d1, d2, +1);\n }\n else {\n return null;\n }\n }\n else if (!i1 && !i2) {\n if (cmp(d2.start, d1.start) >= 0) {\n shift(d2, d1, +1);\n }\n else if (cmp(d2.end, d1.start) <= 0) {\n shift(d1, d2, -1);\n }\n else {\n return null;\n }\n }\n return [d2, d1];\n}\nfunction swapGroups(ds1, ds2) {\n for (var i = ds1.length; i--;) {\n for (var j = 0; j < ds2.length; j++) {\n if (!swap(ds1[i], ds2[j])) {\n while (i < ds1.length) {\n while (j--) {\n swap(ds2[j], ds1[i]);\n }\n j = ds2.length;\n i++;\n }\n return [ds1, ds2];\n }\n }\n }\n ds1.selectionBefore = ds2.selectionBefore =\n ds1.selectionAfter = ds2.selectionAfter = null;\n return [ds2, ds1];\n}\nfunction xform(d1, c1) {\n var i1 = d1.action == \"insert\";\n var i2 = c1.action == \"insert\";\n if (i1 && i2) {\n if (cmp(d1.start, c1.start) < 0) {\n shift(c1, d1, 1);\n }\n else {\n shift(d1, c1, 1);\n }\n }\n else if (i1 && !i2) {\n if (cmp(d1.start, c1.end) >= 0) {\n shift(d1, c1, -1);\n }\n else if (cmp(d1.start, c1.start) <= 0) {\n shift(c1, d1, +1);\n }\n else {\n shift(d1, Range.fromPoints(c1.start, d1.start), -1);\n shift(c1, d1, +1);\n }\n }\n else if (!i1 && i2) {\n if (cmp(c1.start, d1.end) >= 0) {\n shift(c1, d1, -1);\n }\n else if (cmp(c1.start, d1.start) <= 0) {\n shift(d1, c1, +1);\n }\n else {\n shift(c1, Range.fromPoints(d1.start, c1.start), -1);\n shift(d1, c1, +1);\n }\n }\n else if (!i1 && !i2) {\n if (cmp(c1.start, d1.end) >= 0) {\n shift(c1, d1, -1);\n }\n else if (cmp(c1.end, d1.start) <= 0) {\n shift(d1, c1, -1);\n }\n else {\n var before, after;\n if (cmp(d1.start, c1.start) < 0) {\n before = d1;\n d1 = splitDelta(d1, c1.start);\n }\n if (cmp(d1.end, c1.end) > 0) {\n after = splitDelta(d1, c1.end);\n }\n shiftPos(c1.end, d1.start, d1.end, -1);\n if (after && !before) {\n d1.lines = after.lines;\n d1.start = after.start;\n d1.end = after.end;\n after = d1;\n }\n return [c1, before, after].filter(Boolean);\n }\n }\n return [c1, d1];\n}\nfunction shift(d1, d2, dir) {\n shiftPos(d1.start, d2.start, d2.end, dir);\n shiftPos(d1.end, d2.start, d2.end, dir);\n}\nfunction shiftPos(pos, start, end, dir) {\n if (pos.row == (dir == 1 ? start : end).row) {\n pos.column += dir * (end.column - start.column);\n }\n pos.row += dir * (end.row - start.row);\n}\nfunction splitDelta(c, pos) {\n var lines = c.lines;\n var end = c.end;\n c.end = clonePos(pos);\n var rowsBefore = c.end.row - c.start.row;\n var otherLines = lines.splice(rowsBefore, lines.length);\n var col = rowsBefore ? pos.column : pos.column - c.start.column;\n lines.push(otherLines[0].substring(0, col));\n otherLines[0] = otherLines[0].substr(col);\n var rest = {\n start: clonePos(pos),\n end: end,\n lines: otherLines,\n action: c.action\n };\n return rest;\n}\nfunction moveDeltasByOne(redoStack, d) {\n d = cloneDelta(d);\n for (var j = redoStack.length; j--;) {\n var deltaSet = redoStack[j];\n for (var i = 0; i < deltaSet.length; i++) {\n var x = deltaSet[i];\n var xformed = xform(x, d);\n d = xformed[0];\n if (xformed.length != 2) {\n if (xformed[2]) {\n deltaSet.splice(i + 1, 1, xformed[1], xformed[2]);\n i++;\n }\n else if (!xformed[1]) {\n deltaSet.splice(i, 1);\n i--;\n }\n }\n }\n if (!deltaSet.length) {\n redoStack.splice(j, 1);\n }\n }\n return redoStack;\n}\nfunction rebaseRedoStack(redoStack, deltaSets) {\n for (var i = 0; i < deltaSets.length; i++) {\n var deltas = deltaSets[i];\n for (var j = 0; j < deltas.length; j++) {\n moveDeltasByOne(redoStack, deltas[j]);\n }\n }\n}\nexports.UndoManager = UndoManager;\n\n});\n\nace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar FoldLine = /** @class */ (function () {\n function FoldLine(foldData, folds) {\n this.foldData = foldData;\n if (Array.isArray(folds)) {\n this.folds = folds;\n }\n else {\n folds = this.folds = [folds];\n }\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n this.folds.forEach(function (fold) {\n fold.setFoldLine(this);\n }, this);\n }\n FoldLine.prototype.shiftRow = function (shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function (fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n FoldLine.prototype.addFold = function (fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n this.folds.push(fold);\n this.folds.sort(function (a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n }\n else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n }\n else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n }\n else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n fold.foldLine = this;\n };\n FoldLine.prototype.containsRow = function (row) {\n return row >= this.start.row && row <= this.end.row;\n };\n FoldLine.prototype.walk = function (callback, endRow, endColumn) {\n var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true;\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n cmp = fold.range.compareStart(endRow, endColumn);\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n if (stop || cmp === 0) {\n return;\n }\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n FoldLine.prototype.getNextFoldTo = function (row, column) {\n var fold, cmp;\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n }\n else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n return null;\n };\n FoldLine.prototype.addRemoveChars = function (row, column, len) {\n var ret = this.getNextFoldTo(row, column), fold, folds;\n if (ret) {\n fold = ret.fold;\n if (ret.kind == \"inside\"\n && fold.start.column != column\n && fold.start.row != row) {\n window.console && window.console.log(row, column, fold);\n }\n else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n if (i === 0) {\n this.start.column += len;\n }\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n if (!fold.sameRow) {\n return;\n }\n fold.end.column += len;\n }\n this.end.column += len;\n }\n }\n };\n FoldLine.prototype.split = function (row, column) {\n var pos = this.getNextFoldTo(row, column);\n if (!pos || pos.kind == \"inside\")\n return null;\n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n FoldLine.prototype.merge = function (foldLineNext) {\n var folds = foldLineNext.folds;\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n FoldLine.prototype.toString = function () {\n var ret = [this.range.toString() + \": [\"];\n this.folds.forEach(function (fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n FoldLine.prototype.idxToPosition = function (idx) {\n var lastFoldEndColumn = 0;\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n idx -= fold.start.column - lastFoldEndColumn;\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n idx -= fold.placeholder.length;\n if (idx < 0) {\n return fold.start;\n }\n lastFoldEndColumn = fold.end.column;\n }\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n return FoldLine;\n}());\nexports.FoldLine = FoldLine;\n\n});\n\nace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"./range\").Range;\nvar comparePoints = Range.comparePoints;\nvar RangeList = /** @class */ (function () {\n function RangeList() {\n this.ranges = [];\n this.$bias = 1;\n }\n RangeList.prototype.pointIndex = function (pos, excludeEdges, startIndex) {\n var list = this.ranges;\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0)\n continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0)\n return excludeEdges && cmpStart !== 0 ? -i - 2 : i;\n if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))\n return i;\n return -i - 1;\n }\n return -i - 1;\n };\n RangeList.prototype.add = function (range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n else\n endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n RangeList.prototype.addList = function (list) {\n var removed = [];\n for (var i = list.length; i--;) {\n removed.push.apply(removed, this.add(list[i]));\n }\n return removed;\n };\n RangeList.prototype.substractPoint = function (pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges.splice(i, 1);\n };\n RangeList.prototype.merge = function () {\n var removed = [];\n var list = this.ranges;\n list = list.sort(function (a, b) {\n return comparePoints(a.start, b.start);\n });\n var next = list[0], range;\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0)\n continue;\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty())\n continue;\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n this.ranges = list;\n return removed;\n };\n RangeList.prototype.contains = function (row, column) {\n return this.pointIndex({ row: row, column: column }) >= 0;\n };\n RangeList.prototype.containsPoint = function (pos) {\n return this.pointIndex(pos) >= 0;\n };\n RangeList.prototype.rangeAtPoint = function (pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges[i];\n };\n RangeList.prototype.clipRows = function (startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)\n return [];\n var startIndex = this.pointIndex({ row: startRow, column: 0 });\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({ row: endRow, column: 0 }, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n var clipped = [];\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n return clipped;\n };\n RangeList.prototype.removeAll = function () {\n return this.ranges.splice(0, this.ranges.length);\n };\n RangeList.prototype.attach = function (session) {\n if (this.session)\n this.detach();\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n this.session.on('change', this.onChange);\n };\n RangeList.prototype.detach = function () {\n if (!this.session)\n return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n RangeList.prototype.$onChange = function (delta) {\n var start = delta.start;\n var end = delta.end;\n var startRow = start.row;\n var endRow = end.row;\n var ranges = this.ranges;\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row >= startRow)\n break;\n }\n if (delta.action == \"insert\") {\n var lineDif = endRow - startRow;\n var colDiff = -start.column + end.column;\n for (; i < n; i++) {\n var r = ranges[i];\n if (r.start.row > startRow)\n break;\n if (r.start.row == startRow && r.start.column >= start.column) {\n if (r.start.column == start.column && this.$bias <= 0) {\n }\n else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$bias < 0) {\n continue;\n }\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) {\n if (r.end.column > r.start.column && r.end.column == ranges[i + 1].start.column)\n r.end.column -= colDiff;\n }\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n }\n else {\n var lineDif = startRow - endRow;\n var colDiff = start.column - end.column;\n for (; i < n; i++) {\n var r = ranges[i];\n if (r.start.row > endRow)\n break;\n if (r.end.row < endRow\n && (startRow < r.end.row\n || startRow == r.end.row && start.column < r.end.column)) {\n r.end.row = startRow;\n r.end.column = start.column;\n }\n else if (r.end.row == endRow) {\n if (r.end.column <= end.column) {\n if (lineDif || r.end.column > start.column) {\n r.end.column = start.column;\n r.end.row = start.row;\n }\n }\n else {\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n else if (r.end.row > endRow) {\n r.end.row += lineDif;\n }\n if (r.start.row < endRow\n && (startRow < r.start.row\n || startRow == r.start.row && start.column < r.start.column)) {\n r.start.row = startRow;\n r.start.column = start.column;\n }\n else if (r.start.row == endRow) {\n if (r.start.column <= end.column) {\n if (lineDif || r.start.column > start.column) {\n r.start.column = start.column;\n r.start.row = start.row;\n }\n }\n else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n else if (r.start.row > endRow) {\n r.start.row += lineDif;\n }\n }\n }\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n return RangeList;\n}());\nRangeList.prototype.comparePoints = comparePoints;\nexports.RangeList = RangeList;\n\n});\n\nace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range_list\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar RangeList = require(\"../range_list\").RangeList;\nvar Fold = /** @class */ (function (_super) {\n __extends(Fold, _super);\n function Fold(range, placeholder) {\n var _this = _super.call(this) || this;\n _this.foldLine = null;\n _this.placeholder = placeholder;\n _this.range = range;\n _this.start = range.start;\n _this.end = range.end;\n _this.sameRow = range.start.row == range.end.row;\n _this.subFolds = _this.ranges = [];\n return _this;\n }\n Fold.prototype.toString = function () {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n Fold.prototype.setFoldLine = function (foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function (fold) {\n fold.setFoldLine(foldLine);\n });\n };\n Fold.prototype.clone = function () {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function (subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n Fold.prototype.addSubFold = function (fold) {\n if (this.range.isEqual(fold))\n return;\n consumeRange(fold, this.start);\n var row = fold.start.row, column = fold.start.column;\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterStart = this.subFolds[i];\n var firstConsumed = 0;\n if (cmp == 0) {\n if (afterStart.range.containsRange(fold))\n return afterStart.addSubFold(fold);\n else\n firstConsumed = 1;\n }\n var row = fold.range.end.row, column = fold.range.end.column;\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n if (cmp == 0)\n j++;\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n var last = cmp == 0 ? consumedFolds.length - 1 : consumedFolds.length;\n for (var k = firstConsumed; k < last; k++) {\n fold.addSubFold(consumedFolds[k]);\n }\n fold.setFoldLine(this.foldLine);\n return fold;\n };\n Fold.prototype.restoreRange = function (range) {\n return restoreRange(range, this.start);\n };\n return Fold;\n}(RangeList));\nfunction consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0)\n point.column -= anchor.column;\n}\nfunction consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n}\nfunction restorePoint(point, anchor) {\n if (point.row == 0)\n point.column += anchor.column;\n point.row += anchor.row;\n}\nfunction restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n}\nexports.Fold = Fold;\n\n});\n\nace.define(\"ace/edit_session/folding\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/edit_session/fold_line\",\"ace/edit_session/fold\",\"ace/token_iterator\",\"ace/mouse/mouse_event\"], function(require, exports, module){// @ts-nocheck\n\"use strict\";\nvar Range = require(\"../range\").Range;\nvar FoldLine = require(\"./fold_line\").FoldLine;\nvar Fold = require(\"./fold\").Fold;\nvar TokenIterator = require(\"../token_iterator\").TokenIterator;\nvar MouseEvent = require(\"../mouse/mouse_event\").MouseEvent;\nfunction Folding() {\n this.getFoldAt = function (row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine)\n return null;\n var folds = foldLine.folds;\n for (var i = 0; i < folds.length; i++) {\n var range = folds[i].range;\n if (range.contains(row, column)) {\n if (side == 1 && range.isEnd(row, column) && !range.isEmpty()) {\n continue;\n }\n else if (side == -1 && range.isStart(row, column) && !range.isEmpty()) {\n continue;\n }\n return folds[i];\n }\n }\n };\n this.getFoldsInRange = function (range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n start.column += 1;\n end.column -= 1;\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n if (cmp == 2) {\n continue;\n }\n else if (cmp == -2) {\n break;\n }\n var folds = foldLines[i].folds;\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n if (cmp == -2) {\n break;\n }\n else if (cmp == 2) {\n continue;\n }\n else \n if (cmp == 42) {\n break;\n }\n foundFolds.push(fold);\n }\n }\n start.column -= 1;\n end.column += 1;\n return foundFolds;\n };\n this.getFoldsInRangeList = function (ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function (range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n }\n else {\n var folds = this.getFoldsInRange(ranges);\n }\n return folds;\n };\n this.getAllFolds = function () {\n var folds = [];\n var foldLines = this.$foldData;\n for (var i = 0; i < foldLines.length; i++)\n for (var j = 0; j < foldLines[i].folds.length; j++)\n folds.push(foldLines[i].folds[j]);\n return folds;\n };\n this.getFoldStringAt = function (row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine)\n return null;\n var lastFold = {\n end: { column: 0 }\n };\n var str, fold;\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n str = this\n .getLine(fold.start.row)\n .substring(lastFold.end.column, fold.start.column);\n break;\n }\n else if (cmp === 0) {\n return null;\n }\n lastFold = fold;\n }\n if (!str)\n str = this.getLine(fold.start.row).substring(lastFold.end.column);\n if (trim == -1)\n return str.substring(0, column - lastFold.end.column);\n else if (trim == 1)\n return str.substring(column - lastFold.end.column);\n else\n return str;\n };\n this.getFoldLine = function (docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n }\n else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n return null;\n };\n this.getNextFoldLine = function (docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n return null;\n };\n this.getFoldedRowCount = function (first, last) {\n var foldData = this.$foldData, rowCount = last - first + 1;\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row;\n if (end >= last) {\n if (start < last) {\n if (start >= first)\n rowCount -= last - start;\n else\n rowCount = 0; // in one fold\n }\n break;\n }\n else if (end >= first) {\n if (start >= first) // fold inside range\n rowCount -= end - start;\n else\n rowCount -= end - first + 1;\n }\n }\n return rowCount;\n };\n this.$addFoldLine = function (foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function (a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n this.addFold = function (placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n if (placeholder instanceof Fold)\n fold = placeholder;\n else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold)\n return startFold.addSubFold(fold);\n if (startFold && !startFold.range.isStart(startRow, startColumn))\n this.removeFold(startFold);\n if (endFold && !endFold.range.isEnd(endRow, endColumn))\n this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n if (folds.length > 0) {\n this.removeFolds(folds);\n if (!fold.collapseChildren) {\n folds.forEach(function (subFold) {\n fold.addSubFold(subFold);\n });\n }\n }\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n }\n else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n break;\n }\n else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n if (!added)\n foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n if (this.$useWrapMode)\n this.$updateWrapData(foldLine.start.row, foldLine.start.row);\n else\n this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"add\" });\n return fold;\n };\n this.addFolds = function (folds) {\n folds.forEach(function (fold) {\n this.addFold(fold);\n }, this);\n };\n this.removeFold = function (fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n }\n else \n if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n }\n else \n if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n }\n else \n if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n }\n else \n {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n if (!this.$updating) {\n if (this.$useWrapMode)\n this.$updateWrapData(startRow, endRow);\n else\n this.$updateRowLengthCache(startRow, endRow);\n }\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"remove\" });\n };\n this.removeFolds = function (folds) {\n var cloneFolds = [];\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n cloneFolds.forEach(function (fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n this.expandFold = function (fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function (subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row + 1, fold.end.row, fold.collapseChildren - 1);\n }\n fold.subFolds = [];\n };\n this.expandFolds = function (folds) {\n folds.forEach(function (fold) {\n this.expandFold(fold);\n }, this);\n };\n this.unfold = function (location, expandInner) {\n var range, folds;\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n if (expandInner == null)\n expandInner = true;\n }\n else if (typeof location == \"number\") {\n range = new Range(location, 0, location, this.getLine(location).length);\n }\n else if (\"row\" in location) {\n range = Range.fromPoints(location, location);\n }\n else if (Array.isArray(location)) {\n folds = [];\n location.forEach(function (range) {\n folds = folds.concat(this.unfold(range));\n }, this);\n return folds;\n }\n else {\n range = location;\n }\n folds = this.getFoldsInRangeList(range);\n var outermostFolds = folds;\n while (folds.length == 1\n && Range.comparePoints(folds[0].start, range.start) < 0\n && Range.comparePoints(folds[0].end, range.end) > 0) {\n this.expandFolds(folds);\n folds = this.getFoldsInRangeList(range);\n }\n if (expandInner != false) {\n this.removeFolds(folds);\n }\n else {\n this.expandFolds(folds);\n }\n if (outermostFolds.length)\n return outermostFolds;\n };\n this.isRowFolded = function (docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n this.getRowFoldEnd = function (docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n this.getRowFoldStart = function (docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n this.getFoldDisplayLine = function (foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null)\n startRow = foldLine.start.row;\n if (startColumn == null)\n startColumn = 0;\n if (endRow == null)\n endRow = foldLine.end.row;\n if (endColumn == null)\n endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n foldLine.walk(function (placeholder, row, column, lastColumn) {\n if (row < startRow)\n return;\n if (row == startRow) {\n if (column < startColumn)\n return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n if (placeholder != null) {\n textLine += placeholder;\n }\n else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n this.getDisplayLine = function (row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n }\n else {\n return this.getFoldDisplayLine(foldLine, row, endColumn, startRow, startColumn);\n }\n };\n this.$cloneFoldData = function () {\n var fd = [];\n fd = this.$foldData.map(function (foldLine) {\n var folds = foldLine.folds.map(function (fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n return fd;\n };\n this.toggleFold = function (tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n if (fold) {\n this.expandFold(fold);\n return;\n }\n else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n }\n else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n }\n else if (bracketPos = this.findMatchingBracket({ row: cursor.row, column: cursor.column + 1 })) {\n if (range.comparePoint(bracketPos) == 1)\n range.end = bracketPos;\n else\n range.start = bracketPos;\n range.start.column++;\n }\n else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n }\n else {\n var folds = this.getFoldsInRange(range);\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n }\n else if (folds.length == 1) {\n fold = folds[0];\n }\n }\n if (!fold)\n fold = this.getFoldAt(range.start.row, range.start.column);\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n var placeholder = \"...\";\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4)\n return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n this.addFold(placeholder, range);\n };\n this.getCommentFoldRange = function (row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n var type = token && token.type;\n if (token && /^comment|string/.test(type)) {\n type = type.match(/comment|string/)[0];\n if (type == \"comment\")\n type += \"|doc-start|\\\\.doc\";\n var re = new RegExp(type);\n var range = new Range();\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type) && !/^comment.end/.test(token.type));\n token = iterator.stepForward();\n }\n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + (/^comment.start/.test(token.type) ? token.value.length : 2);\n iterator = new TokenIterator(this, row, column);\n if (dir != -1) {\n var lastRow = -1;\n do {\n token = iterator.stepForward();\n if (lastRow == -1) {\n var state = this.getState(iterator.$row);\n if (!re.test(state))\n lastRow = iterator.$row;\n }\n else if (iterator.$row > lastRow) {\n break;\n }\n } while (token && re.test(token.type) && !/^comment.start/.test(token.type));\n token = iterator.stepBackward();\n }\n else\n token = iterator.getCurrentToken();\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn();\n if (!/^comment.end/.test(token.type)) {\n range.end.column += token.value.length - 2;\n }\n return range;\n }\n };\n this.foldAll = function (startRow, endRow, depth, test) {\n if (depth == undefined)\n depth = 100000; // JSON.stringify doesn't hanle Infinity\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets)\n return; // mode doesn't support folding\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null)\n foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\")\n continue;\n if (test && !test(row))\n continue;\n var range = this.getFoldWidgetRange(row);\n if (range && range.isMultiLine()\n && range.end.row <= endRow\n && range.start.row >= startRow) {\n row = range.end.row;\n range.collapseChildren = depth;\n this.addFold(\"...\", range);\n }\n }\n };\n this.foldToLevel = function (level) {\n this.foldAll();\n while (level-- > 0)\n this.unfold(null, false);\n };\n this.foldAllComments = function () {\n var session = this;\n this.foldAll(null, null, null, function (row) {\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token.type == \"text\" && /^\\s+$/.test(token.value))\n continue;\n if (/comment/.test(token.type))\n return true;\n return false;\n }\n });\n };\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n this.setFoldStyle = function (style) {\n if (!this.$foldStyles[style])\n throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n if (this.$foldStyle == style)\n return;\n this.$foldStyle = style;\n if (style == \"manual\")\n this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n this.$setFolding = function (foldMode) {\n if (this.$foldMode == foldMode)\n return;\n this.$foldMode = foldMode;\n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n this._signal(\"changeAnnotation\");\n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || (ignoreCurrent && fw[row]))\n return {};\n var i = row - 1, firstRange;\n while (i >= 0) {\n var c = fw[i];\n if (c == null)\n c = fw[i] = this.getFoldWidget(i);\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange)\n firstRange = range;\n if (range && range.end.row >= row)\n break;\n }\n i--;\n }\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n this.onFoldWidgetClick = function (row, e) {\n if (e instanceof MouseEvent)\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n var range = this.$toggleFoldWidget(row, options);\n if (!range) {\n var el = (e.target || e.srcElement);\n if (el && /ace_fold-widget/.test(el.className))\n el.className += \" ace_invalid\";\n }\n };\n this.$toggleFoldWidget = function (row, options) {\n if (!this.getFoldWidget)\n return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n if (fold) {\n if (options.children || options.all)\n this.removeFold(fold);\n else\n this.expandFold(fold);\n return fold;\n }\n var range = this.getFoldWidgetRange(row, true);\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n }\n else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n }\n else if (range) {\n if (options.all)\n range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n return range;\n };\n this.toggleFoldWidget = function (toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n if (range)\n return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n if (fold) {\n this.removeFold(fold);\n }\n else {\n this.addFold(\"...\", range);\n }\n }\n };\n this.updateFoldWidgets = function (delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n }\n else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n }\n else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n this.tokenizerUpdateFoldWidgets = function (e) {\n var rows = e.data;\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first)\n this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n}\nexports.Folding = Folding;\n\n});\n\nace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar TokenIterator = require(\"../token_iterator\").TokenIterator;\nvar Range = require(\"../range\").Range;\nfunction BracketMatch() {\n this.findMatchingBracket = function (position, chr) {\n if (position.column == 0)\n return null;\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column - 1);\n if (charBeforeCursor == \"\")\n return null;\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match)\n return null;\n if (match[1])\n return this.$findClosingBracket(match[1], position);\n else\n return this.$findOpeningBracket(match[2], position);\n };\n this.getBracketRange = function (pos) {\n var line = this.getLine(pos.row);\n var before = true, range;\n var chr = line.charAt(pos.column - 1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n chr = line.charAt(pos.column);\n pos = { row: pos.row, column: pos.column + 1 };\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n if (!match)\n return null;\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(pos, bracketPos);\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n range.cursor = range.end;\n }\n else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(bracketPos, pos);\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n range.cursor = range.start;\n }\n return range;\n };\n this.getMatchingBracketRanges = function (pos, isBackwards) {\n var line = this.getLine(pos.row);\n var bracketsRegExp = /([\\(\\[\\{])|([\\)\\]\\}])/;\n var chr = !isBackwards && line.charAt(pos.column - 1);\n var match = chr && chr.match(bracketsRegExp);\n if (!match) {\n chr = (isBackwards === undefined || isBackwards) && line.charAt(pos.column);\n pos = {\n row: pos.row,\n column: pos.column + 1\n };\n match = chr && chr.match(bracketsRegExp);\n }\n if (!match)\n return null;\n var startRange = new Range(pos.row, pos.column - 1, pos.row, pos.column);\n var bracketPos = match[1] ? this.$findClosingBracket(match[1], pos)\n : this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return [startRange];\n var endRange = new Range(bracketPos.row, bracketPos.column, bracketPos.row, bracketPos.column + 1);\n return [startRange, endRange];\n };\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\",\n \"<\": \">\",\n \">\": \"<\"\n };\n this.$findOpeningBracket = function (bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n if (!typeRe) {\n typeRe = new RegExp(\"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\")\n .replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\")\n .replace(/-close\\b/, \"-(close|open)\")\n + \")+\");\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n while (true) {\n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return { row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn() };\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n if (token == null)\n break;\n value = token.value;\n valueIndex = value.length - 1;\n }\n return null;\n };\n this.$findClosingBracket = function (bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n if (!typeRe) {\n typeRe = new RegExp(\"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\")\n .replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\")\n .replace(/-open\\b/, \"-(close|open)\")\n + \")+\");\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n while (true) {\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return { row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn() };\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n if (token == null)\n break;\n valueIndex = 0;\n }\n return null;\n };\n this.getMatchingTags = function (pos) {\n var iterator = new TokenIterator(this, pos.row, pos.column);\n var token = this.$findTagName(iterator);\n if (!token)\n return;\n var prevToken = iterator.stepBackward();\n if (prevToken.value === '<') {\n return this.$findClosingTag(iterator, token);\n }\n else {\n return this.$findOpeningTag(iterator, token);\n }\n };\n this.$findTagName = function (iterator) {\n var token = iterator.getCurrentToken();\n var found = false;\n var backward = false;\n if (token && token.type.indexOf('tag-name') === -1) {\n do {\n if (backward)\n token = iterator.stepBackward();\n else\n token = iterator.stepForward();\n if (token) {\n if (token.value === \"/>\") {\n backward = true;\n }\n else if (token.type.indexOf('tag-name') !== -1) {\n found = true;\n }\n }\n } while (token && !found);\n }\n return token;\n };\n this.$findClosingTag = function (iterator, token) {\n var prevToken;\n var currentTag = token.value;\n var tag = token.value;\n var depth = 0;\n var openTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);\n token = iterator.stepForward();\n var openTagName = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + token.value.length);\n var foundOpenTagEnd = false;\n do {\n prevToken = token;\n if (prevToken.type.indexOf('tag-close') !== -1 && !foundOpenTagEnd) {\n var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for `>`\n foundOpenTagEnd = true;\n }\n token = iterator.stepForward();\n if (token) {\n if (token.value === '>' && !foundOpenTagEnd) {\n var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for `>`\n foundOpenTagEnd = true;\n }\n if (token.type.indexOf('tag-name') !== -1) {\n currentTag = token.value;\n if (tag === currentTag) {\n if (prevToken.value === '<') {\n depth++;\n }\n else if (prevToken.value === '') {\n var closeTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for >\n }\n else {\n return;\n }\n }\n }\n }\n }\n else if (tag === currentTag && token.value === '/>') { // self-closing tag\n depth--;\n if (depth < 0) { //found self-closing tag end\n var closeTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 2);\n var closeTagName = closeTagStart;\n var closeTagEnd = closeTagName;\n var openTagEnd = new Range(openTagName.end.row, openTagName.end.column, openTagName.end.row, openTagName.end.column + 1);\n }\n }\n }\n } while (token && depth >= 0);\n if (openTagStart && openTagEnd && closeTagStart && closeTagEnd && openTagName && closeTagName) {\n return {\n openTag: new Range(openTagStart.start.row, openTagStart.start.column, openTagEnd.end.row, openTagEnd.end.column),\n closeTag: new Range(closeTagStart.start.row, closeTagStart.start.column, closeTagEnd.end.row, closeTagEnd.end.column),\n openTagName: openTagName,\n closeTagName: closeTagName\n };\n }\n };\n this.$findOpeningTag = function (iterator, token) {\n var prevToken = iterator.getCurrentToken();\n var tag = token.value;\n var depth = 0;\n var startRow = iterator.getCurrentTokenRow();\n var startColumn = iterator.getCurrentTokenColumn();\n var endColumn = startColumn + 2;\n var closeTagStart = new Range(startRow, startColumn, startRow, endColumn); //Range for \")\n return;\n var closeTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for >\n iterator.stepBackward();\n iterator.stepBackward();\n do {\n token = prevToken;\n startRow = iterator.getCurrentTokenRow();\n startColumn = iterator.getCurrentTokenColumn();\n endColumn = startColumn + token.value.length;\n prevToken = iterator.stepBackward();\n if (token) {\n if (token.type.indexOf('tag-name') !== -1) {\n if (tag === token.value) {\n if (prevToken.value === '<') {\n depth++;\n if (depth > 0) { //found opening tag\n var openTagName = new Range(startRow, startColumn, startRow, endColumn);\n var openTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for <\n do {\n token = iterator.stepForward();\n } while (token && token.value !== '>');\n var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for >\n }\n }\n else if (prevToken.value === '') { // self-closing tag\n var stepCount = 0;\n var tmpToken = prevToken;\n while (tmpToken) {\n if (tmpToken.type.indexOf('tag-name') !== -1 && tmpToken.value === tag) {\n depth--;\n break;\n }\n else if (tmpToken.value === '<') {\n break;\n }\n tmpToken = iterator.stepBackward();\n stepCount++;\n }\n for (var i = 0; i < stepCount; i++) {\n iterator.stepForward();\n }\n }\n }\n } while (prevToken && depth <= 0);\n if (openTagStart && openTagEnd && closeTagStart && closeTagEnd && openTagName && closeTagName) {\n return {\n openTag: new Range(openTagStart.start.row, openTagStart.start.column, openTagEnd.end.row, openTagEnd.end.column),\n closeTag: new Range(closeTagStart.start.row, closeTagStart.start.column, closeTagEnd.end.row, closeTagEnd.end.column),\n openTagName: openTagName,\n closeTagName: closeTagName\n };\n }\n };\n}\nexports.BracketMatch = BracketMatch;\n\n});\n\nace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/bidihandler\",\"ace/config\",\"ace/lib/event_emitter\",\"ace/selection\",\"ace/mode/text\",\"ace/range\",\"ace/document\",\"ace/background_tokenizer\",\"ace/search_highlight\",\"ace/undomanager\",\"ace/edit_session/folding\",\"ace/edit_session/bracket_match\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar BidiHandler = require(\"./bidihandler\").BidiHandler;\nvar config = require(\"./config\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Selection = require(\"./selection\").Selection;\nvar TextMode = require(\"./mode/text\").Mode;\nvar Range = require(\"./range\").Range;\nvar Document = require(\"./document\").Document;\nvar BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;\nvar SearchHighlight = require(\"./search_highlight\").SearchHighlight;\nvar UndoManager = require(\"./undomanager\").UndoManager;\nvar EditSession = /** @class */ (function () {\n function EditSession(text, mode) { this.doc;\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n this.$foldData = [];\n this.id = \"session\" + (++EditSession.$uid);\n this.$foldData.toString = function () {\n return this.join(\"\\n\");\n };\n this.bgTokenizer = new BackgroundTokenizer((new TextMode()).getTokenizer(), this);\n var _self = this;\n this.bgTokenizer.on(\"update\", function (e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n if (typeof text != \"object\" || !text.getLine)\n text = new Document(/**@type{string}*/ (text));\n this.setDocument(text);\n this.selection = new Selection(this);\n this.$bidiHandler = new BidiHandler(this);\n config.resetOptions(this);\n this.setMode(mode);\n config._signal(\"session\", this);\n this.destroyed = false;\n }\n EditSession.prototype.setDocument = function (doc) {\n if (this.doc)\n this.doc.off(\"change\", this.$onChange);\n this.doc = doc;\n doc.on(\"change\", this.$onChange, true);\n this.bgTokenizer.setDocument(this.getDocument());\n this.resetCaches();\n };\n EditSession.prototype.getDocument = function () {\n return this.doc;\n };\n EditSession.prototype.$resetRowCache = function (docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n EditSession.prototype.$getRowCacheIndex = function (cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n while (low <= hi) {\n var mid = (low + hi) >> 1;\n var c = cacheArray[mid];\n if (val > c)\n low = mid + 1;\n else if (val < c)\n hi = mid - 1;\n else\n return mid;\n }\n return low - 1;\n };\n EditSession.prototype.resetCaches = function () {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (!this.destroyed)\n this.bgTokenizer.start(0);\n };\n EditSession.prototype.onChangeFold = function (e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n EditSession.prototype.onChange = function (delta) {\n this.$modified = true;\n this.$bidiHandler.onChange(delta);\n this.$resetRowCache(delta.start.row);\n var removedFolds = this.$updateInternalDataOnChange(delta);\n if (!this.$fromUndo && this.$undoManager) {\n if (removedFolds && removedFolds.length) {\n this.$undoManager.add({\n action: \"removeFolds\",\n folds: removedFolds\n }, this.mergeUndoDeltas);\n this.mergeUndoDeltas = true;\n }\n this.$undoManager.add(delta, this.mergeUndoDeltas);\n this.mergeUndoDeltas = true;\n this.$informUndoManager.schedule();\n }\n this.bgTokenizer.$updateOnChange(delta);\n this._signal(\"change\", delta);\n };\n EditSession.prototype.setValue = function (text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n this.$resetRowCache(0);\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n EditSession.fromJSON = function (session) {\n if (typeof session == \"string\")\n session = JSON.parse(session);\n var undoManager = new UndoManager();\n undoManager.$undoStack = session.history.undo;\n undoManager.$redoStack = session.history.redo;\n undoManager.mark = session.history.mark;\n undoManager.$rev = session.history.rev;\n var editSession = new EditSession(session.value);\n session.folds.forEach(function (fold) {\n editSession.addFold(\"...\", Range.fromPoints(fold.start, fold.end));\n });\n editSession.setAnnotations(session.annotations);\n editSession.setBreakpoints(session.breakpoints);\n editSession.setMode(session.mode);\n editSession.setScrollLeft(session.scrollLeft);\n editSession.setScrollTop(session.scrollTop);\n editSession.setUndoManager(undoManager);\n editSession.selection.fromJSON(session.selection);\n return editSession;\n };\n EditSession.prototype.toJSON = function () {\n return {\n annotations: this.$annotations,\n breakpoints: this.$breakpoints,\n folds: this.getAllFolds().map(function (fold) {\n return fold.range;\n }),\n history: this.getUndoManager(),\n mode: this.$mode.$id,\n scrollLeft: this.$scrollLeft,\n scrollTop: this.$scrollTop,\n selection: this.selection.toJSON(),\n value: this.doc.getValue()\n };\n };\n EditSession.prototype.toString = function () {\n return this.doc.getValue();\n };\n EditSession.prototype.getSelection = function () {\n return this.selection;\n };\n EditSession.prototype.getState = function (row) {\n return this.bgTokenizer.getState(row);\n };\n EditSession.prototype.getTokens = function (row) {\n return this.bgTokenizer.getTokens(row);\n };\n EditSession.prototype.getTokenAt = function (row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token, c = 0;\n if (column == null) {\n var i = tokens.length - 1;\n c = this.getLine(row).length;\n }\n else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column)\n break;\n }\n }\n token = tokens[i];\n if (!token)\n return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n EditSession.prototype.setUndoManager = function (undoManager) {\n this.$undoManager = undoManager;\n if (this.$informUndoManager)\n this.$informUndoManager.cancel();\n if (undoManager) {\n var self = this;\n undoManager.addSession(this);\n this.$syncInformUndoManager = function () {\n self.$informUndoManager.cancel();\n self.mergeUndoDeltas = false;\n };\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n }\n else {\n this.$syncInformUndoManager = function () { };\n }\n };\n EditSession.prototype.markUndoGroup = function () {\n if (this.$syncInformUndoManager)\n this.$syncInformUndoManager();\n };\n EditSession.prototype.getUndoManager = function () {\n return this.$undoManager || this.$defaultUndoManager;\n };\n EditSession.prototype.getTabString = function () {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n }\n else {\n return \"\\t\";\n }\n };\n EditSession.prototype.setUseSoftTabs = function (val) {\n this.setOption(\"useSoftTabs\", val);\n };\n EditSession.prototype.getUseSoftTabs = function () {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n EditSession.prototype.setTabSize = function (tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n EditSession.prototype.getTabSize = function () {\n return this.$tabSize;\n };\n EditSession.prototype.isTabStop = function (position) {\n return this.$useSoftTabs && (position.column % this.$tabSize === 0);\n };\n EditSession.prototype.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {\n this.setOption(\"navigateWithinSoftTabs\", navigateWithinSoftTabs);\n };\n EditSession.prototype.getNavigateWithinSoftTabs = function () {\n return this.$navigateWithinSoftTabs;\n };\n EditSession.prototype.setOverwrite = function (overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n EditSession.prototype.getOverwrite = function () {\n return this.$overwrite;\n };\n EditSession.prototype.toggleOverwrite = function () {\n this.setOverwrite(!this.$overwrite);\n };\n EditSession.prototype.addGutterDecoration = function (row, className) {\n if (!this.$decorations[row])\n this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.removeGutterDecoration = function (row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.getBreakpoints = function () {\n return this.$breakpoints;\n };\n EditSession.prototype.setBreakpoints = function (rows) {\n this.$breakpoints = [];\n for (var i = 0; i < rows.length; i++) {\n this.$breakpoints[rows[i]] = \"ace_breakpoint\";\n }\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.clearBreakpoints = function () {\n this.$breakpoints = [];\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.setBreakpoint = function (row, className) {\n if (className === undefined)\n className = \"ace_breakpoint\";\n if (className)\n this.$breakpoints[row] = className;\n else\n delete this.$breakpoints[row];\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.clearBreakpoint = function (row) {\n delete this.$breakpoints[row];\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.addMarker = function (range, clazz, type, inFront) {\n var id = this.$markerId++;\n var marker = {\n range: range,\n type: type || \"line\",\n renderer: typeof type == \"function\" ? type : null,\n clazz: clazz,\n inFront: !!inFront,\n id: id\n };\n if (inFront) {\n this.$frontMarkers[id] = marker;\n this._signal(\"changeFrontMarker\");\n }\n else {\n this.$backMarkers[id] = marker;\n this._signal(\"changeBackMarker\");\n }\n return id;\n };\n EditSession.prototype.addDynamicMarker = function (marker, inFront) {\n if (!marker.update)\n return;\n var id = this.$markerId++;\n marker.id = id;\n marker.inFront = !!inFront;\n if (inFront) {\n this.$frontMarkers[id] = marker;\n this._signal(\"changeFrontMarker\");\n }\n else {\n this.$backMarkers[id] = marker;\n this._signal(\"changeBackMarker\");\n }\n return marker;\n };\n EditSession.prototype.removeMarker = function (markerId) {\n var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];\n if (!marker)\n return;\n var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;\n delete (markers[markerId]);\n this._signal(marker.inFront ? \"changeFrontMarker\" : \"changeBackMarker\");\n };\n EditSession.prototype.getMarkers = function (inFront) {\n return inFront ? this.$frontMarkers : this.$backMarkers;\n };\n EditSession.prototype.highlight = function (re) {\n if (!this.$searchHighlight) {\n var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");\n this.$searchHighlight = this.addDynamicMarker(highlight);\n }\n this.$searchHighlight.setRegexp(re);\n };\n EditSession.prototype.highlightLines = function (startRow, endRow, clazz, inFront) {\n if (typeof endRow != \"number\") {\n clazz = endRow;\n endRow = startRow;\n }\n if (!clazz)\n clazz = \"ace_step\";\n var range = new Range(startRow, 0, endRow, Infinity);\n range.id = this.addMarker(range, clazz, \"fullLine\", inFront);\n return range;\n };\n EditSession.prototype.setAnnotations = function (annotations) {\n this.$annotations = annotations;\n this._signal(\"changeAnnotation\", {});\n };\n EditSession.prototype.getAnnotations = function () {\n return this.$annotations || [];\n };\n EditSession.prototype.clearAnnotations = function () {\n this.setAnnotations([]);\n };\n EditSession.prototype.$detectNewLine = function (text) {\n var match = text.match(/^.*?(\\r?\\n)/m);\n if (match) {\n this.$autoNewLine = match[1];\n }\n else {\n this.$autoNewLine = \"\\n\";\n }\n };\n EditSession.prototype.getWordRange = function (row, column) {\n var line = this.getLine(row);\n var inToken = false;\n if (column > 0)\n inToken = !!line.charAt(column - 1).match(this.tokenRe);\n if (!inToken)\n inToken = !!line.charAt(column).match(this.tokenRe);\n if (inToken)\n var re = this.tokenRe;\n else if (/^\\s+$/.test(line.slice(column - 1, column + 1)))\n var re = /\\s/;\n else\n var re = this.nonTokenRe;\n var start = column;\n if (start > 0) {\n do {\n start--;\n } while (start >= 0 && line.charAt(start).match(re));\n start++;\n }\n var end = column;\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n return new Range(row, start, row, end);\n };\n EditSession.prototype.getAWordRange = function (row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n return wordRange;\n };\n EditSession.prototype.setNewLineMode = function (newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n EditSession.prototype.getNewLineMode = function () {\n return this.doc.getNewLineMode();\n };\n EditSession.prototype.setUseWorker = function (useWorker) { this.setOption(\"useWorker\", useWorker); };\n EditSession.prototype.getUseWorker = function () { return this.$useWorker; };\n EditSession.prototype.onReloadTokenizer = function (e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n this._signal(\"tokenizerUpdate\", e);\n };\n EditSession.prototype.setMode = function (mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer)\n return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n }\n else {\n path = /**@type{string}*/ (mode) || \"ace/mode/text\";\n }\n if (!this.$modes[\"ace/mode/text\"])\n this.$modes[\"ace/mode/text\"] = new TextMode();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n this.$modeId = path;\n config.loadModule([\"mode\", path], function (m) {\n if (this.$modeId !== path)\n return cb && cb();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n }\n else if (m && m.Mode) {\n m = new m.Mode(options);\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n this.$onChangeMode(m);\n }\n cb && cb();\n }.bind(this));\n if (!this.$mode)\n this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n EditSession.prototype.$onChangeMode = function (mode, $isPlaceholder) {\n if (!$isPlaceholder)\n this.$modeId = mode.$id;\n if (this.$mode === mode)\n return;\n var oldMode = this.$mode;\n this.$mode = mode;\n this.$stopWorker();\n if (this.$useWorker)\n this.$startWorker();\n var tokenizer = mode.getTokenizer();\n if (tokenizer.on !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.on(\"update\", onReloadTokenizer);\n }\n this.bgTokenizer.setTokenizer(tokenizer);\n this.bgTokenizer.setDocument(this.getDocument());\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n if (!$isPlaceholder) {\n if (mode.attachToSession)\n mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n this._emit(\"changeMode\", { oldMode: oldMode, mode: mode });\n }\n };\n EditSession.prototype.$stopWorker = function () {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n EditSession.prototype.$startWorker = function () {\n try {\n this.$worker = this.$mode.createWorker(this);\n }\n catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n EditSession.prototype.getMode = function () {\n return this.$mode;\n };\n EditSession.prototype.setScrollTop = function (scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop))\n return;\n this.$scrollTop = scrollTop;\n this._signal(\"changeScrollTop\", scrollTop);\n };\n EditSession.prototype.getScrollTop = function () {\n return this.$scrollTop;\n };\n EditSession.prototype.setScrollLeft = function (scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))\n return;\n this.$scrollLeft = scrollLeft;\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n EditSession.prototype.getScrollLeft = function () {\n return this.$scrollLeft;\n };\n EditSession.prototype.getScreenWidth = function () {\n this.$computeWidth();\n if (this.lineWidgets)\n return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n EditSession.prototype.getLineWidgetMaxWidth = function () {\n if (this.lineWidgetsWidth != null)\n return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function (w) {\n if (w && w.screenWidth > width)\n width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n EditSession.prototype.$computeWidth = function (force) {\n if (this.$modified || force) {\n this.$modified = false;\n if (this.$useWrapMode)\n return this.screenWidth = this.$wrapLimit;\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len)\n break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (cache[i] == null)\n cache[i] = this.$getStringScreenWidth(lines[i])[0];\n if (cache[i] > longestScreenLine)\n longestScreenLine = cache[i];\n }\n this.screenWidth = longestScreenLine;\n }\n };\n EditSession.prototype.getLine = function (row) {\n return this.doc.getLine(row);\n };\n EditSession.prototype.getLines = function (firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n EditSession.prototype.getLength = function () {\n return this.doc.getLength();\n };\n EditSession.prototype.getTextRange = function (range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n EditSession.prototype.insert = function (position, text) {\n return this.doc.insert(position, text);\n };\n EditSession.prototype.remove = function (range) {\n return this.doc.remove(range);\n };\n EditSession.prototype.removeFullLines = function (firstRow, lastRow) {\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n EditSession.prototype.undoChanges = function (deltas, dontSelect) {\n if (!deltas.length)\n return;\n this.$fromUndo = true;\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n if (delta.action == \"insert\" || delta.action == \"remove\") {\n this.doc.revertDelta(delta);\n }\n else if (delta.folds) {\n this.addFolds(delta.folds);\n }\n }\n if (!dontSelect && this.$undoSelect) {\n if (deltas.selectionBefore)\n this.selection.fromJSON(deltas.selectionBefore);\n else\n this.selection.setRange(this.$getUndoSelection(deltas, true));\n }\n this.$fromUndo = false;\n };\n EditSession.prototype.redoChanges = function (deltas, dontSelect) {\n if (!deltas.length)\n return;\n this.$fromUndo = true;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (delta.action == \"insert\" || delta.action == \"remove\") {\n this.doc.$safeApplyDelta(delta);\n }\n }\n if (!dontSelect && this.$undoSelect) {\n if (deltas.selectionAfter)\n this.selection.fromJSON(deltas.selectionAfter);\n else\n this.selection.setRange(this.$getUndoSelection(deltas, false));\n }\n this.$fromUndo = false;\n };\n EditSession.prototype.setUndoSelect = function (enable) {\n this.$undoSelect = enable;\n };\n EditSession.prototype.$getUndoSelection = function (deltas, isUndo) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n var range, point;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (!delta.start)\n continue; // skip folds\n if (!range) {\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n }\n else {\n range = Range.fromPoints(delta.start, delta.start);\n }\n continue;\n }\n if (isInsert(delta)) {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n point = delta.end;\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n }\n else {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n }\n }\n return range;\n };\n EditSession.prototype.replace = function (range, text) {\n return this.doc.replace(range, text);\n };\n EditSession.prototype.moveText = function (fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n var toRange = Range.fromPoints(toPosition, toPosition);\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)\n toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)\n toRange.end.column += collDiff;\n }\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n toRange.end = this.insert(toRange.start, text);\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function (x) {\n x = x.clone();\n if (x.start.row == oldStart.row)\n x.start.column += collDiff;\n if (x.end.row == oldStart.row)\n x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n return toRange;\n };\n EditSession.prototype.indentRows = function (startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n for (var row = startRow; row <= endRow; row++)\n this.doc.insertInLine({ row: row, column: 0 }, indentString);\n };\n EditSession.prototype.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n for (var j = 0; j < size; ++j)\n if (line.charAt(j) != ' ')\n break;\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n }\n else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n this.remove(deleteRange);\n }\n };\n EditSession.prototype.$moveLines = function (firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0)\n return 0;\n var diff = row - firstRow;\n }\n else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength() - 1)\n return 0;\n var diff = row - lastRow;\n }\n else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function (x) {\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n var lines = dir == 0\n ? this.doc.getLines(firstRow, lastRow)\n : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow + diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n EditSession.prototype.moveLinesUp = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n EditSession.prototype.moveLinesDown = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n EditSession.prototype.duplicateLines = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n EditSession.prototype.$clipRowToDocument = function (row) {\n return Math.max(0, Math.min(row, this.doc.getLength() - 1));\n };\n EditSession.prototype.$clipColumnToRow = function (row, column) {\n if (column < 0)\n return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n EditSession.prototype.$clipPositionToDocument = function (row, column) {\n column = Math.max(0, column);\n if (row < 0) {\n row = 0;\n column = 0;\n }\n else {\n var len = this.doc.getLength();\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len - 1).length;\n }\n else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n return {\n row: row,\n column: column\n };\n };\n EditSession.prototype.$clipRangeToDocument = function (range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n }\n else {\n range.start.column = this.$clipColumnToRow(range.start.row, range.start.column);\n }\n var len = this.doc.getLength() - 1;\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n }\n else {\n range.end.column = this.$clipColumnToRow(range.end.row, range.end.column);\n }\n return range;\n };\n EditSession.prototype.setUseWrapMode = function (useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n this._signal(\"changeWrapMode\");\n }\n };\n EditSession.prototype.getUseWrapMode = function () {\n return this.$useWrapMode;\n };\n EditSession.prototype.setWrapLimitRange = function (min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = { min: min, max: max };\n this.$modified = true;\n this.$bidiHandler.markAsDirty();\n if (this.$useWrapMode)\n this._signal(\"changeWrapMode\");\n }\n };\n EditSession.prototype.adjustWrapLimit = function (desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0)\n limits = { min: $printMargin, max: $printMargin };\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n this._signal(\"changeWrapLimit\");\n }\n return true;\n }\n return false;\n };\n EditSession.prototype.$constrainWrapLimit = function (wrapLimit, min, max) {\n if (min)\n wrapLimit = Math.max(min, wrapLimit);\n if (max)\n wrapLimit = Math.min(max, wrapLimit);\n return wrapLimit;\n };\n EditSession.prototype.getWrapLimit = function () {\n return this.$wrapLimit;\n };\n EditSession.prototype.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n EditSession.prototype.getWrapLimitRange = function () {\n return {\n min: this.$wrapLimitRange.min,\n max: this.$wrapLimitRange.max\n };\n };\n EditSession.prototype.$updateInternalDataOnChange = function (delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n this.$updating = true;\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n var foldLineBefore = this.getFoldLine(firstRow);\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n lastRow = firstRow;\n }\n else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache;\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n }\n else \n if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n }\n else {\n len = Math.abs(delta.start.column - delta.end.column);\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n len = -len;\n }\n var foldLine = this.getFoldLine(firstRow);\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n this.$updating = false;\n if (useWrapMode)\n this.$updateWrapData(firstRow, lastRow);\n else\n this.$updateRowLengthCache(firstRow, lastRow);\n return removedFolds;\n };\n EditSession.prototype.$updateRowLengthCache = function (firstRow, lastRow) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n EditSession.prototype.$updateWrapData = function (firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row++;\n }\n else {\n tokens = [];\n foldLine.walk(function (placeholder, row, column, lastColumn) {\n var walkTokens;\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n }\n else {\n walkTokens = this.$getDisplayTokens(lines[row].substring(lastColumn, column), tokens.length);\n }\n tokens = tokens.concat(walkTokens);\n }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1);\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n EditSession.prototype.$computeWrapSplits = function (tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0, lastDocSplit = 0;\n var isCode = this.$wrapAsCode;\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)\n || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0)\n return indentation;\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE)\n indentation += 1;\n else if (token == TAB)\n indentation += tabSize;\n else if (token == TAB_SPACE)\n continue;\n else\n break;\n }\n }\n if (isCode && indentedSoftWrap !== false)\n indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n function addSplit(screenPos) {\n var len = screenPos - lastSplit;\n for (var i = lastSplit; i < screenPos; i++) {\n var ch = tokens[i];\n if (ch === 12 || ch === 2)\n len -= 1;\n }\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n var indent = 0;\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n split = lastSplit + wrapLimit;\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n addSplit(split);\n continue;\n }\n var minSplit = Math.max(split - (wrapLimit - (wrapLimit >> 2)), lastSplit - 1);\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split--;\n }\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split--;\n }\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split--;\n }\n }\n else {\n while (split > minSplit && tokens[split] < SPACE) {\n split--;\n }\n }\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT)\n split--;\n addSplit(split - indent);\n }\n return splits;\n };\n EditSession.prototype.$getDisplayTokens = function (str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n }\n else if (c == 32) {\n arr.push(SPACE);\n }\n else if ((c > 39 && c < 48) || (c > 57 && c < 64)) {\n arr.push(PUNCTUATION);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n }\n else {\n arr.push(CHAR);\n }\n }\n return arr;\n };\n EditSession.prototype.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0)\n return [0, 0];\n if (maxScreenColumn == null)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n }\n else {\n screenColumn += 1;\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n return [screenColumn, column];\n };\n EditSession.prototype.getRowLength = function (row) {\n var h = 1;\n if (this.lineWidgets)\n h += this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n if (!this.$useWrapMode || !this.$wrapData[row])\n return h;\n else\n return this.$wrapData[row].length + h;\n };\n EditSession.prototype.getRowLineCount = function (row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n }\n else {\n return this.$wrapData[row].length + 1;\n }\n };\n EditSession.prototype.getRowWrapIndent = function (screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n }\n else {\n return 0;\n }\n };\n EditSession.prototype.getScreenLastRowColumn = function (screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n EditSession.prototype.getDocumentLastRowColumn = function (docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n EditSession.prototype.getDocumentLastRowColumnPosition = function (docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n EditSession.prototype.getRowSplitData = function (row) {\n if (!this.$useWrapMode) {\n return undefined;\n }\n else {\n return this.$wrapData[row];\n }\n };\n EditSession.prototype.getScreenTabSize = function (screenColumn) {\n return this.$tabSize - (screenColumn % this.$tabSize | 0);\n };\n EditSession.prototype.screenToDocumentRow = function (screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n EditSession.prototype.screenToDocumentColumn = function (screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n EditSession.prototype.screenToDocumentPosition = function (screenRow, screenColumn, offsetX) {\n if (screenRow < 0)\n return { row: 0, column: 0 };\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n }\n else {\n var doCache = !l;\n }\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n }\n else {\n row += rowLength;\n docRow++;\n if (docRow > foldStart) {\n docRow = foldLine.end.row + 1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n }\n else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n }\n else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n var wrapIndent = 0, splitIndex = Math.floor(screenRow - row);\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n if (splits) {\n column = splits[splitIndex];\n if (splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))\n screenColumn = this.$bidiHandler.offsetToCol(offsetX);\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column)\n docColumn = column - 1;\n if (foldLine)\n return foldLine.idxToPosition(docColumn);\n return { row: docRow, column: docColumn };\n };\n EditSession.prototype.documentToScreenPosition = function (docRow, docColumn) {\n if (typeof docColumn === \"undefined\")\n var pos = this.$clipPositionToDocument(/**@type{Point}*/ (docRow).row, /**@type{Point}*/ (docRow).column);\n else\n pos = this.$clipPositionToDocument(/**@type{number}*/ (docRow), docColumn);\n docRow = pos.row;\n docColumn = pos.column;\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n var rowEnd, row = 0;\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n }\n else {\n var doCache = !l;\n }\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow)\n break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n else {\n rowEnd = row + 1;\n }\n screenRow += this.getRowLength(row);\n row = rowEnd;\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n var textLine = \"\";\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n }\n else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n if (wrapRow) {\n var screenRowOffset = 0;\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow++;\n screenRowOffset++;\n }\n textLine = textLine.substring(wrapRow[screenRowOffset - 1] || 0, textLine.length);\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n if (this.lineWidgets && this.lineWidgets[row] && this.lineWidgets[row].rowsAbove)\n screenRow += this.lineWidgets[row].rowsAbove;\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n EditSession.prototype.documentToScreenColumn = function (row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n EditSession.prototype.documentToScreenRow = function (docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n EditSession.prototype.getScreenLength = function () {\n var screenRows = 0;\n var fold = null;\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n }\n else {\n var lastRow = this.$wrapData.length;\n var row = 0, i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row : Infinity;\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row++;\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = this.$foldData[i++];\n foldStart = fold ? fold.start.row : Infinity;\n }\n }\n }\n if (this.lineWidgets)\n screenRows += this.$getWidgetScreenLength();\n return screenRows;\n };\n EditSession.prototype.$setFontMetrics = function (fm) {\n if (!this.$enableVarChar)\n return;\n this.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0)\n return [0, 0];\n if (!maxScreenColumn)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else {\n screenColumn += fm.getCharacterWidth(c);\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n return [screenColumn, column];\n };\n };\n EditSession.prototype.getPrecedingCharacter = function () {\n var pos = this.selection.getCursor();\n if (pos.column === 0) {\n return pos.row === 0 ? \"\" : this.doc.getNewLineCharacter();\n }\n var currentLine = this.getLine(pos.row);\n return currentLine[pos.column - 1];\n };\n EditSession.prototype.destroy = function () {\n if (!this.destroyed) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer.cleanup();\n this.destroyed = true;\n }\n this.$stopWorker();\n this.removeAllListeners();\n if (this.doc) {\n this.doc.off(\"change\", this.$onChange);\n }\n this.selection.detach();\n };\n return EditSession;\n}());\nEditSession.$uid = 0;\nEditSession.prototype.$modes = config.$modes;\nEditSession.prototype.getValue = EditSession.prototype.toString;\nEditSession.prototype.$defaultUndoManager = {\n undo: function () { },\n redo: function () { },\n hasUndo: function () { },\n hasRedo: function () { },\n reset: function () { },\n add: function () { },\n addSelection: function () { },\n startNewGroup: function () { },\n addSession: function () { }\n};\nEditSession.prototype.$overwrite = false;\nEditSession.prototype.$mode = null;\nEditSession.prototype.$modeId = null;\nEditSession.prototype.$scrollTop = 0;\nEditSession.prototype.$scrollLeft = 0;\nEditSession.prototype.$wrapLimit = 80;\nEditSession.prototype.$useWrapMode = false;\nEditSession.prototype.$wrapLimitRange = {\n min: null,\n max: null\n};\nEditSession.prototype.lineWidgets = null;\nEditSession.prototype.isFullWidth = isFullWidth;\noop.implement(EditSession.prototype, EventEmitter);\nvar CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12;\nfunction isFullWidth(c) {\n if (c < 0x1100)\n return false;\n return c >= 0x1100 && c <= 0x115F ||\n c >= 0x11A3 && c <= 0x11A7 ||\n c >= 0x11FA && c <= 0x11FF ||\n c >= 0x2329 && c <= 0x232A ||\n c >= 0x2E80 && c <= 0x2E99 ||\n c >= 0x2E9B && c <= 0x2EF3 ||\n c >= 0x2F00 && c <= 0x2FD5 ||\n c >= 0x2FF0 && c <= 0x2FFB ||\n c >= 0x3000 && c <= 0x303E ||\n c >= 0x3041 && c <= 0x3096 ||\n c >= 0x3099 && c <= 0x30FF ||\n c >= 0x3105 && c <= 0x312D ||\n c >= 0x3131 && c <= 0x318E ||\n c >= 0x3190 && c <= 0x31BA ||\n c >= 0x31C0 && c <= 0x31E3 ||\n c >= 0x31F0 && c <= 0x321E ||\n c >= 0x3220 && c <= 0x3247 ||\n c >= 0x3250 && c <= 0x32FE ||\n c >= 0x3300 && c <= 0x4DBF ||\n c >= 0x4E00 && c <= 0xA48C ||\n c >= 0xA490 && c <= 0xA4C6 ||\n c >= 0xA960 && c <= 0xA97C ||\n c >= 0xAC00 && c <= 0xD7A3 ||\n c >= 0xD7B0 && c <= 0xD7C6 ||\n c >= 0xD7CB && c <= 0xD7FB ||\n c >= 0xF900 && c <= 0xFAFF ||\n c >= 0xFE10 && c <= 0xFE19 ||\n c >= 0xFE30 && c <= 0xFE52 ||\n c >= 0xFE54 && c <= 0xFE66 ||\n c >= 0xFE68 && c <= 0xFE6B ||\n c >= 0xFF01 && c <= 0xFF60 ||\n c >= 0xFFE0 && c <= 0xFFE6;\n}\nrequire(\"./edit_session/folding\").Folding.call(EditSession.prototype);\nrequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\nconfig.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function (value) {\n if (!value || value == \"off\")\n value = false;\n else if (value == \"free\")\n value = true;\n else if (value == \"printMargin\")\n value = -1;\n else if (typeof value == \"string\")\n value = parseInt(value, 10) || false;\n if (this.$wrap == value)\n return;\n this.$wrap = value;\n if (!value) {\n this.setUseWrapMode(false);\n }\n else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function () {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1)\n return \"printMargin\";\n if (!this.getWrapLimitRange().min)\n return \"free\";\n return this.$wrap;\n }\n return \"off\";\n },\n handlesSet: true\n },\n wrapMethod: {\n set: function (val) {\n val = val == \"auto\"\n ? this.$mode.type != \"text\"\n : val != \"text\";\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n if (this.$useWrapMode) {\n this.$useWrapMode = false;\n this.setUseWrapMode(true);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: {\n set: function () {\n if (this.$useWrapMode) {\n this.$useWrapMode = false;\n this.setUseWrapMode(true);\n }\n },\n initialValue: true\n },\n firstLineNumber: {\n set: function () { this._signal(\"changeBreakpoint\"); },\n initialValue: 1\n },\n useWorker: {\n set: function (useWorker) {\n this.$useWorker = useWorker;\n this.$stopWorker();\n if (useWorker)\n this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: { initialValue: true },\n tabSize: {\n set: function (tabSize) {\n tabSize = parseInt(tabSize);\n if (tabSize > 0 && this.$tabSize !== tabSize) {\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n this._signal(\"changeTabSize\");\n }\n },\n initialValue: 4,\n handlesSet: true\n },\n navigateWithinSoftTabs: { initialValue: false },\n foldStyle: {\n set: function (val) { this.setFoldStyle(val); },\n handlesSet: true\n },\n overwrite: {\n set: function (val) { this._signal(\"changeOverwrite\"); },\n initialValue: false\n },\n newLineMode: {\n set: function (val) { this.doc.setNewLineMode(val); },\n get: function () { return this.doc.getNewLineMode(); },\n handlesSet: true\n },\n mode: {\n set: function (val) { this.setMode(val); },\n get: function () { return this.$modeId; },\n handlesSet: true\n }\n});\nexports.EditSession = EditSession;\n\n});\n\nace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar lang = require(\"./lib/lang\");\nvar oop = require(\"./lib/oop\");\nvar Range = require(\"./range\").Range;\nvar Search = /** @class */ (function () {\n function Search() {\n this.$options = {};\n }\n Search.prototype.set = function (options) {\n oop.mixin(this.$options, options);\n return this;\n };\n Search.prototype.getOptions = function () {\n return lang.copyObject(this.$options);\n };\n Search.prototype.setOptions = function (options) {\n this.$options = options;\n };\n Search.prototype.find = function (session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator)\n return false;\n var firstRange = null;\n iterator.forEach(function (sr, sc, er, ec) {\n firstRange = new Range(sr, sc, er, ec);\n if (sc == ec && options.start && /**@type{Range}*/ (options.start).start\n && options.skipCurrent != false && firstRange.isEqual(/**@type{Range}*/ (options.start))) {\n firstRange = null;\n return false;\n }\n return true;\n });\n return firstRange;\n };\n Search.prototype.findAll = function (session) {\n var options = this.$options;\n if (!options.needle)\n return [];\n this.$assembleRegExp(options);\n var range = options.range;\n var lines = range\n ? session.getLines(range.start.row, range.end.row)\n : session.doc.getAllLines();\n var ranges = [];\n var re = options.re;\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++)\n if (lines[row + j].search(re[j]) == -1)\n continue outer;\n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n if (prevRange && prevRange.end.row === row &&\n prevRange.end.column > startIndex) {\n continue;\n }\n ranges.push(prevRange = new Range(row, startIndex, row + len - 1, endIndex));\n if (len > 2)\n row = row + len - 2;\n }\n }\n else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.end.column;\n var i = 0, j = ranges.length - 1;\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == 0)\n i++;\n var endRow = range.end.row - range.start.row;\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == endRow)\n j--;\n ranges = ranges.slice(i, j + 1);\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n return ranges;\n };\n Search.prototype.replace = function (input, replacement) {\n var options = this.$options;\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine)\n return replacement;\n if (!re)\n return;\n var match = re.exec(input);\n if (!match || match[0].length != input.length)\n return null;\n if (!options.regExp) {\n replacement = replacement.replace(/\\$/g, \"$$$$\");\n }\n replacement = input.replace(re, replacement);\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n for (var i = Math.min(input.length, input.length); i--;) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch)\n replacement[i] = replacement[i].toUpperCase();\n else\n replacement[i] = replacement[i].toLowerCase();\n }\n replacement = replacement.join(\"\");\n }\n return replacement;\n };\n Search.prototype.$assembleRegExp = function (options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp)\n return options.re = options.needle;\n var needle = options.needle;\n if (!options.needle)\n return options.re = false;\n if (!options.regExp)\n needle = lang.escapeRegExp(needle);\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n try {\n new RegExp(needle, \"u\");\n options.$supportsUnicodeFlag = true;\n modifier += \"u\";\n }\n catch (e) {\n options.$supportsUnicodeFlag = false; //left for backward compatibility with previous versions for cases like /ab\\{2}/gu\n }\n if (options.wholeWord)\n needle = addWordBoundary(needle, options);\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine)\n return options.re = this.$assembleMultilineRegExp(needle, modifier);\n try {\n var re = new RegExp(needle, modifier);\n }\n catch (e) {\n re = false;\n }\n return options.re = re;\n };\n Search.prototype.$assembleMultilineRegExp = function (needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n for (var i = 0; i < parts.length; i++)\n try {\n re.push(new RegExp(parts[i], modifier));\n }\n catch (e) {\n return false;\n }\n return re;\n };\n Search.prototype.$matchIterator = function (session, options) {\n var re = this.$assembleRegExp(options);\n if (!re)\n return false;\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n var supportsUnicodeFlag = re.unicode;\n var range = options.range;\n var start = options.start;\n if (!start)\n start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n if (start.start)\n start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n if (backwards) {\n var forEach = function (callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row--; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n };\n }\n else {\n var forEach = function (callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row = row + 1; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n };\n }\n if (options.$isMultiLine) {\n var len = re.length;\n var forEachInLine = function (row, offset, callback) {\n var startRow = backwards ? row - len + 1 : row;\n if (startRow < 0 || startRow + len > session.getLength())\n return;\n var line = session.getLine(startRow);\n var startIndex = line.search(re[0]);\n if (!backwards && startIndex < offset || startIndex === -1)\n return;\n for (var i = 1; i < len; i++) {\n line = session.getLine(startRow + i);\n if (line.search(re[i]) == -1)\n return;\n }\n var endIndex = line.match(re[len - 1])[0].length;\n if (backwards && endIndex > offset)\n return;\n if (callback(startRow, startIndex, startRow + len - 1, endIndex))\n return true;\n };\n }\n else if (backwards) {\n var forEachInLine = function (row, endIndex, callback) {\n var line = session.getLine(row);\n var matches = [];\n var m, last = 0;\n re.lastIndex = 0;\n while ((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (!length) {\n if (last >= line.length)\n break;\n re.lastIndex = last += lang.skipEmptyMatch(line, last, supportsUnicodeFlag);\n }\n if (m.index + length > endIndex)\n break;\n matches.push(m.index, length);\n }\n for (var i = matches.length - 1; i >= 0; i -= 2) {\n var column = matches[i - 1];\n var length = matches[i];\n if (callback(row, column, row, column + length))\n return true;\n }\n };\n }\n else {\n var forEachInLine = function (row, startIndex, callback) {\n var line = session.getLine(row);\n var last;\n var m;\n re.lastIndex = startIndex;\n while ((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (callback(row, last, row, last + length))\n return true;\n if (!length) {\n re.lastIndex = last += lang.skipEmptyMatch(line, last, supportsUnicodeFlag);\n if (last >= line.length)\n return false;\n }\n }\n };\n }\n return { forEach: forEach };\n };\n return Search;\n}());\nfunction addWordBoundary(needle, options) {\n var supportsLookbehind = lang.supportsLookbehind();\n function wordBoundary(c, firstChar) {\n if (firstChar === void 0) { firstChar = true; }\n var wordRegExp = supportsLookbehind && options.$supportsUnicodeFlag ? new RegExp(\"[\\\\p{L}\\\\p{N}_]\", \"u\") : new RegExp(\"\\\\w\");\n if (wordRegExp.test(c) || options.regExp) {\n if (supportsLookbehind && options.$supportsUnicodeFlag) {\n if (firstChar)\n return \"(?<=^|[^\\\\p{L}\\\\p{N}_])\";\n return \"(?=[^\\\\p{L}\\\\p{N}_]|$)\";\n }\n return \"\\\\b\";\n }\n return \"\";\n }\n var needleArray = Array.from(needle);\n var firstChar = needleArray[0];\n var lastChar = needleArray[needleArray.length - 1];\n return wordBoundary(firstChar) + needle + wordBoundary(lastChar, false);\n}\nexports.Search = Search;\n\n});\n\nace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})(); var keyUtil = require(\"../lib/keys\");\nvar useragent = require(\"../lib/useragent\");\nvar KEY_MODS = keyUtil.KEY_MODS;\nvar MultiHashHandler = /** @class */ (function () {\n function MultiHashHandler(config, platform) {\n this.$init(config, platform, false);\n }\n MultiHashHandler.prototype.$init = function (config, platform, $singleCommand) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = $singleCommand;\n };\n MultiHashHandler.prototype.addCommand = function (command) {\n if (this.commands[command.name])\n this.removeCommand(command);\n this.commands[command.name] = command;\n if (command.bindKey)\n this._buildKeyHash(command);\n };\n MultiHashHandler.prototype.removeCommand = function (command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand)\n delete this.commands[name];\n var ckb = this.commandKeyBinding;\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n if (cmdGroup == command) {\n delete ckb[keyId];\n }\n else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1)\n ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n MultiHashHandler.prototype.bindKey = function (key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined)\n position = key.position;\n key = key[this.platform];\n }\n if (!key)\n return;\n if (typeof command == \"function\")\n return this.addCommand({ exec: command, bindKey: key, name: command.name || /**@type{string}*/ (key) }); (key).split(\"|\").forEach(function (keyPart) {\n var chain = \"\";\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function (keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n MultiHashHandler.prototype._addCommandToBinding = function (keyId, command, position) {\n var ckb = this.commandKeyBinding, i;\n if (!command) {\n delete ckb[keyId];\n }\n else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n }\n else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n }\n else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n if (typeof position != \"number\") {\n position = getPosition(command);\n }\n var commands = ckb[keyId];\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position)\n break;\n }\n commands.splice(i, 0, command);\n }\n };\n MultiHashHandler.prototype.addCommands = function (commands) {\n commands && Object.keys(commands).forEach(function (name) {\n var command = commands[name];\n if (!command)\n return;\n if (typeof command === \"string\")\n return this.bindKey(command, name);\n if (typeof command === \"function\")\n command = { exec: command };\n if (typeof command !== \"object\")\n return;\n if (!command.name)\n command.name = name;\n this.addCommand(command);\n }, this);\n };\n MultiHashHandler.prototype.removeCommands = function (commands) {\n Object.keys(commands).forEach(function (name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n MultiHashHandler.prototype.bindKeys = function (keyList) {\n Object.keys(keyList).forEach(function (key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n MultiHashHandler.prototype._buildKeyHash = function (command) {\n this.bindKey(command.bindKey, command);\n };\n MultiHashHandler.prototype.parseKeys = function (keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function (x) { return x; });\n var key = parts.pop();\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode])\n key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();\n else if (!parts.length)\n return { key: key, hashId: -1 };\n else if (parts.length == 1 && parts[0] == \"shift\")\n return { key: key.toUpperCase(), hashId: -1 };\n var hashId = 0;\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n if (modifier == null) {\n if (typeof console != \"undefined\")\n console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n hashId |= modifier;\n }\n return { key: key, hashId: hashId };\n };\n MultiHashHandler.prototype.findKeyCommand = function (hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n MultiHashHandler.prototype.handleKeyboard = function (data, hashId, keyString, keyCode) {\n if (keyCode < 0)\n return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return { command: \"null\" };\n }\n }\n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1)\n data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0)\n data.$keyChain = \"\"; // reset keyChain\n }\n return { command: command };\n };\n MultiHashHandler.prototype.getStatusText = function (editor, data) {\n return data.$keyChain || \"\";\n };\n return MultiHashHandler;\n}());\nfunction getPosition(command) {\n return typeof command == \"object\" && command.bindKey\n && command.bindKey.position\n || (command.isDefault ? -100 : 0);\n}\nvar HashHandler = /** @class */ (function (_super) {\n __extends(HashHandler, _super);\n function HashHandler(config, platform) {\n var _this = _super.call(this, config, platform) || this;\n _this.$singleCommand = true;\n return _this;\n }\n return HashHandler;\n}(MultiHashHandler));\nHashHandler.call = function (thisArg, config, platform) {\n MultiHashHandler.prototype.$init.call(thisArg, config, platform, true);\n};\nMultiHashHandler.call = function (thisArg, config, platform) {\n MultiHashHandler.prototype.$init.call(thisArg, config, platform, false);\n};\nexports.HashHandler = HashHandler;\nexports.MultiHashHandler = MultiHashHandler;\n\n});\n\nace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar oop = require(\"../lib/oop\");\nvar MultiHashHandler = require(\"../keyboard/hash_handler\").MultiHashHandler;\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar CommandManager = /** @class */ (function (_super) {\n __extends(CommandManager, _super);\n function CommandManager(platform, commands) {\n var _this = _super.call(this, commands, platform) || this;\n _this.byName = _this.commands;\n _this.setDefaultHandler(\"exec\", function (e) {\n if (!e.args) {\n return e.command.exec(e.editor, {}, e.event, true);\n }\n return e.command.exec(e.editor, e.args, e.event, false);\n });\n return _this;\n }\n CommandManager.prototype.exec = function (command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--;) {\n if (this.exec(command[i], editor, args))\n return true;\n }\n return false;\n }\n if (typeof command === \"string\")\n command = this.commands[command];\n if (!command)\n return false;\n if (editor && editor.$readOnly && !command.readOnly)\n return false;\n if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor))\n return false;\n var e = { editor: editor, command: command, args: args };\n e.returnValue = this._emit(\"exec\", e);\n this._signal(\"afterExec\", e);\n return e.returnValue === false ? false : true;\n };\n CommandManager.prototype.toggleRecording = function (editor) {\n if (this.$inReplay)\n return;\n editor && editor._emit(\"changeStatus\");\n if (this.recording) {\n this.macro.pop();\n this.off(\"exec\", this.$addCommandToMacro);\n if (!this.macro.length)\n this.macro = this.oldMacro;\n return this.recording = false;\n }\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function (e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n CommandManager.prototype.replay = function (editor) {\n if (this.$inReplay || !this.macro)\n return;\n if (this.recording)\n return this.toggleRecording(editor);\n try {\n this.$inReplay = true;\n this.macro.forEach(function (x) {\n if (typeof x == \"string\")\n this.exec(x, editor);\n else\n this.exec(x[0], editor, x[1]);\n }, this);\n }\n finally {\n this.$inReplay = false;\n }\n };\n CommandManager.prototype.trimMacro = function (m) {\n return m.map(function (x) {\n if (typeof x[0] != \"string\")\n x[0] = x[0].name;\n if (!x[1])\n x = x[0];\n return x;\n });\n };\n return CommandManager;\n}(MultiHashHandler));\noop.implement(CommandManager.prototype, EventEmitter);\nexports.CommandManager = CommandManager;\n\n});\n\nace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar lang = require(\"../lib/lang\");\nvar config = require(\"../config\");\nvar Range = require(\"../range\").Range;\nfunction bindKey(win, mac) {\n return { win: win, mac: mac };\n}\nexports.commands = [{\n name: \"showSettingsMenu\",\n description: \"Show settings menu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/settings_menu\", function (module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n }, {\n name: \"goToNextError\",\n description: \"Go to next error\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/error_marker\", function (module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"goToPreviousError\",\n description: \"Go to previous error\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/error_marker\", function (module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"selectall\",\n description: \"Select all\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function (editor) { editor.selectAll(); },\n readOnly: true\n }, {\n name: \"centerselection\",\n description: \"Center selection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function (editor) { editor.centerSelection(); },\n readOnly: true\n }, {\n name: \"gotoline\",\n description: \"Go to line...\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function (editor, line) {\n if (typeof line === \"number\" && !isNaN(line))\n editor.gotoLine(line);\n editor.prompt({ $type: \"gotoLine\" });\n },\n readOnly: true\n }, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function (editor) { editor.session.toggleFold(false); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function (editor) { editor.session.toggleFold(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"toggleFoldWidget\",\n description: \"Toggle fold widget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function (editor) { editor.session.toggleFoldWidget(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"toggleParentFoldWidget\",\n description: \"Toggle parent fold widget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function (editor) { editor.session.toggleFoldWidget(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldall\",\n description: \"Fold all\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function (editor) { editor.session.foldAll(); },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldAllComments\",\n description: \"Fold all comments\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function (editor) { editor.session.foldAllComments(); },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldOther\",\n description: \"Fold other\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function (editor) {\n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"unfoldall\",\n description: \"Unfold all\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function (editor) { editor.session.unfold(); },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"findnext\",\n description: \"Find next\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function (editor) { editor.findNext(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"findprevious\",\n description: \"Find previous\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function (editor) { editor.findPrevious(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"selectOrFindNext\",\n description: \"Select or find next\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function (editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findNext();\n },\n readOnly: true\n }, {\n name: \"selectOrFindPrevious\",\n description: \"Select or find previous\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function (editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findPrevious();\n },\n readOnly: true\n }, {\n name: \"find\",\n description: \"Find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/searchbox\", function (e) { e.Search(editor); });\n },\n readOnly: true\n }, {\n name: \"overwrite\",\n description: \"Overwrite\",\n bindKey: \"Insert\",\n exec: function (editor) { editor.toggleOverwrite(); },\n readOnly: true\n }, {\n name: \"selecttostart\",\n description: \"Select to start\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function (editor) { editor.getSelection().selectFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"gotostart\",\n description: \"Go to start\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function (editor) { editor.navigateFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"selectup\",\n description: \"Select up\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function (editor) { editor.getSelection().selectUp(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"golineup\",\n description: \"Go line up\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function (editor, args) { editor.navigateUp(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttoend\",\n description: \"Select to end\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function (editor) { editor.getSelection().selectFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"gotoend\",\n description: \"Go to end\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function (editor) { editor.navigateFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"selectdown\",\n description: \"Select down\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function (editor) { editor.getSelection().selectDown(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"golinedown\",\n description: \"Go line down\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function (editor, args) { editor.navigateDown(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectwordleft\",\n description: \"Select word left\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function (editor) { editor.getSelection().selectWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotowordleft\",\n description: \"Go to word left\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function (editor) { editor.navigateWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttolinestart\",\n description: \"Select to line start\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function (editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotolinestart\",\n description: \"Go to line start\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function (editor) { editor.navigateLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectleft\",\n description: \"Select left\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function (editor) { editor.getSelection().selectLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotoleft\",\n description: \"Go to left\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function (editor, args) { editor.navigateLeft(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectwordright\",\n description: \"Select word right\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function (editor) { editor.getSelection().selectWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotowordright\",\n description: \"Go to word right\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function (editor) { editor.navigateWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttolineend\",\n description: \"Select to line end\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function (editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotolineend\",\n description: \"Go to line end\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function (editor) { editor.navigateLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectright\",\n description: \"Select right\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function (editor) { editor.getSelection().selectRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotoright\",\n description: \"Go to right\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function (editor, args) { editor.navigateRight(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectpagedown\",\n description: \"Select page down\",\n bindKey: \"Shift-PageDown\",\n exec: function (editor) { editor.selectPageDown(); },\n readOnly: true\n }, {\n name: \"pagedown\",\n description: \"Page down\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function (editor) { editor.scrollPageDown(); },\n readOnly: true\n }, {\n name: \"gotopagedown\",\n description: \"Go to page down\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function (editor) { editor.gotoPageDown(); },\n readOnly: true\n }, {\n name: \"selectpageup\",\n description: \"Select page up\",\n bindKey: \"Shift-PageUp\",\n exec: function (editor) { editor.selectPageUp(); },\n readOnly: true\n }, {\n name: \"pageup\",\n description: \"Page up\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function (editor) { editor.scrollPageUp(); },\n readOnly: true\n }, {\n name: \"gotopageup\",\n description: \"Go to page up\",\n bindKey: \"PageUp\",\n exec: function (editor) { editor.gotoPageUp(); },\n readOnly: true\n }, {\n name: \"scrollup\",\n description: \"Scroll up\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function (e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n }, {\n name: \"scrolldown\",\n description: \"Scroll down\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function (e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n }, {\n name: \"selectlinestart\",\n description: \"Select line start\",\n bindKey: \"Shift-Home\",\n exec: function (editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectlineend\",\n description: \"Select line end\",\n bindKey: \"Shift-End\",\n exec: function (editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"togglerecording\",\n description: \"Toggle recording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function (editor) { editor.commands.toggleRecording(editor); },\n readOnly: true\n }, {\n name: \"replaymacro\",\n description: \"Replay macro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function (editor) { editor.commands.replay(editor); },\n readOnly: true\n }, {\n name: \"jumptomatching\",\n description: \"Jump to matching\",\n bindKey: bindKey(\"Ctrl-\\\\|Ctrl-P\", \"Command-\\\\\"),\n exec: function (editor) { editor.jumpToMatching(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"selecttomatching\",\n description: \"Select to matching\",\n bindKey: bindKey(\"Ctrl-Shift-\\\\|Ctrl-Shift-P\", \"Command-Shift-\\\\\"),\n exec: function (editor) { editor.jumpToMatching(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"expandToMatching\",\n description: \"Expand to matching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function (editor) { editor.jumpToMatching(true, true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"passKeysToBrowser\",\n description: \"Pass keys to browser\",\n bindKey: bindKey(null, null),\n exec: function () { },\n passEvent: true,\n readOnly: true\n }, {\n name: \"copy\",\n description: \"Copy\",\n exec: function (editor) {\n },\n readOnly: true\n },\n {\n name: \"cut\",\n description: \"Cut\",\n exec: function (editor) {\n var cutLine = editor.$copyWithEmptySelection && editor.selection.isEmpty();\n var range = cutLine ? editor.selection.getLineRange() : editor.selection.getRange();\n editor._emit(\"cut\", range);\n if (!range.isEmpty())\n editor.session.remove(range);\n editor.clearSelection();\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"paste\",\n description: \"Paste\",\n exec: function (editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"removeline\",\n description: \"Remove line\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function (editor) { editor.removeLines(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n }, {\n name: \"duplicateSelection\",\n description: \"Duplicate selection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function (editor) { editor.duplicateSelection(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"sortlines\",\n description: \"Sort lines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function (editor) { editor.sortLines(); },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n }, {\n name: \"togglecomment\",\n description: \"Toggle comment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function (editor) { editor.toggleCommentLines(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"toggleBlockComment\",\n description: \"Toggle block comment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function (editor) { editor.toggleBlockComment(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"modifyNumberUp\",\n description: \"Modify number up\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function (editor) { editor.modifyNumber(1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"modifyNumberDown\",\n description: \"Modify number down\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function (editor) { editor.modifyNumber(-1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"replace\",\n description: \"Replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/searchbox\", function (e) { e.Search(editor, true); });\n }\n }, {\n name: \"undo\",\n description: \"Undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function (editor) { editor.undo(); }\n }, {\n name: \"redo\",\n description: \"Redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function (editor) { editor.redo(); }\n }, {\n name: \"copylinesup\",\n description: \"Copy lines up\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function (editor) { editor.copyLinesUp(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"movelinesup\",\n description: \"Move lines up\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function (editor) { editor.moveLinesUp(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"copylinesdown\",\n description: \"Copy lines down\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function (editor) { editor.copyLinesDown(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"movelinesdown\",\n description: \"Move lines down\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function (editor) { editor.moveLinesDown(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"del\",\n description: \"Delete\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function (editor) { editor.remove(\"right\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"backspace\",\n description: \"Backspace\",\n bindKey: bindKey(\"Shift-Backspace|Backspace\", \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"),\n exec: function (editor) { editor.remove(\"left\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"cut_or_delete\",\n description: \"Cut or delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function (editor) {\n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n }\n else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolinestart\",\n description: \"Remove to line start\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function (editor) { editor.removeToLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolineend\",\n description: \"Remove to line end\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K|Command-Delete\"),\n exec: function (editor) { editor.removeToLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolinestarthard\",\n description: \"Remove to line start hard\",\n bindKey: bindKey(\"Ctrl-Shift-Backspace\", null),\n exec: function (editor) {\n var range = editor.selection.getRange();\n range.start.column = 0;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolineendhard\",\n description: \"Remove to line end hard\",\n bindKey: bindKey(\"Ctrl-Shift-Delete\", null),\n exec: function (editor) {\n var range = editor.selection.getRange();\n range.end.column = Number.MAX_VALUE;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removewordleft\",\n description: \"Remove word left\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function (editor) { editor.removeWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removewordright\",\n description: \"Remove word right\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function (editor) { editor.removeWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"outdent\",\n description: \"Outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function (editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"indent\",\n description: \"Indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function (editor) { editor.indent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"blockoutdent\",\n description: \"Block outdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function (editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"blockindent\",\n description: \"Block indent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function (editor) { editor.blockIndent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"insertstring\",\n description: \"Insert string\",\n exec: function (editor, str) { editor.insert(str); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"inserttext\",\n description: \"Insert text\",\n exec: function (editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"splitline\",\n description: \"Split line\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function (editor) { editor.splitLine(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"transposeletters\",\n description: \"Transpose letters\",\n bindKey: bindKey(\"Alt-Shift-X\", \"Ctrl-T\"),\n exec: function (editor) { editor.transposeLetters(); },\n multiSelectAction: function (editor) { editor.transposeSelections(1); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"touppercase\",\n description: \"To uppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function (editor) { editor.toUpperCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"tolowercase\",\n description: \"To lowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function (editor) { editor.toLowerCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"autoindent\",\n description: \"Auto Indent\",\n bindKey: bindKey(null, null),\n exec: function (editor) { editor.autoIndent(); },\n scrollIntoView: \"animate\"\n }, {\n name: \"expandtoline\",\n description: \"Expand to line\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function (editor) {\n var range = editor.selection.getRange();\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"openlink\",\n bindKey: bindKey(\"Ctrl+F3\", \"F3\"),\n exec: function (editor) { editor.openLink(); }\n }, {\n name: \"joinlines\",\n description: \"Join lines\",\n bindKey: bindKey(null, null),\n exec: function (editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n insertLine += curLine;\n }\n if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n }\n else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n }, {\n name: \"invertSelection\",\n description: \"Invert selection\",\n bindKey: bindKey(null, null),\n exec: function (editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n for (var i = 0; i < ranges.length; i++) {\n if (i == (ranges.length - 1)) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n }\n else {\n newRanges.push(new Range(ranges[i - 1].end.row, ranges[i - 1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n editor.exitMultiSelectMode();\n editor.clearSelection();\n for (var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n }, {\n name: \"addLineAfter\",\n description: \"Add new line after the current line\",\n exec: function (editor) {\n editor.selection.clearSelection();\n editor.navigateLineEnd();\n editor.insert(\"\\n\");\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"addLineBefore\",\n description: \"Add new line before the current line\",\n exec: function (editor) {\n editor.selection.clearSelection();\n var cursor = editor.getCursorPosition();\n editor.selection.moveTo(cursor.row - 1, Number.MAX_VALUE);\n editor.insert(\"\\n\");\n if (cursor.row === 0)\n editor.navigateUp();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"openCommandPallete\",\n exec: function (editor) {\n console.warn(\"This is an obsolete command. Please use `openCommandPalette` instead.\");\n editor.prompt({ $type: \"commands\" });\n },\n readOnly: true\n }, {\n name: \"openCommandPalette\",\n description: \"Open command palette\",\n bindKey: bindKey(\"F1\", \"F1\"),\n exec: function (editor) {\n editor.prompt({ $type: \"commands\" });\n },\n readOnly: true\n }, {\n name: \"modeSelect\",\n description: \"Change language mode...\",\n bindKey: bindKey(null, null),\n exec: function (editor) {\n editor.prompt({ $type: \"modes\" });\n },\n readOnly: true\n }];\nfor (var i = 1; i < 9; i++) {\n exports.commands.push({\n name: \"foldToLevel\" + i,\n description: \"Fold To Level \" + i,\n level: i,\n exec: function (editor) { editor.session.foldToLevel(this.level); },\n scrollIntoView: \"center\",\n readOnly: true\n });\n}\n\n});\n\nace.define(\"ace/line_widgets\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"./lib/dom\");\nvar LineWidgets = /** @class */ (function () {\n function LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n }\n LineWidgets.prototype.getRowLength = function (row) {\n var h;\n if (this.lineWidgets)\n h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else\n h = 0;\n if (!this[\"$useWrapMode\"] || !this[\"$wrapData\"][row]) {\n return 1 + h;\n }\n else {\n return this[\"$wrapData\"][row].length + 1 + h;\n }\n };\n LineWidgets.prototype.$getWidgetScreenLength = function () {\n var screenRows = 0;\n this.lineWidgets.forEach(function (w) {\n if (w && w.rowCount && !w.hidden)\n screenRows += w.rowCount;\n });\n return screenRows;\n };\n LineWidgets.prototype.$onChangeEditor = function (e) {\n this.attach(e.editor);\n };\n LineWidgets.prototype.attach = function (editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this)\n editor.widgetManager.detach();\n if (this.editor == editor)\n return;\n this.detach();\n this.editor = editor;\n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n LineWidgets.prototype.detach = function (e) {\n var editor = this.editor;\n if (!editor)\n return;\n this.editor = null;\n editor.widgetManager = null;\n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function (w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n LineWidgets.prototype.updateOnFold = function (e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action)\n return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i])\n lineWidgets[i].hidden = hide;\n }\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start])\n lineWidgets[start] = lineWidgets[end];\n else\n lineWidgets[end].hidden = hide;\n }\n else {\n if (lineWidgets[start] == lineWidgets[end])\n lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n LineWidgets.prototype.updateOnChange = function (delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n if (len === 0) {\n }\n else if (delta.action == \"remove\") {\n var removed = lineWidgets.splice(startRow + 1, len);\n if (!lineWidgets[startRow] && removed[removed.length - 1]) {\n lineWidgets[startRow] = removed.pop();\n }\n removed.forEach(function (w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n }\n else {\n var args = new Array(len);\n if (lineWidgets[startRow] && lineWidgets[startRow].column != null) {\n if (delta.start.column > lineWidgets[startRow].column)\n startRow++;\n }\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n LineWidgets.prototype.$updateRows = function () {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var noWidgets = true;\n lineWidgets.forEach(function (w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets)\n this.session.lineWidgets = null;\n };\n LineWidgets.prototype.$registerLineWidget = function (w) {\n if (!this.session.lineWidgets)\n this.session.lineWidgets = new Array(this.session.getLength());\n var old = this.session.lineWidgets[w.row];\n if (old) {\n w.$oldWidget = old;\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n this.session.lineWidgets[w.row] = w;\n return w;\n };\n LineWidgets.prototype.addLineWidget = function (w) {\n this.$registerLineWidget(w);\n w.session = this.session;\n if (!this.editor)\n return w;\n var renderer = this.editor.renderer;\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n if (w.text && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.textContent = w.text;\n }\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n if (w.className) {\n dom.addCssClass(w.el, w.className);\n }\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = \"5\";\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n if (!w.coverGutter) {\n w.el.style.zIndex = \"3\";\n }\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n }\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row])\n lineWidgets[fold.start.row] = w;\n else\n w.hidden = true;\n }\n this.session._emit(\"changeFold\", { data: { start: { row: w.row } } });\n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n LineWidgets.prototype.removeLineWidget = function (w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode)\n w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy)\n try {\n w.editor.destroy();\n }\n catch (e) { }\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row];\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget)\n this.onWidgetChanged(w.$oldWidget);\n }\n else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n w1 = w1.$oldWidget;\n }\n }\n }\n this.session._emit(\"changeFold\", { data: { start: { row: w.row } } });\n this.$updateRows();\n };\n LineWidgets.prototype.getWidgetsAtRow = function (row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n return list;\n };\n LineWidgets.prototype.onWidgetChanged = function (w) {\n this.session._changedWidgets.push(w);\n this.editor && this.editor.renderer.updateFull();\n };\n LineWidgets.prototype.measureWidgets = function (e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n if (!changedWidgets || !changedWidgets.length)\n return;\n var min = Infinity;\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el)\n continue;\n if (w.session != this.session)\n continue;\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w)\n continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n w.h = w.el.offsetHeight;\n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n var rowCount = w.h / config.lineHeight;\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0)\n rowCount = 0;\n }\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min)\n min = w.row;\n }\n }\n if (min != Infinity) {\n this.session._emit(\"changeFold\", { data: { start: { row: min } } });\n this.session.lineWidgetWidth = null;\n }\n this.session._changedWidgets = [];\n };\n LineWidgets.prototype.renderWidgets = function (e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n while (first > 0 && !lineWidgets[first])\n first--;\n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n renderer.$cursorLayer.config = config;\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el)\n continue;\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n var top = renderer.$cursorLayer.getPixelPosition({ row: i, column: 0 }, true).top;\n if (!w.coverLine)\n top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth)\n left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n }\n else {\n w.el.style.right = \"\";\n }\n }\n };\n return LineWidgets;\n}());\nexports.LineWidgets = LineWidgets;\n\n});\n\nace.define(\"ace/keyboard/gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/mouse/default_gutter_handler\"], function(require, exports, module){\"use strict\";\nvar keys = require('../lib/keys');\nvar GutterTooltip = require(\"../mouse/default_gutter_handler\").GutterTooltip;\nvar GutterKeyboardHandler = /** @class */ (function () {\n function GutterKeyboardHandler(editor) {\n this.editor = editor;\n this.gutterLayer = editor.renderer.$gutterLayer;\n this.element = editor.renderer.$gutter;\n this.lines = editor.renderer.$gutterLayer.$lines;\n this.activeRowIndex = null;\n this.activeLane = null;\n this.annotationTooltip = new GutterTooltip(this.editor);\n }\n GutterKeyboardHandler.prototype.addListener = function () {\n this.element.addEventListener(\"keydown\", this.$onGutterKeyDown.bind(this));\n this.element.addEventListener(\"focusout\", this.$blurGutter.bind(this));\n this.editor.on(\"mousewheel\", this.$blurGutter.bind(this));\n };\n GutterKeyboardHandler.prototype.removeListener = function () {\n this.element.removeEventListener(\"keydown\", this.$onGutterKeyDown.bind(this));\n this.element.removeEventListener(\"focusout\", this.$blurGutter.bind(this));\n this.editor.off(\"mousewheel\", this.$blurGutter.bind(this));\n };\n GutterKeyboardHandler.prototype.$onGutterKeyDown = function (e) {\n if (this.annotationTooltip.isOpen) {\n e.preventDefault();\n if (e.keyCode === keys[\"escape\"])\n this.annotationTooltip.hideTooltip();\n return;\n }\n if (e.target === this.element) {\n if (e.keyCode != keys[\"enter\"]) {\n return;\n }\n e.preventDefault();\n var row = this.editor.getCursorPosition().row;\n if (!this.editor.isRowVisible(row))\n this.editor.scrollToLine(row, true, true);\n setTimeout(\n function () {\n var index = this.$rowToRowIndex(this.gutterLayer.$cursorCell.row);\n var nearestFoldIndex = this.$findNearestFoldWidget(index);\n var nearestAnnotationIndex = this.$findNearestAnnotation(index);\n if (nearestFoldIndex === null && nearestAnnotationIndex === null)\n return;\n if (nearestFoldIndex === null && nearestAnnotationIndex !== null) {\n this.activeRowIndex = nearestAnnotationIndex;\n this.activeLane = \"annotation\";\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n if (nearestFoldIndex !== null && nearestAnnotationIndex === null) {\n this.activeRowIndex = nearestFoldIndex;\n this.activeLane = \"fold\";\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n if (Math.abs(nearestAnnotationIndex - index) < Math.abs(nearestFoldIndex - index)) {\n this.activeRowIndex = nearestAnnotationIndex;\n this.activeLane = \"annotation\";\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n else {\n this.activeRowIndex = nearestFoldIndex;\n this.activeLane = \"fold\";\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n }.bind(this), 10);\n return;\n }\n this.$handleGutterKeyboardInteraction(e);\n setTimeout(function () {\n this.editor._signal(\"gutterkeydown\", new GutterKeyboardEvent(e, this));\n }.bind(this), 10);\n };\n GutterKeyboardHandler.prototype.$handleGutterKeyboardInteraction = function (e) {\n if (e.keyCode === keys[\"tab\"]) {\n e.preventDefault();\n return;\n }\n if (e.keyCode === keys[\"escape\"]) {\n e.preventDefault();\n this.$blurGutter();\n this.element.focus();\n this.lane = null;\n return;\n }\n if (e.keyCode === keys[\"up\"]) {\n e.preventDefault();\n switch (this.activeLane) {\n case \"fold\":\n this.$moveFoldWidgetUp();\n break;\n case \"annotation\":\n this.$moveAnnotationUp();\n break;\n }\n return;\n }\n if (e.keyCode === keys[\"down\"]) {\n e.preventDefault();\n switch (this.activeLane) {\n case \"fold\":\n this.$moveFoldWidgetDown();\n break;\n case \"annotation\":\n this.$moveAnnotationDown();\n break;\n }\n return;\n }\n if (e.keyCode === keys[\"left\"]) {\n e.preventDefault();\n this.$switchLane(\"annotation\");\n return;\n }\n if (e.keyCode === keys[\"right\"]) {\n e.preventDefault();\n this.$switchLane(\"fold\");\n return;\n }\n if (e.keyCode === keys[\"enter\"] || e.keyCode === keys[\"space\"]) {\n e.preventDefault();\n switch (this.activeLane) {\n case \"fold\":\n if (this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)] === 'start') {\n var rowFoldingWidget = this.$rowIndexToRow(this.activeRowIndex);\n this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex), e);\n setTimeout(\n function () {\n if (this.$rowIndexToRow(this.activeRowIndex) !== rowFoldingWidget) {\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = this.$rowToRowIndex(rowFoldingWidget);\n this.$focusFoldWidget(this.activeRowIndex);\n }\n }.bind(this), 10);\n break;\n }\n else if (this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)] === 'end') {\n break;\n }\n return;\n case \"annotation\":\n var gutterElement = this.lines.cells[this.activeRowIndex].element.childNodes[2];\n var rect = gutterElement.getBoundingClientRect();\n var style = this.annotationTooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));\n break;\n }\n return;\n }\n };\n GutterKeyboardHandler.prototype.$blurGutter = function () {\n if (this.activeRowIndex !== null) {\n switch (this.activeLane) {\n case \"fold\":\n this.$blurFoldWidget(this.activeRowIndex);\n break;\n case \"annotation\":\n this.$blurAnnotation(this.activeRowIndex);\n break;\n }\n }\n if (this.annotationTooltip.isOpen)\n this.annotationTooltip.hideTooltip();\n return;\n };\n GutterKeyboardHandler.prototype.$isFoldWidgetVisible = function (index) {\n var isRowFullyVisible = this.editor.isRowFullyVisible(this.$rowIndexToRow(index));\n var isIconVisible = this.$getFoldWidget(index).style.display !== \"none\";\n return isRowFullyVisible && isIconVisible;\n };\n GutterKeyboardHandler.prototype.$isAnnotationVisible = function (index) {\n var isRowFullyVisible = this.editor.isRowFullyVisible(this.$rowIndexToRow(index));\n var isIconVisible = this.$getAnnotation(index).style.display !== \"none\";\n return isRowFullyVisible && isIconVisible;\n };\n GutterKeyboardHandler.prototype.$getFoldWidget = function (index) {\n var cell = this.lines.get(index);\n var element = cell.element;\n return element.childNodes[1];\n };\n GutterKeyboardHandler.prototype.$getAnnotation = function (index) {\n var cell = this.lines.get(index);\n var element = cell.element;\n return element.childNodes[2];\n };\n GutterKeyboardHandler.prototype.$findNearestFoldWidget = function (index) {\n if (this.$isFoldWidgetVisible(index))\n return index;\n var i = 0;\n while (index - i > 0 || index + i < this.lines.getLength() - 1) {\n i++;\n if (index - i >= 0 && this.$isFoldWidgetVisible(index - i))\n return index - i;\n if (index + i <= this.lines.getLength() - 1 && this.$isFoldWidgetVisible(index + i))\n return index + i;\n }\n return null;\n };\n GutterKeyboardHandler.prototype.$findNearestAnnotation = function (index) {\n if (this.$isAnnotationVisible(index))\n return index;\n var i = 0;\n while (index - i > 0 || index + i < this.lines.getLength() - 1) {\n i++;\n if (index - i >= 0 && this.$isAnnotationVisible(index - i))\n return index - i;\n if (index + i <= this.lines.getLength() - 1 && this.$isAnnotationVisible(index + i))\n return index + i;\n }\n return null;\n };\n GutterKeyboardHandler.prototype.$focusFoldWidget = function (index) {\n if (index == null)\n return;\n var foldWidget = this.$getFoldWidget(index);\n foldWidget.classList.add(this.editor.renderer.keyboardFocusClassName);\n foldWidget.focus();\n };\n GutterKeyboardHandler.prototype.$focusAnnotation = function (index) {\n if (index == null)\n return;\n var annotation = this.$getAnnotation(index);\n annotation.classList.add(this.editor.renderer.keyboardFocusClassName);\n annotation.focus();\n };\n GutterKeyboardHandler.prototype.$blurFoldWidget = function (index) {\n var foldWidget = this.$getFoldWidget(index);\n foldWidget.classList.remove(this.editor.renderer.keyboardFocusClassName);\n foldWidget.blur();\n };\n GutterKeyboardHandler.prototype.$blurAnnotation = function (index) {\n var annotation = this.$getAnnotation(index);\n annotation.classList.remove(this.editor.renderer.keyboardFocusClassName);\n annotation.blur();\n };\n GutterKeyboardHandler.prototype.$moveFoldWidgetUp = function () {\n var index = this.activeRowIndex;\n while (index > 0) {\n index--;\n if (this.$isFoldWidgetVisible(index)) {\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$moveFoldWidgetDown = function () {\n var index = this.activeRowIndex;\n while (index < this.lines.getLength() - 1) {\n index++;\n if (this.$isFoldWidgetVisible(index)) {\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$moveAnnotationUp = function () {\n var index = this.activeRowIndex;\n while (index > 0) {\n index--;\n if (this.$isAnnotationVisible(index)) {\n this.$blurAnnotation(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$moveAnnotationDown = function () {\n var index = this.activeRowIndex;\n while (index < this.lines.getLength() - 1) {\n index++;\n if (this.$isAnnotationVisible(index)) {\n this.$blurAnnotation(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$switchLane = function (desinationLane) {\n switch (desinationLane) {\n case \"annotation\":\n if (this.activeLane === \"annotation\") {\n break;\n }\n var annotationIndex = this.$findNearestAnnotation(this.activeRowIndex);\n if (annotationIndex == null) {\n break;\n }\n this.activeLane = \"annotation\";\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = annotationIndex;\n this.$focusAnnotation(this.activeRowIndex);\n break;\n case \"fold\":\n if (this.activeLane === \"fold\") {\n break;\n }\n var foldWidgetIndex = this.$findNearestFoldWidget(this.activeRowIndex);\n if (foldWidgetIndex == null) {\n break;\n }\n this.activeLane = \"fold\";\n this.$blurAnnotation(this.activeRowIndex);\n this.activeRowIndex = foldWidgetIndex;\n this.$focusFoldWidget(this.activeRowIndex);\n break;\n }\n return;\n };\n GutterKeyboardHandler.prototype.$rowIndexToRow = function (index) {\n var cell = this.lines.get(index);\n if (cell)\n return cell.row;\n return null;\n };\n GutterKeyboardHandler.prototype.$rowToRowIndex = function (row) {\n for (var i = 0; i < this.lines.getLength(); i++) {\n var cell = this.lines.get(i);\n if (cell.row == row)\n return i;\n }\n return null;\n };\n return GutterKeyboardHandler;\n}());\nexports.GutterKeyboardHandler = GutterKeyboardHandler;\nvar GutterKeyboardEvent = /** @class */ (function () {\n function GutterKeyboardEvent(domEvent, gutterKeyboardHandler) {\n this.gutterKeyboardHandler = gutterKeyboardHandler;\n this.domEvent = domEvent;\n }\n GutterKeyboardEvent.prototype.getKey = function () {\n return keys.keyCodeToString(this.domEvent.keyCode);\n };\n GutterKeyboardEvent.prototype.getRow = function () {\n return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex);\n };\n GutterKeyboardEvent.prototype.isInAnnotationLane = function () {\n return this.gutterKeyboardHandler.activeLane === \"annotation\";\n };\n GutterKeyboardEvent.prototype.isInFoldLane = function () {\n return this.gutterKeyboardHandler.activeLane === \"fold\";\n };\n return GutterKeyboardEvent;\n}());\nexports.GutterKeyboardEvent = GutterKeyboardEvent;\n\n});\n\nace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/keyboard/textinput\",\"ace/mouse/mouse_handler\",\"ace/mouse/fold_handler\",\"ace/keyboard/keybinding\",\"ace/edit_session\",\"ace/search\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/commands/command_manager\",\"ace/commands/default_commands\",\"ace/config\",\"ace/token_iterator\",\"ace/line_widgets\",\"ace/keyboard/gutter_handler\",\"ace/config\",\"ace/clipboard\",\"ace/lib/keys\"], function(require, exports, module){\"use strict\";\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar lang = require(\"./lib/lang\");\nvar useragent = require(\"./lib/useragent\");\nvar TextInput = require(\"./keyboard/textinput\").TextInput;\nvar MouseHandler = require(\"./mouse/mouse_handler\").MouseHandler;\nvar FoldHandler = require(\"./mouse/fold_handler\").FoldHandler;\nvar KeyBinding = require(\"./keyboard/keybinding\").KeyBinding;\nvar EditSession = require(\"./edit_session\").EditSession;\nvar Search = require(\"./search\").Search;\nvar Range = require(\"./range\").Range;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar CommandManager = require(\"./commands/command_manager\").CommandManager;\nvar defaultCommands = require(\"./commands/default_commands\").commands;\nvar config = require(\"./config\");\nvar TokenIterator = require(\"./token_iterator\").TokenIterator;\nvar LineWidgets = require(\"./line_widgets\").LineWidgets;\nvar GutterKeyboardHandler = require(\"./keyboard/gutter_handler\").GutterKeyboardHandler;\nvar nls = require(\"./config\").nls;\nvar clipboard = require(\"./clipboard\");\nvar keys = require('./lib/keys');\nvar Editor = /** @class */ (function () {\n function Editor(renderer, session, options) { this.session;\n this.$toDestroy = [];\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n this.id = \"editor\" + (++Editor.$uid);\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n if (typeof document == \"object\") {\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n }\n this.keyBinding = new KeyBinding(this);\n this.$search = new Search().set({\n wrap: true\n });\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n this.$initOperationListeners();\n this._$emitInputEvent = lang.delayedCall(function () {\n this._signal(\"input\", {});\n if (this.session && !this.session.destroyed)\n this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n this.on(\"change\", function (_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n this.setSession(session || options && options.session || new EditSession(\"\"));\n config.resetOptions(this);\n if (options)\n this.setOptions(options);\n config._signal(\"editor\", this);\n }\n Editor.prototype.$initOperationListeners = function () {\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this, true));\n this.on(\"change\", function () {\n if (!this.curOp) {\n this.startOperation();\n this.curOp.selectionBefore = this.$lastSel;\n }\n this.curOp.docChanged = true;\n }.bind(this), true);\n this.on(\"changeSelection\", function () {\n if (!this.curOp) {\n this.startOperation();\n this.curOp.selectionBefore = this.$lastSel;\n }\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n Editor.prototype.startOperation = function (commandEvent) {\n if (this.curOp) {\n if (!commandEvent || this.curOp.command)\n return;\n this.prevOp = this.curOp;\n }\n if (!commandEvent) {\n this.previousCommand = null;\n commandEvent = {};\n }\n this.$opResetTimer.schedule();\n this.curOp = this.session.curOp = {\n command: commandEvent.command || {},\n args: commandEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n this.curOp.selectionBefore = this.selection.toJSON();\n };\n Editor.prototype.endOperation = function (e) {\n if (this.curOp && this.session) {\n if (e && e.returnValue === false || !this.session)\n return (this.curOp = null);\n if (e == true && this.curOp.command && this.curOp.command.name == \"mouse\")\n return;\n this._signal(\"beforeEndOperation\");\n if (!this.curOp)\n return;\n var command = this.curOp.command;\n var scrollIntoView = command && command.scrollIntoView;\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n break;\n default:\n break;\n }\n if (scrollIntoView == \"animate\")\n this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n var sel = this.selection.toJSON();\n this.curOp.selectionAfter = sel;\n this.$lastSel = this.selection.toJSON();\n this.session.getUndoManager().addSelection(sel);\n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n Editor.prototype.$historyTracker = function (e) {\n if (!this.$mergeUndoDeltas)\n return;\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && (e.command.name == prev.command.name);\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined)\n this.mergeNextCommand = true;\n shouldMerge = shouldMerge\n && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n this.mergeNextCommand = true;\n }\n else {\n shouldMerge = shouldMerge\n && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n if (this.$mergeUndoDeltas != \"always\"\n && Date.now() - this.sequenceStartTime > 2000) {\n shouldMerge = false; // the sequence is too long\n }\n if (shouldMerge)\n this.session.mergeUndoDeltas = true;\n else if (mergeableCommands.indexOf(e.command.name) !== -1)\n this.sequenceStartTime = Date.now();\n };\n Editor.prototype.setKeyboardHandler = function (keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\" && keyboardHandler != \"ace\") {\n this.$keybindingId = keyboardHandler;\n var _self = this;\n config.loadModule([\"keybinding\", keyboardHandler], function (module) {\n if (_self.$keybindingId == keyboardHandler)\n _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n }\n else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n Editor.prototype.getKeyboardHandler = function () {\n return this.keyBinding.getKeyboardHandler();\n };\n Editor.prototype.setSession = function (session) {\n if (this.session == session)\n return;\n if (this.curOp)\n this.endOperation();\n this.curOp = {};\n var oldSession = this.session;\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n this.session = session;\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n this.onChangeMode();\n this.onCursorChange();\n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n }\n else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n this.curOp = null;\n oldSession && oldSession._signal(\"changeEditor\", { oldEditor: this });\n session && session._signal(\"changeEditor\", { editor: this });\n if (session && !session.destroyed)\n session.bgTokenizer.scheduleStart();\n };\n Editor.prototype.getSession = function () {\n return this.session;\n };\n Editor.prototype.setValue = function (val, cursorPos) {\n this.session.doc.setValue(val);\n if (!cursorPos)\n this.selectAll();\n else if (cursorPos == 1)\n this.navigateFileEnd();\n else if (cursorPos == -1)\n this.navigateFileStart();\n return val;\n };\n Editor.prototype.getValue = function () {\n return this.session.getValue();\n };\n Editor.prototype.getSelection = function () {\n return this.selection;\n };\n Editor.prototype.resize = function (force) {\n this.renderer.onResize(force);\n };\n Editor.prototype.setTheme = function (theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n Editor.prototype.getTheme = function () {\n return this.renderer.getTheme();\n };\n Editor.prototype.setStyle = function (style) {\n this.renderer.setStyle(style);\n };\n Editor.prototype.unsetStyle = function (style) {\n this.renderer.unsetStyle(style);\n };\n Editor.prototype.getFontSize = function () {\n return this.getOption(\"fontSize\") ||\n dom.computedStyle(this.container).fontSize;\n };\n Editor.prototype.setFontSize = function (size) {\n this.setOption(\"fontSize\", size);\n };\n Editor.prototype.$highlightBrackets = function () {\n if (this.$highlightPending) {\n return;\n }\n var self = this;\n this.$highlightPending = true;\n setTimeout(function () {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || session.destroyed)\n return;\n if (session.$bracketHighlight) {\n session.$bracketHighlight.markerIds.forEach(function (id) {\n session.removeMarker(id);\n });\n session.$bracketHighlight = null;\n }\n var pos = self.getCursorPosition();\n var handler = self.getKeyboardHandler();\n var isBackwards = handler && handler.$getDirectionForHighlight && handler.$getDirectionForHighlight(self);\n var ranges = session.getMatchingBracketRanges(pos, isBackwards);\n if (!ranges) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n if (token && /\\b(?:tag-open|tag-name)/.test(token.type)) {\n var tagNamesRanges = session.getMatchingTags(pos);\n if (tagNamesRanges) {\n ranges = [\n tagNamesRanges.openTagName.isEmpty() ? tagNamesRanges.openTag : tagNamesRanges.openTagName,\n tagNamesRanges.closeTagName.isEmpty() ? tagNamesRanges.closeTag : tagNamesRanges.closeTagName\n ];\n }\n }\n }\n if (!ranges && session.$mode.getMatching)\n ranges = session.$mode.getMatching(self.session);\n if (!ranges) {\n if (self.getHighlightIndentGuides())\n self.renderer.$textLayer.$highlightIndentGuide();\n return;\n }\n var markerType = \"ace_bracket\";\n if (!Array.isArray(ranges)) {\n ranges = [ranges];\n }\n else if (ranges.length == 1) {\n markerType = \"ace_error_bracket\";\n }\n if (ranges.length == 2) {\n if (Range.comparePoints(ranges[0].end, ranges[1].start) == 0)\n ranges = [Range.fromPoints(ranges[0].start, ranges[1].end)];\n else if (Range.comparePoints(ranges[0].start, ranges[1].end) == 0)\n ranges = [Range.fromPoints(ranges[1].start, ranges[0].end)];\n }\n session.$bracketHighlight = {\n ranges: ranges,\n markerIds: ranges.map(function (range) {\n return session.addMarker(range, markerType, \"text\");\n })\n };\n if (self.getHighlightIndentGuides())\n self.renderer.$textLayer.$highlightIndentGuide();\n }, 50);\n };\n Editor.prototype.focus = function () {\n this.textInput.focus();\n };\n Editor.prototype.isFocused = function () {\n return this.textInput.isFocused();\n };\n Editor.prototype.blur = function () {\n this.textInput.blur();\n };\n Editor.prototype.onFocus = function (e) {\n if (this.$isFocused)\n return;\n this.$isFocused = true;\n this.renderer.showCursor();\n this.renderer.visualizeFocus();\n this._emit(\"focus\", e);\n };\n Editor.prototype.onBlur = function (e) {\n if (!this.$isFocused)\n return;\n this.$isFocused = false;\n this.renderer.hideCursor();\n this.renderer.visualizeBlur();\n this._emit(\"blur\", e);\n };\n Editor.prototype.$cursorChange = function () {\n this.renderer.updateCursor();\n this.$highlightBrackets();\n this.$updateHighlightActiveLine();\n };\n Editor.prototype.onDocumentChange = function (delta) {\n var wrap = this.session.$useWrapMode;\n var lastRow = (delta.start.row == delta.end.row ? delta.end.row : Infinity);\n this.renderer.updateLines(delta.start.row, lastRow, wrap);\n this._signal(\"change\", delta);\n this.$cursorChange();\n };\n Editor.prototype.onTokenizerUpdate = function (e) {\n var rows = e.data;\n this.renderer.updateLines(rows.first, rows.last);\n };\n Editor.prototype.onScrollTopChange = function () {\n this.renderer.scrollToY(this.session.getScrollTop());\n };\n Editor.prototype.onScrollLeftChange = function () {\n this.renderer.scrollToX(this.session.getScrollLeft());\n };\n Editor.prototype.onCursorChange = function () {\n this.$cursorChange();\n this._signal(\"changeSelection\");\n };\n Editor.prototype.$updateHighlightActiveLine = function () {\n var session = this.getSession();\n var highlight;\n if (this.$highlightActiveLine) {\n if (this.$selectionStyle != \"line\" || !this.selection.isMultiLine())\n highlight = this.getCursorPosition();\n if (this.renderer.theme && this.renderer.theme.$selectionColorConflict && !this.selection.isEmpty())\n highlight = false;\n if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))\n highlight = false;\n }\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n }\n else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n }\n else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n session._signal(\"changeBackMarker\");\n }\n };\n Editor.prototype.onSelectionChange = function (e) {\n var session = this.session;\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n session.$selectionMarker = null;\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n }\n else {\n this.$updateHighlightActiveLine();\n }\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n this._signal(\"changeSelection\");\n };\n Editor.prototype.$getSelectionHighLightRegexp = function () {\n var session = this.session;\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine())\n return;\n var startColumn = selection.start.column;\n var endColumn = selection.end.column;\n var line = session.getLine(selection.start.row);\n var needle = line.substring(startColumn, endColumn);\n if (needle.length > 5000 || !/[\\w\\d]/.test(needle))\n return;\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n var wordWithBoundary = line.substring(startColumn - 1, endColumn + 1);\n if (!re.test(wordWithBoundary))\n return;\n return re;\n };\n Editor.prototype.onChangeFrontMarker = function () {\n this.renderer.updateFrontMarkers();\n };\n Editor.prototype.onChangeBackMarker = function () {\n this.renderer.updateBackMarkers();\n };\n Editor.prototype.onChangeBreakpoint = function () {\n this.renderer.updateBreakpoints();\n };\n Editor.prototype.onChangeAnnotation = function () {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n Editor.prototype.onChangeMode = function (e) {\n this.renderer.updateText();\n this._emit(\"changeMode\", e);\n };\n Editor.prototype.onChangeWrapLimit = function () {\n this.renderer.updateFull();\n };\n Editor.prototype.onChangeWrapMode = function () {\n this.renderer.onResize(true);\n };\n Editor.prototype.onChangeFold = function () {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n Editor.prototype.getSelectedText = function () {\n return this.session.getTextRange(this.getSelectionRange());\n };\n Editor.prototype.getCopyText = function () {\n var text = this.getSelectedText();\n var nl = this.session.doc.getNewLineCharacter();\n var copyLine = false;\n if (!text && this.$copyWithEmptySelection) {\n copyLine = true;\n var ranges = this.selection.getAllRanges();\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (i && ranges[i - 1].start.row == range.start.row)\n continue;\n text += this.session.getLine(range.start.row) + nl;\n }\n }\n var e = { text: text };\n this._signal(\"copy\", e);\n clipboard.lineMode = copyLine ? e.text : false;\n return e.text;\n };\n Editor.prototype.onCopy = function () {\n this.commands.exec(\"copy\", this);\n };\n Editor.prototype.onCut = function () {\n this.commands.exec(\"cut\", this);\n };\n Editor.prototype.onPaste = function (text, event) {\n var e = { text: text, event: event };\n this.commands.exec(\"paste\", this, e);\n };\n Editor.prototype.$handlePaste = function (e) {\n if (typeof e == \"string\")\n e = { text: e };\n this._signal(\"paste\", e);\n var text = e.text;\n var lineMode = text === clipboard.lineMode;\n var session = this.session;\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n if (lineMode)\n session.insert({ row: this.selection.lead.row, column: 0 }, text);\n else\n this.insert(text);\n }\n else if (lineMode) {\n this.selection.rangeList.ranges.forEach(function (range) {\n session.insert({ row: range.start.row, column: 0 }, text);\n });\n }\n else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n var isFullLine = lines.length == 2 && (!lines[0] || !lines[1]);\n if (lines.length != ranges.length || isFullLine)\n return this.commands.exec(\"insertstring\", this, text);\n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty())\n session.remove(range);\n session.insert(range.start, lines[i]);\n }\n }\n };\n Editor.prototype.execCommand = function (command, args) {\n return this.commands.exec(command, this, args);\n };\n Editor.prototype.insert = function (text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n if (transform) {\n if (text !== transform.text) {\n if (!this.inVirtualSelectionMode) {\n this.session.mergeUndoDeltas = false;\n this.mergeNextCommand = false;\n }\n }\n text = transform.text;\n }\n }\n if (text == \"\\t\")\n text = this.session.getTabString();\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n }\n else if (this.session.getOverwrite() && text.indexOf(\"\\n\") == -1) {\n var range = Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n this.clearSelection();\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n session.insert(cursor, text);\n if (transform && transform.selection) {\n if (transform.selection.length == 2) { // Transform relative to the current column\n this.selection.setSelectionRange(new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1]));\n }\n else { // Transform relative to the current row.\n this.selection.setSelectionRange(new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3]));\n }\n }\n if (this.$enableAutoIndent) {\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n session.insert({ row: cursor.row + 1, column: 0 }, lineIndent);\n }\n if (shouldOutdent)\n mode.autoOutdent(lineState, session, cursor.row);\n }\n };\n Editor.prototype.autoIndent = function () {\n var session = this.session;\n var mode = session.getMode();\n var ranges = this.selection.isEmpty()\n ? [new Range(0, 0, session.doc.getLength() - 1, 0)]\n : this.selection.getAllRanges();\n var prevLineState = \"\";\n var prevLine = \"\";\n var lineIndent = \"\";\n var tab = session.getTabString();\n for (var i = 0; i < ranges.length; i++) {\n var startRow = ranges[i].start.row;\n var endRow = ranges[i].end.row;\n for (var row = startRow; row <= endRow; row++) {\n if (row > 0) {\n prevLineState = session.getState(row - 1);\n prevLine = session.getLine(row - 1);\n lineIndent = mode.getNextLineIndent(prevLineState, prevLine, tab);\n }\n var line = session.getLine(row);\n var currIndent = mode.$getIndent(line);\n if (lineIndent !== currIndent) {\n if (currIndent.length > 0) {\n var range = new Range(row, 0, row, currIndent.length);\n session.remove(range);\n }\n if (lineIndent.length > 0) {\n session.insert({ row: row, column: 0 }, lineIndent);\n }\n }\n mode.autoOutdent(prevLineState, session, row);\n }\n }\n };\n Editor.prototype.onTextInput = function (text, composition) {\n if (!composition)\n return this.keyBinding.onTextInput(text);\n this.startOperation({ command: { name: \"insertstring\" } });\n var applyComposition = this.applyComposition.bind(this, text, composition);\n if (this.selection.rangeCount)\n this.forEachSelection(applyComposition);\n else\n applyComposition();\n this.endOperation();\n };\n Editor.prototype.applyComposition = function (text, composition) {\n if (composition.extendLeft || composition.extendRight) {\n var r = this.selection.getRange();\n r.start.column -= composition.extendLeft;\n r.end.column += composition.extendRight;\n if (r.start.column < 0) {\n r.start.row--;\n r.start.column += this.session.getLine(r.start.row).length + 1;\n }\n this.selection.setRange(r);\n if (!text && !r.isEmpty())\n this.remove();\n }\n if (text || !this.selection.isEmpty())\n this.insert(text, true);\n if (composition.restoreStart || composition.restoreEnd) {\n var r = this.selection.getRange();\n r.start.column -= composition.restoreStart;\n r.end.column -= composition.restoreEnd;\n this.selection.setRange(r);\n }\n };\n Editor.prototype.onCommandKey = function (e, hashId, keyCode) {\n return this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n Editor.prototype.setOverwrite = function (overwrite) {\n this.session.setOverwrite(overwrite);\n };\n Editor.prototype.getOverwrite = function () {\n return this.session.getOverwrite();\n };\n Editor.prototype.toggleOverwrite = function () {\n this.session.toggleOverwrite();\n };\n Editor.prototype.setScrollSpeed = function (speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n Editor.prototype.getScrollSpeed = function () {\n return this.getOption(\"scrollSpeed\");\n };\n Editor.prototype.setDragDelay = function (dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n Editor.prototype.getDragDelay = function () {\n return this.getOption(\"dragDelay\");\n };\n Editor.prototype.setSelectionStyle = function (val) {\n this.setOption(\"selectionStyle\", val);\n };\n Editor.prototype.getSelectionStyle = function () {\n return this.getOption(\"selectionStyle\");\n };\n Editor.prototype.setHighlightActiveLine = function (shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n Editor.prototype.getHighlightActiveLine = function () {\n return this.getOption(\"highlightActiveLine\");\n };\n Editor.prototype.setHighlightGutterLine = function (shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n Editor.prototype.getHighlightGutterLine = function () {\n return this.getOption(\"highlightGutterLine\");\n };\n Editor.prototype.setHighlightSelectedWord = function (shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n Editor.prototype.getHighlightSelectedWord = function () {\n return this.$highlightSelectedWord;\n };\n Editor.prototype.setAnimatedScroll = function (shouldAnimate) {\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n Editor.prototype.getAnimatedScroll = function () {\n return this.renderer.getAnimatedScroll();\n };\n Editor.prototype.setShowInvisibles = function (showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n Editor.prototype.getShowInvisibles = function () {\n return this.renderer.getShowInvisibles();\n };\n Editor.prototype.setDisplayIndentGuides = function (display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n Editor.prototype.getDisplayIndentGuides = function () {\n return this.renderer.getDisplayIndentGuides();\n };\n Editor.prototype.setHighlightIndentGuides = function (highlight) {\n this.renderer.setHighlightIndentGuides(highlight);\n };\n Editor.prototype.getHighlightIndentGuides = function () {\n return this.renderer.getHighlightIndentGuides();\n };\n Editor.prototype.setShowPrintMargin = function (showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n Editor.prototype.getShowPrintMargin = function () {\n return this.renderer.getShowPrintMargin();\n };\n Editor.prototype.setPrintMarginColumn = function (showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n Editor.prototype.getPrintMarginColumn = function () {\n return this.renderer.getPrintMarginColumn();\n };\n Editor.prototype.setReadOnly = function (readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n Editor.prototype.getReadOnly = function () {\n return this.getOption(\"readOnly\");\n };\n Editor.prototype.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n Editor.prototype.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n Editor.prototype.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n Editor.prototype.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n Editor.prototype.setShowFoldWidgets = function (show) {\n this.setOption(\"showFoldWidgets\", show);\n };\n Editor.prototype.getShowFoldWidgets = function () {\n return this.getOption(\"showFoldWidgets\");\n };\n Editor.prototype.setFadeFoldWidgets = function (fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n Editor.prototype.getFadeFoldWidgets = function () {\n return this.getOption(\"fadeFoldWidgets\");\n };\n Editor.prototype.remove = function (dir) {\n if (this.selection.isEmpty()) {\n if (dir == \"left\")\n this.selection.selectLeft();\n else\n this.selection.selectRight();\n }\n var range = this.getSelectionRange();\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n if (new_range)\n range = new_range;\n }\n this.session.remove(range);\n this.clearSelection();\n };\n Editor.prototype.removeWordRight = function () {\n if (this.selection.isEmpty())\n this.selection.selectWordRight();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n Editor.prototype.removeWordLeft = function () {\n if (this.selection.isEmpty())\n this.selection.selectWordLeft();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n Editor.prototype.removeToLineStart = function () {\n if (this.selection.isEmpty())\n this.selection.selectLineStart();\n if (this.selection.isEmpty())\n this.selection.selectLeft();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n Editor.prototype.removeToLineEnd = function () {\n if (this.selection.isEmpty())\n this.selection.selectLineEnd();\n var range = this.getSelectionRange();\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n this.session.remove(range);\n this.clearSelection();\n };\n Editor.prototype.splitLine = function () {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n Editor.prototype.setGhostText = function (text, position) {\n if (!this.session.widgetManager) {\n this.session.widgetManager = new LineWidgets(this.session);\n this.session.widgetManager.attach(this);\n }\n this.renderer.setGhostText(text, position);\n };\n Editor.prototype.removeGhostText = function () {\n if (!this.session.widgetManager)\n return;\n this.renderer.removeGhostText();\n };\n Editor.prototype.transposeLetters = function () {\n if (!this.selection.isEmpty()) {\n return;\n }\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0)\n return;\n var line = this.session.getLine(cursor.row);\n var swap, range;\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column - 1);\n range = new Range(cursor.row, column - 1, cursor.row, column + 1);\n }\n else {\n swap = line.charAt(column - 1) + line.charAt(column - 2);\n range = new Range(cursor.row, column - 2, cursor.row, column);\n }\n this.session.replace(range, swap);\n this.session.selection.moveToPosition(range.end);\n };\n Editor.prototype.toLowerCase = function () {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n Editor.prototype.toUpperCase = function () {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n Editor.prototype.indent = function () {\n var session = this.session;\n var range = this.getSelectionRange();\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n if (this.session.getUseSoftTabs()) {\n var count = (size - column % size);\n var indentString = lang.stringRepeat(\" \", count);\n }\n else {\n var count = column % size;\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n return this.insert(indentString);\n };\n Editor.prototype.blockIndent = function () {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n Editor.prototype.blockOutdent = function () {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n Editor.prototype.sortLines = function () {\n var rows = this.$getSelectedRows();\n var session = this.session;\n var lines = [];\n for (var i = rows.first; i <= rows.last; i++)\n lines.push(session.getLine(i));\n lines.sort(function (a, b) {\n if (a.toLowerCase() < b.toLowerCase())\n return -1;\n if (a.toLowerCase() > b.toLowerCase())\n return 1;\n return 0;\n });\n var deleteRange = new Range(0, 0, 0, 0);\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i - rows.first]);\n }\n };\n Editor.prototype.toggleCommentLines = function () {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n Editor.prototype.toggleBlockComment = function () {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n Editor.prototype.getNumberAt = function (row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n var s = this.session.getLine(row);\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n if (m.index <= column && m.index + m[0].length >= column) {\n var number = {\n value: m[0],\n start: m.index,\n end: m.index + m[0].length\n };\n return number;\n }\n }\n return null;\n };\n Editor.prototype.modifyNumber = function (amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column - 1, row, column);\n var c = this.session.getTextRange(charRange);\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n if (fp !== nr.end && column < fp) {\n amount *= Math.pow(10, nr.end - column - 1);\n }\n else {\n amount *= Math.pow(10, nr.end - column);\n }\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start + 1, column + nnr.length - nr.value.length));\n }\n }\n else {\n this.toggleWord();\n }\n };\n Editor.prototype.toggleWord = function () {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n this.selection.selectWord();\n var currentState = this.getSelectedText();\n var currWordStart = this.selection.getWordRange().start.column;\n var wordParts = currentState.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, '$1 ').split(/\\s/);\n var delta = column - currWordStart - 1;\n if (delta < 0)\n delta = 0;\n var curLength = 0, itLength = 0;\n var that = this;\n if (currentState.match(/[A-Za-z0-9_]+/)) {\n wordParts.forEach(function (item, i) {\n itLength = curLength + item.length;\n if (delta >= curLength && delta <= itLength) {\n currentState = item;\n that.selection.clearSelection();\n that.moveCursorTo(row, curLength + currWordStart);\n that.selection.selectTo(row, itLength + currWordStart);\n }\n curLength = itLength;\n });\n }\n var wordPairs = this.$toggleWordPairs;\n var reg;\n for (var i = 0; i < wordPairs.length; i++) {\n var item = wordPairs[i];\n for (var j = 0; j <= 1; j++) {\n var negate = +!j;\n var firstCondition = currentState.match(new RegExp('^\\\\s?_?(' + lang.escapeRegExp(item[j]) + ')\\\\s?$', 'i'));\n if (firstCondition) {\n var secondCondition = currentState.match(new RegExp('([_]|^|\\\\s)(' + lang.escapeRegExp(firstCondition[1]) + ')($|\\\\s)', 'g'));\n if (secondCondition) {\n reg = currentState.replace(new RegExp(lang.escapeRegExp(item[j]), 'i'), function (result) {\n var res = item[negate];\n if (result.toUpperCase() == result) {\n res = res.toUpperCase();\n }\n else if (result.charAt(0).toUpperCase() == result.charAt(0)) {\n res = res.substr(0, 0) + item[negate].charAt(0).toUpperCase() + res.substr(1);\n }\n return res;\n });\n this.insert(reg);\n reg = \"\";\n }\n }\n }\n }\n };\n Editor.prototype.findLinkAt = function (row, column) {\n var e_1, _a;\n var line = this.session.getLine(row);\n var wordParts = line.split(/((?:https?|ftp):\\/\\/[\\S]+)/);\n var columnPosition = column;\n if (columnPosition < 0)\n columnPosition = 0;\n var previousPosition = 0, currentPosition = 0, match;\n try {\n for (var wordParts_1 = __values(wordParts), wordParts_1_1 = wordParts_1.next(); !wordParts_1_1.done; wordParts_1_1 = wordParts_1.next()) {\n var item = wordParts_1_1.value;\n currentPosition = previousPosition + item.length;\n if (columnPosition >= previousPosition && columnPosition <= currentPosition) {\n if (item.match(/((?:https?|ftp):\\/\\/[\\S]+)/)) {\n match = item.replace(/[\\s:.,'\";}\\]]+$/, \"\");\n break;\n }\n }\n previousPosition = currentPosition;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (wordParts_1_1 && !wordParts_1_1.done && (_a = wordParts_1.return)) _a.call(wordParts_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return match;\n };\n Editor.prototype.openLink = function () {\n var cursor = this.selection.getCursor();\n var url = this.findLinkAt(cursor.row, cursor.column);\n if (url)\n window.open(url, '_blank');\n return url != null;\n };\n Editor.prototype.removeLines = function () {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n Editor.prototype.duplicateSelection = function () {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n }\n else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range));\n range.start = point;\n range.end = endPoint;\n sel.setSelectionRange(range, reverse);\n }\n };\n Editor.prototype.moveLinesDown = function () {\n this.$moveLines(1, false);\n };\n Editor.prototype.moveLinesUp = function () {\n this.$moveLines(-1, false);\n };\n Editor.prototype.moveText = function (range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n Editor.prototype.copyLinesUp = function () {\n this.$moveLines(-1, true);\n };\n Editor.prototype.copyLinesDown = function () {\n this.$moveLines(1, true);\n };\n Editor.prototype.$moveLines = function (dir, copy) {\n var rows, moved;\n var selection = this.selection;\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1)\n moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n }\n else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n while (++i < l) {\n if (totalDiff)\n ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last)\n break;\n else if (!copy && subRows.first > last + 1)\n break;\n last = subRows.last;\n }\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1)\n rangeIndex = i + 1;\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n if (!copy)\n diff = 0;\n totalDiff += diff;\n }\n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n Editor.prototype.$getSelectedRows = function (range) {\n range = (range || this.getSelectionRange()).collapseRows();\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n Editor.prototype.onCompositionStart = function (compositionState) {\n this.renderer.showComposition(compositionState);\n };\n Editor.prototype.onCompositionUpdate = function (text) {\n this.renderer.setCompositionText(text);\n };\n Editor.prototype.onCompositionEnd = function () {\n this.renderer.hideComposition();\n };\n Editor.prototype.getFirstVisibleRow = function () {\n return this.renderer.getFirstVisibleRow();\n };\n Editor.prototype.getLastVisibleRow = function () {\n return this.renderer.getLastVisibleRow();\n };\n Editor.prototype.isRowVisible = function (row) {\n return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());\n };\n Editor.prototype.isRowFullyVisible = function (row) {\n return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());\n };\n Editor.prototype.$getVisibleRowCount = function () {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n Editor.prototype.$moveByPage = function (dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n if (select === true) {\n this.selection.$moveSelection(function () {\n this.moveCursorBy(rows, 0);\n });\n }\n else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n var scrollTop = renderer.scrollTop;\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null)\n renderer.scrollCursorIntoView(null, 0.5);\n renderer.animateScrolling(scrollTop);\n };\n Editor.prototype.selectPageDown = function () {\n this.$moveByPage(1, true);\n };\n Editor.prototype.selectPageUp = function () {\n this.$moveByPage(-1, true);\n };\n Editor.prototype.gotoPageDown = function () {\n this.$moveByPage(1, false);\n };\n Editor.prototype.gotoPageUp = function () {\n this.$moveByPage(-1, false);\n };\n Editor.prototype.scrollPageDown = function () {\n this.$moveByPage(1);\n };\n Editor.prototype.scrollPageUp = function () {\n this.$moveByPage(-1);\n };\n Editor.prototype.scrollToRow = function (row) {\n this.renderer.scrollToRow(row);\n };\n Editor.prototype.scrollToLine = function (line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n Editor.prototype.centerSelection = function () {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n Editor.prototype.getCursorPosition = function () {\n return this.selection.getCursor();\n };\n Editor.prototype.getCursorPositionScreen = function () {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n Editor.prototype.getSelectionRange = function () {\n return this.selection.getRange();\n };\n Editor.prototype.selectAll = function () {\n this.selection.selectAll();\n };\n Editor.prototype.clearSelection = function () {\n this.selection.clearSelection();\n };\n Editor.prototype.moveCursorTo = function (row, column) {\n this.selection.moveCursorTo(row, column);\n };\n Editor.prototype.moveCursorToPosition = function (pos) {\n this.selection.moveCursorToPosition(pos);\n };\n Editor.prototype.jumpToMatching = function (select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var tokenCount = 0;\n if (prevToken && prevToken.type.indexOf('tag-name') !== -1) {\n prevToken = iterator.stepBackward();\n }\n var token = prevToken || iterator.stepForward();\n if (!token)\n return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n if (prevToken.value === '<' && tokenCount > 1) {\n depth[token.value]++;\n }\n else if (prevToken.value === '= 0; --i) {\n if (this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n this.selection.setSelectionRange(selection);\n return replaced;\n };\n Editor.prototype.$tryReplace = function (range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n }\n else {\n return null;\n }\n };\n Editor.prototype.getLastSearchOptions = function () {\n return this.$search.getOptions();\n };\n Editor.prototype.find = function (needle, options, animate) {\n if (!options)\n options = {};\n if (typeof needle == \"string\" || needle instanceof RegExp)\n options.needle = needle;\n else if (typeof needle == \"object\")\n oop.mixin(options, needle);\n var range = this.selection.getRange();\n if (options.needle == null) {\n needle = this.session.getTextRange(range)\n || this.$search.$options.needle;\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n this.$search.set({ needle: needle });\n }\n this.$search.set(options);\n if (!options.start)\n this.$search.set({ start: range });\n var newRange = this.$search.find(this.session);\n if (options.preventScroll)\n return newRange;\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n if (options.backwards)\n range.start = range.end;\n else\n range.end = range.start;\n this.selection.setRange(range);\n };\n Editor.prototype.findNext = function (options, animate) {\n this.find({ skipCurrent: true, backwards: false }, options, animate);\n };\n Editor.prototype.findPrevious = function (options, animate) {\n this.find(options, { skipCurrent: true, backwards: true }, animate);\n };\n Editor.prototype.revealRange = function (range, animate) {\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false)\n this.renderer.animateScrolling(scrollTop);\n };\n Editor.prototype.undo = function () {\n this.session.getUndoManager().undo(this.session);\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n Editor.prototype.redo = function () {\n this.session.getUndoManager().redo(this.session);\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n Editor.prototype.destroy = function () {\n if (this.$toDestroy) {\n this.$toDestroy.forEach(function (el) {\n el.destroy();\n });\n this.$toDestroy = null;\n }\n if (this.$mouseHandler)\n this.$mouseHandler.destroy();\n this.renderer.destroy();\n this._signal(\"destroy\", this);\n if (this.session)\n this.session.destroy();\n if (this._$emitInputEvent)\n this._$emitInputEvent.cancel();\n this.removeAllListeners();\n };\n Editor.prototype.setAutoScrollEditorIntoView = function (enable) {\n if (!enable)\n return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor)\n this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function () {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function () {\n if (shouldScroll)\n rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function () {\n if (shouldScroll && rect && (self.isFocused()\n || self.searchBox && self.searchBox.isFocused())) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n }\n else if (pos.top < config.height &&\n pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n }\n else {\n shouldScroll = null;\n }\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n shouldScroll = rect = null;\n }\n });\n this.setAutoScrollEditorIntoView = function (enable) {\n if (enable)\n return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n Editor.prototype.$resetCursorStyle = function () {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer)\n return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n Editor.prototype.prompt = function (message, options, callback) {\n var editor = this;\n config.loadModule(\"ace/ext/prompt\", function (module) {\n module.prompt(editor, message, options, callback);\n });\n };\n return Editor;\n}());\nEditor.$uid = 0;\nEditor.prototype.curOp = null;\nEditor.prototype.prevOp = {};\nEditor.prototype.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\nEditor.prototype.$toggleWordPairs = [\n [\"first\", \"last\"],\n [\"true\", \"false\"],\n [\"yes\", \"no\"],\n [\"width\", \"height\"],\n [\"top\", \"bottom\"],\n [\"right\", \"left\"],\n [\"on\", \"off\"],\n [\"x\", \"y\"],\n [\"get\", \"set\"],\n [\"max\", \"min\"],\n [\"horizontal\", \"vertical\"],\n [\"show\", \"hide\"],\n [\"add\", \"remove\"],\n [\"up\", \"down\"],\n [\"before\", \"after\"],\n [\"even\", \"odd\"],\n [\"in\", \"out\"],\n [\"inside\", \"outside\"],\n [\"next\", \"previous\"],\n [\"increase\", \"decrease\"],\n [\"attach\", \"detach\"],\n [\"&&\", \"||\"],\n [\"==\", \"!=\"]\n];\noop.implement(Editor.prototype, EventEmitter);\nconfig.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function (style) {\n this.onSelectionChange();\n this._signal(\"changeSelectionStyle\", { data: style });\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function () { this.$updateHighlightActiveLine(); },\n initialValue: true\n },\n highlightSelectedWord: {\n set: function (shouldHighlight) { this.$onSelectionChange(); },\n initialValue: true\n },\n readOnly: {\n set: function (readOnly) {\n this.textInput.setReadOnly(readOnly);\n this.$resetCursorStyle();\n },\n initialValue: false\n },\n copyWithEmptySelection: {\n set: function (value) {\n this.textInput.setCopyWithEmptySelection(value);\n },\n initialValue: false\n },\n cursorStyle: {\n set: function (val) { this.$resetCursorStyle(); },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: { initialValue: true },\n wrapBehavioursEnabled: { initialValue: true },\n enableAutoIndent: { initialValue: true },\n autoScrollEditorIntoView: {\n set: function (val) { this.setAutoScrollEditorIntoView(val); }\n },\n keyboardHandler: {\n set: function (val) { this.setKeyboardHandler(val); },\n get: function () { return this.$keybindingId; },\n handlesSet: true\n },\n value: {\n set: function (val) { this.session.setValue(val); },\n get: function () { return this.getValue(); },\n handlesSet: true,\n hidden: true\n },\n session: {\n set: function (val) { this.setSession(val); },\n get: function () { return this.session; },\n handlesSet: true,\n hidden: true\n },\n showLineNumbers: {\n set: function (show) {\n this.renderer.$gutterLayer.setShowLineNumbers(show);\n this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER);\n if (show && this.$relativeLineNumbers)\n relativeNumberRenderer.attach(this);\n else\n relativeNumberRenderer.detach(this);\n },\n initialValue: true\n },\n relativeLineNumbers: {\n set: function (value) {\n if (this.$showLineNumbers && value)\n relativeNumberRenderer.attach(this);\n else\n relativeNumberRenderer.detach(this);\n }\n },\n placeholder: {\n set: function (message) {\n if (!this.$updatePlaceholder) {\n this.$updatePlaceholder = function () {\n var hasValue = this.session && (this.renderer.$composition ||\n this.session.getLength() > 1 || this.session.getLine(0).length > 0);\n if (hasValue && this.renderer.placeholderNode) {\n this.renderer.off(\"afterRender\", this.$updatePlaceholder);\n dom.removeCssClass(this.container, \"ace_hasPlaceholder\");\n this.renderer.placeholderNode.remove();\n this.renderer.placeholderNode = null;\n }\n else if (!hasValue && !this.renderer.placeholderNode) {\n this.renderer.on(\"afterRender\", this.$updatePlaceholder);\n dom.addCssClass(this.container, \"ace_hasPlaceholder\");\n var el = dom.createElement(\"div\");\n el.className = \"ace_placeholder\";\n el.textContent = this.$placeholder || \"\";\n this.renderer.placeholderNode = el;\n this.renderer.content.appendChild(this.renderer.placeholderNode);\n }\n else if (!hasValue && this.renderer.placeholderNode) {\n this.renderer.placeholderNode.textContent = this.$placeholder || \"\";\n }\n }.bind(this);\n this.on(\"input\", this.$updatePlaceholder);\n }\n this.$updatePlaceholder();\n }\n },\n enableKeyboardAccessibility: {\n set: function (value) {\n var blurCommand = {\n name: \"blurTextInput\",\n description: \"Set focus to the editor content div to allow tabbing through the page\",\n bindKey: \"Esc\",\n exec: function (editor) {\n editor.blur();\n editor.renderer.scroller.focus();\n },\n readOnly: true\n };\n var focusOnEnterKeyup = function (e) {\n if (e.target == this.renderer.scroller && e.keyCode === keys['enter']) {\n e.preventDefault();\n var row = this.getCursorPosition().row;\n if (!this.isRowVisible(row))\n this.scrollToLine(row, true, true);\n this.focus();\n }\n };\n var gutterKeyboardHandler;\n if (value) {\n this.renderer.enableKeyboardAccessibility = true;\n this.renderer.keyboardFocusClassName = \"ace_keyboard-focus\";\n this.textInput.getElement().setAttribute(\"tabindex\", -1);\n this.textInput.setNumberOfExtraLines(useragent.isWin ? 3 : 0);\n this.renderer.scroller.setAttribute(\"tabindex\", 0);\n this.renderer.scroller.setAttribute(\"role\", \"group\");\n this.renderer.scroller.setAttribute(\"aria-roledescription\", nls(\"editor.scroller.aria-roledescription\", \"editor\"));\n this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName);\n this.renderer.scroller.setAttribute(\"aria-label\", nls(\"editor.scroller.aria-label\", \"Editor content, press Enter to start editing, press Escape to exit\"));\n this.renderer.scroller.addEventListener(\"keyup\", focusOnEnterKeyup.bind(this));\n this.commands.addCommand(blurCommand);\n this.renderer.$gutter.setAttribute(\"tabindex\", 0);\n this.renderer.$gutter.setAttribute(\"aria-hidden\", false);\n this.renderer.$gutter.setAttribute(\"role\", \"group\");\n this.renderer.$gutter.setAttribute(\"aria-roledescription\", nls(\"editor.gutter.aria-roledescription\", \"editor\"));\n this.renderer.$gutter.setAttribute(\"aria-label\", nls(\"editor.gutter.aria-label\", \"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit\"));\n this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName);\n this.renderer.content.setAttribute(\"aria-hidden\", true);\n if (!gutterKeyboardHandler)\n gutterKeyboardHandler = new GutterKeyboardHandler(this);\n gutterKeyboardHandler.addListener();\n }\n else {\n this.renderer.enableKeyboardAccessibility = false;\n this.textInput.getElement().setAttribute(\"tabindex\", 0);\n this.textInput.setNumberOfExtraLines(0);\n this.renderer.scroller.setAttribute(\"tabindex\", -1);\n this.renderer.scroller.removeAttribute(\"role\");\n this.renderer.scroller.removeAttribute(\"aria-roledescription\");\n this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName);\n this.renderer.scroller.removeAttribute(\"aria-label\");\n this.renderer.scroller.removeEventListener(\"keyup\", focusOnEnterKeyup.bind(this));\n this.commands.removeCommand(blurCommand);\n this.renderer.content.removeAttribute(\"aria-hidden\");\n this.renderer.$gutter.setAttribute(\"tabindex\", -1);\n this.renderer.$gutter.setAttribute(\"aria-hidden\", true);\n this.renderer.$gutter.removeAttribute(\"role\");\n this.renderer.$gutter.removeAttribute(\"aria-roledescription\");\n this.renderer.$gutter.removeAttribute(\"aria-label\");\n this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName);\n if (gutterKeyboardHandler)\n gutterKeyboardHandler.removeListener();\n }\n },\n initialValue: false\n },\n customScrollbar: \"renderer\",\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n displayIndentGuides: \"renderer\",\n highlightIndentGuides: \"renderer\",\n showGutter: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n hasCssTransforms: \"renderer\",\n maxPixelHeight: \"renderer\",\n useTextareaForIME: \"renderer\",\n useResizeObserver: \"renderer\",\n useSvgGutterIcons: \"renderer\",\n showFoldedAnnotations: \"renderer\",\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimeout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n navigateWithinSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n});\nvar relativeNumberRenderer = {\n getText: function (/**@type{EditSession}*/ session, /**@type{number}*/ row) {\n return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9 ? \"\\xb7\" : \"\"))) + \"\";\n },\n getWidth: function (session, /**@type{number}*/ lastLineNumber, config) {\n return Math.max(lastLineNumber.toString().length, (config.lastRow + 1).toString().length, 2) * config.characterWidth;\n },\n update: function (e, /**@type{Editor}*/ editor) {\n editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);\n },\n attach: function (/**@type{Editor}*/ editor) {\n editor.renderer.$gutterLayer.$renderer = this;\n editor.on(\"changeSelection\", this.update);\n this.update(null, editor);\n },\n detach: function (/**@type{Editor}*/ editor) {\n if (editor.renderer.$gutterLayer.$renderer == this)\n editor.renderer.$gutterLayer.$renderer = null;\n editor.off(\"changeSelection\", this.update);\n this.update(null, editor);\n }\n};\nexports.Editor = Editor;\n\n});\n\nace.define(\"ace/layer/lines\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar Lines = /** @class */ (function () {\n function Lines(element, canvasHeight) {\n this.element = element;\n this.canvasHeight = canvasHeight || 500000;\n this.element.style.height = (this.canvasHeight * 2) + \"px\";\n this.cells = [];\n this.cellCache = [];\n this.$offsetCoefficient = 0;\n }\n Lines.prototype.moveContainer = function (config) {\n dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);\n };\n Lines.prototype.pageChanged = function (oldConfig, newConfig) {\n return (Math.floor((oldConfig.firstRowScreen * oldConfig.lineHeight) / this.canvasHeight) !==\n Math.floor((newConfig.firstRowScreen * newConfig.lineHeight) / this.canvasHeight));\n };\n Lines.prototype.computeLineTop = function (row, config, session) {\n var screenTop = config.firstRowScreen * config.lineHeight;\n var screenPage = Math.floor(screenTop / this.canvasHeight);\n var lineTop = session.documentToScreenRow(row, 0) * config.lineHeight;\n return lineTop - (screenPage * this.canvasHeight);\n };\n Lines.prototype.computeLineHeight = function (row, config, session) {\n return config.lineHeight * session.getRowLineCount(row);\n };\n Lines.prototype.getLength = function () {\n return this.cells.length;\n };\n Lines.prototype.get = function (index) {\n return this.cells[index];\n };\n Lines.prototype.shift = function () {\n this.$cacheCell(this.cells.shift());\n };\n Lines.prototype.pop = function () {\n this.$cacheCell(this.cells.pop());\n };\n Lines.prototype.push = function (cell) {\n if (Array.isArray(cell)) {\n this.cells.push.apply(this.cells, cell);\n var fragment = dom.createFragment(this.element);\n for (var i = 0; i < cell.length; i++) {\n fragment.appendChild(cell[i].element);\n }\n this.element.appendChild(fragment);\n }\n else {\n this.cells.push(cell);\n this.element.appendChild(cell.element);\n }\n };\n Lines.prototype.unshift = function (cell) {\n if (Array.isArray(cell)) {\n this.cells.unshift.apply(this.cells, cell);\n var fragment = dom.createFragment(this.element);\n for (var i = 0; i < cell.length; i++) {\n fragment.appendChild(cell[i].element);\n }\n if (this.element.firstChild)\n this.element.insertBefore(fragment, this.element.firstChild);\n else\n this.element.appendChild(fragment);\n }\n else {\n this.cells.unshift(cell);\n this.element.insertAdjacentElement(\"afterbegin\", cell.element);\n }\n };\n Lines.prototype.last = function () {\n if (this.cells.length)\n return this.cells[this.cells.length - 1];\n else\n return null;\n };\n Lines.prototype.$cacheCell = function (cell) {\n if (!cell)\n return;\n cell.element.remove();\n this.cellCache.push(cell);\n };\n Lines.prototype.createCell = function (row, config, session, initElement) {\n var cell = this.cellCache.pop();\n if (!cell) {\n var element = dom.createElement(\"div\");\n if (initElement)\n initElement(element);\n this.element.appendChild(element);\n cell = {\n element: element,\n text: \"\",\n row: row\n };\n }\n cell.row = row;\n return cell;\n };\n return Lines;\n}());\nexports.Lines = Lines;\n\n});\n\nace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/layer/lines\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar oop = require(\"../lib/oop\");\nvar lang = require(\"../lib/lang\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar Lines = require(\"./lines\").Lines;\nvar nls = require(\"../config\").nls;\nvar Gutter = /** @class */ (function () {\n function Gutter(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n this.gutterWidth = 0;\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n this.$lines = new Lines(this.element);\n this.$lines.$offsetCoefficient = 1;\n }\n Gutter.prototype.setSession = function (session) {\n if (this.session)\n this.session.off(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session)\n session.on(\"change\", this.$updateAnnotations);\n };\n Gutter.prototype.addGutterDecoration = function (row, className) {\n if (window.console)\n console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n Gutter.prototype.removeGutterDecoration = function (row, className) {\n if (window.console)\n console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n Gutter.prototype.setAnnotations = function (annotations) {\n this.$annotations = [];\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo)\n rowInfo = this.$annotations[row] = { text: [], type: [] };\n var annoText = annotation.text;\n var annoType = annotation.type;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n if (rowInfo.text.indexOf(annoText) === -1) {\n rowInfo.text.push(annoText);\n rowInfo.type.push(annoType);\n }\n var className = annotation.className;\n if (className)\n rowInfo.className = className;\n else if (annoType == \"error\")\n rowInfo.className = \" ace_error\";\n else if (annoType == \"warning\" && rowInfo.className != \" ace_error\")\n rowInfo.className = \" ace_warning\";\n else if (annoType == \"info\" && (!rowInfo.className))\n rowInfo.className = \" ace_info\";\n }\n };\n Gutter.prototype.$updateAnnotations = function (delta) {\n if (!this.$annotations.length)\n return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n }\n else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n }\n else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n Gutter.prototype.update = function (config) {\n this.config = config;\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n this.oldLastRow = lastRow;\n this.config = config;\n this.$lines.moveContainer(config);\n this.$updateCursorRow();\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var cell = null;\n var index = -1;\n var row = firstRow;\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n if (row > lastRow) {\n while (this.$lines.getLength() > index + 1)\n this.$lines.pop();\n break;\n }\n cell = this.$lines.get(++index);\n if (cell) {\n cell.row = row;\n }\n else {\n cell = this.$lines.createCell(row, config, this.session, onCreateCell);\n this.$lines.push(cell);\n }\n this.$renderCell(cell, config, fold, row);\n row++;\n }\n this._signal(\"afterRender\");\n this.$updateGutterWidth(config);\n };\n Gutter.prototype.$updateGutterWidth = function (config) {\n var session = this.session;\n var gutterRenderer = session.gutterRenderer || this.$renderer;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineText = this.$lines.last() ? this.$lines.last().text : \"\";\n if (this.$fixedWidth || session.$useWrapMode)\n lastLineText = session.getLength() + firstLineNumber - 1;\n var gutterWidth = gutterRenderer\n ? gutterRenderer.getWidth(session, lastLineText, config)\n : lastLineText.toString().length * config.characterWidth;\n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth; (this.element.parentNode).style.width =\n this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n this._signal(\"changeGutterWidth\", gutterWidth);\n }\n };\n Gutter.prototype.$updateCursorRow = function () {\n if (!this.$highlightGutterLine)\n return;\n var position = this.session.selection.getCursor();\n if (this.$cursorRow === position.row)\n return;\n this.$cursorRow = position.row;\n };\n Gutter.prototype.updateLineHighlight = function () {\n if (!this.$highlightGutterLine)\n return;\n var row = this.session.selection.cursor.row;\n this.$cursorRow = row;\n if (this.$cursorCell && this.$cursorCell.row == row)\n return;\n if (this.$cursorCell)\n this.$cursorCell.element.className = this.$cursorCell.element.className.replace(\"ace_gutter-active-line \", \"\");\n var cells = this.$lines.cells;\n this.$cursorCell = null;\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n if (cell.row >= this.$cursorRow) {\n if (cell.row > this.$cursorRow) {\n var fold = this.session.getFoldLine(this.$cursorRow);\n if (i > 0 && fold && fold.start.row == cells[i - 1].row)\n cell = cells[i - 1];\n else\n break;\n }\n cell.element.className = \"ace_gutter-active-line \" + cell.element.className;\n this.$cursorCell = cell;\n break;\n }\n }\n };\n Gutter.prototype.scrollLines = function (config) {\n var oldConfig = this.config;\n this.config = config;\n this.$updateCursorRow();\n if (this.$lines.pageChanged(oldConfig, config))\n return this.update(config);\n this.$lines.moveContainer(config);\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n this.session.getLength() - 1);\n var oldLastRow = this.oldLastRow;\n this.oldLastRow = lastRow;\n if (!oldConfig || oldLastRow < config.firstRow)\n return this.update(config);\n if (lastRow < oldConfig.firstRow)\n return this.update(config);\n if (oldConfig.firstRow < config.firstRow)\n for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--)\n this.$lines.shift();\n if (oldLastRow > lastRow)\n for (var row = this.session.getFoldedRowCount(lastRow + 1, oldLastRow); row > 0; row--)\n this.$lines.pop();\n if (config.firstRow < oldConfig.firstRow) {\n this.$lines.unshift(this.$renderLines(config, config.firstRow, oldConfig.firstRow - 1));\n }\n if (lastRow > oldLastRow) {\n this.$lines.push(this.$renderLines(config, oldLastRow + 1, lastRow));\n }\n this.updateLineHighlight();\n this._signal(\"afterRender\");\n this.$updateGutterWidth(config);\n };\n Gutter.prototype.$renderLines = function (config, firstRow, lastRow) {\n var fragment = [];\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n var cell = this.$lines.createCell(row, config, this.session, onCreateCell);\n this.$renderCell(cell, config, foldLine, row);\n fragment.push(cell);\n row++;\n }\n return fragment;\n };\n Gutter.prototype.$renderCell = function (cell, config, fold, row) {\n var element = cell.element;\n var session = this.session;\n var textNode = element.childNodes[0];\n var foldWidget = element.childNodes[1];\n var annotationNode = element.childNodes[2];\n var annotationIconNode = annotationNode.firstChild;\n var firstLineNumber = session.$firstLineNumber;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var gutterRenderer = session.gutterRenderer || this.$renderer;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var foldStart = fold ? fold.start.row : Number.MAX_VALUE;\n var lineHeight = config.lineHeight + \"px\";\n var className = this.$useSvgGutterIcons ? \"ace_gutter-cell_svg-icons \" : \"ace_gutter-cell \";\n var iconClassName = this.$useSvgGutterIcons ? \"ace_icon_svg\" : \"ace_icon\";\n var rowText = (gutterRenderer\n ? gutterRenderer.getText(session, row)\n : row + firstLineNumber).toString();\n if (this.$highlightGutterLine) {\n if (row == this.$cursorRow || (fold && row < this.$cursorRow && row >= foldStart && this.$cursorRow <= fold.end.row)) {\n className += \"ace_gutter-active-line \";\n if (this.$cursorCell != cell) {\n if (this.$cursorCell)\n this.$cursorCell.element.className = this.$cursorCell.element.className.replace(\"ace_gutter-active-line \", \"\");\n this.$cursorCell = cell;\n }\n }\n }\n if (breakpoints[row])\n className += breakpoints[row];\n if (decorations[row])\n className += decorations[row];\n if (this.$annotations[row] && row !== foldStart)\n className += this.$annotations[row].className;\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null)\n c = foldWidgets[row] = session.getFoldWidget(row);\n }\n if (c) {\n var foldClass = \"ace_fold-widget ace_\" + c;\n var isClosedFold = c == \"start\" && row == foldStart && row < fold.end.row;\n if (isClosedFold) {\n foldClass += \" ace_closed\";\n var foldAnnotationClass = '';\n var annotationInFold = false;\n for (var i = row + 1; i <= fold.end.row; i++) {\n if (!this.$annotations[i])\n continue;\n if (this.$annotations[i].className === \" ace_error\") {\n annotationInFold = true;\n foldAnnotationClass = \" ace_error_fold\";\n break;\n }\n if (this.$annotations[i].className === \" ace_warning\") {\n annotationInFold = true;\n foldAnnotationClass = \" ace_warning_fold\";\n continue;\n }\n }\n className += foldAnnotationClass;\n }\n else\n foldClass += \" ace_open\";\n if (foldWidget.className != foldClass)\n foldWidget.className = foldClass;\n dom.setStyle(foldWidget.style, \"height\", lineHeight);\n dom.setStyle(foldWidget.style, \"display\", \"inline-block\");\n foldWidget.setAttribute(\"role\", \"button\");\n foldWidget.setAttribute(\"tabindex\", \"-1\");\n var foldRange = session.getFoldWidgetRange(row);\n if (foldRange)\n foldWidget.setAttribute(\"aria-label\", nls(\"gutter.code-folding.range.aria-label\", \"Toggle code folding, rows $0 through $1\", [foldRange.start.row + 1, foldRange.end.row + 1]));\n else {\n if (fold)\n foldWidget.setAttribute(\"aria-label\", nls(\"gutter.code-folding.closed.aria-label\", \"Toggle code folding, rows $0 through $1\", [fold.start.row + 1, fold.end.row + 1]));\n else\n foldWidget.setAttribute(\"aria-label\", nls(\"gutter.code-folding.open.aria-label\", \"Toggle code folding, row $0\", [row + 1]));\n }\n if (isClosedFold) {\n foldWidget.setAttribute(\"aria-expanded\", \"false\");\n foldWidget.setAttribute(\"title\", nls(\"gutter.code-folding.closed.title\", \"Unfold code\"));\n }\n else {\n foldWidget.setAttribute(\"aria-expanded\", \"true\");\n foldWidget.setAttribute(\"title\", nls(\"gutter.code-folding.open.title\", \"Fold code\"));\n }\n }\n else {\n if (foldWidget) {\n dom.setStyle(foldWidget.style, \"display\", \"none\");\n foldWidget.setAttribute(\"tabindex\", \"0\");\n foldWidget.removeAttribute(\"role\");\n foldWidget.removeAttribute(\"aria-label\");\n }\n }\n if (annotationInFold && this.$showFoldedAnnotations) {\n annotationNode.className = \"ace_gutter_annotation\";\n annotationIconNode.className = iconClassName;\n annotationIconNode.className += foldAnnotationClass;\n dom.setStyle(annotationIconNode.style, \"height\", lineHeight);\n dom.setStyle(annotationNode.style, \"display\", \"block\");\n dom.setStyle(annotationNode.style, \"height\", lineHeight);\n var ariaLabel;\n switch (foldAnnotationClass) {\n case \" ace_error_fold\":\n ariaLabel = nls(\"gutter.annotation.aria-label.error\", \"Read annotations row $0\", [rowText]);\n break;\n case \" ace_warning_fold\":\n ariaLabel = nls(\"gutter.annotation.aria-label.warning\", \"Read annotations row $0\", [rowText]);\n break;\n }\n annotationNode.setAttribute(\"aria-label\", ariaLabel);\n annotationNode.setAttribute(\"tabindex\", \"-1\");\n annotationNode.setAttribute(\"role\", \"button\");\n }\n else if (this.$annotations[row]) {\n annotationNode.className = \"ace_gutter_annotation\";\n annotationIconNode.className = iconClassName;\n if (this.$useSvgGutterIcons)\n annotationIconNode.className += this.$annotations[row].className;\n else\n element.classList.add(this.$annotations[row].className.replace(\" \", \"\"));\n dom.setStyle(annotationIconNode.style, \"height\", lineHeight);\n dom.setStyle(annotationNode.style, \"display\", \"block\");\n dom.setStyle(annotationNode.style, \"height\", lineHeight);\n var ariaLabel;\n switch (this.$annotations[row].className) {\n case \" ace_error\":\n ariaLabel = nls(\"gutter.annotation.aria-label.error\", \"Read annotations row $0\", [rowText]);\n break;\n case \" ace_warning\":\n ariaLabel = nls(\"gutter.annotation.aria-label.warning\", \"Read annotations row $0\", [rowText]);\n break;\n case \" ace_info\":\n ariaLabel = nls(\"gutter.annotation.aria-label.info\", \"Read annotations row $0\", [rowText]);\n break;\n }\n annotationNode.setAttribute(\"aria-label\", ariaLabel);\n annotationNode.setAttribute(\"tabindex\", \"-1\");\n annotationNode.setAttribute(\"role\", \"button\");\n }\n else {\n dom.setStyle(annotationNode.style, \"display\", \"none\");\n annotationNode.removeAttribute(\"aria-label\");\n annotationNode.removeAttribute(\"role\");\n annotationNode.setAttribute(\"tabindex\", \"0\");\n }\n if (rowText !== textNode.data) {\n textNode.data = rowText;\n }\n if (element.className != className)\n element.className = className;\n dom.setStyle(cell.element.style, \"height\", this.$lines.computeLineHeight(row, config, session) + \"px\");\n dom.setStyle(cell.element.style, \"top\", this.$lines.computeLineTop(row, config, session) + \"px\");\n cell.text = rowText;\n if (annotationNode.style.display === \"none\" && foldWidget.style.display === \"none\")\n cell.element.setAttribute(\"aria-hidden\", true);\n else\n cell.element.setAttribute(\"aria-hidden\", false);\n return cell;\n };\n Gutter.prototype.setHighlightGutterLine = function (highlightGutterLine) {\n this.$highlightGutterLine = highlightGutterLine;\n };\n Gutter.prototype.setShowLineNumbers = function (show) {\n this.$renderer = !show && {\n getWidth: function () { return 0; },\n getText: function () { return \"\"; }\n };\n };\n Gutter.prototype.getShowLineNumbers = function () {\n return this.$showLineNumbers;\n };\n Gutter.prototype.setShowFoldWidgets = function (show) {\n if (show)\n dom.addCssClass(this.element, \"ace_folding-enabled\");\n else\n dom.removeCssClass(this.element, \"ace_folding-enabled\");\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n Gutter.prototype.getShowFoldWidgets = function () {\n return this.$showFoldWidgets;\n };\n Gutter.prototype.$computePadding = function () {\n if (!this.element.firstChild)\n return { left: 0, right: 0 };\n var style = dom.computedStyle(/**@type{Element}*/ (this.element.firstChild));\n this.$padding = {};\n this.$padding.left = (parseInt(style.borderLeftWidth) || 0)\n + (parseInt(style.paddingLeft) || 0) + 1;\n this.$padding.right = (parseInt(style.borderRightWidth) || 0)\n + (parseInt(style.paddingRight) || 0);\n return this.$padding;\n };\n Gutter.prototype.getRegion = function (point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left)\n return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right)\n return \"foldWidgets\";\n };\n return Gutter;\n}());\nGutter.prototype.$fixedWidth = false;\nGutter.prototype.$highlightGutterLine = true;\nGutter.prototype.$renderer = \"\";\nGutter.prototype.$showLineNumbers = true;\nGutter.prototype.$showFoldWidgets = true;\noop.implement(Gutter.prototype, EventEmitter);\nfunction onCreateCell(element) {\n var textNode = document.createTextNode('');\n element.appendChild(textNode);\n var foldWidget = dom.createElement(\"span\");\n element.appendChild(foldWidget);\n var annotationNode = dom.createElement(\"span\");\n element.appendChild(annotationNode);\n var annotationIconNode = dom.createElement(\"span\");\n annotationNode.appendChild(annotationIconNode);\n return element;\n}\nexports.Gutter = Gutter;\n\n});\n\nace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar dom = require(\"../lib/dom\");\nvar Marker = /** @class */ (function () {\n function Marker(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n }\n Marker.prototype.setPadding = function (padding) {\n this.$padding = padding;\n };\n Marker.prototype.setSession = function (session) {\n this.session = session;\n };\n Marker.prototype.setMarkers = function (markers) {\n this.markers = markers;\n };\n Marker.prototype.elt = function (className, css) {\n var x = this.i != -1 && this.element.childNodes[this.i];\n if (!x) {\n x = document.createElement(\"div\");\n this.element.appendChild(x);\n this.i = -1;\n }\n else {\n this.i++;\n }\n x.style.cssText = css;\n x.className = className;\n };\n Marker.prototype.update = function (config) {\n if (!config)\n return;\n this.config = config;\n this.i = 0;\n var html;\n for (var key in this.markers) {\n var marker = this.markers[key];\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty())\n continue;\n range = range.toScreenRange(this.session);\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n marker.renderer(html, range, left, top, config);\n }\n else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n }\n else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n }\n else if (range.isMultiLine()) {\n if (marker.type == \"text\")\n this.drawTextMarker(html, range, marker.clazz, config);\n else\n this.drawMultiLineMarker(html, range, marker.clazz, config);\n }\n else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n if (this.i != -1) {\n while (this.i < this.element.childElementCount)\n this.element.removeChild(this.element.lastChild);\n }\n };\n Marker.prototype.$getTop = function (row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n Marker.prototype.drawTextMarker = function (stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0;\n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var lineRange = new Range(row, range.start.column, row, curr);\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n this.drawSingleLineMarker(stringBuilder, lineRange, clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\"\n + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), layerConfig, row == end ? 0 : 1, extraStyle);\n }\n };\n Marker.prototype.drawMultiLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height = config.lineHeight;\n var top = this.$getTop(range.start.row, config);\n var left = padding + range.start.column * config.characterWidth;\n extraStyle = extraStyle || \"\";\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n var range1 = range.clone();\n range1.end.row = range1.start.row;\n range1.end.column = this.session.getLine(range1.start.row).length;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br1 ace_start\", config, null, extraStyle);\n }\n else {\n this.elt(clazz + \" ace_br1 ace_start\", \"height:\" + height + \"px;\" + \"right:0;\" + \"top:\" + top + \"px;left:\" + left + \"px;\" + (extraStyle || \"\"));\n }\n if (this.session.$bidiHandler.isBidiRow(range.end.row)) {\n var range1 = range.clone();\n range1.start.row = range1.end.row;\n range1.start.column = 0;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br12\", config, null, extraStyle);\n }\n else {\n top = this.$getTop(range.end.row, config);\n var width = range.end.column * config.characterWidth;\n this.elt(clazz + \" ace_br12\", \"height:\" + height + \"px;\" +\n \"width:\" + width + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + padding + \"px;\" + (extraStyle || \"\"));\n }\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0)\n return;\n top = this.$getTop(range.start.row + 1, config);\n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n this.elt(clazz + (radiusClass ? \" ace_br\" + radiusClass : \"\"), \"height:\" + height + \"px;\" +\n \"right:0;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + padding + \"px;\" + (extraStyle || \"\"));\n };\n Marker.prototype.drawSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {\n if (this.session.$bidiHandler.isBidiRow(range.start.row))\n return this.drawBidiSingleLineMarker(stringBuilder, range, clazz, config, extraLength, extraStyle);\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"width:\" + width + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + left + \"px;\" + (extraStyle || \"\"));\n };\n Marker.prototype.drawBidiSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;\n var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);\n selections.forEach(function (selection) {\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"width:\" + (selection.width + (extraLength || 0)) + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + (padding + selection.left) + \"px;\" + (extraStyle || \"\"));\n }, this);\n };\n Marker.prototype.drawFullLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row)\n height += this.$getTop(range.end.row, config) - top;\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:0;right:0;\" + (extraStyle || \"\"));\n };\n Marker.prototype.drawScreenLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:0;right:0;\" + (extraStyle || \"\"));\n };\n return Marker;\n}());\nMarker.prototype.$padding = 0;\nfunction getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n}\nexports.Marker = Marker;\n\n});\n\nace.define(\"ace/layer/text_util\",[\"require\",\"exports\",\"module\"], function(require, exports, module){// Tokens for which Ace just uses a simple TextNode and does not add any special className.\nvar textTokens = new Set([\"text\", \"rparen\", \"lparen\"]);\nexports.isTextToken = function (tokenType) {\n return textTokens.has(tokenType);\n};\n\n});\n\nace.define(\"ace/layer/text\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/layer/lines\",\"ace/lib/event_emitter\",\"ace/config\",\"ace/layer/text_util\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar dom = require(\"../lib/dom\");\nvar lang = require(\"../lib/lang\");\nvar Lines = require(\"./lines\").Lines;\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar nls = require(\"../config\").nls;\nvar isTextToken = require(\"./text_util\").isTextToken;\nvar Text = /** @class */ (function () {\n function Text(parentEl) {\n this.dom = dom;\n this.element = this.dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n this.$lines = new Lines(this.element);\n }\n Text.prototype.$updateEolChar = function () {\n var doc = this.session.doc;\n var unixMode = doc.getNewLineCharacter() == \"\\n\" && doc.getNewLineMode() != \"windows\";\n var EOL_CHAR = unixMode ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF;\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n };\n Text.prototype.setPadding = function (padding) {\n this.$padding = padding;\n this.element.style.margin = \"0 \" + padding + \"px\";\n };\n Text.prototype.getLineHeight = function () {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n Text.prototype.getCharacterWidth = function () {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n Text.prototype.$setFontMetrics = function (measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", \n function (e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n };\n Text.prototype.checkForSizeChanges = function () {\n this.$fontMetrics.checkForSizeChanges();\n };\n Text.prototype.$pollSizeChanges = function () {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n Text.prototype.setSession = function (session) {\n this.session = session;\n if (session)\n this.$computeTabString();\n };\n Text.prototype.setShowInvisibles = function (showInvisibles) {\n if (this.showInvisibles == showInvisibles)\n return false;\n this.showInvisibles = showInvisibles;\n if (typeof showInvisibles == \"string\") {\n this.showSpaces = /tab/i.test(showInvisibles);\n this.showTabs = /space/i.test(showInvisibles);\n this.showEOL = /eol/i.test(showInvisibles);\n }\n else {\n this.showSpaces = this.showTabs = this.showEOL = showInvisibles;\n }\n this.$computeTabString();\n return true;\n };\n Text.prototype.setDisplayIndentGuides = function (display) {\n if (this.displayIndentGuides == display)\n return false;\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n Text.prototype.setHighlightIndentGuides = function (highlight) {\n if (this.$highlightIndentGuides === highlight)\n return false;\n this.$highlightIndentGuides = highlight;\n return highlight;\n };\n Text.prototype.$computeTabString = function () {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize; var tabStr = this.$tabStrings = [0];\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showTabs) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_tab\";\n span.textContent = lang.stringRepeat(this.TAB_CHAR, i);\n tabStr.push(span);\n }\n else {\n tabStr.push(this.dom.createTextNode(lang.stringRepeat(\" \", i), this.element));\n }\n }\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = this.showSpaces ? \" ace_invisible ace_invisible_space\" : \"\";\n var spaceContent = this.showSpaces\n ? lang.stringRepeat(this.SPACE_CHAR, this.tabSize)\n : lang.stringRepeat(\" \", this.tabSize);\n var tabClass = this.showTabs ? \" ace_invisible ace_invisible_tab\" : \"\";\n var tabContent = this.showTabs\n ? lang.stringRepeat(this.TAB_CHAR, this.tabSize)\n : spaceContent;\n var span = this.dom.createElement(\"span\");\n span.className = className + spaceClass;\n span.textContent = spaceContent;\n this.$tabStrings[\" \"] = span;\n var span = this.dom.createElement(\"span\");\n span.className = className + tabClass;\n span.textContent = tabContent;\n this.$tabStrings[\"\\t\"] = span;\n }\n };\n Text.prototype.updateLines = function (config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow ||\n this.config.firstRow != config.firstRow) {\n return this.update(config);\n }\n this.config = config;\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n }\n else {\n row = foldLine.end.row;\n }\n }\n lineElementsIdx++;\n }\n var heightChanged = false;\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > last)\n break; var lineElement = lineElements[lineElementsIdx++];\n if (lineElement) {\n this.dom.removeChildren(lineElement);\n this.$renderLine(lineElement, row, row == foldStart ? foldLine : false);\n if (heightChanged)\n lineElement.style.top = this.$lines.computeLineTop(row, config, this.session) + \"px\";\n var height = (config.lineHeight * this.session.getRowLength(row)) + \"px\";\n if (lineElement.style.height != height) {\n heightChanged = true;\n lineElement.style.height = height;\n }\n }\n row++;\n }\n if (heightChanged) {\n while (lineElementsIdx < this.$lines.cells.length) {\n var cell = this.$lines.cells[lineElementsIdx++];\n cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + \"px\";\n }\n }\n };\n Text.prototype.scrollLines = function (config) {\n var oldConfig = this.config;\n this.config = config;\n if (this.$lines.pageChanged(oldConfig, config))\n return this.update(config);\n this.$lines.moveContainer(config);\n var lastRow = config.lastRow;\n var oldLastRow = oldConfig ? oldConfig.lastRow : -1;\n if (!oldConfig || oldLastRow < config.firstRow)\n return this.update(config);\n if (lastRow < oldConfig.firstRow)\n return this.update(config);\n if (!oldConfig || oldConfig.lastRow < config.firstRow)\n return this.update(config);\n if (config.lastRow < oldConfig.firstRow)\n return this.update(config);\n if (oldConfig.firstRow < config.firstRow)\n for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--)\n this.$lines.shift();\n if (oldConfig.lastRow > config.lastRow)\n for (var row = this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row > 0; row--)\n this.$lines.pop();\n if (config.firstRow < oldConfig.firstRow) {\n this.$lines.unshift(this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1));\n }\n if (config.lastRow > oldConfig.lastRow) {\n this.$lines.push(this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow));\n }\n this.$highlightIndentGuide();\n };\n Text.prototype.$renderLinesFragment = function (config, firstRow, lastRow) {\n var fragment = [];\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n var line = this.$lines.createCell(row, config, this.session);\n var lineEl = line.element;\n this.dom.removeChildren(lineEl);\n dom.setStyle(lineEl.style, \"height\", this.$lines.computeLineHeight(row, config, this.session) + \"px\");\n dom.setStyle(lineEl.style, \"top\", this.$lines.computeLineTop(row, config, this.session) + \"px\");\n this.$renderLine(lineEl, row, row == foldStart ? foldLine : false);\n if (this.$useLineGroups()) {\n lineEl.className = \"ace_line_group\";\n }\n else {\n lineEl.className = \"ace_line\";\n }\n fragment.push(line);\n row++;\n }\n return fragment;\n };\n Text.prototype.update = function (config) {\n this.$lines.moveContainer(config);\n this.config = config;\n var firstRow = config.firstRow;\n var lastRow = config.lastRow;\n var lines = this.$lines;\n while (lines.getLength())\n lines.pop();\n lines.push(this.$renderLinesFragment(config, firstRow, lastRow));\n };\n Text.prototype.$renderToken = function (parent, screenColumn, token, value) {\n var self = this;\n var re = /(\\t)|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\uFEFF\\uFFF9-\\uFFFC\\u2066\\u2067\\u2068\\u202A\\u202B\\u202D\\u202E\\u202C\\u2069]+)|(\\u3000)|([\\u1100-\\u115F\\u11A3-\\u11A7\\u11FA-\\u11FF\\u2329-\\u232A\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3001-\\u303E\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u31BA\\u31C0-\\u31E3\\u31F0-\\u321E\\u3220-\\u3247\\u3250-\\u32FE\\u3300-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFF01-\\uFF60\\uFFE0-\\uFFE6]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n var valueFragment = this.dom.createFragment(this.element);\n var m;\n var i = 0;\n while (m = re.exec(value)) {\n var tab = m[1];\n var simpleSpace = m[2];\n var controlCharacter = m[3];\n var cjkSpace = m[4];\n var cjk = m[5];\n if (!self.showSpaces && simpleSpace)\n continue;\n var before = i != m.index ? value.slice(i, m.index) : \"\";\n i = m.index + m[0].length;\n if (before) {\n valueFragment.appendChild(this.dom.createTextNode(before, this.element));\n }\n if (tab) {\n var tabSize = self.session.getScreenTabSize(screenColumn + m.index);\n valueFragment.appendChild(self.$tabStrings[tabSize].cloneNode(true));\n screenColumn += tabSize - 1;\n }\n else if (simpleSpace) {\n if (self.showSpaces) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_space\";\n span.textContent = lang.stringRepeat(self.SPACE_CHAR, simpleSpace.length);\n valueFragment.appendChild(span);\n }\n else {\n valueFragment.appendChild(this.dom.createTextNode(simpleSpace, this.element));\n }\n }\n else if (controlCharacter) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_space ace_invalid\";\n span.textContent = lang.stringRepeat(self.SPACE_CHAR, controlCharacter.length);\n valueFragment.appendChild(span);\n }\n else if (cjkSpace) {\n screenColumn += 1;\n var span = this.dom.createElement(\"span\");\n span.style.width = (self.config.characterWidth * 2) + \"px\";\n span.className = self.showSpaces ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n span.textContent = self.showSpaces ? self.SPACE_CHAR : cjkSpace;\n valueFragment.appendChild(span);\n }\n else if (cjk) {\n screenColumn += 1;\n var span = this.dom.createElement(\"span\");\n span.style.width = (self.config.characterWidth * 2) + \"px\";\n span.className = \"ace_cjk\";\n span.textContent = cjk;\n valueFragment.appendChild(span);\n }\n }\n valueFragment.appendChild(this.dom.createTextNode(i ? value.slice(i) : value, this.element));\n if (!isTextToken(token.type)) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var span = this.dom.createElement(\"span\");\n if (token.type == \"fold\") {\n span.style.width = (token.value.length * this.config.characterWidth) + \"px\";\n span.setAttribute(\"title\", nls(\"inline-fold.closed.title\", \"Unfold code\"));\n }\n span.className = classes;\n span.appendChild(valueFragment);\n parent.appendChild(span);\n }\n else {\n parent.appendChild(valueFragment);\n }\n return screenColumn + value.length;\n };\n Text.prototype.renderIndentGuide = function (parent, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max)\n return value;\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n var count = cols / this.tabSize;\n for (var i = 0; i < count; i++) {\n parent.appendChild(this.$tabStrings[\" \"].cloneNode(true));\n }\n this.$highlightIndentGuide();\n return value.substr(cols);\n }\n else if (value[0] == \"\\t\") {\n for (var i = 0; i < cols; i++) {\n parent.appendChild(this.$tabStrings[\"\\t\"].cloneNode(true));\n }\n this.$highlightIndentGuide();\n return value.substr(cols);\n }\n this.$highlightIndentGuide();\n return value;\n };\n Text.prototype.$highlightIndentGuide = function () {\n if (!this.$highlightIndentGuides || !this.displayIndentGuides)\n return;\n this.$highlightIndentGuideMarker = {\n indentLevel: undefined,\n start: undefined,\n end: undefined,\n dir: undefined\n };\n var lines = this.session.doc.$lines;\n if (!lines)\n return;\n var cursor = this.session.selection.getCursor();\n var initialIndent = /^\\s*/.exec(this.session.doc.getLine(cursor.row))[0].length;\n var elementIndentLevel = Math.floor(initialIndent / this.tabSize);\n this.$highlightIndentGuideMarker = {\n indentLevel: elementIndentLevel,\n start: cursor.row\n };\n var bracketHighlight = this.session.$bracketHighlight;\n if (bracketHighlight) {\n var ranges = this.session.$bracketHighlight.ranges;\n for (var i = 0; i < ranges.length; i++) {\n if (cursor.row !== ranges[i].start.row) {\n this.$highlightIndentGuideMarker.end = ranges[i].start.row;\n if (cursor.row > ranges[i].start.row) {\n this.$highlightIndentGuideMarker.dir = -1;\n }\n else {\n this.$highlightIndentGuideMarker.dir = 1;\n }\n break;\n }\n }\n }\n if (!this.$highlightIndentGuideMarker.end) {\n if (lines[cursor.row] !== '' && cursor.column === lines[cursor.row].length) {\n this.$highlightIndentGuideMarker.dir = 1;\n for (var i = cursor.row + 1; i < lines.length; i++) {\n var line = lines[i];\n var currentIndent = /^\\s*/.exec(line)[0].length;\n if (line !== '') {\n this.$highlightIndentGuideMarker.end = i;\n if (currentIndent <= initialIndent)\n break;\n }\n }\n }\n }\n this.$renderHighlightIndentGuide();\n };\n Text.prototype.$clearActiveIndentGuide = function () {\n var cells = this.$lines.cells;\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var childNodes = cell.element.childNodes;\n if (childNodes.length > 0) {\n for (var j = 0; j < childNodes.length; j++) {\n if (childNodes[j].classList && childNodes[j].classList.contains(\"ace_indent-guide-active\")) {\n childNodes[j].classList.remove(\"ace_indent-guide-active\");\n break;\n }\n }\n }\n }\n };\n Text.prototype.$setIndentGuideActive = function (cell, indentLevel) {\n var line = this.session.doc.getLine(cell.row);\n if (line !== \"\") {\n var childNodes = cell.element.childNodes;\n if (childNodes) {\n var node = childNodes[indentLevel - 1];\n if (node && node.classList && node.classList.contains(\"ace_indent-guide\"))\n node.classList.add(\"ace_indent-guide-active\");\n }\n }\n };\n Text.prototype.$renderHighlightIndentGuide = function () {\n if (!this.$lines)\n return;\n var cells = this.$lines.cells;\n this.$clearActiveIndentGuide();\n var indentLevel = this.$highlightIndentGuideMarker.indentLevel;\n if (indentLevel !== 0) {\n if (this.$highlightIndentGuideMarker.dir === 1) {\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n if (this.$highlightIndentGuideMarker.end && cell.row >= this.$highlightIndentGuideMarker.start\n + 1) {\n if (cell.row >= this.$highlightIndentGuideMarker.end)\n break;\n this.$setIndentGuideActive(cell, indentLevel);\n }\n }\n }\n else {\n for (var i = cells.length - 1; i >= 0; i--) {\n var cell = cells[i];\n if (this.$highlightIndentGuideMarker.end && cell.row < this.$highlightIndentGuideMarker.start) {\n if (cell.row <= this.$highlightIndentGuideMarker.end)\n break;\n this.$setIndentGuideActive(cell, indentLevel);\n }\n }\n }\n }\n };\n Text.prototype.$createLineElement = function (parent) {\n var lineEl = this.dom.createElement(\"div\");\n lineEl.className = \"ace_line\";\n lineEl.style.height = this.config.lineHeight + \"px\";\n return lineEl;\n };\n Text.prototype.$renderWrappedLine = function (parent, tokens, splits) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n var lineEl = this.$createLineElement();\n parent.appendChild(lineEl);\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(lineEl, value, splitChars);\n if (!value)\n continue;\n chars -= value.length;\n }\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value);\n chars += value.length;\n }\n else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value.substring(0, splitChars - chars));\n value = value.substring(splitChars - chars);\n chars = splitChars;\n lineEl = this.$createLineElement();\n parent.appendChild(lineEl);\n lineEl.appendChild(this.dom.createTextNode(lang.stringRepeat(\"\\xa0\", splits.indent), this.element));\n split++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value);\n }\n }\n }\n if (splits[splits.length - 1] > this.MAX_LINE_LENGTH)\n this.$renderOverflowMessage(lineEl, screenColumn, null, \"\", true);\n };\n Text.prototype.$renderSimpleLine = function (parent, tokens) {\n var screenColumn = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n value = this.renderIndentGuide(parent, value);\n if (!value)\n continue;\n }\n if (screenColumn + value.length > this.MAX_LINE_LENGTH)\n return this.$renderOverflowMessage(parent, screenColumn, token, value);\n screenColumn = this.$renderToken(parent, screenColumn, token, value);\n }\n };\n Text.prototype.$renderOverflowMessage = function (parent, screenColumn, token, value, hide) {\n token && this.$renderToken(parent, screenColumn, token, value.slice(0, this.MAX_LINE_LENGTH - screenColumn));\n var overflowEl = this.dom.createElement(\"span\");\n overflowEl.className = \"ace_inline_button ace_keyword ace_toggle_wrap\";\n overflowEl.textContent = hide ? \"\" : \"\";\n parent.appendChild(overflowEl);\n };\n Text.prototype.$renderLine = function (parent, row, foldLine) {\n if (!foldLine && foldLine != false)\n foldLine = this.session.getFoldLine(row);\n if (foldLine)\n var tokens = this.$getFoldLineTokens(row, foldLine);\n else\n var tokens = this.session.getTokens(row);\n var lastLineEl = parent;\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n if (splits && splits.length) {\n this.$renderWrappedLine(parent, tokens, splits);\n var lastLineEl = parent.lastChild;\n }\n else {\n var lastLineEl = parent;\n if (this.$useLineGroups()) {\n lastLineEl = this.$createLineElement();\n parent.appendChild(lastLineEl);\n }\n this.$renderSimpleLine(lastLineEl, tokens);\n }\n }\n else if (this.$useLineGroups()) {\n lastLineEl = this.$createLineElement();\n parent.appendChild(lastLineEl);\n }\n if (this.showEOL && lastLineEl) {\n if (foldLine)\n row = foldLine.end.row;\n var invisibleEl = this.dom.createElement(\"span\");\n invisibleEl.className = \"ace_invisible ace_invisible_eol\";\n invisibleEl.textContent = row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR;\n lastLineEl.appendChild(invisibleEl);\n }\n };\n Text.prototype.$getFoldLineTokens = function (row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n function addTokens(tokens, from, to) {\n var idx = 0, col = 0;\n while ((col + tokens[idx].value.length) < from) {\n col += tokens[idx].value.length;\n idx++;\n if (idx == tokens.length)\n return;\n }\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > (to - from))\n value = value.substring(0, to - from);\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n col = from + value.length;\n idx += 1;\n }\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n }\n else\n renderTokens.push(tokens[idx]);\n col += value.length;\n idx += 1;\n }\n }\n var tokens = session.getTokens(row);\n foldLine.walk(function (placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n }\n else {\n if (isNewRow)\n tokens = session.getTokens(row);\n if (tokens.length)\n addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n return renderTokens;\n };\n Text.prototype.$useLineGroups = function () {\n return this.session.getUseWrapMode();\n };\n return Text;\n}());\nText.prototype.EOF_CHAR = \"\\xB6\";\nText.prototype.EOL_CHAR_LF = \"\\xAC\";\nText.prototype.EOL_CHAR_CRLF = \"\\xa4\";\nText.prototype.EOL_CHAR = Text.prototype.EOL_CHAR_LF;\nText.prototype.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\nText.prototype.SPACE_CHAR = \"\\xB7\";\nText.prototype.$padding = 0;\nText.prototype.MAX_LINE_LENGTH = 10000;\nText.prototype.showInvisibles = false;\nText.prototype.showSpaces = false;\nText.prototype.showTabs = false;\nText.prototype.showEOL = false;\nText.prototype.displayIndentGuides = true;\nText.prototype.$highlightIndentGuides = true;\nText.prototype.$tabStrings = [];\nText.prototype.destroy = {};\nText.prototype.onChangeTabSize = Text.prototype.$computeTabString;\noop.implement(Text.prototype, EventEmitter);\nexports.Text = Text;\n\n});\n\nace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar Cursor = /** @class */ (function () {\n function Cursor(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = this.$updateOpacity.bind(this);\n }\n Cursor.prototype.$updateOpacity = function (val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--;)\n dom.setStyle(cursors[i].style, \"opacity\", val ? \"\" : \"0\");\n };\n Cursor.prototype.$startCssAnimation = function () {\n var cursors = this.cursors;\n for (var i = cursors.length; i--;)\n cursors[i].style.animationDuration = this.blinkInterval + \"ms\";\n this.$isAnimating = true;\n setTimeout(function () {\n if (this.$isAnimating) {\n dom.addCssClass(this.element, \"ace_animate-blinking\");\n }\n }.bind(this));\n };\n Cursor.prototype.$stopCssAnimation = function () {\n this.$isAnimating = false;\n dom.removeCssClass(this.element, \"ace_animate-blinking\");\n };\n Cursor.prototype.setPadding = function (padding) {\n this.$padding = padding;\n };\n Cursor.prototype.setSession = function (session) {\n this.session = session;\n };\n Cursor.prototype.setBlinking = function (blinking) {\n if (blinking != this.isBlinking) {\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n Cursor.prototype.setBlinkInterval = function (blinkInterval) {\n if (blinkInterval != this.blinkInterval) {\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n Cursor.prototype.setSmoothBlinking = function (smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.restartTimer();\n }\n };\n Cursor.prototype.addCursor = function () {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n Cursor.prototype.removeCursor = function () {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n Cursor.prototype.hideCursor = function () {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n Cursor.prototype.showCursor = function () {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n Cursor.prototype.restartTimer = function () {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n this.$stopCssAnimation();\n if (this.smoothBlinking) {\n this.$isSmoothBlinking = false;\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n update(true);\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible) {\n this.$stopCssAnimation();\n return;\n }\n if (this.smoothBlinking) {\n this.$isSmoothBlinking = true;\n setTimeout(function () {\n if (this.$isSmoothBlinking) {\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }\n }.bind(this));\n }\n if (dom.HAS_CSS_ANIMATION) {\n this.$startCssAnimation();\n }\n else {\n var blink = /**@this{Cursor}*/ function () {\n this.timeoutId = setTimeout(function () {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n this.intervalId = setInterval(function () {\n update(true);\n blink();\n }, this.blinkInterval);\n blink();\n }\n };\n Cursor.prototype.getPixelPosition = function (position, onScreen) {\n if (!this.config || !this.session)\n return { left: 0, top: 0 };\n if (!position)\n position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : pos.column * this.config.characterWidth);\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *\n this.config.lineHeight;\n return { left: cursorLeft, top: cursorTop };\n };\n Cursor.prototype.isCursorInView = function (pixelPos, config) {\n return pixelPos.top >= 0 && pixelPos.top < config.maxHeight;\n };\n Cursor.prototype.update = function (config) {\n this.config = config;\n var selections = this.session.$selectionMarkers;\n var i = 0, cursorIndex = 0;\n if (selections === undefined || selections.length === 0) {\n selections = [{ cursor: null }];\n }\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n if ((pixelPos.top > config.height + config.offset ||\n pixelPos.top < 0) && i > 1) {\n continue;\n }\n var element = this.cursors[cursorIndex++] || this.addCursor();\n var style = element.style;\n if (!this.drawCursor) {\n if (!this.isCursorInView(pixelPos, config)) {\n dom.setStyle(style, \"display\", \"none\");\n }\n else {\n dom.setStyle(style, \"display\", \"block\");\n dom.translate(element, pixelPos.left, pixelPos.top);\n dom.setStyle(style, \"width\", Math.round(config.characterWidth) + \"px\");\n dom.setStyle(style, \"height\", config.lineHeight + \"px\");\n }\n }\n else {\n this.drawCursor(element, pixelPos, config, selections[i], this.session);\n }\n }\n while (this.cursors.length > cursorIndex)\n this.removeCursor();\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n Cursor.prototype.$setOverwrite = function (overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite)\n dom.addCssClass(this.element, \"ace_overwrite-cursors\");\n else\n dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n Cursor.prototype.destroy = function () {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n return Cursor;\n}());\nCursor.prototype.$padding = 0;\nCursor.prototype.drawCursor = null;\nexports.Cursor = Cursor;\n\n});\n\nace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar event = require(\"./lib/event\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar MAX_SCROLL_H = 0x8000;\nvar Scrollbar = /** @class */ (function () {\n function Scrollbar(parent, classSuffix) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + classSuffix;\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.inner.textContent = \"\\xa0\";\n this.element.appendChild(this.inner);\n parent.appendChild(this.element);\n this.setVisible(false);\n this.skipEvent = false;\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n }\n Scrollbar.prototype.setVisible = function (isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n return Scrollbar;\n}());\noop.implement(Scrollbar.prototype, EventEmitter);\nvar VScrollBar = /** @class */ (function (_super) {\n __extends(VScrollBar, _super);\n function VScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-v') || this;\n _this.scrollTop = 0;\n _this.scrollHeight = 0;\n renderer.$scrollbarWidth =\n _this.width = dom.scrollbarWidth(parent.ownerDocument);\n _this.inner.style.width =\n _this.element.style.width = (_this.width || 15) + 5 + \"px\";\n _this.$minWidth = 0;\n return _this;\n }\n VScrollBar.prototype.onScroll = function () {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n this._emit(\"scroll\", { data: this.scrollTop });\n }\n this.skipEvent = false;\n };\n VScrollBar.prototype.getWidth = function () {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n VScrollBar.prototype.setHeight = function (height) {\n this.element.style.height = height + \"px\";\n };\n VScrollBar.prototype.setScrollHeight = function (height) {\n this.scrollHeight = height;\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n }\n else if (this.coeff != 1) {\n this.coeff = 1;\n }\n this.inner.style.height = height + \"px\";\n };\n VScrollBar.prototype.setScrollTop = function (scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n return VScrollBar;\n}(Scrollbar));\nVScrollBar.prototype.setInnerHeight = VScrollBar.prototype.setScrollHeight;\nvar HScrollBar = /** @class */ (function (_super) {\n __extends(HScrollBar, _super);\n function HScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-h') || this;\n _this.scrollLeft = 0;\n _this.height = renderer.$scrollbarWidth;\n _this.inner.style.height =\n _this.element.style.height = (_this.height || 15) + 5 + \"px\";\n return _this;\n }\n HScrollBar.prototype.onScroll = function () {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n this._emit(\"scroll\", { data: this.scrollLeft });\n }\n this.skipEvent = false;\n };\n HScrollBar.prototype.getHeight = function () {\n return this.isVisible ? this.height : 0;\n };\n HScrollBar.prototype.setWidth = function (width) {\n this.element.style.width = width + \"px\";\n };\n HScrollBar.prototype.setInnerWidth = function (width) {\n this.inner.style.width = width + \"px\";\n };\n HScrollBar.prototype.setScrollWidth = function (width) {\n this.inner.style.width = width + \"px\";\n };\n HScrollBar.prototype.setScrollLeft = function (scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n return HScrollBar;\n}(Scrollbar));\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n\n});\n\nace.define(\"ace/scrollbar_custom\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar event = require(\"./lib/event\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\ndom.importCssString(\".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\\n position: absolute;\\n background: rgba(128, 128, 128, 0.6);\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n border: 1px solid #bbb;\\n border-radius: 2px;\\n z-index: 8;\\n}\\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\\n position: absolute;\\n z-index: 6;\\n background: none;\\n overflow: hidden!important;\\n}\\n.ace_editor>.ace_sb-v {\\n z-index: 6;\\n right: 0;\\n top: 0;\\n width: 12px;\\n}\\n.ace_editor>.ace_sb-v div {\\n z-index: 8;\\n right: 0;\\n width: 100%;\\n}\\n.ace_editor>.ace_sb-h {\\n bottom: 0;\\n left: 0;\\n height: 12px;\\n}\\n.ace_editor>.ace_sb-h div {\\n bottom: 0;\\n height: 100%;\\n}\\n.ace_editor>.ace_sb_grabbed {\\n z-index: 8;\\n background: #000;\\n}\", \"ace_scrollbar.css\", false);\nvar ScrollBar = /** @class */ (function () {\n function ScrollBar(parent, classSuffix) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_sb\" + classSuffix;\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"\";\n this.element.appendChild(this.inner);\n this.VScrollWidth = 12;\n this.HScrollHeight = 12;\n parent.appendChild(this.element);\n this.setVisible(false);\n this.skipEvent = false;\n event.addMultiMouseDownListener(this.element, [500, 300, 300], this, \"onMouseDown\");\n }\n ScrollBar.prototype.setVisible = function (isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n return ScrollBar;\n}());\noop.implement(ScrollBar.prototype, EventEmitter);\nvar VScrollBar = /** @class */ (function (_super) {\n __extends(VScrollBar, _super);\n function VScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-v') || this;\n _this.scrollTop = 0;\n _this.scrollHeight = 0;\n _this.parent = parent;\n _this.width = _this.VScrollWidth;\n _this.renderer = renderer;\n _this.inner.style.width = _this.element.style.width = (_this.width || 15) + \"px\";\n _this.$minWidth = 0;\n return _this;\n }\n VScrollBar.prototype.onMouseDown = function (eType, e) {\n if (eType !== \"mousedown\")\n return;\n if (event.getButton(e) !== 0 || e.detail === 2) {\n return;\n }\n if (e.target === this.inner) {\n var self = this;\n var mousePageY = e.clientY;\n var onMouseMove = function (e) {\n mousePageY = e.clientY;\n };\n var onMouseUp = function () {\n clearInterval(timerId);\n };\n var startY = e.clientY;\n var startTop = this.thumbTop;\n var onScrollInterval = function () {\n if (mousePageY === undefined)\n return;\n var scrollTop = self.scrollTopFromThumbTop(startTop + mousePageY - startY);\n if (scrollTop === self.scrollTop)\n return;\n self._emit(\"scroll\", { data: scrollTop });\n };\n event.capture(this.inner, onMouseMove, onMouseUp);\n var timerId = setInterval(onScrollInterval, 20);\n return event.preventDefault(e);\n }\n var top = e.clientY - this.element.getBoundingClientRect().top - this.thumbHeight / 2;\n this._emit(\"scroll\", { data: this.scrollTopFromThumbTop(top) });\n return event.preventDefault(e);\n };\n VScrollBar.prototype.getHeight = function () {\n return this.height;\n };\n VScrollBar.prototype.scrollTopFromThumbTop = function (thumbTop) {\n var scrollTop = thumbTop * (this.pageHeight - this.viewHeight) / (this.slideHeight - this.thumbHeight);\n scrollTop = scrollTop >> 0;\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n else if (scrollTop > this.pageHeight - this.viewHeight) {\n scrollTop = this.pageHeight - this.viewHeight;\n }\n return scrollTop;\n };\n VScrollBar.prototype.getWidth = function () {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n VScrollBar.prototype.setHeight = function (height) {\n this.height = Math.max(0, height);\n this.slideHeight = this.height;\n this.viewHeight = this.height;\n this.setScrollHeight(this.pageHeight, true);\n };\n VScrollBar.prototype.setScrollHeight = function (height, force) {\n if (this.pageHeight === height && !force)\n return;\n this.pageHeight = height;\n this.thumbHeight = this.slideHeight * this.viewHeight / this.pageHeight;\n if (this.thumbHeight > this.slideHeight)\n this.thumbHeight = this.slideHeight;\n if (this.thumbHeight < 15)\n this.thumbHeight = 15;\n this.inner.style.height = this.thumbHeight + \"px\";\n if (this.scrollTop > (this.pageHeight - this.viewHeight)) {\n this.scrollTop = (this.pageHeight - this.viewHeight);\n if (this.scrollTop < 0)\n this.scrollTop = 0;\n this._emit(\"scroll\", { data: this.scrollTop });\n }\n };\n VScrollBar.prototype.setScrollTop = function (scrollTop) {\n this.scrollTop = scrollTop;\n if (scrollTop < 0)\n scrollTop = 0;\n this.thumbTop = scrollTop * (this.slideHeight - this.thumbHeight) / (this.pageHeight - this.viewHeight);\n this.inner.style.top = this.thumbTop + \"px\";\n };\n return VScrollBar;\n}(ScrollBar));\nVScrollBar.prototype.setInnerHeight = VScrollBar.prototype.setScrollHeight;\nvar HScrollBar = /** @class */ (function (_super) {\n __extends(HScrollBar, _super);\n function HScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-h') || this;\n _this.scrollLeft = 0;\n _this.scrollWidth = 0;\n _this.height = _this.HScrollHeight;\n _this.inner.style.height = _this.element.style.height = (_this.height || 12) + \"px\";\n _this.renderer = renderer;\n return _this;\n }\n HScrollBar.prototype.onMouseDown = function (eType, e) {\n if (eType !== \"mousedown\")\n return;\n if (event.getButton(e) !== 0 || e.detail === 2) {\n return;\n }\n if (e.target === this.inner) {\n var self = this;\n var mousePageX = e.clientX;\n var onMouseMove = function (e) {\n mousePageX = e.clientX;\n };\n var onMouseUp = function () {\n clearInterval(timerId);\n };\n var startX = e.clientX;\n var startLeft = this.thumbLeft;\n var onScrollInterval = function () {\n if (mousePageX === undefined)\n return;\n var scrollLeft = self.scrollLeftFromThumbLeft(startLeft + mousePageX - startX);\n if (scrollLeft === self.scrollLeft)\n return;\n self._emit(\"scroll\", { data: scrollLeft });\n };\n event.capture(this.inner, onMouseMove, onMouseUp);\n var timerId = setInterval(onScrollInterval, 20);\n return event.preventDefault(e);\n }\n var left = e.clientX - this.element.getBoundingClientRect().left - this.thumbWidth / 2;\n this._emit(\"scroll\", { data: this.scrollLeftFromThumbLeft(left) });\n return event.preventDefault(e);\n };\n HScrollBar.prototype.getHeight = function () {\n return this.isVisible ? this.height : 0;\n };\n HScrollBar.prototype.scrollLeftFromThumbLeft = function (thumbLeft) {\n var scrollLeft = thumbLeft * (this.pageWidth - this.viewWidth) / (this.slideWidth - this.thumbWidth);\n scrollLeft = scrollLeft >> 0;\n if (scrollLeft < 0) {\n scrollLeft = 0;\n }\n else if (scrollLeft > this.pageWidth - this.viewWidth) {\n scrollLeft = this.pageWidth - this.viewWidth;\n }\n return scrollLeft;\n };\n HScrollBar.prototype.setWidth = function (width) {\n this.width = Math.max(0, width);\n this.element.style.width = this.width + \"px\";\n this.slideWidth = this.width;\n this.viewWidth = this.width;\n this.setScrollWidth(this.pageWidth, true);\n };\n HScrollBar.prototype.setScrollWidth = function (width, force) {\n if (this.pageWidth === width && !force)\n return;\n this.pageWidth = width;\n this.thumbWidth = this.slideWidth * this.viewWidth / this.pageWidth;\n if (this.thumbWidth > this.slideWidth)\n this.thumbWidth = this.slideWidth;\n if (this.thumbWidth < 15)\n this.thumbWidth = 15;\n this.inner.style.width = this.thumbWidth + \"px\";\n if (this.scrollLeft > (this.pageWidth - this.viewWidth)) {\n this.scrollLeft = (this.pageWidth - this.viewWidth);\n if (this.scrollLeft < 0)\n this.scrollLeft = 0;\n this._emit(\"scroll\", { data: this.scrollLeft });\n }\n };\n HScrollBar.prototype.setScrollLeft = function (scrollLeft) {\n this.scrollLeft = scrollLeft;\n if (scrollLeft < 0)\n scrollLeft = 0;\n this.thumbLeft = scrollLeft * (this.slideWidth - this.thumbWidth) / (this.pageWidth - this.viewWidth);\n this.inner.style.left = (this.thumbLeft) + \"px\";\n };\n return HScrollBar;\n}(ScrollBar));\nHScrollBar.prototype.setInnerWidth = HScrollBar.prototype.setScrollWidth;\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n\n});\n\nace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"], function(require, exports, module){\"use strict\";\nvar event = require(\"./lib/event\");\nvar RenderLoop = /** @class */ (function () {\n function RenderLoop(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.$recursionLimit = 2;\n this.window = win || window;\n var _self = this;\n this._flush = function (ts) {\n _self.pending = false;\n var changes = _self.changes;\n if (changes) {\n event.blockIdle(100);\n _self.changes = 0;\n _self.onRender(changes);\n }\n if (_self.changes) {\n if (_self.$recursionLimit-- < 0)\n return;\n _self.schedule();\n }\n else {\n _self.$recursionLimit = 2;\n }\n };\n }\n RenderLoop.prototype.schedule = function (change) {\n this.changes = this.changes | change;\n if (this.changes && !this.pending) {\n event.nextFrame(this._flush);\n this.pending = true;\n }\n };\n RenderLoop.prototype.clear = function (change) {\n var changes = this.changes;\n this.changes = 0;\n return changes;\n };\n return RenderLoop;\n}());\nexports.RenderLoop = RenderLoop;\n\n});\n\nace.define(\"ace/layer/font_metrics\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(require, exports, module){var oop = require(\"../lib/oop\");\nvar dom = require(\"../lib/dom\");\nvar lang = require(\"../lib/lang\");\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar CHAR_COUNT = 512;\nvar USE_OBSERVER = typeof ResizeObserver == \"function\";\nvar L = 200;\nvar FontMetrics = /** @class */ (function () {\n function FontMetrics(parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n this.$measureNode.textContent = lang.stringRepeat(\"X\", CHAR_COUNT);\n this.$characterSize = { width: 0, height: 0 };\n if (USE_OBSERVER)\n this.$addObserver();\n else\n this.checkForSizeChanges();\n }\n FontMetrics.prototype.$setMeasureNodeStyles = function (style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n }\n else {\n style.font = \"inherit\";\n }\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n FontMetrics.prototype.checkForSizeChanges = function (size) {\n if (size === undefined)\n size = this.$measureSizes();\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n this._emit(\"changeCharacterSize\", { data: size });\n }\n };\n FontMetrics.prototype.$addObserver = function () {\n var self = this;\n this.$observer = new window.ResizeObserver(function (e) {\n self.checkForSizeChanges();\n });\n this.$observer.observe(this.$measureNode);\n };\n FontMetrics.prototype.$pollSizeChanges = function () {\n if (this.$pollSizeChangesTimer || this.$observer)\n return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = event.onIdle(function cb() {\n self.checkForSizeChanges();\n event.onIdle(cb, 500);\n }, 500);\n };\n FontMetrics.prototype.setPolling = function (val) {\n if (val) {\n this.$pollSizeChanges();\n }\n else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n FontMetrics.prototype.$measureSizes = function (node) {\n var size = {\n height: (node || this.$measureNode).clientHeight,\n width: (node || this.$measureNode).clientWidth / CHAR_COUNT\n };\n if (size.width === 0 || size.height === 0)\n return null;\n return size;\n };\n FontMetrics.prototype.$measureCharWidth = function (ch) {\n this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n FontMetrics.prototype.getCharacterWidth = function (ch) {\n var w = this.charSizes[ch];\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n return w;\n };\n FontMetrics.prototype.destroy = function () {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$observer)\n this.$observer.disconnect();\n if (this.el && this.el.parentNode)\n this.el.parentNode.removeChild(this.el);\n };\n FontMetrics.prototype.$getZoom = function (element) {\n if (!element || !element.parentElement)\n return 1;\n return (window.getComputedStyle(element)[\"zoom\"] || 1) * this.$getZoom(element.parentElement);\n };\n FontMetrics.prototype.$initTransformMeasureNodes = function () {\n var t = function (t, l) {\n return [\"div\", {\n style: \"position: absolute;top:\" + t + \"px;left:\" + l + \"px;\"\n }];\n };\n this.els = dom.buildDom([t(0, 0), t(L, 0), t(0, L), t(L, L)], this.el);\n };\n FontMetrics.prototype.transformCoordinates = function (clientPos, elPos) {\n if (clientPos) {\n var zoom = this.$getZoom(this.el);\n clientPos = mul(1 / zoom, clientPos);\n }\n function solve(l1, l2, r) {\n var det = l1[1] * l2[0] - l1[0] * l2[1];\n return [\n (-l2[1] * r[0] + l2[0] * r[1]) / det,\n (+l1[1] * r[0] - l1[0] * r[1]) / det\n ];\n }\n function sub(a, b) { return [a[0] - b[0], a[1] - b[1]]; }\n function add(a, b) { return [a[0] + b[0], a[1] + b[1]]; }\n function mul(a, b) { return [a * b[0], a * b[1]]; }\n if (!this.els)\n this.$initTransformMeasureNodes();\n function p(el) {\n var r = el.getBoundingClientRect();\n return [r.left, r.top];\n }\n var a = p(this.els[0]);\n var b = p(this.els[1]);\n var c = p(this.els[2]);\n var d = p(this.els[3]);\n var h = solve(sub(d, b), sub(d, c), sub(add(b, c), add(d, a)));\n var m1 = mul(1 + h[0], sub(b, a));\n var m2 = mul(1 + h[1], sub(c, a));\n if (elPos) {\n var x = elPos;\n var k = h[0] * x[0] / L + h[1] * x[1] / L + 1;\n var ut = add(mul(x[0], m1), mul(x[1], m2));\n return add(mul(1 / k / L, ut), a);\n }\n var u = sub(clientPos, a);\n var f = solve(sub(m1, mul(h[0], u)), sub(m2, mul(h[1], u)), u);\n return mul(L, f);\n };\n return FontMetrics;\n}());\nFontMetrics.prototype.$characterSize = { width: 0, height: 0 };\noop.implement(FontMetrics.prototype, EventEmitter);\nexports.FontMetrics = FontMetrics;\n\n});\n\nace.define(\"ace/css/editor-css\",[\"require\",\"exports\",\"module\"], function(require, exports, module){/*\nstyles = []\nfor (var i = 1; i < 16; i++) {\n styles.push(\".ace_br\" + i + \"{\" + (\n [\"top-left\", \"top-right\", \"bottom-right\", \"bottom-left\"]\n ).map(function(x, j) {\n return i & (1< .ace_line, .ace_text-layer > .ace_line_group {\\n contain: style size layout;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n}\\n\\n.ace_hidpi .ace_text-layer,\\n.ace_hidpi .ace_gutter-layer,\\n.ace_hidpi .ace_content,\\n.ace_hidpi .ace_gutter {\\n contain: strict;\\n}\\n.ace_hidpi .ace_text-layer > .ace_line, \\n.ace_hidpi .ace_text-layer > .ace_line_group {\\n contain: strict;\\n}\\n\\n.ace_cjk {\\n display: inline-block;\\n text-align: center;\\n}\\n\\n.ace_cursor-layer {\\n z-index: 4;\\n}\\n\\n.ace_cursor {\\n z-index: 4;\\n position: absolute;\\n box-sizing: border-box;\\n border-left: 2px solid;\\n /* workaround for smooth cursor repaintng whole screen in chrome */\\n transform: translatez(0);\\n}\\n\\n.ace_multiselect .ace_cursor {\\n border-left-width: 1px;\\n}\\n\\n.ace_slim-cursors .ace_cursor {\\n border-left-width: 1px;\\n}\\n\\n.ace_overwrite-cursors .ace_cursor {\\n border-left-width: 0;\\n border-bottom: 1px solid;\\n}\\n\\n.ace_hidden-cursors .ace_cursor {\\n opacity: 0.2;\\n}\\n\\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\\n opacity: 0;\\n}\\n\\n.ace_smooth-blinking .ace_cursor {\\n transition: opacity 0.18s;\\n}\\n\\n.ace_animate-blinking .ace_cursor {\\n animation-duration: 1000ms;\\n animation-timing-function: step-end;\\n animation-name: blink-ace-animate;\\n animation-iteration-count: infinite;\\n}\\n\\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\\n animation-duration: 1000ms;\\n animation-timing-function: ease-in-out;\\n animation-name: blink-ace-animate-smooth;\\n}\\n \\n@keyframes blink-ace-animate {\\n from, to { opacity: 1; }\\n 60% { opacity: 0; }\\n}\\n\\n@keyframes blink-ace-animate-smooth {\\n from, to { opacity: 1; }\\n 45% { opacity: 1; }\\n 60% { opacity: 0; }\\n 85% { opacity: 0; }\\n}\\n\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\n position: absolute;\\n z-index: 3;\\n}\\n\\n.ace_marker-layer .ace_selection {\\n position: absolute;\\n z-index: 5;\\n}\\n\\n.ace_marker-layer .ace_bracket {\\n position: absolute;\\n z-index: 6;\\n}\\n\\n.ace_marker-layer .ace_error_bracket {\\n position: absolute;\\n border-bottom: 1px solid #DE5555;\\n border-radius: 0;\\n}\\n\\n.ace_marker-layer .ace_active-line {\\n position: absolute;\\n z-index: 2;\\n}\\n\\n.ace_marker-layer .ace_selected-word {\\n position: absolute;\\n z-index: 4;\\n box-sizing: border-box;\\n}\\n\\n.ace_line .ace_fold {\\n box-sizing: border-box;\\n\\n display: inline-block;\\n height: 11px;\\n margin-top: -2px;\\n vertical-align: middle;\\n\\n background-image:\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\n background-repeat: no-repeat, repeat-x;\\n background-position: center center, top left;\\n color: transparent;\\n\\n border: 1px solid black;\\n border-radius: 2px;\\n\\n cursor: pointer;\\n pointer-events: auto;\\n}\\n\\n.ace_dark .ace_fold {\\n}\\n\\n.ace_fold:hover{\\n background-image:\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\n}\\n\\n.ace_tooltip {\\n background-color: #f5f5f5;\\n border: 1px solid gray;\\n border-radius: 1px;\\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\n color: black;\\n max-width: 100%;\\n padding: 3px 4px;\\n position: fixed;\\n z-index: 999999;\\n box-sizing: border-box;\\n cursor: default;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n line-height: normal;\\n font-style: normal;\\n font-weight: normal;\\n letter-spacing: normal;\\n pointer-events: none;\\n overflow: auto;\\n max-width: min(60em, 66vw);\\n overscroll-behavior: contain;\\n}\\n.ace_tooltip pre {\\n white-space: pre-wrap;\\n}\\n\\n.ace_tooltip.ace_dark {\\n background-color: #636363;\\n color: #fff;\\n}\\n\\n.ace_tooltip:focus {\\n outline: 1px solid #5E9ED6;\\n}\\n\\n.ace_icon {\\n display: inline-block;\\n width: 18px;\\n vertical-align: top;\\n}\\n\\n.ace_icon_svg {\\n display: inline-block;\\n width: 12px;\\n vertical-align: top;\\n -webkit-mask-repeat: no-repeat;\\n -webkit-mask-size: 12px;\\n -webkit-mask-position: center;\\n}\\n\\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\\n padding-right: 13px;\\n}\\n\\n.ace_fold-widget {\\n box-sizing: border-box;\\n\\n margin: 0 -12px 0 1px;\\n display: none;\\n width: 11px;\\n vertical-align: top;\\n\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\n background-repeat: no-repeat;\\n background-position: center;\\n\\n border-radius: 3px;\\n \\n border: 1px solid transparent;\\n cursor: pointer;\\n}\\n\\n.ace_folding-enabled .ace_fold-widget {\\n display: inline-block; \\n}\\n\\n.ace_fold-widget.ace_end {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\n}\\n\\n.ace_fold-widget.ace_closed {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\n}\\n\\n.ace_fold-widget:hover {\\n border: 1px solid rgba(0, 0, 0, 0.3);\\n background-color: rgba(255, 255, 255, 0.2);\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\n}\\n\\n.ace_fold-widget:active {\\n border: 1px solid rgba(0, 0, 0, 0.4);\\n background-color: rgba(0, 0, 0, 0.05);\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\n}\\n/**\\n * Dark version for fold widgets\\n */\\n.ace_dark .ace_fold-widget {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\n}\\n.ace_dark .ace_fold-widget.ace_end {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\n}\\n.ace_dark .ace_fold-widget.ace_closed {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\n}\\n.ace_dark .ace_fold-widget:hover {\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\n background-color: rgba(255, 255, 255, 0.1);\\n}\\n.ace_dark .ace_fold-widget:active {\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\n}\\n\\n.ace_inline_button {\\n border: 1px solid lightgray;\\n display: inline-block;\\n margin: -1px 8px;\\n padding: 0 5px;\\n pointer-events: auto;\\n cursor: pointer;\\n}\\n.ace_inline_button:hover {\\n border-color: gray;\\n background: rgba(200,200,200,0.2);\\n display: inline-block;\\n pointer-events: auto;\\n}\\n\\n.ace_fold-widget.ace_invalid {\\n background-color: #FFB4B4;\\n border-color: #DE5555;\\n}\\n\\n.ace_fade-fold-widgets .ace_fold-widget {\\n transition: opacity 0.4s ease 0.05s;\\n opacity: 0;\\n}\\n\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\n transition: opacity 0.05s ease 0.05s;\\n opacity:1;\\n}\\n\\n.ace_underline {\\n text-decoration: underline;\\n}\\n\\n.ace_bold {\\n font-weight: bold;\\n}\\n\\n.ace_nobold .ace_bold {\\n font-weight: normal;\\n}\\n\\n.ace_italic {\\n font-style: italic;\\n}\\n\\n\\n.ace_error-marker {\\n background-color: rgba(255, 0, 0,0.2);\\n position: absolute;\\n z-index: 9;\\n}\\n\\n.ace_highlight-marker {\\n background-color: rgba(255, 255, 0,0.2);\\n position: absolute;\\n z-index: 8;\\n}\\n\\n.ace_mobile-menu {\\n position: absolute;\\n line-height: 1.5;\\n border-radius: 4px;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n user-select: none;\\n background: white;\\n box-shadow: 1px 3px 2px grey;\\n border: 1px solid #dcdcdc;\\n color: black;\\n}\\n.ace_dark > .ace_mobile-menu {\\n background: #333;\\n color: #ccc;\\n box-shadow: 1px 3px 2px grey;\\n border: 1px solid #444;\\n\\n}\\n.ace_mobile-button {\\n padding: 2px;\\n cursor: pointer;\\n overflow: hidden;\\n}\\n.ace_mobile-button:hover {\\n background-color: #eee;\\n opacity:1;\\n}\\n.ace_mobile-button:active {\\n background-color: #ddd;\\n}\\n\\n.ace_placeholder {\\n font-family: arial;\\n transform: scale(0.9);\\n transform-origin: left;\\n white-space: pre;\\n opacity: 0.7;\\n margin: 0 10px;\\n}\\n\\n.ace_ghost_text {\\n opacity: 0.5;\\n font-style: italic;\\n}\\n\\n.ace_ghost_text > div {\\n white-space: pre;\\n}\\n\\n.ghost_text_line_wrapped::after {\\n content: \\\"\\u21A9\\\";\\n position: absolute;\\n}\\n\\n.ace_lineWidgetContainer.ace_ghost_text {\\n margin: 0px 4px\\n}\\n\\n.ace_screenreader-only {\\n position:absolute;\\n left:-10000px;\\n top:auto;\\n width:1px;\\n height:1px;\\n overflow:hidden;\\n}\";\n\n});\n\nace.define(\"ace/layer/decorators\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar oop = require(\"../lib/oop\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar Decorator = /** @class */ (function () {\n function Decorator(parent, renderer) {\n this.canvas = dom.createElement(\"canvas\");\n this.renderer = renderer;\n this.pixelRatio = 1;\n this.maxHeight = renderer.layerConfig.maxHeight;\n this.lineHeight = renderer.layerConfig.lineHeight;\n this.canvasHeight = parent.parent.scrollHeight;\n this.heightRatio = this.canvasHeight / this.maxHeight;\n this.canvasWidth = parent.width;\n this.minDecorationHeight = (2 * this.pixelRatio) | 0;\n this.halfMinDecorationHeight = (this.minDecorationHeight / 2) | 0;\n this.canvas.width = this.canvasWidth;\n this.canvas.height = this.canvasHeight;\n this.canvas.style.top = 0 + \"px\";\n this.canvas.style.right = 0 + \"px\";\n this.canvas.style.zIndex = 7 + \"px\";\n this.canvas.style.position = \"absolute\";\n this.colors = {};\n this.colors.dark = {\n \"error\": \"rgba(255, 18, 18, 1)\",\n \"warning\": \"rgba(18, 136, 18, 1)\",\n \"info\": \"rgba(18, 18, 136, 1)\"\n };\n this.colors.light = {\n \"error\": \"rgb(255,51,51)\",\n \"warning\": \"rgb(32,133,72)\",\n \"info\": \"rgb(35,68,138)\"\n };\n parent.element.appendChild(this.canvas);\n }\n Decorator.prototype.$updateDecorators = function (config) {\n var colors = (this.renderer.theme.isDark === true) ? this.colors.dark : this.colors.light;\n if (config) {\n this.maxHeight = config.maxHeight;\n this.lineHeight = config.lineHeight;\n this.canvasHeight = config.height;\n var allLineHeight = (config.lastRow + 1) * this.lineHeight;\n if (allLineHeight < this.canvasHeight) {\n this.heightRatio = 1;\n }\n else {\n this.heightRatio = this.canvasHeight / this.maxHeight;\n }\n }\n var ctx = this.canvas.getContext(\"2d\");\n function compare(a, b) {\n if (a.priority < b.priority)\n return -1;\n if (a.priority > b.priority)\n return 1;\n return 0;\n }\n var annotations = this.renderer.session.$annotations;\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n if (annotations) {\n var priorities = {\n \"info\": 1,\n \"warning\": 2,\n \"error\": 3\n };\n annotations.forEach(function (item) {\n item.priority = priorities[item.type] || null;\n });\n annotations = annotations.sort(compare);\n var foldData = this.renderer.session.$foldData;\n for (var i = 0; i < annotations.length; i++) {\n var row = annotations[i].row;\n var compensateFold = this.compensateFoldRows(row, foldData);\n var currentY = Math.round((row - compensateFold) * this.lineHeight * this.heightRatio);\n var y1 = Math.round(((row - compensateFold) * this.lineHeight * this.heightRatio));\n var y2 = Math.round((((row - compensateFold) * this.lineHeight + this.lineHeight) * this.heightRatio));\n var height = y2 - y1;\n if (height < this.minDecorationHeight) {\n var yCenter = ((y1 + y2) / 2) | 0;\n if (yCenter < this.halfMinDecorationHeight) {\n yCenter = this.halfMinDecorationHeight;\n }\n else if (yCenter + this.halfMinDecorationHeight > this.canvasHeight) {\n yCenter = this.canvasHeight - this.halfMinDecorationHeight;\n }\n y1 = Math.round(yCenter - this.halfMinDecorationHeight);\n y2 = Math.round(yCenter + this.halfMinDecorationHeight);\n }\n ctx.fillStyle = colors[annotations[i].type] || null;\n ctx.fillRect(0, currentY, this.canvasWidth, y2 - y1);\n }\n }\n var cursor = this.renderer.session.selection.getCursor();\n if (cursor) {\n var compensateFold = this.compensateFoldRows(cursor.row, foldData);\n var currentY = Math.round((cursor.row - compensateFold) * this.lineHeight * this.heightRatio);\n ctx.fillStyle = \"rgba(0, 0, 0, 0.5)\";\n ctx.fillRect(0, currentY, this.canvasWidth, 2);\n }\n };\n Decorator.prototype.compensateFoldRows = function (row, foldData) {\n var compensateFold = 0;\n if (foldData && foldData.length > 0) {\n for (var j = 0; j < foldData.length; j++) {\n if (row > foldData[j].start.row && row < foldData[j].end.row) {\n compensateFold += row - foldData[j].start.row;\n }\n else if (row >= foldData[j].end.row) {\n compensateFold += foldData[j].end.row - foldData[j].start.row;\n }\n }\n }\n return compensateFold;\n };\n return Decorator;\n}());\noop.implement(Decorator.prototype, EventEmitter);\nexports.Decorator = Decorator;\n\n});\n\nace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/config\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/scrollbar\",\"ace/scrollbar_custom\",\"ace/scrollbar_custom\",\"ace/renderloop\",\"ace/layer/font_metrics\",\"ace/lib/event_emitter\",\"ace/css/editor-css\",\"ace/layer/decorators\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar lang = require(\"./lib/lang\");\nvar config = require(\"./config\");\nvar GutterLayer = require(\"./layer/gutter\").Gutter;\nvar MarkerLayer = require(\"./layer/marker\").Marker;\nvar TextLayer = require(\"./layer/text\").Text;\nvar CursorLayer = require(\"./layer/cursor\").Cursor;\nvar HScrollBar = require(\"./scrollbar\").HScrollBar;\nvar VScrollBar = require(\"./scrollbar\").VScrollBar;\nvar HScrollBarCustom = require(\"./scrollbar_custom\").HScrollBar;\nvar VScrollBarCustom = require(\"./scrollbar_custom\").VScrollBar;\nvar RenderLoop = require(\"./renderloop\").RenderLoop;\nvar FontMetrics = require(\"./layer/font_metrics\").FontMetrics;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar editorCss = require(\"./css/editor-css\");\nvar Decorator = require(\"./layer/decorators\").Decorator;\nvar useragent = require(\"./lib/useragent\");\ndom.importCssString(editorCss, \"ace_editor.css\", false);\nvar VirtualRenderer = /** @class */ (function () {\n function VirtualRenderer(container, theme) {\n var _self = this;\n this.container = container || dom.createElement(\"div\");\n dom.addCssClass(this.container, \"ace_editor\");\n if (dom.HI_DPI)\n dom.addCssClass(this.container, \"ace_hidpi\");\n this.setTheme(theme);\n if (config.get(\"useStrictCSP\") == null)\n config.set(\"useStrictCSP\", false);\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n this.$gutter.setAttribute(\"aria-hidden\", \"true\");\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n this.$markerBack = new MarkerLayer(this.content);\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n this.$markerFront = new MarkerLayer(this.content);\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n this.scrollBar =\n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.on(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.on(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n this.scrollTop = 0;\n this.scrollLeft = 0;\n this.cursorPos = {\n row: 0,\n column: 0\n };\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.on(\"changeCharacterSize\", function (e) {\n _self.updateCharacterSize();\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n _self._signal(\"changeCharacterSize\", e);\n });\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n this.layerConfig = {\n width: 1,\n padding: 0,\n firstRow: 0,\n firstRowScreen: 0,\n lastRow: 0,\n lineHeight: 0,\n characterWidth: 0,\n minHeight: 1,\n maxHeight: 1,\n offset: 0,\n height: 1,\n gutterOffset: 1\n };\n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n this.margin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n this.$keepTextAreaAtCursor = !useragent.isIOS;\n this.$loop = new RenderLoop(this.$renderChanges.bind(this), this.container.ownerDocument.defaultView);\n this.$loop.schedule(this.CHANGE_FULL);\n this.updateCharacterSize();\n this.setPadding(4);\n this.$addResizeObserver();\n config.resetOptions(this);\n config._signal(\"renderer\", this);\n }\n VirtualRenderer.prototype.updateCharacterSize = function () {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n this.layerConfig.characterWidth =\n this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight =\n this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n dom.setStyle(this.scroller.style, \"line-height\", this.lineHeight + \"px\");\n };\n VirtualRenderer.prototype.setSession = function (session) {\n if (this.session)\n this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0)\n session.setScrollTop(-this.scrollMargin.top);\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session)\n return;\n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode();\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n VirtualRenderer.prototype.updateLines = function (firstRow, lastRow, force) {\n if (lastRow === undefined)\n lastRow = Infinity;\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n }\n else {\n if (this.$changedLines.firstRow > firstRow)\n this.$changedLines.firstRow = firstRow;\n if (this.$changedLines.lastRow < lastRow)\n this.$changedLines.lastRow = lastRow;\n }\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force)\n this.$changedLines.lastRow = this.layerConfig.lastRow;\n else\n return;\n }\n if (this.$changedLines.firstRow > this.layerConfig.lastRow)\n return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n VirtualRenderer.prototype.onChangeNewLineMode = function () {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);\n };\n VirtualRenderer.prototype.onChangeTabSize = function () {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n VirtualRenderer.prototype.updateText = function () {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n VirtualRenderer.prototype.updateFull = function (force) {\n if (force)\n this.$renderChanges(this.CHANGE_FULL, true);\n else\n this.$loop.schedule(this.CHANGE_FULL);\n };\n VirtualRenderer.prototype.updateFontSize = function () {\n this.$textLayer.checkForSizeChanges();\n };\n VirtualRenderer.prototype.$updateSizeAsync = function () {\n if (this.$loop.pending)\n this.$size.$dirty = true;\n else\n this.onResize();\n };\n VirtualRenderer.prototype.onResize = function (force, gutterWidth, width, height) {\n if (this.resizing > 2)\n return;\n else if (this.resizing > 0)\n this.resizing++;\n else\n this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height)\n height = el.clientHeight || el.scrollHeight;\n if (!width)\n width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n if (this.$resizeTimer)\n this.$resizeTimer.cancel();\n if (!this.$size.scrollerHeight || (!width && !height))\n return this.resizing = 0;\n if (force)\n this.$gutterLayer.$padding = null;\n if (force)\n this.$renderChanges(changes | this.$changes, true);\n else\n this.$loop.schedule(changes | this.$changes);\n if (this.resizing)\n this.resizing = 0;\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n if (this.$customScrollbar) {\n this.$updateCustomScrollbar(true);\n }\n };\n VirtualRenderer.prototype.$updateCachedSize = function (force, gutterWidth, width, height) {\n height -= (this.$extraHeight || 0);\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n size.scrollerHeight = size.height;\n if (this.$horizScroll)\n size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.setHeight(size.scrollerHeight);\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n changes = changes | this.CHANGE_SCROLL;\n }\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n if (gutterWidth == null)\n gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n this.gutterWidth = gutterWidth;\n dom.setStyle(this.scrollBarH.element.style, \"left\", gutterWidth + \"px\");\n dom.setStyle(this.scroller.style, \"left\", gutterWidth + this.margin.left + \"px\");\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);\n dom.setStyle(this.$gutter.style, \"left\", this.margin.left + \"px\");\n var right = this.scrollBarV.getWidth() + \"px\";\n dom.setStyle(this.scrollBarH.element.style, \"right\", right);\n dom.setStyle(this.scroller.style, \"right\", right);\n dom.setStyle(this.scroller.style, \"bottom\", this.scrollBarH.getHeight());\n this.scrollBarH.setWidth(size.scrollerWidth);\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) {\n changes |= this.CHANGE_FULL;\n }\n }\n size.$dirty = !width || !height;\n if (changes)\n this._signal(\"resize\", oldSize);\n return changes;\n };\n VirtualRenderer.prototype.onGutterResize = function (width) {\n var gutterWidth = this.$showGutter ? width : 0;\n if (gutterWidth != this.gutterWidth)\n this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n }\n else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n }\n else {\n this.$computeLayerConfig();\n }\n };\n VirtualRenderer.prototype.adjustWrapLimit = function () {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n VirtualRenderer.prototype.setAnimatedScroll = function (shouldAnimate) {\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n VirtualRenderer.prototype.getAnimatedScroll = function () {\n return this.$animatedScroll;\n };\n VirtualRenderer.prototype.setShowInvisibles = function (showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n this.session.$bidiHandler.setShowInvisibles(showInvisibles);\n };\n VirtualRenderer.prototype.getShowInvisibles = function () {\n return this.getOption(\"showInvisibles\");\n };\n VirtualRenderer.prototype.getDisplayIndentGuides = function () {\n return this.getOption(\"displayIndentGuides\");\n };\n VirtualRenderer.prototype.setDisplayIndentGuides = function (display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n VirtualRenderer.prototype.getHighlightIndentGuides = function () {\n return this.getOption(\"highlightIndentGuides\");\n };\n VirtualRenderer.prototype.setHighlightIndentGuides = function (highlight) {\n this.setOption(\"highlightIndentGuides\", highlight);\n };\n VirtualRenderer.prototype.setShowPrintMargin = function (showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n VirtualRenderer.prototype.getShowPrintMargin = function () {\n return this.getOption(\"showPrintMargin\");\n };\n VirtualRenderer.prototype.setPrintMarginColumn = function (printMarginColumn) {\n this.setOption(\"printMarginColumn\", printMarginColumn);\n };\n VirtualRenderer.prototype.getPrintMarginColumn = function () {\n return this.getOption(\"printMarginColumn\");\n };\n VirtualRenderer.prototype.getShowGutter = function () {\n return this.getOption(\"showGutter\");\n };\n VirtualRenderer.prototype.setShowGutter = function (show) {\n return this.setOption(\"showGutter\", show);\n };\n VirtualRenderer.prototype.getFadeFoldWidgets = function () {\n return this.getOption(\"fadeFoldWidgets\");\n };\n VirtualRenderer.prototype.setFadeFoldWidgets = function (show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n VirtualRenderer.prototype.setHighlightGutterLine = function (shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n VirtualRenderer.prototype.getHighlightGutterLine = function () {\n return this.getOption(\"highlightGutterLine\");\n };\n VirtualRenderer.prototype.$updatePrintMargin = function () {\n if (!this.$showPrintMargin && !this.$printMarginEl)\n return;\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n var style = this.$printMarginEl.style;\n style.left = Math.round(this.characterWidth * this.$printMarginColumn + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n if (this.session && this.session.$wrap == -1)\n this.adjustWrapLimit();\n };\n VirtualRenderer.prototype.getContainerElement = function () {\n return this.container;\n };\n VirtualRenderer.prototype.getMouseEventTarget = function () {\n return this.scroller;\n };\n VirtualRenderer.prototype.getTextAreaContainer = function () {\n return this.container;\n };\n VirtualRenderer.prototype.$moveTextAreaToCursor = function () {\n if (this.$isMousePressed)\n return;\n var style = this.textarea.style;\n var composition = this.$composition;\n if (!this.$keepTextAreaAtCursor && !composition) {\n dom.translate(this.textarea, -100, 0);\n return;\n }\n var pixelPos = this.$cursorLayer.$pixelPos;\n if (!pixelPos)\n return;\n if (composition && composition.markerRange)\n pixelPos = this.$cursorLayer.getPixelPosition(composition.markerRange.start, true);\n var config = this.layerConfig;\n var posTop = pixelPos.top;\n var posLeft = pixelPos.left;\n posTop -= config.offset;\n var h = composition && composition.useTextareaForIME || useragent.isMobile ? this.lineHeight : 1;\n if (posTop < 0 || posTop > config.height - h) {\n dom.translate(this.textarea, 0, 0);\n return;\n }\n var w = 1;\n var maxTop = this.$size.height - h;\n if (!composition) {\n posTop += this.lineHeight;\n }\n else {\n if (composition.useTextareaForIME) {\n var val = this.textarea.value;\n w = this.characterWidth * (this.session.$getStringScreenWidth(val)[0]);\n }\n else {\n posTop += this.lineHeight + 2;\n }\n }\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w)\n posLeft = this.$size.scrollerWidth - w;\n posLeft += this.gutterWidth + this.margin.left;\n dom.setStyle(style, \"height\", h + \"px\");\n dom.setStyle(style, \"width\", w + \"px\");\n dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, maxTop));\n };\n VirtualRenderer.prototype.getFirstVisibleRow = function () {\n return this.layerConfig.firstRow;\n };\n VirtualRenderer.prototype.getFirstFullyVisibleRow = function () {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n VirtualRenderer.prototype.getLastFullyVisibleRow = function () {\n var config = this.layerConfig;\n var lastRow = config.lastRow;\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight)\n return lastRow - 1;\n return lastRow;\n };\n VirtualRenderer.prototype.getLastVisibleRow = function () {\n return this.layerConfig.lastRow;\n };\n VirtualRenderer.prototype.setPadding = function (padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n VirtualRenderer.prototype.setScrollMargin = function (top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top | 0;\n sm.bottom = bottom | 0;\n sm.right = right | 0;\n sm.left = left | 0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session)\n this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n VirtualRenderer.prototype.setMargin = function (top, bottom, left, right) {\n var sm = this.margin;\n sm.top = top | 0;\n sm.bottom = bottom | 0;\n sm.right = right | 0;\n sm.left = left | 0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);\n this.updateFull();\n };\n VirtualRenderer.prototype.getHScrollBarAlwaysVisible = function () {\n return this.$hScrollBarAlwaysVisible;\n };\n VirtualRenderer.prototype.setHScrollBarAlwaysVisible = function (alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n VirtualRenderer.prototype.getVScrollBarAlwaysVisible = function () {\n return this.$vScrollBarAlwaysVisible;\n };\n VirtualRenderer.prototype.setVScrollBarAlwaysVisible = function (alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n VirtualRenderer.prototype.$updateScrollBarV = function () {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n VirtualRenderer.prototype.$updateScrollBarH = function () {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n VirtualRenderer.prototype.freeze = function () {\n this.$frozen = true;\n };\n VirtualRenderer.prototype.unfreeze = function () {\n this.$frozen = false;\n };\n VirtualRenderer.prototype.$renderChanges = function (changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {\n this.$changes |= changes;\n return;\n }\n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n this._signal(\"beforeRender\", changes);\n if (this.session && this.session.$bidiHandler)\n this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);\n var config = this.layerConfig;\n if (changes & this.CHANGE_FULL ||\n changes & this.CHANGE_SIZE ||\n changes & this.CHANGE_TEXT ||\n changes & this.CHANGE_LINES ||\n changes & this.CHANGE_SCROLL ||\n changes & this.CHANGE_H_SCROLL) {\n changes |= this.$computeLayerConfig() | this.$loop.clear();\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - Math.max(this.layerConfig.firstRow, 0)) * this.lineHeight;\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig() | this.$loop.clear();\n }\n }\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL)\n this.$updateScrollBarH();\n dom.translate(this.content, -this.scrollLeft, -config.offset);\n var width = config.width + 2 * this.$padding + \"px\";\n var height = config.minHeight + \"px\";\n dom.setStyle(this.content.style, \"width\", width);\n dom.setStyle(this.content.style, \"height\", height);\n }\n if (changes & this.CHANGE_H_SCROLL) {\n dom.translate(this.content, -this.scrollLeft, -config.offset);\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller \" : \"ace_scroller ace_scroll-left \";\n if (this.enableKeyboardAccessibility)\n this.scroller.className += this.keyboardFocusClassName;\n }\n if (changes & this.CHANGE_FULL) {\n this.$changedLines = null;\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\", changes);\n return;\n }\n if (changes & this.CHANGE_SCROLL) {\n this.$changedLines = null;\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)\n this.$textLayer.update(config);\n else\n this.$textLayer.scrollLines(config);\n if (this.$showGutter) {\n if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES)\n this.$gutterLayer.update(config);\n else\n this.$gutterLayer.scrollLines(config);\n }\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\", changes);\n return;\n }\n if (changes & this.CHANGE_TEXT) {\n this.$changedLines = null;\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n else if (changes & this.CHANGE_CURSOR) {\n if (this.$highlightGutterLine)\n this.$gutterLayer.updateLineHighlight(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n }\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n this._signal(\"afterRender\", changes);\n };\n VirtualRenderer.prototype.$autosize = function () {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight, Math.max((this.$minLines || 1) * this.lineHeight, height)) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll)\n desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)\n desiredHeight = this.$maxPixelHeight;\n var hideScrollbars = desiredHeight <= 2 * this.lineHeight;\n var vScroll = !hideScrollbars && height > maxHeight;\n if (desiredHeight != this.desiredHeight ||\n this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n this._signal(\"autosize\");\n }\n };\n VirtualRenderer.prototype.$computeLayerConfig = function () {\n var session = this.session;\n var size = this.$size;\n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n var longestLine = this.$getLongestLine();\n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||\n size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n var hScrollChanged = this.$horizScroll !== horizScroll;\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n if (this.$maxLines && this.lineHeight > 1)\n this.$autosize();\n var minHeight = size.scrollerHeight + this.lineHeight;\n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd\n ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd\n : 0;\n maxHeight += scrollPastEnd;\n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||\n size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n var offset = this.scrollTop % this.lineHeight;\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +\n firstRowHeight;\n offset = this.scrollTop - firstRowScreen * lineHeight;\n var changes = 0;\n if (this.layerConfig.width != longestLine || hScrollChanged)\n changes = this.CHANGE_H_SCROLL;\n if (hScrollChanged || vScrollChanged) {\n changes |= this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n this._signal(\"scrollbarVisibilityChanged\");\n if (vScrollChanged)\n longestLine = this.$getLongestLine();\n }\n this.layerConfig = {\n width: longestLine,\n padding: this.$padding,\n firstRow: firstRow,\n firstRowScreen: firstRowScreen,\n lastRow: lastRow,\n lineHeight: lineHeight,\n characterWidth: this.characterWidth,\n minHeight: minHeight,\n maxHeight: maxHeight,\n offset: offset,\n gutterOffset: lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height: this.$size.scrollerHeight\n };\n if (this.session.$bidiHandler)\n this.session.$bidiHandler.setContentWidth(longestLine - this.$padding);\n return changes;\n };\n VirtualRenderer.prototype.$updateLines = function () {\n if (!this.$changedLines)\n return;\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n var layerConfig = this.layerConfig;\n if (firstRow > layerConfig.lastRow + 1) {\n return;\n }\n if (lastRow < layerConfig.firstRow) {\n return;\n }\n if (lastRow === Infinity) {\n if (this.$showGutter)\n this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n VirtualRenderer.prototype.$getLongestLine = function () {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode)\n charCount += 1;\n if (this.$textLayer && charCount > this.$textLayer.MAX_LINE_LENGTH)\n charCount = this.$textLayer.MAX_LINE_LENGTH + 30;\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n VirtualRenderer.prototype.updateFrontMarkers = function () {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n VirtualRenderer.prototype.updateBackMarkers = function () {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n VirtualRenderer.prototype.addGutterDecoration = function (row, className) {\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n VirtualRenderer.prototype.removeGutterDecoration = function (row, className) {\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n VirtualRenderer.prototype.updateBreakpoints = function (rows) {\n this._rows = rows;\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n VirtualRenderer.prototype.setAnnotations = function (annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n VirtualRenderer.prototype.updateCursor = function () {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n VirtualRenderer.prototype.hideCursor = function () {\n this.$cursorLayer.hideCursor();\n };\n VirtualRenderer.prototype.showCursor = function () {\n this.$cursorLayer.showCursor();\n };\n VirtualRenderer.prototype.scrollSelectionIntoView = function (anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n VirtualRenderer.prototype.scrollCursorIntoView = function (cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0)\n return;\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var newLeft = pos.left;\n var newTop = pos.top;\n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n if (this.$scrollAnimation) {\n this.$stopAnimation = true;\n }\n var currentTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n if (currentTop + topMargin > newTop) {\n if (offset && currentTop + topMargin > newTop + this.lineHeight)\n newTop -= offset * this.$size.scrollerHeight;\n if (newTop === 0)\n newTop = -this.scrollMargin.top;\n this.session.setScrollTop(newTop);\n }\n else if (currentTop + this.$size.scrollerHeight - bottomMargin < newTop + this.lineHeight) {\n if (offset && currentTop + this.$size.scrollerHeight - bottomMargin < newTop - this.lineHeight)\n newTop += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(newTop + this.lineHeight + bottomMargin - this.$size.scrollerHeight);\n }\n var currentLeft = this.scrollLeft;\n var twoCharsWidth = 2 * this.layerConfig.characterWidth;\n if (newLeft - twoCharsWidth < currentLeft) {\n newLeft -= twoCharsWidth;\n if (newLeft < this.$padding + twoCharsWidth) {\n newLeft = -this.scrollMargin.left;\n }\n this.session.setScrollLeft(newLeft);\n }\n else {\n newLeft += twoCharsWidth;\n if (currentLeft + this.$size.scrollerWidth < newLeft + this.characterWidth) {\n this.session.setScrollLeft(Math.round(newLeft + this.characterWidth - this.$size.scrollerWidth));\n }\n else if (currentLeft <= this.$padding && newLeft - currentLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n }\n };\n VirtualRenderer.prototype.getScrollTop = function () {\n return this.session.getScrollTop();\n };\n VirtualRenderer.prototype.getScrollLeft = function () {\n return this.session.getScrollLeft();\n };\n VirtualRenderer.prototype.getScrollTopRow = function () {\n return this.scrollTop / this.lineHeight;\n };\n VirtualRenderer.prototype.getScrollBottomRow = function () {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n VirtualRenderer.prototype.scrollToRow = function (row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n VirtualRenderer.prototype.alignCursor = function (cursor, alignment) {\n if (typeof cursor == \"number\")\n cursor = { row: cursor, column: 0 };\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n this.session.setScrollTop(offset);\n return offset;\n };\n VirtualRenderer.prototype.$calcSteps = function (fromValue, toValue) {\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n var func = function (t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n for (i = 0; i < l; ++i)\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n return steps;\n };\n VirtualRenderer.prototype.scrollToLine = function (line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({ row: line, column: 0 });\n var offset = pos.top;\n if (center)\n offset -= this.$size.scrollerHeight / 2;\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false)\n this.animateScrolling(initialScroll, callback);\n };\n VirtualRenderer.prototype.animateScrolling = function (fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll)\n return;\n var _self = this;\n if (fromValue == toValue)\n return;\n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue)\n return;\n }\n }\n var steps = _self.$calcSteps(fromValue, toValue);\n this.$scrollAnimation = { from: fromValue, to: toValue, steps: steps };\n clearInterval(this.$timer);\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n function endAnimation() {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n _self.$stopAnimation = false;\n callback && callback();\n }\n this.$timer = setInterval(function () {\n if (_self.$stopAnimation) {\n endAnimation();\n return;\n }\n if (!_self.session)\n return clearInterval(_self.$timer);\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n }\n else if (toValue != null) {\n _self.session.$scrollTop = -1;\n _self.session.setScrollTop(toValue);\n toValue = null;\n }\n else {\n endAnimation();\n }\n }, 10);\n };\n VirtualRenderer.prototype.scrollToY = function (scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n VirtualRenderer.prototype.scrollToX = function (scrollLeft) {\n if (this.scrollLeft !== scrollLeft)\n this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n VirtualRenderer.prototype.scrollTo = function (x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(x);\n };\n VirtualRenderer.prototype.scrollBy = function (deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n VirtualRenderer.prototype.isScrollableBy = function (deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)\n return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight\n - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)\n return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)\n return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth\n - this.layerConfig.width < -1 + this.scrollMargin.right)\n return true;\n };\n VirtualRenderer.prototype.pixelToScreenCoordinates = function (x, y) {\n var canvasPos;\n if (this.$hasCssTransforms) {\n canvasPos = { top: 0, left: 0 };\n var p = this.$fontMetrics.transformCoordinates([x, y]);\n x = p[1] - this.gutterWidth - this.margin.left;\n y = p[0];\n }\n else {\n canvasPos = this.scroller.getBoundingClientRect();\n }\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);\n return { row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX };\n };\n VirtualRenderer.prototype.screenToTextCoordinates = function (x, y) {\n var canvasPos;\n if (this.$hasCssTransforms) {\n canvasPos = { top: 0, left: 0 };\n var p = this.$fontMetrics.transformCoordinates([x, y]);\n x = p[1] - this.gutterWidth - this.margin.left;\n y = p[0];\n }\n else {\n canvasPos = this.scroller.getBoundingClientRect();\n }\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);\n };\n VirtualRenderer.prototype.textToScreenCoordinates = function (row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : Math.round(pos.column * this.characterWidth));\n var y = pos.row * this.lineHeight;\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n VirtualRenderer.prototype.visualizeFocus = function () {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n VirtualRenderer.prototype.visualizeBlur = function () {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n VirtualRenderer.prototype.showComposition = function (composition) {\n this.$composition = composition;\n if (!composition.cssText) {\n composition.cssText = this.textarea.style.cssText;\n }\n if (composition.useTextareaForIME == undefined)\n composition.useTextareaForIME = this.$useTextareaForIME;\n if (this.$useTextareaForIME) {\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n this.$cursorLayer.element.style.display = \"none\";\n }\n else {\n composition.markerId = this.session.addMarker(composition.markerRange, \"ace_composition_marker\", \"text\");\n }\n };\n VirtualRenderer.prototype.setCompositionText = function (text) {\n var cursor = this.session.selection.cursor;\n this.addToken(text, \"composition_placeholder\", cursor.row, cursor.column);\n this.$moveTextAreaToCursor();\n };\n VirtualRenderer.prototype.hideComposition = function () {\n if (!this.$composition)\n return;\n if (this.$composition.markerId)\n this.session.removeMarker(this.$composition.markerId);\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = this.$composition.cssText;\n var cursor = this.session.selection.cursor;\n this.removeExtraToken(cursor.row, cursor.column);\n this.$composition = null;\n this.$cursorLayer.element.style.display = \"\";\n };\n VirtualRenderer.prototype.setGhostText = function (text, position) {\n var cursor = this.session.selection.cursor;\n var insertPosition = position || { row: cursor.row, column: cursor.column };\n this.removeGhostText();\n var textChunks = this.$calculateWrappedTextChunks(text, insertPosition);\n this.addToken(textChunks[0].text, \"ghost_text\", insertPosition.row, insertPosition.column);\n this.$ghostText = {\n text: text,\n position: {\n row: insertPosition.row,\n column: insertPosition.column\n }\n };\n if (textChunks.length > 1) {\n var divs = textChunks.slice(1).map(function (el) {\n return \"\").concat(el.text, \"
\");\n });\n this.$ghostTextWidget = {\n html: divs.join(\"\"),\n row: insertPosition.row,\n column: insertPosition.column,\n className: \"ace_ghost_text\"\n };\n this.session.widgetManager.addLineWidget(this.$ghostTextWidget);\n var pixelPosition = this.$cursorLayer.getPixelPosition(insertPosition, true);\n var el = this.container;\n var height = el.getBoundingClientRect().height;\n var ghostTextHeight = textChunks.length * this.lineHeight;\n var fitsY = ghostTextHeight < (height - pixelPosition.top);\n if (fitsY)\n return;\n if (ghostTextHeight < height) {\n this.scrollBy(0, (textChunks.length - 1) * this.lineHeight);\n }\n else {\n this.scrollToRow(insertPosition.row);\n }\n }\n };\n VirtualRenderer.prototype.$calculateWrappedTextChunks = function (text, position) {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth) - 2;\n limit = limit <= 0 ? 60 : limit; // this is a hack to prevent the editor from crashing when the window is too small\n var textLines = text.split(/\\r?\\n/);\n var textChunks = [];\n for (var i = 0; i < textLines.length; i++) {\n var displayTokens = this.session.$getDisplayTokens(textLines[i], position.column);\n var wrapSplits = this.session.$computeWrapSplits(displayTokens, limit, this.session.$tabSize);\n if (wrapSplits.length > 0) {\n var start = 0;\n wrapSplits.push(textLines[i].length);\n for (var j = 0; j < wrapSplits.length; j++) {\n var textSlice = textLines[i].slice(start, wrapSplits[j]);\n textChunks.push({ text: textSlice, wrapped: true });\n start = wrapSplits[j];\n }\n }\n else {\n textChunks.push({ text: textLines[i], wrapped: false });\n }\n }\n return textChunks;\n };\n VirtualRenderer.prototype.removeGhostText = function () {\n if (!this.$ghostText)\n return;\n var position = this.$ghostText.position;\n this.removeExtraToken(position.row, position.column);\n if (this.$ghostTextWidget) {\n this.session.widgetManager.removeLineWidget(this.$ghostTextWidget);\n this.$ghostTextWidget = null;\n }\n this.$ghostText = null;\n };\n VirtualRenderer.prototype.addToken = function (text, type, row, column) {\n var session = this.session;\n session.bgTokenizer.lines[row] = null;\n var newToken = { type: type, value: text };\n var tokens = session.getTokens(row);\n if (column == null || !tokens.length) {\n tokens.push(newToken);\n }\n else {\n var l = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n l += token.value.length;\n if (column <= l) {\n var diff = token.value.length - (l - column);\n var before = token.value.slice(0, diff);\n var after = token.value.slice(diff);\n tokens.splice(i, 1, { type: token.type, value: before }, newToken, { type: token.type, value: after });\n break;\n }\n }\n }\n this.updateLines(row, row);\n };\n VirtualRenderer.prototype.removeExtraToken = function (row, column) {\n this.session.bgTokenizer.lines[row] = null;\n this.updateLines(row, row);\n };\n VirtualRenderer.prototype.setTheme = function (theme, cb) {\n var _self = this;\n this.$themeId = theme;\n _self._dispatchEvent('themeChange', { theme: theme });\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n }\n else {\n afterLoad(theme);\n }\n function afterLoad(module) {\n if (_self.$themeId != theme)\n return cb && cb();\n if (!module || !module.cssClass)\n throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n if (module.$id)\n _self.$themeId = module.$id;\n dom.importCssString(module.cssText, module.cssClass, _self.container);\n if (_self.theme)\n dom.removeCssClass(_self.container, _self.theme.cssClass);\n var padding = \"padding\" in module ? module.padding\n : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding)\n _self.setPadding(padding);\n _self.$theme = module.cssClass;\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n if (_self.$size) {\n _self.$size.width = 0;\n _self.$updateSizeAsync();\n }\n _self._dispatchEvent('themeLoaded', { theme: module });\n cb && cb();\n }\n };\n VirtualRenderer.prototype.getTheme = function () {\n return this.$themeId;\n };\n VirtualRenderer.prototype.setStyle = function (style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n VirtualRenderer.prototype.unsetStyle = function (style) {\n dom.removeCssClass(this.container, style);\n };\n VirtualRenderer.prototype.setCursorStyle = function (style) {\n dom.setStyle(this.scroller.style, \"cursor\", style);\n };\n VirtualRenderer.prototype.setMouseCursor = function (cursorStyle) {\n dom.setStyle(this.scroller.style, \"cursor\", cursorStyle);\n };\n VirtualRenderer.prototype.attachToShadowRoot = function () {\n dom.importCssString(editorCss, \"ace_editor.css\", this.container);\n };\n VirtualRenderer.prototype.destroy = function () {\n this.freeze();\n this.$fontMetrics.destroy();\n this.$cursorLayer.destroy();\n this.removeAllListeners();\n this.container.textContent = \"\";\n this.setOption(\"useResizeObserver\", false);\n };\n VirtualRenderer.prototype.$updateCustomScrollbar = function (val) {\n var _self = this;\n this.$horizScroll = this.$vScroll = null;\n this.scrollBarV.element.remove();\n this.scrollBarH.element.remove();\n if (this.$scrollDecorator) {\n delete this.$scrollDecorator;\n }\n if (val === true) {\n this.scrollBarV = new VScrollBarCustom(this.container, this);\n this.scrollBarH = new HScrollBarCustom(this.container, this);\n this.scrollBarV.setHeight(this.$size.scrollerHeight);\n this.scrollBarH.setWidth(this.$size.scrollerWidth);\n this.scrollBarV.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n this.$scrollDecorator = new Decorator(this.scrollBarV, this);\n this.$scrollDecorator.$updateDecorators();\n }\n else {\n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n }\n };\n VirtualRenderer.prototype.$addResizeObserver = function () {\n if (!window.ResizeObserver || this.$resizeObserver)\n return;\n var self = this;\n this.$resizeTimer = lang.delayedCall(function () {\n if (!self.destroyed)\n self.onResize();\n }, 50);\n this.$resizeObserver = new window.ResizeObserver(function (e) {\n var w = e[0].contentRect.width;\n var h = e[0].contentRect.height;\n if (Math.abs(self.$size.width - w) > 1\n || Math.abs(self.$size.height - h) > 1) {\n self.$resizeTimer.delay();\n }\n else {\n self.$resizeTimer.cancel();\n }\n });\n this.$resizeObserver.observe(this.container);\n };\n return VirtualRenderer;\n}());\nVirtualRenderer.prototype.CHANGE_CURSOR = 1;\nVirtualRenderer.prototype.CHANGE_MARKER = 2;\nVirtualRenderer.prototype.CHANGE_GUTTER = 4;\nVirtualRenderer.prototype.CHANGE_SCROLL = 8;\nVirtualRenderer.prototype.CHANGE_LINES = 16;\nVirtualRenderer.prototype.CHANGE_TEXT = 32;\nVirtualRenderer.prototype.CHANGE_SIZE = 64;\nVirtualRenderer.prototype.CHANGE_MARKER_BACK = 128;\nVirtualRenderer.prototype.CHANGE_MARKER_FRONT = 256;\nVirtualRenderer.prototype.CHANGE_FULL = 512;\nVirtualRenderer.prototype.CHANGE_H_SCROLL = 1024;\nVirtualRenderer.prototype.$changes = 0;\nVirtualRenderer.prototype.$padding = null;\nVirtualRenderer.prototype.$frozen = false;\nVirtualRenderer.prototype.STEPS = 8;\noop.implement(VirtualRenderer.prototype, EventEmitter);\nconfig.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n useResizeObserver: {\n set: function (value) {\n if (!value && this.$resizeObserver) {\n this.$resizeObserver.disconnect();\n this.$resizeTimer.cancel();\n this.$resizeTimer = this.$resizeObserver = null;\n }\n else if (value && !this.$resizeObserver) {\n this.$addResizeObserver();\n }\n }\n },\n animatedScroll: { initialValue: false },\n showInvisibles: {\n set: function (value) {\n if (this.$textLayer.setShowInvisibles(value))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function () { this.$updatePrintMargin(); },\n initialValue: true\n },\n printMarginColumn: {\n set: function () { this.$updatePrintMargin(); },\n initialValue: 80\n },\n printMargin: {\n set: function (val) {\n if (typeof val == \"number\")\n this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function () {\n return this.$showPrintMargin && this.$printMarginColumn;\n }\n },\n showGutter: {\n set: function (show) {\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n useSvgGutterIcons: {\n set: function (value) {\n this.$gutterLayer.$useSvgGutterIcons = value;\n },\n initialValue: false\n },\n showFoldedAnnotations: {\n set: function (value) {\n this.$gutterLayer.$showFoldedAnnotations = value;\n },\n initialValue: false\n },\n fadeFoldWidgets: {\n set: function (show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function (show) {\n this.$gutterLayer.setShowFoldWidgets(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function (show) {\n if (this.$textLayer.setDisplayIndentGuides(show))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightIndentGuides: {\n set: function (show) {\n if (this.$textLayer.setHighlightIndentGuides(show) == true) {\n this.$textLayer.$highlightIndentGuide();\n }\n else {\n this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells);\n }\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function (shouldHighlight) {\n this.$gutterLayer.setHighlightGutterLine(shouldHighlight);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n hScrollBarAlwaysVisible: {\n set: function (val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function (val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function (size) {\n if (typeof size == \"number\")\n size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function (name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function (val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function (val) {\n if (!(this.$minLines < 0x1ffffffffffff))\n this.$minLines = 0;\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function (val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function (val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val)\n return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function (val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n customScrollbar: {\n set: function (val) {\n this.$updateCustomScrollbar(val);\n },\n initialValue: false\n },\n theme: {\n set: function (val) { this.setTheme(val); },\n get: function () { return this.$themeId || this.theme; },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n },\n hasCssTransforms: {},\n useTextareaForIME: {\n initialValue: !useragent.isMobile && !useragent.isIE\n }\n});\nexports.VirtualRenderer = VirtualRenderer;\n\n});\n\nace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/config\"], function(require, exports, module) {\n\"use strict\";\n\nvar oop = require(\"../lib/oop\");\nvar net = require(\"../lib/net\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar config = require(\"../config\");\n\nfunction $workerBlob(workerUrl) {\n var script = \"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n try {\n return new Blob([script], {\"type\": \"application/javascript\"});\n } catch (e) { // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n}\n\nfunction createWorker(workerUrl) {\n if (typeof Worker == \"undefined\")\n return { postMessage: function() {}, terminate: function() {} };\n if (config.get(\"loadWorkerFromBlob\")) {\n var blob = $workerBlob(workerUrl);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n return new Worker(blobURL);\n }\n return new Worker(workerUrl);\n}\n\nvar WorkerClient = function(worker) {\n if (!worker.postMessage)\n worker = this.$createWorkerFromOldConfig.apply(this, arguments);\n\n this.$worker = worker;\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n\n this.callbackId = 1;\n this.callbacks = {};\n\n this.$worker.onmessage = this.onMessage;\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$createWorkerFromOldConfig = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {\n if (require.nameToUrl && !require.toUrl)\n require.toUrl = require.nameToUrl;\n\n if (config.get(\"packaged\") || !require.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod, \"worker\");\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(require.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n\n var tlns = {};\n topLevelNamespaces.forEach(function(ns) {\n tlns[ns] = normalizePath(require.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n this.$worker = createWorker(workerUrl);\n if (importScripts) {\n this.send(\"importScripts\", importScripts);\n }\n this.$worker.postMessage({\n init : true,\n tlns : tlns,\n module : mod,\n classname : classname\n });\n return this.$worker;\n };\n\n this.onMessage = function(e) {\n var msg = e.data;\n switch (msg.type) {\n case \"event\":\n this._signal(msg.name, {data: msg.data});\n break;\n case \"call\":\n var callback = this.callbacks[msg.id];\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n break;\n case \"error\":\n this.reportError(msg.data);\n break;\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n \n this.reportError = function(err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function(path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function() {\n this._signal(\"terminate\", {});\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker.onerror = function(e) {\n e.preventDefault();\n };\n this.$worker = null;\n if (this.$doc)\n this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function(cmd, args) {\n this.$worker.postMessage({command: cmd, args: args});\n };\n\n this.call = function(cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n this.send(cmd, args);\n };\n\n this.emit = function(event, data) {\n try {\n if (data.data && data.data.err)\n data.data.err = {message: data.data.err.message, stack: data.data.err.stack, code: data.data.err.code};\n this.$worker && this.$worker.postMessage({event: event, data: {data: data.data}});\n }\n catch(ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function(doc) {\n if (this.$doc)\n this.terminate();\n\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener, true);\n };\n\n this.changeListener = function(delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n if (delta.action == \"insert\")\n this.deltaQueue.push(delta.start, delta.lines);\n else\n this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function() {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else\n this.emit(\"change\", {data: q});\n };\n\n}).call(WorkerClient.prototype);\n\n\nvar UIWorkerClient = function(topLevelNamespaces, mod, classname) {\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n\n var messageBuffer = [];\n var workerClient = new WorkerClient({\n messageBuffer: messageBuffer,\n terminate: function() {},\n postMessage: function(e) {\n messageBuffer.push(e);\n if (!main) return;\n if (emitSync)\n setTimeout(processNext);\n else\n processNext();\n }\n });\n\n workerClient.setEmitSync = function(val) { emitSync = val; };\n\n var processNext = function() {\n var msg = messageBuffer.shift();\n if (msg.command)\n main[msg.command].apply(main, msg.args);\n else if (msg.event)\n sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function(msg) {\n workerClient.onMessage({data: msg});\n };\n sender.callback = function(data, callbackId) {\n this.postMessage({type: \"call\", id: callbackId, data: data});\n };\n sender.emit = function(name, data) {\n this.postMessage({type: \"event\", name: name, data: data});\n };\n\n config.loadModule([\"worker\", mod], function(Main) {\n main = new Main[classname](sender);\n while (messageBuffer.length)\n processNext();\n });\n\n return workerClient;\n};\n\nexports.UIWorkerClient = UIWorkerClient;\nexports.WorkerClient = WorkerClient;\nexports.createWorker = createWorker;\n\n\n});\n\nace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"./range\").Range;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar oop = require(\"./lib/oop\");\nvar PlaceHolder = /** @class */ (function () {\n function PlaceHolder(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate, true);\n this.$others = others;\n this.$onCursorChange = function () {\n setTimeout(function () {\n _self.onCursorChange();\n });\n };\n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager()[\"$undostack\"] || { length: -1 };\n this.$undoStackDepth = undoStack.length;\n this.setup();\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n }\n PlaceHolder.prototype.setup = function () {\n var _self = this;\n var doc = this.doc;\n var session = this.session;\n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode)\n session.selection.toSingleRange();\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function (other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n PlaceHolder.prototype.showOtherMarkers = function () {\n if (this.othersActive)\n return;\n var session = this.session;\n var _self = this;\n this.othersActive = true;\n this.others.forEach(function (anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column + _self.length), _self.othersClass, null, false);\n });\n };\n PlaceHolder.prototype.hideOtherMarkers = function () {\n if (!this.othersActive)\n return;\n this.othersActive = false;\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n PlaceHolder.prototype.onUpdate = function (delta) {\n if (this.$updating)\n return this.updateAnchors(delta);\n var range = delta;\n if (range.start.row !== range.end.row)\n return;\n if (range.start.row !== this.pos.row)\n return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n this.updateAnchors(delta);\n if (inMainRange)\n this.length += lengthDiff;\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = { row: otherPos.row, column: otherPos.column + distanceFromStart };\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n }\n else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = { row: otherPos.row, column: otherPos.column + distanceFromStart };\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n this.$updating = false;\n this.updateMarkers();\n };\n PlaceHolder.prototype.updateAnchors = function (delta) {\n this.pos.onChange(delta);\n for (var i = this.others.length; i--;)\n this.others[i].onChange(delta);\n this.updateMarkers();\n };\n PlaceHolder.prototype.updateMarkers = function () {\n if (this.$updating)\n return;\n var _self = this;\n var session = this.session;\n var updateMarker = function (pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + _self.length), className, null, false);\n };\n updateMarker(this.pos, this.mainClass);\n for (var i = this.others.length; i--;)\n updateMarker(this.others[i], this.othersClass);\n };\n PlaceHolder.prototype.onCursorChange = function (event) {\n if (this.$updating || !this.session)\n return;\n var pos = this.session.selection.getCursor();\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n this._emit(\"cursorEnter\", event);\n }\n else {\n this.hideOtherMarkers();\n this._emit(\"cursorLeave\", event);\n }\n };\n PlaceHolder.prototype.detach = function () {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.off(\"change\", this.$onUpdate);\n this.session.selection.off(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n PlaceHolder.prototype.cancel = function () {\n if (this.$undoStackDepth === -1)\n return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager[\"$undostack\"]).length - this.$undoStackDepth;\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(this.session, true);\n }\n if (this.selectionBefore)\n this.session.selection.fromJSON(this.selectionBefore);\n };\n return PlaceHolder;\n}());\noop.implement(PlaceHolder.prototype, EventEmitter);\nexports.PlaceHolder = PlaceHolder;\n\n});\n\nace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(require, exports, module){var event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nfunction onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n if (ctrl && useragent.isMac)\n button = ev.button;\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode)\n e.editor.exitMultiSelectMode();\n return;\n }\n if (button !== 0)\n return;\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));\n var mouseX = e.x, mouseY = e.y;\n var onMouseSelection = function (e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n var selectionMode;\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt)\n selectionMode = shift ? \"block\" : \"add\";\n else if (alt && editor.$blockSelectEnabled)\n selectionMode = \"block\";\n }\n else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift)\n return;\n }\n else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection)\n return; // dragging\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n editor.inVirtualSelectionMode = true;\n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n editor.once(\"mouseup\", function () {\n var tmpSel = selection.toOrientedRange();\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))\n selection.substractPoint(tmpSel.cursor);\n else {\n if (shift) {\n selection.substractPoint(range.cursor);\n }\n else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n selection.addRange(tmpSel);\n }\n editor.inVirtualSelectionMode = false;\n });\n }\n else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true;\n var initialRange;\n var rectSel = [];\n var blockSelect = function () {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))\n return;\n screenCursor = newCursor;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())\n rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n };\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n }\n else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n if (shift)\n screenAnchor = session.documentToScreenPosition(selection.lead);\n else\n selection.moveToPosition(pos);\n screenCursor = { row: -1, column: -1 };\n var onMouseSelectionEnd = function (e) {\n blockSelect();\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length)\n rectSel = [selection.toOrientedRange()];\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n for (var i = 0; i < rectSel.length; i++)\n selection.addRange(rectSel[i]);\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n };\n var onSelectionInterval = blockSelect;\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function () { onSelectionInterval(); }, 20);\n return e.preventDefault();\n }\n}\nexports.onMouseDown = onMouseDown;\n\n});\n\nace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"], function(require, exports, module){/**\n * commands to enter multiselect mode\n * @type {import(\"../../ace-internal\").Ace.Command[]}\n */\nexports.defaultCommands = [{\n name: \"addCursorAbove\",\n description: \"Add cursor above\",\n exec: function (editor) { editor.selectMoreLines(-1); },\n bindKey: { win: \"Ctrl-Alt-Up\", mac: \"Ctrl-Alt-Up\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorBelow\",\n description: \"Add cursor below\",\n exec: function (editor) { editor.selectMoreLines(1); },\n bindKey: { win: \"Ctrl-Alt-Down\", mac: \"Ctrl-Alt-Down\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorAboveSkipCurrent\",\n description: \"Add cursor above (skip current)\",\n exec: function (editor) { editor.selectMoreLines(-1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Up\", mac: \"Ctrl-Alt-Shift-Up\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorBelowSkipCurrent\",\n description: \"Add cursor below (skip current)\",\n exec: function (editor) { editor.selectMoreLines(1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Down\", mac: \"Ctrl-Alt-Shift-Down\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectMoreBefore\",\n description: \"Select more before\",\n exec: function (editor) { editor.selectMore(-1); },\n bindKey: { win: \"Ctrl-Alt-Left\", mac: \"Ctrl-Alt-Left\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectMoreAfter\",\n description: \"Select more after\",\n exec: function (editor) { editor.selectMore(1); },\n bindKey: { win: \"Ctrl-Alt-Right\", mac: \"Ctrl-Alt-Right\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectNextBefore\",\n description: \"Select next before\",\n exec: function (editor) { editor.selectMore(-1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Left\", mac: \"Ctrl-Alt-Shift-Left\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectNextAfter\",\n description: \"Select next after\",\n exec: function (editor) { editor.selectMore(1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Right\", mac: \"Ctrl-Alt-Shift-Right\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"toggleSplitSelectionIntoLines\",\n description: \"Split selection into lines\",\n exec: function (editor) {\n if (editor.multiSelect.rangeCount > 1)\n editor.multiSelect.joinSelections();\n else\n editor.multiSelect.splitIntoLines();\n },\n bindKey: { win: \"Ctrl-Alt-L\", mac: \"Ctrl-Alt-L\" },\n readOnly: true\n }, {\n name: \"splitSelectionIntoLines\",\n description: \"Split into lines\",\n exec: function (editor) { editor.multiSelect.splitIntoLines(); },\n readOnly: true\n }, {\n name: \"alignCursors\",\n description: \"Align cursors\",\n exec: function (editor) { editor.alignCursors(); },\n bindKey: { win: \"Ctrl-Alt-A\", mac: \"Ctrl-Alt-A\" },\n scrollIntoView: \"cursor\"\n }, {\n name: \"findAll\",\n description: \"Find all\",\n exec: function (editor) { editor.findAll(); },\n bindKey: { win: \"Ctrl-Alt-K\", mac: \"Ctrl-Alt-G\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }];\nexports.multiSelectCommands = [{\n name: \"singleSelection\",\n description: \"Single selection\",\n bindKey: \"esc\",\n exec: function (editor) { editor.exitMultiSelectMode(); },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function (editor) { return editor && editor.inMultiSelectMode; }\n }];\nvar HashHandler = require(\"../keyboard/hash_handler\").HashHandler;\nexports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n\n});\n\nace.define(\"ace/multi_select\",[\"require\",\"exports\",\"module\",\"ace/range_list\",\"ace/range\",\"ace/selection\",\"ace/mouse/multi_select_handler\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/commands/multi_select_commands\",\"ace/search\",\"ace/edit_session\",\"ace/editor\",\"ace/config\"], function(require, exports, module){/**\n * @typedef {import(\"./anchor\").Anchor} Anchor\n * @typedef {import(\"../ace-internal\").Ace.Point} Point\n * @typedef {import(\"../ace-internal\").Ace.ScreenCoordinates} ScreenCoordinates\n */\nvar RangeList = require(\"./range_list\").RangeList;\nvar Range = require(\"./range\").Range;\nvar Selection = require(\"./selection\").Selection;\nvar onMouseDown = require(\"./mouse/multi_select_handler\").onMouseDown;\nvar event = require(\"./lib/event\");\nvar lang = require(\"./lib/lang\");\nvar commands = require(\"./commands/multi_select_commands\");\nexports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\nvar Search = require(\"./search\").Search;\nvar search = new Search();\nfunction find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n}\nvar EditSession = require(\"./edit_session\").EditSession;\n(function () {\n this.getSelectionMarkers = function () {\n return this.$selectionMarkers;\n };\n}).call(EditSession.prototype);\n(function () {\n this.ranges = null;\n this.rangeList = null;\n this.addRange = function (range, $blockChangeEvents) {\n if (!range)\n return;\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n if (!range.cursor)\n range.cursor = range.end;\n var removed = this.rangeList.add(range);\n this.$onAddRange(range);\n if (removed.length)\n this.$onRemoveRange(removed);\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n this.toSingleRange = function (range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length)\n this.$onRemoveRange(removed);\n range && this.fromOrientedRange(range);\n };\n this.substractPoint = function (pos) {\n var removed = this.rangeList.substractPoint(pos);\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n this.mergeOverlappingRanges = function () {\n var removed = this.rangeList.merge();\n if (removed.length)\n this.$onRemoveRange(removed);\n };\n this.$onAddRange = function (range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n this._signal(\"addRange\", { range: range });\n };\n this.$onRemoveRange = function (removed) {\n this.rangeCount = this.rangeList.ranges.length;\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n for (var i = removed.length; i--;) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n this._signal(\"removeRange\", { ranges: removed });\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n this._signal(\"singleSelect\");\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange()))\n this.fromOrientedRange(lastRange);\n };\n this.$initRangeList = function () {\n if (this.rangeList)\n return;\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n this.getAllRanges = function () {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n this.splitIntoLines = function () {\n var ranges = this.ranges.length ? this.ranges : [this.getRange()];\n var newRanges = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n var row = range.start.row;\n var endRow = range.end.row;\n if (row === endRow) {\n newRanges.push(range.clone());\n }\n else {\n newRanges.push(new Range(row, range.start.column, row, this.session.getLine(row).length));\n while (++row < endRow)\n newRanges.push(this.getLineRange(row, true));\n newRanges.push(new Range(endRow, 0, endRow, range.end.column));\n }\n if (i == 0 && !this.isBackwards())\n newRanges = newRanges.reverse();\n }\n this.toSingleRange();\n for (var i = newRanges.length; i--;)\n this.addRange(newRanges[i]);\n };\n this.joinSelections = function () {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n };\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n }\n else {\n var cursor = this.session.documentToScreenPosition(this.cursor);\n var anchor = this.session.documentToScreenPosition(this.anchor);\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n this.rectangularRangeBlock = function (screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n var xBackwards = screenCursor.column < screenAnchor.column;\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n var startOffsetX = screenCursor.offsetX;\n var endOffsetX = screenAnchor.offsetX;\n }\n else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n var startOffsetX = screenAnchor.offsetX;\n var endOffsetX = screenCursor.offsetX;\n }\n var yBackwards = screenCursor.row < screenAnchor.row;\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n }\n else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n if (startColumn < 0)\n startColumn = 0;\n if (startRow < 0)\n startRow = 0;\n if (startRow == endRow)\n includeEmptyLines = true;\n var docEnd;\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(this.session.screenToDocumentPosition(row, startColumn, startOffsetX), this.session.screenToDocumentPosition(row, endColumn, endOffsetX));\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd))\n break;\n docEnd = range.end;\n }\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n if (yBackwards)\n rectSel.reverse();\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n while (rectSel[end].isEmpty() && end > 0)\n end--;\n if (end > 0) {\n var start = 0;\n while (rectSel[start].isEmpty())\n start++;\n }\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty())\n rectSel.splice(i, 1);\n }\n }\n return rectSel;\n };\n}).call(Selection.prototype);\nvar Editor = require(\"./editor\").Editor;\n(function () {\n this.updateSelectionMarkers = function () {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.addSelectionMarker = function (orientedRange) {\n if (!orientedRange.cursor)\n orientedRange.cursor = orientedRange.end;\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n this.removeSelectionMarker = function (range) {\n if (!range.marker)\n return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1)\n this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n this.removeSelectionMarkers = function (ranges) {\n var markerList = this.session.$selectionMarkers;\n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.marker)\n continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1)\n markerList.splice(index, 1);\n }\n this.session.selectionMarkerCount = markerList.length;\n };\n this.$onAddRange = function (e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.$onRemoveRange = function (e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.$onMultiSelect = function (e) {\n if (this.inMultiSelectMode)\n return;\n this.inMultiSelectMode = true;\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.$onSingleSelect = function (e) {\n if (this.session.multiSelect.inVirtualMode)\n return;\n this.inMultiSelectMode = false;\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n this._emit(\"changeSelection\");\n };\n this.$onMultiSelectExec = function (e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect)\n return;\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n }\n else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n }\n else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n }\n else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n }\n else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n return result;\n };\n this.forEachSelection = function (cmd, args, options) {\n if (this.inVirtualSelectionMode)\n return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines;\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n if (!ranges.length)\n return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)\n i--;\n }\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined)\n result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n tmpSel.detach();\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n if (selection.ranges[0])\n selection.fromOrientedRange(selection.ranges[0]);\n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to)\n this.renderer.animateScrolling(anim.from);\n return result;\n };\n this.exitMultiSelectMode = function () {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode)\n return;\n this.multiSelect.toSingleRange();\n };\n this.getSelectedText = function () {\n var text = \"\";\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length)\n text = \"\";\n }\n else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n return text;\n };\n this.$checkMultiselectChange = function (e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)\n return;\n var pos = anchor == this.multiSelect.anchor\n ? range.cursor == range.start ? range.end : range.start\n : range.cursor;\n if (pos.row != anchor.row\n || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)\n this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());\n else\n this.multiSelect.mergeOverlappingRanges();\n }\n };\n this.findAll = function (needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n if (options.needle == undefined) {\n var range = this.selection.isEmpty()\n ? this.selection.getWordRange()\n : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n }\n this.$search.set(options);\n var ranges = this.$search.findAll(this.session);\n if (!ranges.length)\n return 0;\n var selection = this.multiSelect;\n if (!additive)\n selection.toSingleRange(ranges[0]);\n for (var i = ranges.length; i--;)\n selection.addRange(ranges[i], true);\n if (range && selection.rangeList.rangeAtPoint(range.start))\n selection.addRange(range, true);\n return ranges.length;\n };\n this.selectMoreLines = function (dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn)\n screenLead.column = this.selection.$desiredColumn;\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n }\n else {\n var anchor = lead;\n }\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n }\n else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n newRange.desiredColumn = screenLead.column;\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n }\n else {\n if (skip)\n var toRemove = range.cursor;\n }\n this.selection.addRange(newRange);\n if (toRemove)\n this.selection.substractPoint(toRemove);\n };\n this.transposeSelections = function (dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n for (var i = all.length; i--;) {\n var range = all[i];\n if (range.isEmpty()) {\n var tmp_1 = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp_1.start.row;\n range.start.column = tmp_1.start.column;\n range.end.row = tmp_1.end.row;\n range.end.column = tmp_1.end.column;\n }\n }\n sel.mergeOverlappingRanges();\n var words = [];\n for (var i = all.length; i--;) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n if (dir < 0)\n words.unshift(words.pop());\n else\n words.push(words.shift());\n for (var i = all.length; i--;) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n sel.fromOrientedRange(sel.ranges[0]);\n };\n this.selectMore = function (dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n var range = sel.toOrientedRange();\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst)\n return;\n }\n var needle = session.getTextRange(range);\n var newRange = find(session, needle, dir);\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n if (skip)\n this.multiSelect.substractPoint(range.cursor);\n };\n this.alignCursors = function () {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function (r) {\n if (r.cursor.row == row)\n return true;\n row = r.cursor.row;\n });\n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row, lr = range.end.row;\n var guessRange = fr == lr;\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n if (fr < 0)\n fr = 0;\n if (lr >= max)\n lr = max - 1;\n }\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({ row: fr, column: 0 }, lines.join(\"\\n\") + \"\\n\");\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n this.selection.setRange(range);\n }\n else {\n sameRowRanges.forEach(function (r) {\n sel.substractPoint(r.cursor);\n });\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function (r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1)\n spaceOffset = 0;\n if (p.column > maxCol)\n maxCol = p.column;\n if (spaceOffset < minSpace)\n minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function (r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d)\n session.insert(p, lang.stringRepeat(\" \", l - d));\n else\n session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n this.$reAlignText = function (lines, forceLeft) {\n var isLeftAligned = true, isRightAligned = true;\n var startW, textW, endW;\n return lines.map(function (line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m)\n return [line];\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length)\n isRightAligned = false;\n if (startW != m[1].length)\n isLeftAligned = false;\n if (startW > m[1].length)\n startW = m[1].length;\n if (textW < m[2].length)\n textW = m[2].length;\n if (endW > m[3].length)\n endW = m[3].length;\n return m;\n }).map(forceLeft ? alignLeft :\n isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(textW - m[2].length + endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n}).call(Editor.prototype);\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nexports.onSessionChange = function (e) {\n var session = e.session;\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n this.multiSelect = session && session.multiSelect;\n var oldSession = e.oldSession;\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode)\n this.$onMultiSelect();\n else\n this.$onSingleSelect();\n }\n};\nfunction MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange)\n return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n addAltCursorListeners(editor);\n}\nfunction addAltCursorListeners(editor) {\n if (!editor.textInput)\n return;\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function (e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n }\n else if (altCursor) {\n reset();\n }\n }, editor);\n event.addListener(el, \"keyup\", reset, editor);\n event.addListener(el, \"blur\", reset, editor);\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n}\nexports.MultiSelect = MultiSelect;\nrequire(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function (val) {\n MultiSelect(this);\n if (val) {\n this.on(\"mousedown\", onMouseDown);\n }\n else {\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function (val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n});\n\n});\n\nace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../../range\").Range;\nvar FoldMode = exports.FoldMode = function () { };\n(function () {\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line))\n return \"start\";\n if (foldStyle == \"markbeginend\"\n && this.foldingStopMarker\n && this.foldingStopMarker.test(line))\n return \"end\";\n return \"\";\n };\n this.getFoldWidgetRange = function (session, foldStyle, row) {\n return null;\n };\n this.indentationBlock = function (session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1)\n return;\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n if (level == -1)\n continue;\n if (level <= startLevel) {\n var token = session.getTokenAt(row, 0);\n if (!token || token.type !== \"string\")\n break;\n }\n endRow = row;\n }\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n this.openingBracketBlock = function (session, bracket, row, column, typeRe) {\n var start = { row: row, column: column + 1 };\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end)\n return;\n var fw = session.foldWidgets[end.row];\n if (fw == null)\n fw = session.getFoldWidget(end.row);\n if (fw == \"start\" && end.row > start.row) {\n end.row--;\n end.column = session.getLine(end.row).length;\n }\n return Range.fromPoints(start, end);\n };\n this.closingBracketBlock = function (session, bracket, row, column, typeRe) {\n var end = { row: row, column: column };\n var start = session.$findOpeningBracket(bracket, end);\n if (!start)\n return;\n start.column++;\n end.column--;\n return Range.fromPoints(start, end);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/ext/error_marker\",[\"require\",\"exports\",\"module\",\"ace/line_widgets\",\"ace/lib/dom\",\"ace/range\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar LineWidgets = require(\"../line_widgets\").LineWidgets;\nvar dom = require(\"../lib/dom\");\nvar Range = require(\"../range\").Range;\nvar nls = require(\"../config\").nls;\nfunction binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n while (first <= last) {\n var mid = (first + last) >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0)\n first = mid + 1;\n else if (c < 0)\n last = mid - 1;\n else\n return mid;\n }\n return -(first + 1);\n}\nfunction findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length)\n return;\n var i = binarySearch(annotations, { row: row, column: -1 }, Range.comparePoints);\n if (i < 0)\n i = -i - 1;\n if (i >= annotations.length)\n i = dir > 0 ? 0 : annotations.length - 1;\n else if (i === 0 && dir < 0)\n i = annotations.length - 1;\n var annotation = annotations[i];\n if (!annotation || !dir)\n return;\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n if (!annotation)\n return annotations.slice();\n }\n var matched = [];\n row = annotation.row;\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n return matched.length && matched;\n}\nexports.showErrorMarker = function (editor, dir) {\n var session = editor.session;\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function (w) {\n return w.type == \"errorMarker\";\n })[0];\n if (oldWidget) {\n oldWidget.destroy();\n }\n else {\n row -= dir;\n }\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\"\n ? annotation.pos.sc\n : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n }\n else if (oldWidget) {\n return;\n }\n else {\n gutterAnno = {\n text: [nls(\"error-marker.good-state\", \"Looks good!\")],\n className: \"ace_ok\"\n };\n }\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n var w = {\n row: pos.row,\n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n var left = editor.renderer.$cursorLayer\n .getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"
\");\n el.appendChild(dom.createElement(\"div\"));\n var kb = function (_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return { command: \"null\" };\n }\n };\n w.destroy = function () {\n if (editor.$mouseHandler.isMousePressed)\n return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n editor.session.widgetManager.addLineWidget(w);\n w.el.onmousedown = editor.focus.bind(editor);\n editor.renderer.scrollCursorIntoView(null, 0.5, { bottom: w.el.offsetHeight });\n};\ndom.importCssString(\"\\n .error_widget_wrapper {\\n background: inherit;\\n color: inherit;\\n border:none\\n }\\n .error_widget {\\n border-top: solid 2px;\\n border-bottom: solid 2px;\\n margin: 5px 0;\\n padding: 10px 40px;\\n white-space: pre-wrap;\\n }\\n .error_widget.ace_error, .error_widget_arrow.ace_error{\\n border-color: #ff5a5a\\n }\\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\\n border-color: #F1D817\\n }\\n .error_widget.ace_info, .error_widget_arrow.ace_info{\\n border-color: #5a5a5a\\n }\\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\\n border-color: #5aaa5a\\n }\\n .error_widget_arrow {\\n position: absolute;\\n border: solid 5px;\\n border-top-color: transparent!important;\\n border-right-color: transparent!important;\\n border-left-color: transparent!important;\\n top: -5px;\\n }\\n\", \"error_marker.css\", false);\n\n});\n\nace.define(\"ace/ace\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/range\",\"ace/editor\",\"ace/edit_session\",\"ace/undomanager\",\"ace/virtual_renderer\",\"ace/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/multi_select\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/ext/error_marker\",\"ace/config\",\"ace/loader_build\"], function(require, exports, module){/**\n * The main class required to set up an Ace instance in the browser.\n *\n * @namespace Ace\n **/\n\"use strict\";\nrequire(\"./loader_build\")(exports)\nvar dom = require(\"./lib/dom\");\nvar Range = require(\"./range\").Range;\nvar Editor = require(\"./editor\").Editor;\nvar EditSession = require(\"./edit_session\").EditSession;\nvar UndoManager = require(\"./undomanager\").UndoManager;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nrequire(\"./worker/worker_client\");\nrequire(\"./keyboard/hash_handler\");\nrequire(\"./placeholder\");\nrequire(\"./multi_select\");\nrequire(\"./mode/folding/fold_mode\");\nrequire(\"./theme/textmate\");\nrequire(\"./ext/error_marker\");\nexports.config = require(\"./config\");\nexports.edit = function (el, options) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el)\n throw new Error(\"ace.edit can't find div #\" + _id);\n }\n if (el && el.env && el.env.editor instanceof Editor)\n return el.env.editor;\n var value = \"\";\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n }\n else if (el) {\n value = el.textContent;\n el.innerHTML = \"\";\n }\n var doc = exports.createEditSession(value);\n var editor = new Editor(new Renderer(el), doc, options);\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode)\n env.textarea = oldNode;\n editor.on(\"destroy\", function () {\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n};\nexports.createEditSession = function (text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n};\nexports.Range = Range;\nexports.Editor = Editor;\nexports.EditSession = EditSession;\nexports.UndoManager = UndoManager;\nexports.VirtualRenderer = Renderer;\nexports.version = exports.config.version;\n\n}); (function() {\n ace.require([\"ace/ace\"], function(a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n var global = (function () {\n return this;\n })();\n if (!global && typeof window != \"undefined\") global = window; // can happen in strict mode\n if (!global && typeof self != \"undefined\") global = self; // can happen in webworker\n \n if (!global.ace)\n global.ace = a;\n for (var key in a) if (a.hasOwnProperty(key))\n global.ace[key] = a[key];\n global.ace[\"default\"] = global.ace;\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = global.ace;\n }\n });\n })();\n ","ace.define(\"ace/snippets\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/lib/lang\",\"ace/range\",\"ace/range_list\",\"ace/keyboard/hash_handler\",\"ace/tokenizer\",\"ace/clipboard\",\"ace/editor\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"./lib/dom\");\nvar oop = require(\"./lib/oop\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar lang = require(\"./lib/lang\");\nvar Range = require(\"./range\").Range;\nvar RangeList = require(\"./range_list\").RangeList;\nvar HashHandler = require(\"./keyboard/hash_handler\").HashHandler;\nvar Tokenizer = require(\"./tokenizer\").Tokenizer;\nvar clipboard = require(\"./clipboard\");\nvar VARIABLES = {\n CURRENT_WORD: function (editor) {\n return editor.session.getTextRange(editor.session.getWordRange());\n },\n SELECTION: function (editor, name, indentation) {\n var text = editor.session.getTextRange();\n if (indentation)\n return text.replace(/\\n\\r?([ \\t]*\\S)/g, \"\\n\" + indentation + \"$1\");\n return text;\n },\n CURRENT_LINE: function (editor) {\n return editor.session.getLine(editor.getCursorPosition().row);\n },\n PREV_LINE: function (editor) {\n return editor.session.getLine(editor.getCursorPosition().row - 1);\n },\n LINE_INDEX: function (editor) {\n return editor.getCursorPosition().row;\n },\n LINE_NUMBER: function (editor) {\n return editor.getCursorPosition().row + 1;\n },\n SOFT_TABS: function (editor) {\n return editor.session.getUseSoftTabs() ? \"YES\" : \"NO\";\n },\n TAB_SIZE: function (editor) {\n return editor.session.getTabSize();\n },\n CLIPBOARD: function (editor) {\n return clipboard.getText && clipboard.getText();\n },\n FILENAME: function (editor) {\n return /[^/\\\\]*$/.exec(this.FILEPATH(editor))[0];\n },\n FILENAME_BASE: function (editor) {\n return /[^/\\\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\\.[^.]*$/, \"\");\n },\n DIRECTORY: function (editor) {\n return this.FILEPATH(editor).replace(/[^/\\\\]*$/, \"\");\n },\n FILEPATH: function (editor) { return \"/not implemented.txt\"; },\n WORKSPACE_NAME: function () { return \"Unknown\"; },\n FULLNAME: function () { return \"Unknown\"; },\n BLOCK_COMMENT_START: function (editor) {\n var mode = editor.session.$mode || {};\n return mode.blockComment && mode.blockComment.start || \"\";\n },\n BLOCK_COMMENT_END: function (editor) {\n var mode = editor.session.$mode || {};\n return mode.blockComment && mode.blockComment.end || \"\";\n },\n LINE_COMMENT: function (editor) {\n var mode = editor.session.$mode || {};\n return mode.lineCommentStart || \"\";\n },\n CURRENT_YEAR: date.bind(null, { year: \"numeric\" }),\n CURRENT_YEAR_SHORT: date.bind(null, { year: \"2-digit\" }),\n CURRENT_MONTH: date.bind(null, { month: \"numeric\" }),\n CURRENT_MONTH_NAME: date.bind(null, { month: \"long\" }),\n CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: \"short\" }),\n CURRENT_DATE: date.bind(null, { day: \"2-digit\" }),\n CURRENT_DAY_NAME: date.bind(null, { weekday: \"long\" }),\n CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: \"short\" }),\n CURRENT_HOUR: date.bind(null, { hour: \"2-digit\", hour12: false }),\n CURRENT_MINUTE: date.bind(null, { minute: \"2-digit\" }),\n CURRENT_SECOND: date.bind(null, { second: \"2-digit\" })\n};\nVARIABLES.SELECTED_TEXT = VARIABLES.SELECTION;\nfunction date(dateFormat) {\n var str = new Date().toLocaleString(\"en-us\", dateFormat);\n return str.length == 1 ? \"0\" + str : str;\n}\nvar SnippetManager = /** @class */ (function () {\n function SnippetManager() {\n this.snippetMap = {};\n this.snippetNameMap = {};\n this.variables = VARIABLES;\n }\n SnippetManager.prototype.getTokenizer = function () {\n return SnippetManager[\"$tokenizer\"] || this.createTokenizer();\n };\n SnippetManager.prototype.createTokenizer = function () {\n function TabstopToken(str) {\n str = str.substr(1);\n if (/^\\d+$/.test(str))\n return [{ tabstopId: parseInt(str, 10) }];\n return [{ text: str }];\n }\n function escape(ch) {\n return \"(?:[^\\\\\\\\\" + ch + \"]|\\\\\\\\.)\";\n }\n var formatMatcher = {\n regex: \"/(\" + escape(\"/\") + \"+)/\",\n onMatch: function (val, state, stack) {\n var ts = stack[0];\n ts.fmtString = true;\n ts.guard = val.slice(1, -1);\n ts.flag = \"\";\n return \"\";\n },\n next: \"formatString\"\n };\n SnippetManager[\"$tokenizer\"] = new Tokenizer({\n start: [\n { regex: /\\\\./, onMatch: function (val, state, stack) {\n var ch = val[1];\n if (ch == \"}\" && stack.length) {\n val = ch;\n }\n else if (\"`$\\\\\".indexOf(ch) != -1) {\n val = ch;\n }\n return [val];\n } },\n { regex: /}/, onMatch: function (val, state, stack) {\n return [stack.length ? stack.shift() : val];\n } },\n { regex: /\\$(?:\\d+|\\w+)/, onMatch: TabstopToken },\n { regex: /\\$\\{[\\dA-Z_a-z]+/, onMatch: function (str, state, stack) {\n var t = TabstopToken(str.substr(1));\n stack.unshift(t[0]);\n return t;\n }, next: \"snippetVar\" },\n { regex: /\\n/, token: \"newline\", merge: false }\n ],\n snippetVar: [\n { regex: \"\\\\|\" + escape(\"\\\\|\") + \"*\\\\|\", onMatch: function (val, state, stack) {\n var choices = val.slice(1, -1).replace(/\\\\[,|\\\\]|,/g, function (operator) {\n return operator.length == 2 ? operator[1] : \"\\x00\";\n }).split(\"\\x00\").map(function (value) {\n return { value: value };\n });\n stack[0].choices = choices;\n return [choices[0]];\n }, next: \"start\" },\n formatMatcher,\n { regex: \"([^:}\\\\\\\\]|\\\\\\\\.)*:?\", token: \"\", next: \"start\" }\n ],\n formatString: [\n { regex: /:/, onMatch: function (val, state, stack) {\n if (stack.length && stack[0].expectElse) {\n stack[0].expectElse = false;\n stack[0].ifEnd = { elseEnd: stack[0] };\n return [stack[0].ifEnd];\n }\n return \":\";\n } },\n { regex: /\\\\./, onMatch: function (val, state, stack) {\n var ch = val[1];\n if (ch == \"}\" && stack.length)\n val = ch;\n else if (\"`$\\\\\".indexOf(ch) != -1)\n val = ch;\n else if (ch == \"n\")\n val = \"\\n\";\n else if (ch == \"t\")\n val = \"\\t\";\n else if (\"ulULE\".indexOf(ch) != -1)\n val = { changeCase: ch, local: ch > \"a\" };\n return [val];\n } },\n { regex: \"/\\\\w*}\", onMatch: function (val, state, stack) {\n var next = stack.shift();\n if (next)\n next.flag = val.slice(1, -1);\n this.next = next && next.tabstopId ? \"start\" : \"\";\n return [next || val];\n }, next: \"start\" },\n { regex: /\\$(?:\\d+|\\w+)/, onMatch: function (val, state, stack) {\n return [{ text: val.slice(1) }];\n } },\n { regex: /\\${\\w+/, onMatch: function (val, state, stack) {\n var token = { text: val.slice(2) };\n stack.unshift(token);\n return [token];\n }, next: \"formatStringVar\" },\n { regex: /\\n/, token: \"newline\", merge: false },\n { regex: /}/, onMatch: function (val, state, stack) {\n var next = stack.shift();\n this.next = next && next.tabstopId ? \"start\" : \"\";\n return [next || val];\n }, next: \"start\" }\n ],\n formatStringVar: [\n { regex: /:\\/\\w+}/, onMatch: function (val, state, stack) {\n var ts = stack[0];\n ts.formatFunction = val.slice(2, -1);\n return [stack.shift()];\n }, next: \"formatString\" },\n formatMatcher,\n { regex: /:[\\?\\-+]?/, onMatch: function (val, state, stack) {\n if (val[1] == \"+\")\n stack[0].ifEnd = stack[0];\n if (val[1] == \"?\")\n stack[0].expectElse = true;\n }, next: \"formatString\" },\n { regex: \"([^:}\\\\\\\\]|\\\\\\\\.)*:?\", token: \"\", next: \"formatString\" }\n ]\n });\n return SnippetManager[\"$tokenizer\"];\n };\n SnippetManager.prototype.tokenizeTmSnippet = function (str, startState) {\n return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) {\n return x.value || x;\n });\n };\n SnippetManager.prototype.getVariableValue = function (editor, name, indentation) {\n if (/^\\d+$/.test(name))\n return (this.variables.__ || {})[name] || \"\";\n if (/^[A-Z]\\d+$/.test(name))\n return (this.variables[name[0] + \"__\"] || {})[name.substr(1)] || \"\";\n name = name.replace(/^TM_/, \"\");\n if (!this.variables.hasOwnProperty(name))\n return \"\";\n var value = this.variables[name];\n if (typeof value == \"function\")\n value = this.variables[name](editor, name, indentation);\n return value == null ? \"\" : value;\n };\n SnippetManager.prototype.tmStrFormat = function (str, ch, editor) {\n if (!ch.fmt)\n return str;\n var flag = ch.flag || \"\";\n var re = ch.guard;\n re = new RegExp(re, flag.replace(/[^gim]/g, \"\"));\n var fmtTokens = typeof ch.fmt == \"string\" ? this.tokenizeTmSnippet(ch.fmt, \"formatString\") : ch.fmt;\n var _self = this;\n var formatted = str.replace(re, function () {\n var oldArgs = _self.variables.__;\n _self.variables.__ = [].slice.call(arguments);\n var fmtParts = _self.resolveVariables(fmtTokens, editor);\n var gChangeCase = \"E\";\n for (var i = 0; i < fmtParts.length; i++) {\n var ch = fmtParts[i];\n if (typeof ch == \"object\") {\n fmtParts[i] = \"\";\n if (ch.changeCase && ch.local) {\n var next = fmtParts[i + 1];\n if (next && typeof next == \"string\") {\n if (ch.changeCase == \"u\")\n fmtParts[i] = next[0].toUpperCase();\n else\n fmtParts[i] = next[0].toLowerCase();\n fmtParts[i + 1] = next.substr(1);\n }\n }\n else if (ch.changeCase) {\n gChangeCase = ch.changeCase;\n }\n }\n else if (gChangeCase == \"U\") {\n fmtParts[i] = ch.toUpperCase();\n }\n else if (gChangeCase == \"L\") {\n fmtParts[i] = ch.toLowerCase();\n }\n }\n _self.variables.__ = oldArgs;\n return fmtParts.join(\"\");\n });\n return formatted;\n };\n SnippetManager.prototype.tmFormatFunction = function (str, ch, editor) {\n if (ch.formatFunction == \"upcase\")\n return str.toUpperCase();\n if (ch.formatFunction == \"downcase\")\n return str.toLowerCase();\n return str;\n };\n SnippetManager.prototype.resolveVariables = function (snippet, editor) {\n var result = [];\n var indentation = \"\";\n var afterNewLine = true;\n for (var i = 0; i < snippet.length; i++) {\n var ch = snippet[i];\n if (typeof ch == \"string\") {\n result.push(ch);\n if (ch == \"\\n\") {\n afterNewLine = true;\n indentation = \"\";\n }\n else if (afterNewLine) {\n indentation = /^\\t*/.exec(ch)[0];\n afterNewLine = /\\S/.test(ch);\n }\n continue;\n }\n if (!ch)\n continue;\n afterNewLine = false;\n if (ch.fmtString) {\n var j = snippet.indexOf(ch, i + 1);\n if (j == -1)\n j = snippet.length;\n ch.fmt = snippet.slice(i + 1, j);\n i = j;\n }\n if (ch.text) {\n var value = this.getVariableValue(editor, ch.text, indentation) + \"\";\n if (ch.fmtString)\n value = this.tmStrFormat(value, ch, editor);\n if (ch.formatFunction)\n value = this.tmFormatFunction(value, ch, editor);\n if (value && !ch.ifEnd) {\n result.push(value);\n gotoNext(ch);\n }\n else if (!value && ch.ifEnd) {\n gotoNext(ch.ifEnd);\n }\n }\n else if (ch.elseEnd) {\n gotoNext(ch.elseEnd);\n }\n else if (ch.tabstopId != null) {\n result.push(ch);\n }\n else if (ch.changeCase != null) {\n result.push(ch);\n }\n }\n function gotoNext(ch) {\n var i1 = snippet.indexOf(ch, i + 1);\n if (i1 != -1)\n i = i1;\n }\n return result;\n };\n SnippetManager.prototype.getDisplayTextForSnippet = function (editor, snippetText) {\n var processedSnippet = processSnippetText.call(this, editor, snippetText);\n return processedSnippet.text;\n };\n SnippetManager.prototype.insertSnippetForSelection = function (editor, snippetText, options) {\n if (options === void 0) { options = {}; }\n var processedSnippet = processSnippetText.call(this, editor, snippetText, options);\n var range = editor.getSelectionRange();\n var end = editor.session.replace(range, processedSnippet.text);\n var tabstopManager = new TabstopManager(editor);\n var selectionId = editor.inVirtualSelectionMode && editor.selection.index;\n tabstopManager.addTabstops(processedSnippet.tabstops, range.start, end, selectionId);\n };\n SnippetManager.prototype.insertSnippet = function (editor, snippetText, options) {\n if (options === void 0) { options = {}; }\n var self = this;\n if (editor.inVirtualSelectionMode)\n return self.insertSnippetForSelection(editor, snippetText, options);\n editor.forEachSelection(function () {\n self.insertSnippetForSelection(editor, snippetText, options);\n }, null, { keepOrder: true });\n if (editor.tabstopManager)\n editor.tabstopManager.tabNext();\n };\n SnippetManager.prototype.$getScope = function (editor) {\n var scope = editor.session.$mode.$id || \"\";\n scope = scope.split(\"/\").pop();\n if (scope === \"html\" || scope === \"php\") {\n if (scope === \"php\" && !editor.session.$mode.inlinePhp)\n scope = \"html\";\n var c = editor.getCursorPosition();\n var state = editor.session.getState(c.row);\n if (typeof state === \"object\") {\n state = state[0];\n }\n if (state.substring) {\n if (state.substring(0, 3) == \"js-\")\n scope = \"javascript\";\n else if (state.substring(0, 4) == \"css-\")\n scope = \"css\";\n else if (state.substring(0, 4) == \"php-\")\n scope = \"php\";\n }\n }\n return scope;\n };\n SnippetManager.prototype.getActiveScopes = function (editor) {\n var scope = this.$getScope(editor);\n var scopes = [scope];\n var snippetMap = this.snippetMap;\n if (snippetMap[scope] && snippetMap[scope].includeScopes) {\n scopes.push.apply(scopes, snippetMap[scope].includeScopes);\n }\n scopes.push(\"_\");\n return scopes;\n };\n SnippetManager.prototype.expandWithTab = function (editor, options) {\n var self = this;\n var result = editor.forEachSelection(function () {\n return self.expandSnippetForSelection(editor, options);\n }, null, { keepOrder: true });\n if (result && editor.tabstopManager)\n editor.tabstopManager.tabNext();\n return result;\n };\n SnippetManager.prototype.expandSnippetForSelection = function (editor, options) {\n var cursor = editor.getCursorPosition();\n var line = editor.session.getLine(cursor.row);\n var before = line.substring(0, cursor.column);\n var after = line.substr(cursor.column);\n var snippetMap = this.snippetMap;\n var snippet;\n this.getActiveScopes(editor).some(function (scope) {\n var snippets = snippetMap[scope];\n if (snippets)\n snippet = this.findMatchingSnippet(snippets, before, after);\n return !!snippet;\n }, this);\n if (!snippet)\n return false;\n if (options && options.dryRun)\n return true;\n editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length);\n this.variables.M__ = snippet.matchBefore;\n this.variables.T__ = snippet.matchAfter;\n this.insertSnippetForSelection(editor, snippet.content);\n this.variables.M__ = this.variables.T__ = null;\n return true;\n };\n SnippetManager.prototype.findMatchingSnippet = function (snippetList, before, after) {\n for (var i = snippetList.length; i--;) {\n var s = snippetList[i];\n if (s.startRe && !s.startRe.test(before))\n continue;\n if (s.endRe && !s.endRe.test(after))\n continue;\n if (!s.startRe && !s.endRe)\n continue;\n s.matchBefore = s.startRe ? s.startRe.exec(before) : [\"\"];\n s.matchAfter = s.endRe ? s.endRe.exec(after) : [\"\"];\n s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : \"\";\n s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : \"\";\n return s;\n }\n };\n SnippetManager.prototype.register = function (snippets, scope) {\n var snippetMap = this.snippetMap;\n var snippetNameMap = this.snippetNameMap;\n var self = this;\n if (!snippets)\n snippets = [];\n function wrapRegexp(src) {\n if (src && !/^\\^?\\(.*\\)\\$?$|^\\\\b$/.test(src))\n src = \"(?:\" + src + \")\";\n return src || \"\";\n }\n function guardedRegexp(re, guard, opening) {\n re = wrapRegexp(re);\n guard = wrapRegexp(guard);\n if (opening) {\n re = guard + re;\n if (re && re[re.length - 1] != \"$\")\n re = re + \"$\";\n }\n else {\n re = re + guard;\n if (re && re[0] != \"^\")\n re = \"^\" + re;\n }\n return new RegExp(re);\n }\n function addSnippet(s) {\n if (!s.scope)\n s.scope = scope || \"_\";\n scope = s.scope;\n if (!snippetMap[scope]) {\n snippetMap[scope] = [];\n snippetNameMap[scope] = {};\n }\n var map = snippetNameMap[scope];\n if (s.name) {\n var old = map[s.name];\n if (old)\n self.unregister(old);\n map[s.name] = s;\n }\n snippetMap[scope].push(s);\n if (s.prefix)\n s.tabTrigger = s.prefix;\n if (!s.content && s.body)\n s.content = Array.isArray(s.body) ? s.body.join(\"\\n\") : s.body;\n if (s.tabTrigger && !s.trigger) {\n if (!s.guard && /^\\w/.test(s.tabTrigger))\n s.guard = \"\\\\b\";\n s.trigger = lang.escapeRegExp(s.tabTrigger);\n }\n if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard)\n return;\n s.startRe = guardedRegexp(s.trigger, s.guard, true);\n s.triggerRe = new RegExp(s.trigger);\n s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);\n s.endTriggerRe = new RegExp(s.endTrigger);\n }\n if (Array.isArray(snippets)) {\n snippets.forEach(addSnippet);\n }\n else {\n Object.keys(snippets).forEach(function (key) {\n addSnippet(snippets[key]);\n });\n }\n this._signal(\"registerSnippets\", { scope: scope });\n };\n SnippetManager.prototype.unregister = function (snippets, scope) {\n var snippetMap = this.snippetMap;\n var snippetNameMap = this.snippetNameMap;\n function removeSnippet(s) {\n var nameMap = snippetNameMap[s.scope || scope];\n if (nameMap && nameMap[s.name]) {\n delete nameMap[s.name];\n var map = snippetMap[s.scope || scope];\n var i = map && map.indexOf(s);\n if (i >= 0)\n map.splice(i, 1);\n }\n }\n if (snippets.content)\n removeSnippet(snippets);\n else if (Array.isArray(snippets))\n snippets.forEach(removeSnippet);\n };\n SnippetManager.prototype.parseSnippetFile = function (str) {\n str = str.replace(/\\r/g, \"\");\n var list = [], /**@type{Snippet}*/ snippet = {};\n var re = /^#.*|^({[\\s\\S]*})\\s*$|^(\\S+) (.*)$|^((?:\\n*\\t.*)+)/gm;\n var m;\n while (m = re.exec(str)) {\n if (m[1]) {\n try {\n snippet = JSON.parse(m[1]);\n list.push(snippet);\n }\n catch (e) { }\n }\n if (m[4]) {\n snippet.content = m[4].replace(/^\\t/gm, \"\");\n list.push(snippet);\n snippet = {};\n }\n else {\n var key = m[2], val = m[3];\n if (key == \"regex\") {\n var guardRe = /\\/((?:[^\\/\\\\]|\\\\.)*)|$/g;\n snippet.guard = guardRe.exec(val)[1];\n snippet.trigger = guardRe.exec(val)[1];\n snippet.endTrigger = guardRe.exec(val)[1];\n snippet.endGuard = guardRe.exec(val)[1];\n }\n else if (key == \"snippet\") {\n snippet.tabTrigger = val.match(/^\\S*/)[0];\n if (!snippet.name)\n snippet.name = val;\n }\n else if (key) {\n snippet[key] = val;\n }\n }\n }\n return list;\n };\n SnippetManager.prototype.getSnippetByName = function (name, editor) {\n var snippetMap = this.snippetNameMap;\n var snippet;\n this.getActiveScopes(editor).some(function (scope) {\n var snippets = snippetMap[scope];\n if (snippets)\n snippet = snippets[name];\n return !!snippet;\n }, this);\n return snippet;\n };\n return SnippetManager;\n}());\noop.implement(SnippetManager.prototype, EventEmitter);\nvar processSnippetText = function (editor, snippetText, options) {\n if (options === void 0) { options = {}; }\n var cursor = editor.getCursorPosition();\n var line = editor.session.getLine(cursor.row);\n var tabString = editor.session.getTabString();\n var indentString = line.match(/^\\s*/)[0];\n if (cursor.column < indentString.length)\n indentString = indentString.slice(0, cursor.column);\n snippetText = snippetText.replace(/\\r/g, \"\");\n var tokens = this.tokenizeTmSnippet(snippetText);\n tokens = this.resolveVariables(tokens, editor);\n tokens = tokens.map(function (x) {\n if (x == \"\\n\" && !options.excludeExtraIndent)\n return x + indentString;\n if (typeof x == \"string\")\n return x.replace(/\\t/g, tabString);\n return x;\n });\n var tabstops = [];\n tokens.forEach(function (p, i) {\n if (typeof p != \"object\")\n return;\n var id = p.tabstopId;\n var ts = tabstops[id];\n if (!ts) {\n ts = tabstops[id] = [];\n ts.index = id;\n ts.value = \"\";\n ts.parents = {};\n }\n if (ts.indexOf(p) !== -1)\n return;\n if (p.choices && !ts.choices)\n ts.choices = p.choices;\n ts.push(p);\n var i1 = tokens.indexOf(p, i + 1);\n if (i1 === -1)\n return;\n var value = tokens.slice(i + 1, i1);\n var isNested = value.some(function (t) { return typeof t === \"object\"; });\n if (isNested && !ts.value) {\n ts.value = value;\n }\n else if (value.length && (!ts.value || typeof ts.value !== \"string\")) {\n ts.value = value.join(\"\");\n }\n });\n tabstops.forEach(function (ts) { ts.length = 0; });\n var expanding = {};\n function copyValue(val) {\n var copy = [];\n for (var i = 0; i < val.length; i++) {\n var p = val[i];\n if (typeof p == \"object\") {\n if (expanding[p.tabstopId])\n continue;\n var j = val.lastIndexOf(p, i - 1);\n p = copy[j] || { tabstopId: p.tabstopId };\n }\n copy[i] = p;\n }\n return copy;\n }\n for (var i = 0; i < tokens.length; i++) {\n var p = tokens[i];\n if (typeof p != \"object\")\n continue;\n var id = p.tabstopId;\n var ts = tabstops[id];\n var i1 = tokens.indexOf(p, i + 1);\n if (expanding[id]) {\n if (expanding[id] === p) {\n delete expanding[id];\n Object.keys(expanding).forEach(function (parentId) {\n ts.parents[parentId] = true;\n });\n }\n continue;\n }\n expanding[id] = p;\n var value = ts.value;\n if (typeof value !== \"string\")\n value = copyValue(value);\n else if (p.fmt)\n value = this.tmStrFormat(value, p, editor);\n tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p));\n if (ts.indexOf(p) === -1)\n ts.push(p);\n }\n var row = 0, column = 0;\n var text = \"\";\n tokens.forEach(function (t) {\n if (typeof t === \"string\") {\n var lines = t.split(\"\\n\");\n if (lines.length > 1) {\n column = lines[lines.length - 1].length;\n row += lines.length - 1;\n }\n else\n column += t.length;\n text += t;\n }\n else if (t) {\n if (!t.start)\n t.start = { row: row, column: column };\n else\n t.end = { row: row, column: column };\n }\n });\n return {\n text: text,\n tabstops: tabstops,\n tokens: tokens\n };\n};\nvar TabstopManager = /** @class */ (function () {\n function TabstopManager(editor) {\n this.index = 0;\n this.ranges = [];\n this.tabstops = [];\n if (editor.tabstopManager)\n return editor.tabstopManager;\n editor.tabstopManager = this;\n this.$onChange = this.onChange.bind(this);\n this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;\n this.$onChangeSession = this.onChangeSession.bind(this);\n this.$onAfterExec = this.onAfterExec.bind(this);\n this.attach(editor);\n }\n TabstopManager.prototype.attach = function (editor) {\n this.$openTabstops = null;\n this.selectedTabstop = null;\n this.editor = editor;\n this.session = editor.session;\n this.editor.on(\"change\", this.$onChange);\n this.editor.on(\"changeSelection\", this.$onChangeSelection);\n this.editor.on(\"changeSession\", this.$onChangeSession);\n this.editor.commands.on(\"afterExec\", this.$onAfterExec);\n this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);\n };\n TabstopManager.prototype.detach = function () {\n this.tabstops.forEach(this.removeTabstopMarkers, this);\n this.ranges.length = 0;\n this.tabstops.length = 0;\n this.selectedTabstop = null;\n this.editor.off(\"change\", this.$onChange);\n this.editor.off(\"changeSelection\", this.$onChangeSelection);\n this.editor.off(\"changeSession\", this.$onChangeSession);\n this.editor.commands.off(\"afterExec\", this.$onAfterExec);\n this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);\n this.editor.tabstopManager = null;\n this.session = null;\n this.editor = null;\n };\n TabstopManager.prototype.onChange = function (delta) {\n var isRemove = delta.action[0] == \"r\";\n var selectedTabstop = this.selectedTabstop || {};\n var parents = selectedTabstop.parents || {};\n var tabstops = this.tabstops.slice();\n for (var i = 0; i < tabstops.length; i++) {\n var ts = tabstops[i];\n var active = ts == selectedTabstop || parents[ts.index];\n ts.rangeList.$bias = active ? 0 : 1;\n if (delta.action == \"remove\" && ts !== selectedTabstop) {\n var parentActive = ts.parents && ts.parents[selectedTabstop.index];\n var startIndex = ts.rangeList.pointIndex(delta.start, parentActive);\n startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1;\n var endIndex = ts.rangeList.pointIndex(delta.end, parentActive);\n endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1;\n var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex);\n for (var j = 0; j < toRemove.length; j++)\n this.removeRange(toRemove[j]);\n }\n ts.rangeList.$onChange(delta);\n }\n var session = this.session;\n if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue())\n this.detach();\n };\n TabstopManager.prototype.updateLinkedFields = function () {\n var ts = this.selectedTabstop;\n if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked)\n return;\n this.$inChange = true;\n var session = this.session;\n var text = session.getTextRange(ts.firstNonLinked);\n for (var i = 0; i < ts.length; i++) {\n var range = ts[i];\n if (!range.linked)\n continue;\n var original = range.original;\n var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor);\n session.replace(range, fmt);\n }\n this.$inChange = false;\n };\n TabstopManager.prototype.onAfterExec = function (e) {\n if (e.command && !e.command.readOnly)\n this.updateLinkedFields();\n };\n TabstopManager.prototype.onChangeSelection = function () {\n if (!this.editor)\n return;\n var lead = this.editor.selection.lead;\n var anchor = this.editor.selection.anchor;\n var isEmpty = this.editor.selection.isEmpty();\n for (var i = 0; i < this.ranges.length; i++) {\n if (this.ranges[i].linked)\n continue;\n var containsLead = this.ranges[i].contains(lead.row, lead.column);\n var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);\n if (containsLead && containsAnchor)\n return;\n }\n this.detach();\n };\n TabstopManager.prototype.onChangeSession = function () {\n this.detach();\n };\n TabstopManager.prototype.tabNext = function (dir) {\n var max = this.tabstops.length;\n var index = this.index + (dir || 1);\n index = Math.min(Math.max(index, 1), max);\n if (index == max)\n index = 0;\n this.selectTabstop(index);\n this.updateTabstopMarkers();\n if (index === 0) {\n this.detach();\n }\n };\n TabstopManager.prototype.selectTabstop = function (index) {\n this.$openTabstops = null;\n var ts = this.tabstops[this.index];\n if (ts)\n this.addTabstopMarkers(ts);\n this.index = index;\n ts = this.tabstops[this.index];\n if (!ts || !ts.length)\n return;\n this.selectedTabstop = ts;\n var range = ts.firstNonLinked || ts;\n if (ts.choices)\n range.cursor = range.start;\n if (!this.editor.inVirtualSelectionMode) {\n var sel = this.editor.multiSelect;\n sel.toSingleRange(range);\n for (var i = 0; i < ts.length; i++) {\n if (ts.hasLinkedRanges && ts[i].linked)\n continue;\n sel.addRange(ts[i].clone(), true);\n }\n }\n else {\n this.editor.selection.fromOrientedRange(range);\n }\n this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);\n if (this.selectedTabstop && this.selectedTabstop.choices)\n this.editor.execCommand(\"startAutocomplete\", { matches: this.selectedTabstop.choices });\n };\n TabstopManager.prototype.addTabstops = function (tabstops, start, end) {\n var useLink = this.useLink || !this.editor.getOption(\"enableMultiselect\");\n if (!this.$openTabstops)\n this.$openTabstops = [];\n if (!tabstops[0]) {\n var p = Range.fromPoints(end, end);\n moveRelative(p.start, start);\n moveRelative(p.end, start);\n tabstops[0] = [p];\n tabstops[0].index = 0;\n }\n var i = this.index;\n var arg = [i + 1, 0];\n var ranges = this.ranges;\n var snippetId = this.snippetId = (this.snippetId || 0) + 1;\n tabstops.forEach(function (ts, index) {\n var dest = this.$openTabstops[index] || ts;\n dest.snippetId = snippetId;\n for (var i = 0; i < ts.length; i++) {\n var p = ts[i];\n var range = Range.fromPoints(p.start, p.end || p.start);\n movePoint(range.start, start);\n movePoint(range.end, start);\n range.original = p;\n range.tabstop = dest;\n ranges.push(range);\n if (dest != ts)\n dest.unshift(range);\n else\n dest[i] = range;\n if (p.fmtString || (dest.firstNonLinked && useLink)) {\n range.linked = true;\n dest.hasLinkedRanges = true;\n }\n else if (!dest.firstNonLinked)\n dest.firstNonLinked = range;\n }\n if (!dest.firstNonLinked)\n dest.hasLinkedRanges = false;\n if (dest === ts) {\n arg.push(dest);\n this.$openTabstops[index] = dest;\n }\n this.addTabstopMarkers(dest);\n dest.rangeList = dest.rangeList || new RangeList();\n dest.rangeList.$bias = 0;\n dest.rangeList.addList(dest);\n }, this);\n if (arg.length > 2) {\n if (this.tabstops.length)\n arg.push(arg.splice(2, 1)[0]);\n this.tabstops.splice.apply(this.tabstops, arg);\n }\n };\n TabstopManager.prototype.addTabstopMarkers = function (ts) {\n var session = this.session;\n ts.forEach(function (range) {\n if (!range.markerId)\n range.markerId = session.addMarker(range, \"ace_snippet-marker\", \"text\");\n });\n };\n TabstopManager.prototype.removeTabstopMarkers = function (ts) {\n var session = this.session;\n ts.forEach(function (range) {\n session.removeMarker(range.markerId);\n range.markerId = null;\n });\n };\n TabstopManager.prototype.updateTabstopMarkers = function () {\n if (!this.selectedTabstop)\n return;\n var currentSnippetId = this.selectedTabstop.snippetId;\n if (this.selectedTabstop.index === 0) {\n currentSnippetId--;\n }\n this.tabstops.forEach(function (ts) {\n if (ts.snippetId === currentSnippetId)\n this.addTabstopMarkers(ts);\n else\n this.removeTabstopMarkers(ts);\n }, this);\n };\n TabstopManager.prototype.removeRange = function (range) {\n var i = range.tabstop.indexOf(range);\n if (i != -1)\n range.tabstop.splice(i, 1);\n i = this.ranges.indexOf(range);\n if (i != -1)\n this.ranges.splice(i, 1);\n i = range.tabstop.rangeList.ranges.indexOf(range);\n if (i != -1)\n range.tabstop.splice(i, 1);\n this.session.removeMarker(range.markerId);\n if (!range.tabstop.length) {\n i = this.tabstops.indexOf(range.tabstop);\n if (i != -1)\n this.tabstops.splice(i, 1);\n if (!this.tabstops.length)\n this.detach();\n }\n };\n return TabstopManager;\n}());\nTabstopManager.prototype.keyboardHandler = new HashHandler();\nTabstopManager.prototype.keyboardHandler.bindKeys({\n \"Tab\": function (editor) {\n if (exports.snippetManager && exports.snippetManager.expandWithTab(editor))\n return;\n editor.tabstopManager.tabNext(1);\n editor.renderer.scrollCursorIntoView();\n },\n \"Shift-Tab\": function (editor) {\n editor.tabstopManager.tabNext(-1);\n editor.renderer.scrollCursorIntoView();\n },\n \"Esc\": function (editor) {\n editor.tabstopManager.detach();\n }\n});\nvar movePoint = function (point, diff) {\n if (point.row == 0)\n point.column += diff.column;\n point.row += diff.row;\n};\nvar moveRelative = function (point, start) {\n if (point.row == start.row)\n point.column -= start.column;\n point.row -= start.row;\n};\ndom.importCssString(\"\\n.ace_snippet-marker {\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n background: rgba(194, 193, 208, 0.09);\\n border: 1px dotted rgba(211, 208, 235, 0.62);\\n position: absolute;\\n}\", \"snippets.css\", false);\nexports.snippetManager = new SnippetManager();\nvar Editor = require(\"./editor\").Editor;\n(function () {\n this.insertSnippet = function (content, options) {\n return exports.snippetManager.insertSnippet(this, content, options);\n };\n this.expandSnippet = function (options) {\n return exports.snippetManager.expandWithTab(this, options);\n };\n}).call(Editor.prototype);\n\n});\n\nace.define(\"ace/autocomplete/popup\",[\"require\",\"exports\",\"module\",\"ace/virtual_renderer\",\"ace/editor\",\"ace/range\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/lib/dom\",\"ace/config\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar Renderer = require(\"../virtual_renderer\").VirtualRenderer;\nvar Editor = require(\"../editor\").Editor;\nvar Range = require(\"../range\").Range;\nvar event = require(\"../lib/event\");\nvar lang = require(\"../lib/lang\");\nvar dom = require(\"../lib/dom\");\nvar nls = require(\"../config\").nls;\nvar userAgent = require(\"./../lib/useragent\");\nvar getAriaId = function (index) {\n return \"suggest-aria-id:\".concat(index);\n};\nvar popupAriaRole = userAgent.isSafari ? \"menu\" : \"listbox\";\nvar optionAriaRole = userAgent.isSafari ? \"menuitem\" : \"option\";\nvar ariaActiveState = userAgent.isSafari ? \"aria-current\" : \"aria-selected\";\nvar $singleLineEditor = function (el) {\n var renderer = new Renderer(el);\n renderer.$maxLines = 4;\n var editor = new Editor(renderer);\n editor.setHighlightActiveLine(false);\n editor.setShowPrintMargin(false);\n editor.renderer.setShowGutter(false);\n editor.renderer.setHighlightGutterLine(false);\n editor.$mouseHandler.$focusTimeout = 0;\n editor.$highlightTagPending = true;\n return editor;\n};\nvar AcePopup = /** @class */ (function () {\n function AcePopup(parentNode) {\n var el = dom.createElement(\"div\");\n var popup = $singleLineEditor(el);\n if (parentNode) {\n parentNode.appendChild(el);\n }\n el.style.display = \"none\";\n popup.renderer.content.style.cursor = \"default\";\n popup.renderer.setStyle(\"ace_autocomplete\");\n popup.renderer.$textLayer.element.setAttribute(\"role\", popupAriaRole);\n popup.renderer.$textLayer.element.setAttribute(\"aria-roledescription\", nls(\"autocomplete.popup.aria-roledescription\", \"Autocomplete suggestions\"));\n popup.renderer.$textLayer.element.setAttribute(\"aria-label\", nls(\"autocomplete.popup.aria-label\", \"Autocomplete suggestions\"));\n popup.renderer.textarea.setAttribute(\"aria-hidden\", \"true\");\n popup.setOption(\"displayIndentGuides\", false);\n popup.setOption(\"dragDelay\", 150);\n var noop = function () { };\n popup.focus = noop;\n popup.$isFocused = true;\n popup.renderer.$cursorLayer.restartTimer = noop;\n popup.renderer.$cursorLayer.element.style.opacity = \"0\";\n popup.renderer.$maxLines = 8;\n popup.renderer.$keepTextAreaAtCursor = false;\n popup.setHighlightActiveLine(false);\n popup.session.highlight(\"\");\n popup.session.$searchHighlight.clazz = \"ace_highlight-marker\";\n popup.on(\"mousedown\", function (e) {\n var pos = e.getDocumentPosition();\n popup.selection.moveToPosition(pos);\n selectionMarker.start.row = selectionMarker.end.row = pos.row;\n e.stop();\n });\n var lastMouseEvent;\n var hoverMarker = new Range(-1, 0, -1, Infinity);\n var selectionMarker = new Range(-1, 0, -1, Infinity);\n selectionMarker.id = popup.session.addMarker(selectionMarker, \"ace_active-line\", \"fullLine\");\n popup.setSelectOnHover = function (val) {\n if (!val) {\n hoverMarker.id = popup.session.addMarker(hoverMarker, \"ace_line-hover\", \"fullLine\");\n }\n else if (hoverMarker.id) {\n popup.session.removeMarker(hoverMarker.id);\n hoverMarker.id = null;\n }\n };\n popup.setSelectOnHover(false);\n popup.on(\"mousemove\", function (e) {\n if (!lastMouseEvent) {\n lastMouseEvent = e;\n return;\n }\n if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {\n return;\n }\n lastMouseEvent = e;\n lastMouseEvent.scrollTop = popup.renderer.scrollTop;\n popup.isMouseOver = true;\n var row = lastMouseEvent.getDocumentPosition().row;\n if (hoverMarker.start.row != row) {\n if (!hoverMarker.id)\n popup.setRow(row);\n setHoverMarker(row);\n }\n });\n popup.renderer.on(\"beforeRender\", function () {\n if (lastMouseEvent && hoverMarker.start.row != -1) {\n lastMouseEvent.$pos = null;\n var row = lastMouseEvent.getDocumentPosition().row;\n if (!hoverMarker.id)\n popup.setRow(row);\n setHoverMarker(row, true);\n }\n });\n popup.renderer.on(\"afterRender\", function () {\n var row = popup.getRow();\n var t = popup.renderer.$textLayer;\n var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]);\n var el = document.activeElement; // Active element is textarea of main editor\n if (selected !== popup.selectedNode && popup.selectedNode) {\n dom.removeCssClass(popup.selectedNode, \"ace_selected\");\n el.removeAttribute(\"aria-activedescendant\");\n popup.selectedNode.removeAttribute(ariaActiveState);\n popup.selectedNode.removeAttribute(\"id\");\n }\n popup.selectedNode = selected;\n if (selected) {\n dom.addCssClass(selected, \"ace_selected\");\n var ariaId = getAriaId(row);\n selected.id = ariaId;\n t.element.setAttribute(\"aria-activedescendant\", ariaId);\n el.setAttribute(\"aria-activedescendant\", ariaId);\n selected.setAttribute(\"role\", optionAriaRole);\n selected.setAttribute(\"aria-roledescription\", nls(\"autocomplete.popup.item.aria-roledescription\", \"item\"));\n selected.setAttribute(\"aria-label\", popup.getData(row).caption || popup.getData(row).value);\n selected.setAttribute(\"aria-setsize\", popup.data.length);\n selected.setAttribute(\"aria-posinset\", row + 1);\n selected.setAttribute(\"aria-describedby\", \"doc-tooltip\");\n selected.setAttribute(ariaActiveState, \"true\");\n }\n });\n var hideHoverMarker = function () { setHoverMarker(-1); };\n var setHoverMarker = function (row, suppressRedraw) {\n if (row !== hoverMarker.start.row) {\n hoverMarker.start.row = hoverMarker.end.row = row;\n if (!suppressRedraw)\n popup.session._emit(\"changeBackMarker\");\n popup._emit(\"changeHoverMarker\");\n }\n };\n popup.getHoveredRow = function () {\n return hoverMarker.start.row;\n };\n event.addListener(popup.container, \"mouseout\", function () {\n popup.isMouseOver = false;\n hideHoverMarker();\n });\n popup.on(\"hide\", hideHoverMarker);\n popup.on(\"changeSelection\", hideHoverMarker);\n popup.session.doc.getLength = function () {\n return popup.data.length;\n };\n popup.session.doc.getLine = function (i) {\n var data = popup.data[i];\n if (typeof data == \"string\")\n return data;\n return (data && data.value) || \"\";\n };\n var bgTokenizer = popup.session.bgTokenizer;\n bgTokenizer.$tokenizeRow = function (row) {\n var data = popup.data[row];\n var tokens = [];\n if (!data)\n return tokens;\n if (typeof data == \"string\")\n data = { value: data };\n var caption = data.caption || data.value || data.name;\n function addToken(value, className) {\n value && tokens.push({\n type: (data.className || \"\") + (className || \"\"),\n value: value\n });\n }\n var lower = caption.toLowerCase();\n var filterText = (popup.filterText || \"\").toLowerCase();\n var lastIndex = 0;\n var lastI = 0;\n for (var i = 0; i <= filterText.length; i++) {\n if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) {\n var sub = filterText.slice(lastI, i);\n lastI = i;\n var index = lower.indexOf(sub, lastIndex);\n if (index == -1)\n continue;\n addToken(caption.slice(lastIndex, index), \"\");\n lastIndex = index + sub.length;\n addToken(caption.slice(index, lastIndex), \"completion-highlight\");\n }\n }\n addToken(caption.slice(lastIndex, caption.length), \"\");\n tokens.push({ type: \"completion-spacer\", value: \" \" });\n if (data.meta)\n tokens.push({ type: \"completion-meta\", value: data.meta });\n if (data.message)\n tokens.push({ type: \"completion-message\", value: data.message });\n return tokens;\n };\n bgTokenizer.$updateOnChange = noop;\n bgTokenizer.start = noop;\n popup.session.$computeWidth = function () {\n return this.screenWidth = 0;\n };\n popup.isOpen = false;\n popup.isTopdown = false;\n popup.autoSelect = true;\n popup.filterText = \"\";\n popup.isMouseOver = false;\n popup.data = [];\n popup.setData = function (list, filterText) {\n popup.filterText = filterText || \"\";\n popup.setValue(lang.stringRepeat(\"\\n\", list.length), -1);\n popup.data = list || [];\n popup.setRow(0);\n };\n popup.getData = function (row) {\n return popup.data[row];\n };\n popup.getRow = function () {\n return selectionMarker.start.row;\n };\n popup.setRow = function (line) {\n line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length - 1, line));\n if (selectionMarker.start.row != line) {\n popup.selection.clearSelection();\n selectionMarker.start.row = selectionMarker.end.row = line || 0;\n popup.session._emit(\"changeBackMarker\");\n popup.moveCursorTo(line || 0, 0);\n if (popup.isOpen)\n popup._signal(\"select\");\n }\n };\n popup.on(\"changeSelection\", function () {\n if (popup.isOpen)\n popup.setRow(popup.selection.lead.row);\n popup.renderer.scrollCursorIntoView();\n });\n popup.hide = function () {\n this.container.style.display = \"none\";\n popup.anchorPos = null;\n popup.anchor = null;\n if (popup.isOpen) {\n popup.isOpen = false;\n this._signal(\"hide\");\n }\n };\n popup.tryShow = function (pos, lineHeight, anchor, forceShow) {\n if (!forceShow && popup.isOpen && popup.anchorPos && popup.anchor &&\n popup.anchorPos.top === pos.top && popup.anchorPos.left === pos.left &&\n popup.anchor === anchor) {\n return true;\n }\n var el = this.container;\n var screenHeight = window.innerHeight;\n var screenWidth = window.innerWidth;\n var renderer = this.renderer;\n var maxH = renderer.$maxLines * lineHeight * 1.4;\n var dims = { top: 0, bottom: 0, left: 0 };\n var spaceBelow = screenHeight - pos.top - 3 * this.$borderSize - lineHeight;\n var spaceAbove = pos.top - 3 * this.$borderSize;\n if (!anchor) {\n if (spaceAbove <= spaceBelow || spaceBelow >= maxH) {\n anchor = \"bottom\";\n }\n else {\n anchor = \"top\";\n }\n }\n if (anchor === \"top\") {\n dims.bottom = pos.top - this.$borderSize;\n dims.top = dims.bottom - maxH;\n }\n else if (anchor === \"bottom\") {\n dims.top = pos.top + lineHeight + this.$borderSize;\n dims.bottom = dims.top + maxH;\n }\n var fitsX = dims.top >= 0 && dims.bottom <= screenHeight;\n if (!forceShow && !fitsX) {\n return false;\n }\n if (!fitsX) {\n if (anchor === \"top\") {\n renderer.$maxPixelHeight = spaceAbove;\n }\n else {\n renderer.$maxPixelHeight = spaceBelow;\n }\n }\n else {\n renderer.$maxPixelHeight = null;\n }\n if (anchor === \"top\") {\n el.style.top = \"\";\n el.style.bottom = (screenHeight - dims.bottom) + \"px\";\n popup.isTopdown = false;\n }\n else {\n el.style.top = dims.top + \"px\";\n el.style.bottom = \"\";\n popup.isTopdown = true;\n }\n el.style.display = \"\";\n var left = pos.left;\n if (left + el.offsetWidth > screenWidth)\n left = screenWidth - el.offsetWidth;\n el.style.left = left + \"px\";\n el.style.right = \"\";\n if (!popup.isOpen) {\n popup.isOpen = true;\n this._signal(\"show\");\n lastMouseEvent = null;\n }\n popup.anchorPos = pos;\n popup.anchor = anchor;\n return true;\n };\n popup.show = function (pos, lineHeight, topdownOnly) {\n this.tryShow(pos, lineHeight, topdownOnly ? \"bottom\" : undefined, true);\n };\n popup.goTo = function (where) {\n var row = this.getRow();\n var max = this.session.getLength() - 1;\n switch (where) {\n case \"up\":\n row = row <= 0 ? max : row - 1;\n break;\n case \"down\":\n row = row >= max ? -1 : row + 1;\n break;\n case \"start\":\n row = 0;\n break;\n case \"end\":\n row = max;\n break;\n }\n this.setRow(row);\n };\n popup.getTextLeftOffset = function () {\n return this.$borderSize + this.renderer.$padding + this.$imageSize;\n };\n popup.$imageSize = 0;\n popup.$borderSize = 1;\n return popup;\n }\n return AcePopup;\n}());\ndom.importCssString(\"\\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\\n background-color: #CAD6FA;\\n z-index: 1;\\n}\\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\\n background-color: #3a674e;\\n}\\n.ace_editor.ace_autocomplete .ace_line-hover {\\n border: 1px solid #abbffe;\\n margin-top: -1px;\\n background: rgba(233,233,253,0.4);\\n position: absolute;\\n z-index: 2;\\n}\\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\\n border: 1px solid rgba(109, 150, 13, 0.8);\\n background: rgba(58, 103, 78, 0.62);\\n}\\n.ace_completion-meta {\\n opacity: 0.5;\\n margin-left: 0.9em;\\n}\\n.ace_completion-message {\\n margin-left: 0.9em;\\n color: blue;\\n}\\n.ace_editor.ace_autocomplete .ace_completion-highlight{\\n color: #2d69c7;\\n}\\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\\n color: #93ca12;\\n}\\n.ace_editor.ace_autocomplete {\\n width: 300px;\\n z-index: 200000;\\n border: 1px lightgray solid;\\n position: fixed;\\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\\n line-height: 1.4;\\n background: #fefefe;\\n color: #111;\\n}\\n.ace_dark.ace_editor.ace_autocomplete {\\n border: 1px #484747 solid;\\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\\n line-height: 1.4;\\n background: #25282c;\\n color: #c1c1c1;\\n}\\n.ace_autocomplete .ace_text-layer {\\n width: calc(100% - 8px);\\n}\\n.ace_autocomplete .ace_line {\\n display: flex;\\n align-items: center;\\n}\\n.ace_autocomplete .ace_line > * {\\n min-width: 0;\\n flex: 0 0 auto;\\n}\\n.ace_autocomplete .ace_line .ace_ {\\n flex: 0 1 auto;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n.ace_autocomplete .ace_completion-spacer {\\n flex: 1;\\n}\\n.ace_autocomplete.ace_loading:after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0px;\\n height: 2px;\\n width: 8%;\\n background: blue;\\n z-index: 100;\\n animation: ace_progress 3s infinite linear;\\n animation-delay: 300ms;\\n transform: translateX(-100%) scaleX(1);\\n}\\n@keyframes ace_progress {\\n 0% { transform: translateX(-100%) scaleX(1) }\\n 50% { transform: translateX(625%) scaleX(2) } \\n 100% { transform: translateX(1500%) scaleX(3) } \\n}\\n@media (prefers-reduced-motion) {\\n .ace_autocomplete.ace_loading:after {\\n transform: translateX(625%) scaleX(2);\\n animation: none;\\n }\\n}\\n\", \"autocompletion.css\", false);\nexports.AcePopup = AcePopup;\nexports.$singleLineEditor = $singleLineEditor;\nexports.getAriaId = getAriaId;\n\n});\n\nace.define(\"ace/autocomplete/inline_screenreader\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar AceInlineScreenReader = /** @class */ (function () {\n function AceInlineScreenReader(editor) {\n this.editor = editor;\n this.screenReaderDiv = document.createElement(\"div\");\n this.screenReaderDiv.classList.add(\"ace_screenreader-only\");\n this.editor.container.appendChild(this.screenReaderDiv);\n }\n AceInlineScreenReader.prototype.setScreenReaderContent = function (content) {\n if (!this.popup && this.editor.completer && /**@type{import(\"../autocomplete\").Autocomplete}*/ (this.editor.completer).popup) {\n this.popup = /**@type{import(\"../autocomplete\").Autocomplete}*/ (this.editor.completer).popup;\n this.popup.renderer.on(\"afterRender\", function () {\n var row = this.popup.getRow();\n var t = this.popup.renderer.$textLayer;\n var selected = t.element.childNodes[row - t.config.firstRow];\n if (selected) {\n var idString = \"doc-tooltip \";\n for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) {\n idString += \"ace-inline-screenreader-line-\".concat(lineIndex, \" \");\n }\n selected.setAttribute(\"aria-describedby\", idString);\n }\n }.bind(this));\n }\n while (this.screenReaderDiv.firstChild) {\n this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);\n }\n this._lines = content.split(/\\r\\n|\\r|\\n/);\n var codeElement = this.createCodeBlock();\n this.screenReaderDiv.appendChild(codeElement);\n };\n AceInlineScreenReader.prototype.destroy = function () {\n this.screenReaderDiv.remove();\n };\n AceInlineScreenReader.prototype.createCodeBlock = function () {\n var container = document.createElement(\"pre\");\n container.setAttribute(\"id\", \"ace-inline-screenreader\");\n for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) {\n var codeElement = document.createElement(\"code\");\n codeElement.setAttribute(\"id\", \"ace-inline-screenreader-line-\".concat(lineIndex));\n var line = document.createTextNode(this._lines[lineIndex]);\n codeElement.appendChild(line);\n container.appendChild(codeElement);\n }\n return container;\n };\n return AceInlineScreenReader;\n}());\nexports.AceInlineScreenReader = AceInlineScreenReader;\n\n});\n\nace.define(\"ace/autocomplete/inline\",[\"require\",\"exports\",\"module\",\"ace/snippets\",\"ace/autocomplete/inline_screenreader\"], function(require, exports, module){\"use strict\";\nvar snippetManager = require(\"../snippets\").snippetManager;\nvar AceInlineScreenReader = require(\"./inline_screenreader\").AceInlineScreenReader;\nvar AceInline = /** @class */ (function () {\n function AceInline() {\n this.editor = null;\n }\n AceInline.prototype.show = function (editor, completion, prefix) {\n prefix = prefix || \"\";\n if (editor && this.editor && this.editor !== editor) {\n this.hide();\n this.editor = null;\n this.inlineScreenReader = null;\n }\n if (!editor || !completion) {\n return false;\n }\n if (!this.inlineScreenReader) {\n this.inlineScreenReader = new AceInlineScreenReader(editor);\n }\n var displayText = completion.snippet ? snippetManager.getDisplayTextForSnippet(editor, completion.snippet) : completion.value;\n if (completion.hideInlinePreview || !displayText || !displayText.startsWith(prefix)) {\n return false;\n }\n this.editor = editor;\n this.inlineScreenReader.setScreenReaderContent(displayText);\n displayText = displayText.slice(prefix.length);\n if (displayText === \"\") {\n editor.removeGhostText();\n }\n else {\n editor.setGhostText(displayText);\n }\n return true;\n };\n AceInline.prototype.isOpen = function () {\n if (!this.editor) {\n return false;\n }\n return !!this.editor.renderer.$ghostText;\n };\n AceInline.prototype.hide = function () {\n if (!this.editor) {\n return false;\n }\n this.editor.removeGhostText();\n return true;\n };\n AceInline.prototype.destroy = function () {\n this.hide();\n this.editor = null;\n if (this.inlineScreenReader) {\n this.inlineScreenReader.destroy();\n this.inlineScreenReader = null;\n }\n };\n return AceInline;\n}());\nexports.AceInline = AceInline;\n\n});\n\nace.define(\"ace/autocomplete/util\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nexports.parForEach = function (array, fn, callback) {\n var completed = 0;\n var arLength = array.length;\n if (arLength === 0)\n callback();\n for (var i = 0; i < arLength; i++) {\n fn(array[i], function (result, err) {\n completed++;\n if (completed === arLength)\n callback(result, err);\n });\n }\n};\nvar ID_REGEX = /[a-zA-Z_0-9\\$\\-\\u00A2-\\u2000\\u2070-\\uFFFF]/;\nexports.retrievePrecedingIdentifier = function (text, pos, regex) {\n regex = regex || ID_REGEX;\n var buf = [];\n for (var i = pos - 1; i >= 0; i--) {\n if (regex.test(text[i]))\n buf.push(text[i]);\n else\n break;\n }\n return buf.reverse().join(\"\");\n};\nexports.retrieveFollowingIdentifier = function (text, pos, regex) {\n regex = regex || ID_REGEX;\n var buf = [];\n for (var i = pos; i < text.length; i++) {\n if (regex.test(text[i]))\n buf.push(text[i]);\n else\n break;\n }\n return buf;\n};\nexports.getCompletionPrefix = function (editor) {\n var pos = editor.getCursorPosition();\n var line = editor.session.getLine(pos.row);\n var prefix;\n editor.completers.forEach(function (completer) {\n if (completer.identifierRegexps) {\n completer.identifierRegexps.forEach(function (identifierRegex) {\n if (!prefix && identifierRegex)\n prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex);\n }.bind(this));\n }\n }.bind(this));\n return prefix || this.retrievePrecedingIdentifier(line, pos.column);\n};\nexports.triggerAutocomplete = function (editor, previousChar) {\n var previousChar = previousChar == null\n ? editor.session.getPrecedingCharacter()\n : previousChar;\n return editor.completers.some(function (completer) {\n if (completer.triggerCharacters && Array.isArray(completer.triggerCharacters)) {\n return completer.triggerCharacters.includes(previousChar);\n }\n });\n};\n\n});\n\nace.define(\"ace/autocomplete\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\",\"ace/autocomplete/popup\",\"ace/autocomplete/inline\",\"ace/autocomplete/popup\",\"ace/autocomplete/util\",\"ace/lib/lang\",\"ace/lib/dom\",\"ace/snippets\",\"ace/config\",\"ace/lib/event\",\"ace/lib/scroll\"], function(require, exports, module){\"use strict\";\nvar HashHandler = require(\"./keyboard/hash_handler\").HashHandler;\nvar AcePopup = require(\"./autocomplete/popup\").AcePopup;\nvar AceInline = require(\"./autocomplete/inline\").AceInline;\nvar getAriaId = require(\"./autocomplete/popup\").getAriaId;\nvar util = require(\"./autocomplete/util\");\nvar lang = require(\"./lib/lang\");\nvar dom = require(\"./lib/dom\");\nvar snippetManager = require(\"./snippets\").snippetManager;\nvar config = require(\"./config\");\nvar event = require(\"./lib/event\");\nvar preventParentScroll = require(\"./lib/scroll\").preventParentScroll;\nvar destroyCompleter = function (e, editor) {\n editor.completer && editor.completer.destroy();\n};\nvar Autocomplete = /** @class */ (function () {\n function Autocomplete() {\n this.autoInsert = false;\n this.autoSelect = true;\n this.autoShown = false;\n this.exactMatch = false;\n this.inlineEnabled = false;\n this.keyboardHandler = new HashHandler();\n this.keyboardHandler.bindKeys(this.commands);\n this.parentNode = null;\n this.setSelectOnHover = false;\n this.hasSeen = new Set();\n this.showLoadingState = false;\n this.stickySelectionDelay = 500;\n this.blurListener = this.blurListener.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.mousedownListener = this.mousedownListener.bind(this);\n this.mousewheelListener = this.mousewheelListener.bind(this);\n this.onLayoutChange = this.onLayoutChange.bind(this);\n this.changeTimer = lang.delayedCall(function () {\n this.updateCompletions(true);\n }.bind(this));\n this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);\n this.popupTimer = lang.delayedCall(this.$updatePopupPosition.bind(this), 50);\n this.stickySelectionTimer = lang.delayedCall(function () {\n this.stickySelection = true;\n }.bind(this), this.stickySelectionDelay);\n this.$firstOpenTimer = lang.delayedCall(/**@this{Autocomplete}*/ function () {\n var initialPosition = this.completionProvider && this.completionProvider.initialPosition;\n if (this.autoShown || (this.popup && this.popup.isOpen) || !initialPosition || this.editor.completers.length === 0)\n return;\n this.completions = new FilteredList(Autocomplete.completionsForLoading);\n this.openPopup(this.editor, initialPosition.prefix, false);\n this.popup.renderer.setStyle(\"ace_loading\", true);\n }.bind(this), this.stickySelectionDelay);\n }\n Object.defineProperty(Autocomplete, \"completionsForLoading\", {\n get: function () {\n return [{\n caption: config.nls(\"autocomplete.loading\", \"Loading...\"),\n value: \"\"\n }];\n },\n enumerable: false,\n configurable: true\n });\n Autocomplete.prototype.$init = function () {\n this.popup = new AcePopup(this.parentNode || document.body || document.documentElement);\n this.popup.on(\"click\", function (e) {\n this.insertMatch();\n e.stop();\n }.bind(this));\n this.popup.focus = this.editor.focus.bind(this.editor);\n this.popup.on(\"show\", this.$onPopupShow.bind(this));\n this.popup.on(\"hide\", this.$onHidePopup.bind(this));\n this.popup.on(\"select\", this.$onPopupChange.bind(this));\n event.addListener(this.popup.container, \"mouseout\", this.mouseOutListener.bind(this));\n this.popup.on(\"changeHoverMarker\", this.tooltipTimer.bind(null, null));\n this.popup.renderer.on(\"afterRender\", this.$onPopupRender.bind(this));\n return this.popup;\n };\n Autocomplete.prototype.$initInline = function () {\n if (!this.inlineEnabled || this.inlineRenderer)\n return;\n this.inlineRenderer = new AceInline();\n return this.inlineRenderer;\n };\n Autocomplete.prototype.getPopup = function () {\n return this.popup || this.$init();\n };\n Autocomplete.prototype.$onHidePopup = function () {\n if (this.inlineRenderer) {\n this.inlineRenderer.hide();\n }\n this.hideDocTooltip();\n this.stickySelectionTimer.cancel();\n this.popupTimer.cancel();\n this.stickySelection = false;\n };\n Autocomplete.prototype.$seen = function (completion) {\n if (!this.hasSeen.has(completion) && completion && completion.completer && completion.completer.onSeen && typeof completion.completer.onSeen === \"function\") {\n completion.completer.onSeen(this.editor, completion);\n this.hasSeen.add(completion);\n }\n };\n Autocomplete.prototype.$onPopupChange = function (hide) {\n if (this.inlineRenderer && this.inlineEnabled) {\n var completion = hide ? null : this.popup.getData(this.popup.getRow());\n this.$updateGhostText(completion);\n if (this.popup.isMouseOver && this.setSelectOnHover) {\n this.tooltipTimer.call(null, null);\n return;\n }\n this.popupTimer.schedule();\n this.tooltipTimer.schedule();\n }\n else {\n this.popupTimer.call(null, null);\n this.tooltipTimer.call(null, null);\n }\n };\n Autocomplete.prototype.$updateGhostText = function (completion) {\n var row = this.base.row;\n var column = this.base.column;\n var cursorColumn = this.editor.getCursorPosition().column;\n var prefix = this.editor.session.getLine(row).slice(column, cursorColumn);\n if (!this.inlineRenderer.show(this.editor, completion, prefix)) {\n this.inlineRenderer.hide();\n }\n else {\n this.$seen(completion);\n }\n };\n Autocomplete.prototype.$onPopupRender = function () {\n var inlineEnabled = this.inlineRenderer && this.inlineEnabled;\n if (this.completions && this.completions.filtered && this.completions.filtered.length > 0) {\n for (var i = this.popup.getFirstVisibleRow(); i <= this.popup.getLastVisibleRow(); i++) {\n var completion = this.popup.getData(i);\n if (completion && (!inlineEnabled || completion.hideInlinePreview)) {\n this.$seen(completion);\n }\n }\n }\n };\n Autocomplete.prototype.$onPopupShow = function (hide) {\n this.$onPopupChange(hide);\n this.stickySelection = false;\n if (this.stickySelectionDelay >= 0)\n this.stickySelectionTimer.schedule(this.stickySelectionDelay);\n };\n Autocomplete.prototype.observeLayoutChanges = function () {\n if (this.$elements || !this.editor)\n return;\n window.addEventListener(\"resize\", this.onLayoutChange, { passive: true });\n window.addEventListener(\"wheel\", this.mousewheelListener);\n var el = this.editor.container.parentNode;\n var elements = [];\n while (el) {\n elements.push(el);\n el.addEventListener(\"scroll\", this.onLayoutChange, { passive: true });\n el = el.parentNode;\n }\n this.$elements = elements;\n };\n Autocomplete.prototype.unObserveLayoutChanges = function () {\n var _this = this;\n window.removeEventListener(\"resize\", this.onLayoutChange, { passive: true });\n window.removeEventListener(\"wheel\", this.mousewheelListener);\n this.$elements && this.$elements.forEach(function (el) {\n el.removeEventListener(\"scroll\", _this.onLayoutChange, { passive: true });\n });\n this.$elements = null;\n };\n Autocomplete.prototype.onLayoutChange = function () {\n if (!this.popup.isOpen)\n return this.unObserveLayoutChanges();\n this.$updatePopupPosition();\n this.updateDocTooltip();\n };\n Autocomplete.prototype.$updatePopupPosition = function () {\n var editor = this.editor;\n var renderer = editor.renderer;\n var lineHeight = renderer.layerConfig.lineHeight;\n var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);\n pos.left -= this.popup.getTextLeftOffset();\n var rect = editor.container.getBoundingClientRect();\n pos.top += rect.top - renderer.layerConfig.offset;\n pos.left += rect.left - editor.renderer.scrollLeft;\n pos.left += renderer.gutterWidth;\n var posGhostText = {\n top: pos.top,\n left: pos.left\n };\n if (renderer.$ghostText && renderer.$ghostTextWidget) {\n if (this.base.row === renderer.$ghostText.position.row) {\n posGhostText.top += renderer.$ghostTextWidget.el.offsetHeight;\n }\n }\n var editorContainerBottom = editor.container.getBoundingClientRect().bottom - lineHeight;\n var lowestPosition = editorContainerBottom < posGhostText.top ?\n { top: editorContainerBottom, left: posGhostText.left } :\n posGhostText;\n if (this.popup.tryShow(lowestPosition, lineHeight, \"bottom\")) {\n return;\n }\n if (this.popup.tryShow(pos, lineHeight, \"top\")) {\n return;\n }\n this.popup.show(pos, lineHeight);\n };\n Autocomplete.prototype.openPopup = function (editor, prefix, keepPopupPosition) {\n this.$firstOpenTimer.cancel();\n if (!this.popup)\n this.$init();\n if (this.inlineEnabled && !this.inlineRenderer)\n this.$initInline();\n this.popup.autoSelect = this.autoSelect;\n this.popup.setSelectOnHover(this.setSelectOnHover);\n var oldRow = this.popup.getRow();\n var previousSelectedItem = this.popup.data[oldRow];\n this.popup.setData(this.completions.filtered, this.completions.filterText);\n if (this.editor.textInput.setAriaOptions) {\n this.editor.textInput.setAriaOptions({\n activeDescendant: getAriaId(this.popup.getRow()),\n inline: this.inlineEnabled\n });\n }\n editor.keyBinding.addKeyboardHandler(this.keyboardHandler);\n var newRow;\n if (this.stickySelection)\n newRow = this.popup.data.indexOf(previousSelectedItem);\n if (!newRow || newRow === -1)\n newRow = 0;\n this.popup.setRow(this.autoSelect ? newRow : -1);\n if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow])\n this.$onPopupChange();\n var inlineEnabled = this.inlineRenderer && this.inlineEnabled;\n if (newRow === oldRow && inlineEnabled) {\n var completion = this.popup.getData(this.popup.getRow());\n this.$updateGhostText(completion);\n }\n if (!keepPopupPosition) {\n this.popup.setTheme(editor.getTheme());\n this.popup.setFontSize(editor.getFontSize());\n this.$updatePopupPosition();\n if (this.tooltipNode) {\n this.updateDocTooltip();\n }\n }\n this.changeTimer.cancel();\n this.observeLayoutChanges();\n };\n Autocomplete.prototype.detach = function () {\n if (this.editor) {\n this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);\n this.editor.off(\"changeSelection\", this.changeListener);\n this.editor.off(\"blur\", this.blurListener);\n this.editor.off(\"mousedown\", this.mousedownListener);\n this.editor.off(\"mousewheel\", this.mousewheelListener);\n }\n this.$firstOpenTimer.cancel();\n this.changeTimer.cancel();\n this.hideDocTooltip();\n if (this.completionProvider) {\n this.completionProvider.detach();\n }\n if (this.popup && this.popup.isOpen)\n this.popup.hide();\n if (this.popup && this.popup.renderer) {\n this.popup.renderer.off(\"afterRender\", this.$onPopupRender);\n }\n if (this.base)\n this.base.detach();\n this.activated = false;\n this.completionProvider = this.completions = this.base = null;\n this.unObserveLayoutChanges();\n };\n Autocomplete.prototype.changeListener = function (e) {\n var cursor = this.editor.selection.lead;\n if (cursor.row != this.base.row || cursor.column < this.base.column) {\n this.detach();\n }\n if (this.activated)\n this.changeTimer.schedule();\n else\n this.detach();\n };\n Autocomplete.prototype.blurListener = function (e) {\n var el = document.activeElement;\n var text = this.editor.textInput.getElement();\n var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget);\n var container = this.popup && this.popup.container;\n if (el != text && el.parentNode != container && !fromTooltip\n && el != this.tooltipNode && e.relatedTarget != text) {\n this.detach();\n }\n };\n Autocomplete.prototype.mousedownListener = function (e) {\n this.detach();\n };\n Autocomplete.prototype.mousewheelListener = function (e) {\n if (this.popup && !this.popup.isMouseOver)\n this.detach();\n };\n Autocomplete.prototype.mouseOutListener = function (e) {\n if (this.popup.isOpen)\n this.$updatePopupPosition();\n };\n Autocomplete.prototype.goTo = function (where) {\n this.popup.goTo(where);\n };\n Autocomplete.prototype.insertMatch = function (data, options) {\n if (!data)\n data = this.popup.getData(this.popup.getRow());\n if (!data)\n return false;\n if (data.value === \"\") // Explicitly given nothing to insert, e.g. \"No suggestion state\"\n return this.detach();\n var completions = this.completions;\n var result = this.getCompletionProvider().insertMatch(this.editor, data, completions.filterText, options);\n if (this.completions == completions)\n this.detach();\n return result;\n };\n Autocomplete.prototype.showPopup = function (editor, options) {\n if (this.editor)\n this.detach();\n this.activated = true;\n this.editor = editor;\n if (editor.completer != this) {\n if (editor.completer)\n editor.completer.detach();\n editor.completer = this;\n }\n editor.on(\"changeSelection\", this.changeListener);\n editor.on(\"blur\", this.blurListener);\n editor.on(\"mousedown\", this.mousedownListener);\n editor.on(\"mousewheel\", this.mousewheelListener);\n this.updateCompletions(false, options);\n };\n Autocomplete.prototype.getCompletionProvider = function (initialPosition) {\n if (!this.completionProvider)\n this.completionProvider = new CompletionProvider(initialPosition);\n return this.completionProvider;\n };\n Autocomplete.prototype.gatherCompletions = function (editor, callback) {\n return this.getCompletionProvider().gatherCompletions(editor, callback);\n };\n Autocomplete.prototype.updateCompletions = function (keepPopupPosition, options) {\n if (keepPopupPosition && this.base && this.completions) {\n var pos = this.editor.getCursorPosition();\n var prefix = this.editor.session.getTextRange({ start: this.base, end: pos });\n if (prefix == this.completions.filterText)\n return;\n this.completions.setFilter(prefix);\n if (!this.completions.filtered.length)\n return this.detach();\n if (this.completions.filtered.length == 1\n && this.completions.filtered[0].value == prefix\n && !this.completions.filtered[0].snippet)\n return this.detach();\n this.openPopup(this.editor, prefix, keepPopupPosition);\n return;\n }\n if (options && options.matches) {\n var pos = this.editor.getSelectionRange().start;\n this.base = this.editor.session.doc.createAnchor(pos.row, pos.column);\n this.base.$insertRight = true;\n this.completions = new FilteredList(options.matches);\n this.getCompletionProvider().completions = this.completions;\n return this.openPopup(this.editor, \"\", keepPopupPosition);\n }\n var session = this.editor.getSession();\n var pos = this.editor.getCursorPosition();\n var prefix = util.getCompletionPrefix(this.editor);\n this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length);\n this.base.$insertRight = true;\n var completionOptions = {\n exactMatch: this.exactMatch,\n ignoreCaption: this.ignoreCaption\n };\n this.getCompletionProvider({\n prefix: prefix,\n pos: pos\n }).provideCompletions(this.editor, completionOptions, \n function (err, completions, finished) {\n var filtered = completions.filtered;\n var prefix = util.getCompletionPrefix(this.editor);\n this.$firstOpenTimer.cancel();\n if (finished) {\n if (!filtered.length) {\n var emptyMessage = !this.autoShown && this.emptyMessage;\n if (typeof emptyMessage == \"function\")\n emptyMessage = this.emptyMessage(prefix);\n if (emptyMessage) {\n var completionsForEmpty = [{\n caption: emptyMessage,\n value: \"\"\n }\n ];\n this.completions = new FilteredList(completionsForEmpty);\n this.openPopup(this.editor, prefix, keepPopupPosition);\n this.popup.renderer.setStyle(\"ace_loading\", false);\n this.popup.renderer.setStyle(\"ace_empty-message\", true);\n return;\n }\n return this.detach();\n }\n if (filtered.length == 1 && filtered[0].value == prefix\n && !filtered[0].snippet)\n return this.detach();\n if (this.autoInsert && !this.autoShown && filtered.length == 1)\n return this.insertMatch(filtered[0]);\n }\n this.completions = !finished && this.showLoadingState ?\n new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) :\n completions;\n this.openPopup(this.editor, prefix, keepPopupPosition);\n this.popup.renderer.setStyle(\"ace_empty-message\", false);\n this.popup.renderer.setStyle(\"ace_loading\", !finished);\n }.bind(this));\n if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) {\n this.$firstOpenTimer.delay(this.stickySelectionDelay / 2);\n }\n };\n Autocomplete.prototype.cancelContextMenu = function () {\n this.editor.$mouseHandler.cancelContextMenu();\n };\n Autocomplete.prototype.updateDocTooltip = function () {\n var popup = this.popup;\n var all = this.completions.filtered;\n var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]);\n var doc = null;\n if (!selected || !this.editor || !this.popup.isOpen)\n return this.hideDocTooltip();\n var completersLength = this.editor.completers.length;\n for (var i = 0; i < completersLength; i++) {\n var completer = this.editor.completers[i];\n if (completer.getDocTooltip && selected.completerId === completer.id) {\n doc = completer.getDocTooltip(selected);\n break;\n }\n }\n if (!doc && typeof selected != \"string\")\n doc = selected;\n if (typeof doc == \"string\")\n doc = { docText: doc };\n if (!doc || !(doc.docHTML || doc.docText))\n return this.hideDocTooltip();\n this.showDocTooltip(doc);\n };\n Autocomplete.prototype.showDocTooltip = function (item) {\n if (!this.tooltipNode) {\n this.tooltipNode = dom.createElement(\"div\");\n this.tooltipNode.style.margin = \"0\";\n this.tooltipNode.style.pointerEvents = \"auto\";\n this.tooltipNode.style.overscrollBehavior = \"contain\";\n this.tooltipNode.tabIndex = -1;\n this.tooltipNode.onblur = this.blurListener.bind(this);\n this.tooltipNode.onclick = this.onTooltipClick.bind(this);\n this.tooltipNode.id = \"doc-tooltip\";\n this.tooltipNode.setAttribute(\"role\", \"tooltip\");\n this.tooltipNode.addEventListener(\"wheel\", preventParentScroll);\n }\n var theme = this.editor.renderer.theme;\n this.tooltipNode.className = \"ace_tooltip ace_doc-tooltip \" +\n (theme.isDark ? \"ace_dark \" : \"\") + (theme.cssClass || \"\");\n var tooltipNode = this.tooltipNode;\n if (item.docHTML) {\n tooltipNode.innerHTML = item.docHTML;\n }\n else if (item.docText) {\n tooltipNode.textContent = item.docText;\n }\n if (!tooltipNode.parentNode)\n this.popup.container.appendChild(this.tooltipNode);\n var popup = this.popup;\n var rect = popup.container.getBoundingClientRect();\n tooltipNode.style.top = popup.container.style.top;\n tooltipNode.style.bottom = popup.container.style.bottom;\n tooltipNode.style.display = \"block\";\n if (window.innerWidth - rect.right < 320) {\n if (rect.left < 320) {\n if (popup.isTopdown) {\n tooltipNode.style.top = rect.bottom + \"px\";\n tooltipNode.style.left = rect.left + \"px\";\n tooltipNode.style.right = \"\";\n tooltipNode.style.bottom = \"\";\n }\n else {\n tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + \"px\";\n tooltipNode.style.left = rect.left + \"px\";\n tooltipNode.style.right = \"\";\n tooltipNode.style.bottom = \"\";\n }\n }\n else {\n tooltipNode.style.right = window.innerWidth - rect.left + \"px\";\n tooltipNode.style.left = \"\";\n }\n }\n else {\n tooltipNode.style.left = (rect.right + 1) + \"px\";\n tooltipNode.style.right = \"\";\n }\n };\n Autocomplete.prototype.hideDocTooltip = function () {\n this.tooltipTimer.cancel();\n if (!this.tooltipNode)\n return;\n var el = this.tooltipNode;\n if (!this.editor.isFocused() && document.activeElement == el)\n this.editor.focus();\n this.tooltipNode = null;\n if (el.parentNode)\n el.parentNode.removeChild(el);\n };\n Autocomplete.prototype.onTooltipClick = function (e) {\n var a = e.target;\n while (a && a != this.tooltipNode) {\n if (a.nodeName == \"A\" && a.href) {\n a.rel = \"noreferrer\";\n a.target = \"_blank\";\n break;\n }\n a = a.parentNode;\n }\n };\n Autocomplete.prototype.destroy = function () {\n this.detach();\n if (this.popup) {\n this.popup.destroy();\n var el = this.popup.container;\n if (el && el.parentNode)\n el.parentNode.removeChild(el);\n }\n if (this.editor && this.editor.completer == this) {\n this.editor.off(\"destroy\", destroyCompleter);\n this.editor.completer = null;\n }\n this.inlineRenderer = this.popup = this.editor = null;\n };\n return Autocomplete;\n}());\nAutocomplete.prototype.commands = {\n \"Up\": function (editor) { editor.completer.goTo(\"up\"); },\n \"Down\": function (editor) { editor.completer.goTo(\"down\"); },\n \"Ctrl-Up|Ctrl-Home\": function (editor) { editor.completer.goTo(\"start\"); },\n \"Ctrl-Down|Ctrl-End\": function (editor) { editor.completer.goTo(\"end\"); },\n \"Esc\": function (editor) { editor.completer.detach(); },\n \"Return\": function (editor) { return editor.completer.insertMatch(); },\n \"Shift-Return\": function (editor) { editor.completer.insertMatch(null, { deleteSuffix: true }); },\n \"Tab\": function (editor) {\n var result = editor.completer.insertMatch();\n if (!result && !editor.tabstopManager)\n editor.completer.goTo(\"down\");\n else\n return result;\n },\n \"Backspace\": function (editor) {\n editor.execCommand(\"backspace\");\n var prefix = util.getCompletionPrefix(editor);\n if (!prefix && editor.completer)\n editor.completer.detach();\n },\n \"PageUp\": function (editor) { editor.completer.popup.gotoPageUp(); },\n \"PageDown\": function (editor) { editor.completer.popup.gotoPageDown(); }\n};\nAutocomplete.for = function (editor) {\n if (editor.completer instanceof Autocomplete) {\n return editor.completer;\n }\n if (editor.completer) {\n editor.completer.destroy();\n editor.completer = null;\n }\n if (config.get(\"sharedPopups\")) {\n if (!Autocomplete[\"$sharedInstance\"])\n Autocomplete[\"$sharedInstance\"] = new Autocomplete();\n editor.completer = Autocomplete[\"$sharedInstance\"];\n }\n else {\n editor.completer = new Autocomplete();\n editor.once(\"destroy\", destroyCompleter);\n }\n return editor.completer;\n};\nAutocomplete.startCommand = {\n name: \"startAutocomplete\",\n exec: function (editor, options) {\n var completer = Autocomplete.for(editor);\n completer.autoInsert = false;\n completer.autoSelect = true;\n completer.autoShown = false;\n completer.showPopup(editor, options);\n completer.cancelContextMenu();\n },\n bindKey: \"Ctrl-Space|Ctrl-Shift-Space|Alt-Space\"\n};\nvar CompletionProvider = /** @class */ (function () {\n function CompletionProvider(initialPosition) {\n this.initialPosition = initialPosition;\n this.active = true;\n }\n CompletionProvider.prototype.insertByIndex = function (editor, index, options) {\n if (!this.completions || !this.completions.filtered) {\n return false;\n }\n return this.insertMatch(editor, this.completions.filtered[index], options);\n };\n CompletionProvider.prototype.insertMatch = function (editor, data, options) {\n if (!data)\n return false;\n editor.startOperation({ command: { name: \"insertMatch\" } });\n if (data.completer && data.completer.insertMatch) {\n data.completer.insertMatch(editor, data);\n }\n else {\n if (!this.completions)\n return false;\n var replaceBefore = this.completions.filterText.length;\n var replaceAfter = 0;\n if (data.range && data.range.start.row === data.range.end.row) {\n replaceBefore -= this.initialPosition.prefix.length;\n replaceBefore += this.initialPosition.pos.column - data.range.start.column;\n replaceAfter += data.range.end.column - this.initialPosition.pos.column;\n }\n if (replaceBefore || replaceAfter) {\n var ranges;\n if (editor.selection.getAllRanges) {\n ranges = editor.selection.getAllRanges();\n }\n else {\n ranges = [editor.getSelectionRange()];\n }\n for (var i = 0, range; range = ranges[i]; i++) {\n range.start.column -= replaceBefore;\n range.end.column += replaceAfter;\n editor.session.remove(range);\n }\n }\n if (data.snippet) {\n snippetManager.insertSnippet(editor, data.snippet);\n }\n else {\n this.$insertString(editor, data);\n }\n if (data.completer && data.completer.onInsert && typeof data.completer.onInsert == \"function\") {\n data.completer.onInsert(editor, data);\n }\n if (data.command && data.command === \"startAutocomplete\") {\n editor.execCommand(data.command);\n }\n }\n editor.endOperation();\n return true;\n };\n CompletionProvider.prototype.$insertString = function (editor, data) {\n var text = data.value || data;\n editor.execCommand(\"insertstring\", text);\n };\n CompletionProvider.prototype.gatherCompletions = function (editor, callback) {\n var session = editor.getSession();\n var pos = editor.getCursorPosition();\n var prefix = util.getCompletionPrefix(editor);\n var matches = [];\n this.completers = editor.completers;\n var total = editor.completers.length;\n editor.completers.forEach(function (completer, i) {\n completer.getCompletions(editor, session, pos, prefix, function (err, results) {\n if (completer.hideInlinePreview)\n results = results.map(function (result) {\n return Object.assign(result, { hideInlinePreview: completer.hideInlinePreview });\n });\n if (!err && results)\n matches = matches.concat(results);\n callback(null, {\n prefix: util.getCompletionPrefix(editor),\n matches: matches,\n finished: (--total === 0)\n });\n });\n });\n return true;\n };\n CompletionProvider.prototype.provideCompletions = function (editor, options, callback) {\n var processResults = function (results) {\n var prefix = results.prefix;\n var matches = results.matches;\n this.completions = new FilteredList(matches);\n if (options.exactMatch)\n this.completions.exactMatch = true;\n if (options.ignoreCaption)\n this.completions.ignoreCaption = true;\n this.completions.setFilter(prefix);\n if (results.finished || this.completions.filtered.length)\n callback(null, this.completions, results.finished);\n }.bind(this);\n var isImmediate = true;\n var immediateResults = null;\n this.gatherCompletions(editor, function (err, results) {\n if (!this.active) {\n return;\n }\n if (err) {\n callback(err, [], true);\n this.detach();\n }\n var prefix = results.prefix;\n if (prefix.indexOf(results.prefix) !== 0)\n return;\n if (isImmediate) {\n immediateResults = results;\n return;\n }\n processResults(results);\n }.bind(this));\n isImmediate = false;\n if (immediateResults) {\n var results = immediateResults;\n immediateResults = null;\n processResults(results);\n }\n };\n CompletionProvider.prototype.detach = function () {\n this.active = false;\n this.completers && this.completers.forEach(function (completer) {\n if (typeof completer.cancel === \"function\") {\n completer.cancel();\n }\n });\n };\n return CompletionProvider;\n}());\nvar FilteredList = /** @class */ (function () {\n function FilteredList(array, filterText) {\n this.all = array;\n this.filtered = array;\n this.filterText = filterText || \"\";\n this.exactMatch = false;\n this.ignoreCaption = false;\n }\n FilteredList.prototype.setFilter = function (str) {\n if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)\n var matches = this.filtered;\n else\n var matches = this.all;\n this.filterText = str;\n matches = this.filterCompletions(matches, this.filterText);\n matches = matches.sort(function (a, b) {\n return b.exactMatch - a.exactMatch || b.$score - a.$score\n || (a.caption || a.value).localeCompare(b.caption || b.value);\n });\n var prev = null;\n matches = matches.filter(function (item) {\n var caption = item.snippet || item.caption || item.value;\n if (caption === prev)\n return false;\n prev = caption;\n return true;\n });\n this.filtered = matches;\n };\n FilteredList.prototype.filterCompletions = function (items, needle) {\n var results = [];\n var upper = needle.toUpperCase();\n var lower = needle.toLowerCase();\n loop: for (var i = 0, item; item = items[i]; i++) {\n var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet;\n if (!caption)\n continue;\n var lastIndex = -1;\n var matchMask = 0;\n var penalty = 0;\n var index, distance;\n if (this.exactMatch) {\n if (needle !== caption.substr(0, needle.length))\n continue loop;\n }\n else {\n var fullMatchIndex = caption.toLowerCase().indexOf(lower);\n if (fullMatchIndex > -1) {\n penalty = fullMatchIndex;\n }\n else {\n for (var j = 0; j < needle.length; j++) {\n var i1 = caption.indexOf(lower[j], lastIndex + 1);\n var i2 = caption.indexOf(upper[j], lastIndex + 1);\n index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;\n if (index < 0)\n continue loop;\n distance = index - lastIndex - 1;\n if (distance > 0) {\n if (lastIndex === -1)\n penalty += 10;\n penalty += distance;\n matchMask = matchMask | (1 << j);\n }\n lastIndex = index;\n }\n }\n }\n item.matchMask = matchMask;\n item.exactMatch = penalty ? 0 : 1;\n item.$score = (item.score || 0) - penalty;\n results.push(item);\n }\n return results;\n };\n return FilteredList;\n}());\nexports.Autocomplete = Autocomplete;\nexports.CompletionProvider = CompletionProvider;\nexports.FilteredList = FilteredList;\n\n});\n\nace.define(\"ace/autocomplete/text_completer\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){var Range = require(\"../range\").Range;\nvar splitRegex = /[^a-zA-Z_0-9\\$\\-\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w]+/;\nfunction getWordIndex(doc, pos) {\n var textBefore = doc.getTextRange(Range.fromPoints({\n row: 0,\n column: 0\n }, pos));\n return textBefore.split(splitRegex).length - 1;\n}\nfunction wordDistance(doc, pos) {\n var prefixPos = getWordIndex(doc, pos);\n var words = doc.getValue().split(splitRegex);\n var wordScores = Object.create(null);\n var currentWord = words[prefixPos];\n words.forEach(function (word, idx) {\n if (!word || word === currentWord)\n return;\n var distance = Math.abs(prefixPos - idx);\n var score = words.length - distance;\n if (wordScores[word]) {\n wordScores[word] = Math.max(score, wordScores[word]);\n }\n else {\n wordScores[word] = score;\n }\n });\n return wordScores;\n}\nexports.getCompletions = function (editor, session, pos, prefix, callback) {\n var wordScore = wordDistance(session, pos);\n var wordList = Object.keys(wordScore);\n callback(null, wordList.map(function (word) {\n return {\n caption: word,\n value: word,\n score: wordScore[word],\n meta: \"local\"\n };\n }));\n};\n\n});\n\nace.define(\"ace/ext/language_tools\",[\"require\",\"exports\",\"module\",\"ace/snippets\",\"ace/autocomplete\",\"ace/config\",\"ace/lib/lang\",\"ace/autocomplete/util\",\"ace/autocomplete/text_completer\",\"ace/editor\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar snippetManager = require(\"../snippets\").snippetManager;\nvar Autocomplete = require(\"../autocomplete\").Autocomplete;\nvar config = require(\"../config\");\nvar lang = require(\"../lib/lang\");\nvar util = require(\"../autocomplete/util\");\nvar textCompleter = require(\"../autocomplete/text_completer\");\nvar keyWordCompleter = {\n getCompletions: function (editor, session, pos, prefix, callback) {\n if (session.$mode.completer) {\n return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback);\n }\n var state = editor.session.getState(pos.row);\n var completions = session.$mode.getCompletions(state, session, pos, prefix);\n completions = completions.map(function (el) {\n el.completerId = keyWordCompleter.id;\n return el;\n });\n callback(null, completions);\n },\n id: \"keywordCompleter\"\n};\nvar transformSnippetTooltip = function (str) {\n var record = {};\n return str.replace(/\\${(\\d+)(:(.*?))?}/g, function (_, p1, p2, p3) {\n return (record[p1] = p3 || '');\n }).replace(/\\$(\\d+?)/g, function (_, p1) {\n return record[p1];\n });\n};\nvar snippetCompleter = {\n getCompletions: function (editor, session, pos, prefix, callback) {\n var scopes = [];\n var token = session.getTokenAt(pos.row, pos.column);\n if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\\.xml$/))\n scopes.push('html-tag');\n else\n scopes = snippetManager.getActiveScopes(editor);\n var snippetMap = snippetManager.snippetMap;\n var completions = [];\n scopes.forEach(function (scope) {\n var snippets = snippetMap[scope] || [];\n for (var i = snippets.length; i--;) {\n var s = snippets[i];\n var caption = s.name || s.tabTrigger;\n if (!caption)\n continue;\n completions.push({\n caption: caption,\n snippet: s.content,\n meta: s.tabTrigger && !s.name ? s.tabTrigger + \"\\u21E5 \" : \"snippet\",\n completerId: snippetCompleter.id\n });\n }\n }, this);\n callback(null, completions);\n },\n getDocTooltip: function (item) {\n if (item.snippet && !item.docHTML) {\n item.docHTML = [\n \"\", lang.escapeHTML(item.caption), \"\", \"
\",\n lang.escapeHTML(transformSnippetTooltip(item.snippet))\n ].join(\"\");\n }\n },\n id: \"snippetCompleter\"\n};\nvar completers = [snippetCompleter, textCompleter, keyWordCompleter];\nexports.setCompleters = function (val) {\n completers.length = 0;\n if (val)\n completers.push.apply(completers, val);\n};\nexports.addCompleter = function (completer) {\n completers.push(completer);\n};\nexports.textCompleter = textCompleter;\nexports.keyWordCompleter = keyWordCompleter;\nexports.snippetCompleter = snippetCompleter;\nvar expandSnippet = {\n name: \"expandSnippet\",\n exec: function (editor) {\n return snippetManager.expandWithTab(editor);\n },\n bindKey: \"Tab\"\n};\nvar onChangeMode = function (e, editor) {\n loadSnippetsForMode(editor.session.$mode);\n};\nvar loadSnippetsForMode = function (mode) {\n if (typeof mode == \"string\")\n mode = config.$modes[mode];\n if (!mode)\n return;\n if (!snippetManager.files)\n snippetManager.files = {};\n loadSnippetFile(mode.$id, mode.snippetFileId);\n if (mode.modes)\n mode.modes.forEach(loadSnippetsForMode);\n};\nvar loadSnippetFile = function (id, snippetFilePath) {\n if (!snippetFilePath || !id || snippetManager.files[id])\n return;\n snippetManager.files[id] = {};\n config.loadModule(snippetFilePath, function (m) {\n if (!m)\n return;\n snippetManager.files[id] = m;\n if (!m.snippets && m.snippetText)\n m.snippets = snippetManager.parseSnippetFile(m.snippetText);\n snippetManager.register(m.snippets || [], m.scope);\n if (m.includeScopes) {\n snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;\n m.includeScopes.forEach(function (x) {\n loadSnippetsForMode(\"ace/mode/\" + x);\n });\n }\n });\n};\nvar doLiveAutocomplete = function (e) {\n var editor = e.editor;\n var hasCompleter = editor.completer && editor.completer.activated;\n if (e.command.name === \"backspace\") {\n if (hasCompleter && !util.getCompletionPrefix(editor))\n editor.completer.detach();\n }\n else if (e.command.name === \"insertstring\" && !hasCompleter) {\n lastExecEvent = e;\n var delay = e.editor.$liveAutocompletionDelay;\n if (delay) {\n liveAutocompleteTimer.delay(delay);\n }\n else {\n showLiveAutocomplete(e);\n }\n }\n};\nvar lastExecEvent;\nvar liveAutocompleteTimer = lang.delayedCall(function () {\n showLiveAutocomplete(lastExecEvent);\n}, 0);\nvar showLiveAutocomplete = function (e) {\n var editor = e.editor;\n var prefix = util.getCompletionPrefix(editor);\n var previousChar = e.args;\n var triggerAutocomplete = util.triggerAutocomplete(editor, previousChar);\n if (prefix && prefix.length >= editor.$liveAutocompletionThreshold || triggerAutocomplete) {\n var completer = Autocomplete.for(editor);\n completer.autoShown = true;\n completer.showPopup(editor);\n }\n};\nvar Editor = require(\"../editor\").Editor;\nrequire(\"../config\").defineOptions(Editor.prototype, \"editor\", {\n enableBasicAutocompletion: {\n set: function (val) {\n if (val) {\n if (!this.completers)\n this.completers = Array.isArray(val) ? val : completers;\n this.commands.addCommand(Autocomplete.startCommand);\n }\n else {\n this.commands.removeCommand(Autocomplete.startCommand);\n }\n },\n value: false\n },\n enableLiveAutocompletion: {\n set: function (val) {\n if (val) {\n if (!this.completers)\n this.completers = Array.isArray(val) ? val : completers;\n this.commands.on('afterExec', doLiveAutocomplete);\n }\n else {\n this.commands.off('afterExec', doLiveAutocomplete);\n }\n },\n value: false\n },\n liveAutocompletionDelay: {\n initialValue: 0\n },\n liveAutocompletionThreshold: {\n initialValue: 0\n },\n enableSnippets: {\n set: function (val) {\n if (val) {\n this.commands.addCommand(expandSnippet);\n this.on(\"changeMode\", onChangeMode);\n onChangeMode(null, this);\n }\n else {\n this.commands.removeCommand(expandSnippet);\n this.off(\"changeMode\", onChangeMode);\n }\n },\n value: false\n }\n});\n\n}); (function() {\n ace.require([\"ace/ext/language_tools\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","ace.define(\"ace/split\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/editor\",\"ace/virtual_renderer\",\"ace/edit_session\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Editor = require(\"./editor\").Editor;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nvar EditSession = require(\"./edit_session\").EditSession;\nvar Split;\nSplit = function (container, theme, splits) {\n this.BELOW = 1;\n this.BESIDE = 0;\n this.$container = container;\n this.$theme = theme;\n this.$splits = 0;\n this.$editorCSS = \"\";\n this.$editors = [];\n this.$orientation = this.BESIDE;\n this.setSplits(splits || 1);\n this.$cEditor = this.$editors[0];\n this.on(\"focus\", function (editor) {\n this.$cEditor = editor;\n }.bind(this));\n};\n(function () {\n oop.implement(this, EventEmitter);\n this.$createEditor = function () {\n var el = document.createElement(\"div\");\n el.className = this.$editorCSS;\n el.style.cssText = \"position: absolute; top:0px; bottom:0px\";\n this.$container.appendChild(el);\n var editor = new Editor(new Renderer(el, this.$theme));\n editor.on(\"focus\", function () {\n this._emit(\"focus\", editor);\n }.bind(this));\n this.$editors.push(editor);\n editor.setFontSize(this.$fontSize);\n return editor;\n };\n this.setSplits = function (splits) {\n var editor;\n if (splits < 1) {\n throw \"The number of splits have to be > 0!\";\n }\n if (splits == this.$splits) {\n return;\n }\n else if (splits > this.$splits) {\n while (this.$splits < this.$editors.length && this.$splits < splits) {\n editor = this.$editors[this.$splits];\n this.$container.appendChild(editor.container);\n editor.setFontSize(this.$fontSize);\n this.$splits++;\n }\n while (this.$splits < splits) {\n this.$createEditor();\n this.$splits++;\n }\n }\n else {\n while (this.$splits > splits) {\n editor = this.$editors[this.$splits - 1];\n this.$container.removeChild(editor.container);\n this.$splits--;\n }\n }\n this.resize();\n };\n this.getSplits = function () {\n return this.$splits;\n };\n this.getEditor = function (idx) {\n return this.$editors[idx];\n };\n this.getCurrentEditor = function () {\n return this.$cEditor;\n };\n this.focus = function () {\n this.$cEditor.focus();\n };\n this.blur = function () {\n this.$cEditor.blur();\n };\n this.setTheme = function (theme) {\n this.$editors.forEach(function (editor) {\n editor.setTheme(theme);\n });\n };\n this.setKeyboardHandler = function (keybinding) {\n this.$editors.forEach(function (editor) {\n editor.setKeyboardHandler(keybinding);\n });\n };\n this.forEach = function (callback, scope) {\n this.$editors.forEach(callback, scope);\n };\n this.$fontSize = \"\";\n this.setFontSize = function (size) {\n this.$fontSize = size;\n this.forEach(function (editor) {\n editor.setFontSize(size);\n });\n };\n this.$cloneSession = function (session) {\n var s = new EditSession(session.getDocument(), session.getMode());\n var undoManager = session.getUndoManager();\n s.setUndoManager(undoManager);\n s.setTabSize(session.getTabSize());\n s.setUseSoftTabs(session.getUseSoftTabs());\n s.setOverwrite(session.getOverwrite());\n s.setBreakpoints(session.getBreakpoints());\n s.setUseWrapMode(session.getUseWrapMode());\n s.setUseWorker(session.getUseWorker());\n s.setWrapLimitRange(session.$wrapLimitRange.min, session.$wrapLimitRange.max);\n s.$foldData = session.$cloneFoldData();\n return s;\n };\n this.setSession = function (session, idx) {\n var editor;\n if (idx == null) {\n editor = this.$cEditor;\n }\n else {\n editor = this.$editors[idx];\n }\n var isUsed = this.$editors.some(function (editor) {\n return editor.session === session;\n });\n if (isUsed) {\n session = this.$cloneSession(session);\n }\n editor.setSession(session);\n return session;\n };\n this.getOrientation = function () {\n return this.$orientation;\n };\n this.setOrientation = function (orientation) {\n if (this.$orientation == orientation) {\n return;\n }\n this.$orientation = orientation;\n this.resize();\n };\n this.resize = function () {\n var width = this.$container.clientWidth;\n var height = this.$container.clientHeight;\n var editor;\n if (this.$orientation == this.BESIDE) {\n var editorWidth = width / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = editorWidth + \"px\";\n editor.container.style.top = \"0px\";\n editor.container.style.left = i * editorWidth + \"px\";\n editor.container.style.height = height + \"px\";\n editor.resize();\n }\n }\n else {\n var editorHeight = height / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = width + \"px\";\n editor.container.style.top = i * editorHeight + \"px\";\n editor.container.style.left = \"0px\";\n editor.container.style.height = editorHeight + \"px\";\n editor.resize();\n }\n }\n };\n}).call(Split.prototype);\nexports.Split = Split;\n\n});\n\nace.define(\"ace/ext/split\",[\"require\",\"exports\",\"module\",\"ace/split\"], function(require, exports, module){\"use strict\";\nmodule.exports = require(\"../split\");\n\n}); (function() {\n ace.require([\"ace/ext/split\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","ace.define(\"ace/mode/jsdoc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar JsDocCommentHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: [\"comment.doc.tag\", \"comment.doc.text\", \"lparen.doc\"],\n regex: \"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\\\s*)({)\",\n push: [\n {\n token: \"lparen.doc\",\n regex: \"{\",\n push: [\n {\n include: \"doc-syntax\"\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }\n ]\n }, {\n token: [\"rparen.doc\", \"text.doc\", \"variable.parameter.doc\", \"lparen.doc\", \"variable.parameter.doc\", \"rparen.doc\"],\n regex: /(})(\\s*)(?:([\\w=:\\/\\.]+)|(?:(\\[)([\\w=:\\/\\.]+)(\\])))/,\n next: \"pop\"\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }, {\n include: \"doc-syntax\"\n }, {\n defaultToken: \"text.doc\"\n }\n ]\n }, {\n token: [\"comment.doc.tag\", \"text.doc\", \"lparen.doc\"],\n regex: \"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|\"\n + \"implements|external|exception|throws|enum|define|extends))(\\\\s*)({)\",\n push: [\n {\n token: \"lparen.doc\",\n regex: \"{\",\n push: [\n {\n include: \"doc-syntax\"\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }\n ]\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }, {\n include: \"doc-syntax\"\n }, {\n defaultToken: \"text.doc\"\n }\n ]\n }, {\n token: [\"comment.doc.tag\", \"text.doc\", \"variable.parameter.doc\"],\n regex: \"(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|\"\n + \"requires|param|implements|function|extends|typedef|mixes|constructor|var|\"\n + \"memberof\\\\!|event|listens|exports|class|constructs|interface|emits|fires|\"\n + \"throws|const|callback|borrows|augments))(\\\\s+)(\\\\w[\\\\w#\\.:\\/~\\\"\\\\-]*)?\"\n }, {\n token: [\"comment.doc.tag\", \"text.doc\", \"variable.parameter.doc\"],\n regex: \"(@method)(\\\\s+)(\\\\w[\\\\w\\.\\\\(\\\\)]*)\"\n }, {\n token: \"comment.doc.tag\",\n regex: \"@access\\\\s+(?:private|public|protected)\"\n }, {\n token: \"comment.doc.tag\",\n regex: \"@kind\\\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\"\n }, {\n token: \"comment.doc.tag\",\n regex: \"@\\\\w+(?=\\\\s|$)\"\n },\n JsDocCommentHighlightRules.getTagRule(),\n {\n defaultToken: \"comment.doc\",\n caseInsensitive: true\n }\n ],\n \"doc-syntax\": [{\n token: \"operator.doc\",\n regex: /[|:]/\n }, {\n token: \"paren.doc\",\n regex: /[\\[\\]]/\n }]\n };\n this.normalizeRules();\n};\noop.inherits(JsDocCommentHighlightRules, TextHighlightRules);\nJsDocCommentHighlightRules.getTagRule = function (start) {\n return {\n token: \"comment.doc.tag.storage.type\",\n regex: \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\nJsDocCommentHighlightRules.getStartRule = function (start) {\n return {\n token: \"comment.doc\", // doc comment\n regex: \"\\\\/\\\\*(?=\\\\*)\",\n next: start\n };\n};\nJsDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token: \"comment.doc\", // closing comment\n regex: \"\\\\*\\\\/\",\n next: start\n };\n};\nexports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;\n\n});\n\nace.define(\"ace/mode/javascript_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/jsdoc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar DocCommentHighlightRules = require(\"./jsdoc_comment_highlight_rules\").JsDocCommentHighlightRules;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\nvar JavaScriptHighlightRules = function (options) {\n var keywords = {\n \"variable.language\": \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\", // Pseudo\n \"keyword\": \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor\",\n \"storage.type\": \"const|let|var|function\",\n \"constant.language\": \"null|Infinity|NaN|undefined\",\n \"support.function\": \"alert\",\n \"constant.language.boolean\": \"true|false\"\n };\n var keywordMapper = this.createKeywordMapper(keywords, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n var anonymousFunctionRe = \"(function)(\\\\s*)(\\\\*?)\";\n var functionCallStartRule = {\n token: [\"identifier\", \"text\", \"paren.lparen\"],\n regex: \"(\\\\b(?!\" + Object.values(keywords).join(\"|\") + \"\\\\b)\" + identifierRe + \")(\\\\s*)(\\\\()\"\n };\n this.$rules = {\n \"no_regex\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n functionCallStartRule,\n {\n token: \"string\",\n regex: \"'(?=.)\",\n next: \"qstring\"\n }, {\n token: \"string\",\n regex: '\"(?=.)',\n next: \"qqstring\"\n }, {\n token: \"constant.numeric\", // hexadecimal, octal and binary\n regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token: \"constant.numeric\", // decimal integers and floats\n regex: /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token: [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\s*)(=)(\\\\s*)\" + anonymousFunctionRe + \"(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"storage.type\", \"text\", \"storage.type\", \"text\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex: \"(function)(?:(?:(\\\\s*)(\\\\*)(\\\\s*))|(\\\\s+))(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)\" + anonymousFunctionRe + \"(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"text\", \"text\", \"storage.type\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: \"(:)(\\\\s*)\" + anonymousFunctionRe + \"(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: \"keyword\",\n regex: \"from(?=\\\\s*('|\\\"))\"\n }, {\n token: \"keyword\",\n regex: \"(?:\" + kwBeforeRe + \")\\\\b\",\n next: \"start\"\n }, {\n token: \"support.constant\",\n regex: /that\\b/\n }, {\n token: [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex: /(console)(\\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\\b/\n }, {\n token: keywordMapper,\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: /[.](?![.])/,\n next: \"property\"\n }, {\n token: \"storage.type\",\n regex: /=>/,\n next: \"start\"\n }, {\n token: \"keyword.operator\",\n regex: /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next: \"start\"\n }, {\n token: \"punctuation.operator\",\n regex: /[?:,;.]/,\n next: \"start\"\n }, {\n token: \"paren.lparen\",\n regex: /[\\[({]/,\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: \"keyword.operator\",\n regex: /=/\n }, {\n token: [\n \"storage.type\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: anonymousFunctionRe + \"(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"storage.type\", \"text\", \"storage.type\", \"text\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex: \"(function)(?:(?:(\\\\s*)(\\\\*)(\\\\s*))|(\\\\s+))(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: \"punctuation.operator\",\n regex: /[.](?![.])/\n }, {\n token: \"support.function\",\n regex: \"prototype\"\n }, {\n token: \"support.function\",\n regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()/\n }, {\n token: \"support.function.dom\",\n regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token: \"support.constant\",\n regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b/\n }, {\n token: \"identifier\",\n regex: identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token: \"text\",\n regex: \"\\\\s+|^$\",\n next: \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token: \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token: \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token: \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"default_parameter\": [\n {\n token: \"string\",\n regex: \"'(?=.)\",\n push: [\n {\n token: \"string\",\n regex: \"'|$\",\n next: \"pop\"\n }, {\n include: \"qstring\"\n }\n ]\n }, {\n token: \"string\",\n regex: '\"(?=.)',\n push: [\n {\n token: \"string\",\n regex: '\"|$',\n next: \"pop\"\n }, {\n include: \"qqstring\"\n }\n ]\n }, {\n token: \"constant.language\",\n regex: \"null|Infinity|NaN|undefined\"\n }, {\n token: \"constant.numeric\", // hexadecimal, octal and binary\n regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token: \"constant.numeric\", // decimal integers and floats\n regex: /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token: \"punctuation.operator\",\n regex: \",\",\n next: \"function_arguments\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"function_arguments\": [\n comments(\"function_arguments\"),\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \",\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\": [\n {\n token: \"constant.language.escape\",\n regex: escapedRe\n }, {\n token: \"string\",\n regex: \"\\\\\\\\$\",\n consumeLineEnd: true\n }, {\n token: \"string\",\n regex: '\"|$',\n next: \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\": [\n {\n token: \"constant.language.escape\",\n regex: escapedRe\n }, {\n token: \"string\",\n regex: \"\\\\\\\\$\",\n consumeLineEnd: true\n }, {\n token: \"string\",\n regex: \"'|$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function (val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token: \"string.quasi.start\",\n regex: /`/,\n push: [{\n token: \"constant.language.escape\",\n regex: escapedRe\n }, {\n token: \"paren.quasi.start\",\n regex: /\\${/,\n push: \"start\"\n }, {\n token: \"string.quasi.end\",\n regex: /`/,\n next: \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n }, {\n token: [\"variable.parameter\", \"text\"],\n regex: \"(\" + identifierRe + \")(\\\\s*)(?=\\\\=>)\"\n }, {\n token: \"paren.lparen\",\n regex: \"(\\\\()(?=[^\\\\(]+\\\\s*=>)\",\n next: \"function_arguments\"\n }, {\n token: \"variable.language\",\n regex: \"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\\\b\"\n });\n this.$rules[\"function_arguments\"].unshift({\n token: \"keyword.operator\",\n regex: \"=\",\n next: \"default_parameter\"\n }, {\n token: \"keyword.operator\",\n regex: \"\\\\.{3}\"\n });\n this.$rules[\"property\"].unshift({\n token: \"support.function\",\n regex: \"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|\"\n + \"finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\\\b(?=\\\\()\"\n }, {\n token: \"constant.language\",\n regex: \"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\\\b\"\n });\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n this.embedRules(DocCommentHighlightRules, \"doc-\", [DocCommentHighlightRules.getEndRule(\"no_regex\")]);\n this.normalizeRules();\n};\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch: function (val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n }\n else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex: \"))\",\n next: \"jsxAttributes\",\n nextState: \"jsx\"\n };\n this.$rules.start.unshift(jsxTag);\n var jsxJsRule = {\n regex: \"{\",\n token: \"paren.quasi.start\",\n push: \"start\"\n };\n this.$rules.jsx = [\n jsxJsRule,\n jsxTag,\n { include: \"reference\" }, { defaultToken: \"string.xml\" }\n ];\n this.$rules.jsxAttributes = [{\n token: \"meta.tag.punctuation.tag-close.xml\",\n regex: \"/?>\",\n onMatch: function (value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{ type: this.token, value: value }];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token: \"entity.other.attribute-name.xml\",\n regex: tagRegex\n }, {\n token: \"keyword.operator.attribute-equals.xml\",\n regex: \"=\"\n }, {\n token: \"text.tag-whitespace.xml\",\n regex: \"\\\\s+\"\n }, {\n token: \"string.attribute-value.xml\",\n regex: \"'\",\n stateName: \"jsx_attr_q\",\n push: [\n { token: \"string.attribute-value.xml\", regex: \"'\", next: \"pop\" },\n { include: \"reference\" },\n { defaultToken: \"string.attribute-value.xml\" }\n ]\n }, {\n token: \"string.attribute-value.xml\",\n regex: '\"',\n stateName: \"jsx_attr_qq\",\n push: [\n { token: \"string.attribute-value.xml\", regex: '\"', next: \"pop\" },\n { include: \"reference\" },\n { defaultToken: \"string.attribute-value.xml\" }\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token: \"constant.language.escape.reference.xml\",\n regex: \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\nfunction comments(next) {\n return [\n {\n token: \"comment\", // multi line comment\n regex: /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n { token: \"comment\", regex: \"\\\\*\\\\/\", next: next || \"pop\" },\n { defaultToken: \"comment\", caseInsensitive: true }\n ]\n }, {\n token: \"comment\",\n regex: \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n { token: \"comment\", regex: \"$|^\", next: next || \"pop\" },\n { defaultToken: \"comment\", caseInsensitive: true }\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingBraceOutdent = function () { };\n(function () {\n this.checkOutdent = function (line, input) {\n if (!/^\\s+$/.test(line))\n return false;\n return /^\\s*\\}/.test(input);\n };\n this.autoOutdent = function (doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n if (!match)\n return 0;\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({ row: row, column: column });\n if (!openBracePos || openBracePos.row == row)\n return 0;\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column - 1), indent);\n };\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n}).call(MatchingBraceOutdent.prototype);\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n\n});\n\nace.define(\"ace/mode/behaviour/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Behaviour = require(\"../behaviour\").Behaviour;\nvar TokenIterator = require(\"../../token_iterator\").TokenIterator;\nfunction is(token, type) {\n return token && token.type.lastIndexOf(type + \".xml\") > -1;\n}\nvar XmlBehaviour = function () {\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '\"' || text == \"'\") {\n var quote = text;\n var selected = session.doc.getTextRange(editor.getSelectionRange());\n if (selected !== \"\" && selected !== \"'\" && selected != '\"' && editor.getWrapBehavioursEnabled()) {\n return {\n text: quote + selected + quote,\n selection: false\n };\n }\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (rightChar == quote && (is(token, \"attribute-value\") || is(token, \"string\"))) {\n return {\n text: \"\",\n selection: [1, 1]\n };\n }\n if (!token)\n token = iterator.stepBackward();\n if (!token)\n return;\n while (is(token, \"tag-whitespace\") || is(token, \"whitespace\")) {\n token = iterator.stepBackward();\n }\n var rightSpace = !rightChar || rightChar.match(/\\s/);\n if (is(token, \"attribute-equals\") && (rightSpace || rightChar == '>') || (is(token, \"decl-attribute-equals\") && (rightSpace || rightChar == '?'))) {\n return {\n text: quote + quote,\n selection: [1, 1]\n };\n }\n }\n });\n this.add(\"string_dquotes\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"autoclosing\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '>') {\n var position = editor.getSelectionRange().start;\n var iterator = new TokenIterator(session, position.row, position.column);\n var token = iterator.getCurrentToken() || iterator.stepBackward();\n if (!token || !(is(token, \"tag-name\") || is(token, \"tag-whitespace\") || is(token, \"attribute-name\") || is(token, \"attribute-equals\") || is(token, \"attribute-value\")))\n return;\n if (is(token, \"reference.attribute-value\"))\n return;\n if (is(token, \"attribute-value\")) {\n var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;\n if (position.column < tokenEndColumn)\n return;\n if (position.column == tokenEndColumn) {\n var nextToken = iterator.stepForward();\n if (nextToken && is(nextToken, \"attribute-value\"))\n return;\n iterator.stepBackward();\n }\n }\n if (/^\\s*>/.test(session.getLine(position.row).slice(position.column)))\n return;\n while (!is(token, \"tag-name\")) {\n token = iterator.stepBackward();\n if (token.value == \"<\") {\n token = iterator.stepForward();\n break;\n }\n }\n var tokenRow = iterator.getCurrentTokenRow();\n var tokenColumn = iterator.getCurrentTokenColumn();\n if (is(iterator.stepBackward(), \"end-tag-open\"))\n return;\n var element = token.value;\n if (tokenRow == position.row)\n element = element.substring(0, position.column - tokenColumn);\n if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))\n return;\n return {\n text: \">\" + \"\",\n selection: [1, 1]\n };\n }\n });\n this.add(\"autoindent\", \"insertion\", function (state, action, editor, session, text) {\n if (text == \"\\n\") {\n var cursor = editor.getCursorPosition();\n var line = session.getLine(cursor.row);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (is(token, \"\") && token.type.indexOf(\"tag-close\") !== -1) {\n if (token.value == \"/>\")\n return;\n while (token && token.type.indexOf(\"tag-name\") === -1) {\n token = iterator.stepBackward();\n }\n if (!token) {\n return;\n }\n var tag = token.value;\n var row = iterator.getCurrentTokenRow();\n token = iterator.stepBackward();\n if (!token || token.type.indexOf(\"end-tag\") !== -1) {\n return;\n }\n if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {\n var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);\n var line = session.getLine(row);\n var nextIndent = this.$getIndent(line);\n var indent = nextIndent + session.getTabString();\n if (nextToken && nextToken.value === \"') {\n var position = editor.getSelectionRange().start;\n var iterator = new TokenIterator(session, position.row, position.column);\n var token = iterator.getCurrentToken() || iterator.stepBackward();\n if (!token)\n return;\n if (token.value == '<') {\n return {\n text: \">\",\n selection: [1, 1]\n };\n }\n }\n });\n};\noop.inherits(JavaScriptBehaviour, CstyleBehaviour);\nexports.JavaScriptBehaviour = JavaScriptBehaviour;\n\n});\n\nace.define(\"ace/mode/folding/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Range = require(\"../../range\").Range;\nvar BaseFoldMode = require(\"./fold_mode\").FoldMode;\nvar FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {\n BaseFoldMode.call(this);\n this.voidElements = voidElements || {};\n this.optionalEndTags = oop.mixin({}, this.voidElements);\n if (optionalEndTags)\n oop.mixin(this.optionalEndTags, optionalEndTags);\n};\noop.inherits(FoldMode, BaseFoldMode);\nvar Tag = function () {\n this.tagName = \"\";\n this.closing = false;\n this.selfClosing = false;\n this.start = { row: 0, column: 0 };\n this.end = { row: 0, column: 0 };\n};\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n(function () {\n this.getFoldWidget = function (session, foldStyle, row) {\n var tag = this._getFirstTagInLine(session, row);\n if (!tag)\n return this.getCommentFoldWidget(session, row);\n if (tag.closing || (!tag.tagName && tag.selfClosing))\n return foldStyle === \"markbeginend\" ? \"end\" : \"\";\n if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))\n return \"\";\n if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))\n return \"\";\n return \"start\";\n };\n this.getCommentFoldWidget = function (session, row) {\n if (/comment/.test(session.getState(row)) && /';\n break;\n }\n }\n return tag;\n }\n else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == '/>';\n return tag;\n }\n tag.start.column += token.value.length;\n }\n return null;\n };\n this._findEndTagInLine = function (session, row, tagName, startColumn) {\n var tokens = session.getTokens(row);\n var column = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n column += token.value.length;\n if (column < startColumn - 1)\n continue;\n if (is(token, \"end-tag-open\")) {\n token = tokens[i + 1];\n if (is(token, \"tag-name\") && token.value === \"\") {\n token = tokens[i + 2];\n }\n if (token && token.value == tagName)\n return true;\n }\n }\n return false;\n };\n this.getFoldWidgetRange = function (session, foldStyle, row) {\n var tags = session.getMatchingTags({ row: row, column: 0 });\n if (tags) {\n return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);\n }\n else {\n return this.getCommentFoldWidget(session, row)\n && session.getCommentFoldRange(row, session.getLine(row).length);\n }\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Range = require(\"../../range\").Range;\nvar BaseFoldMode = require(\"./fold_mode\").FoldMode;\nvar FoldMode = exports.FoldMode = function (commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start));\n this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end));\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n(function () {\n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe = /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n return fw;\n };\n this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n }\n else if (foldStyle != \"all\")\n range = null;\n }\n return range;\n }\n if (foldStyle === \"markbegin\")\n return;\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n this.getSectionRange = function (session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n }\n else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n }\n else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function (session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m)\n continue;\n if (m[1])\n depth--;\n else\n depth++;\n if (!depth)\n break;\n }\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/folding/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/xml\",\"ace/mode/folding/cstyle\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar XmlFoldMode = require(\"./xml\").FoldMode;\nvar CFoldMode = require(\"./cstyle\").FoldMode;\nvar FoldMode = exports.FoldMode = function (commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start));\n this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end));\n }\n this.xmlFoldMode = new XmlFoldMode();\n};\noop.inherits(FoldMode, CFoldMode);\n(function () {\n this.getFoldWidgetRangeBase = this.getFoldWidgetRange;\n this.getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function (session, foldStyle, row) {\n var fw = this.getFoldWidgetBase(session, foldStyle, row);\n if (!fw) {\n return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);\n }\n return fw;\n };\n this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {\n var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);\n if (range)\n return range;\n return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/javascript\",\"ace/mode/folding/javascript\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar JavaScriptHighlightRules = require(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = require(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = require(\"../worker/worker_client\").WorkerClient;\nvar JavaScriptBehaviour = require(\"./behaviour/javascript\").JavaScriptBehaviour;\nvar JavaScriptFoldMode = require(\"./folding/javascript\").FoldMode;\nvar Mode = function () {\n this.HighlightRules = JavaScriptHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new JavaScriptBehaviour();\n this.foldingRules = new JavaScriptFoldMode();\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"//\";\n this.blockComment = { start: \"/*\", end: \"*/\" };\n this.$quotes = { '\"': '\"', \"'\": \"'\", \"`\": \"`\" };\n this.$pairQuotesAfter = {\n \"`\": /\\w/\n };\n this.getNextLineIndent = function (state, line, tab) {\n var indent = this.$getIndent(line);\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n if (tokens.length && tokens[tokens.length - 1].type == \"comment\") {\n return indent;\n }\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n return indent;\n };\n this.checkOutdent = function (state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n this.autoOutdent = function (state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n this.createWorker = function (session) {\n var worker = new WorkerClient([\"ace\"], \"ace/mode/javascript_worker\", \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n worker.on(\"annotate\", function (results) {\n session.setAnnotations(results.data);\n });\n worker.on(\"terminate\", function () {\n session.clearAnnotations();\n });\n return worker;\n };\n this.$id = \"ace/mode/javascript\";\n this.snippetFileId = \"ace/snippets/javascript\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/javascript\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","ace.define(\"ace/theme/github_dark-css\",[\"require\",\"exports\",\"module\"], function(require, exports, module){module.exports = \".ace-github-dark .ace_gutter {\\n background: #24292e;\\n color: #7388b5\\n}\\n\\n.ace-github-dark .ace_print-margin {\\n width: 1px;\\n background: #00204b\\n}\\n\\n.ace-github-dark {\\n background-color: #24292e;\\n color: #FFFFFF\\n}\\n\\n.ace-github-dark .ace_constant.ace_other,\\n.ace-github-dark .ace_cursor {\\n color: #FFFFFF\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_selection {\\n background: #003F8E\\n}\\n\\n.ace-github-dark.ace_multiselect .ace_selection.ace_start {\\n box-shadow: 0 0 3px 0px #24292e;\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_step {\\n background: rgb(127, 111, 19)\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_bracket {\\n margin: -1px 0 0 -1px;\\n border: 1px solid #404F7D\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_active-line {\\n background: #00346E\\n}\\n\\n.ace-github-dark .ace_gutter-active-line {\\n background-color: #24292e\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_selected-word {\\n border: 1px solid #003F8E\\n}\\n\\n.ace-github-dark .ace_invisible {\\n color: #404F7D\\n}\\n\\n.ace-github-dark .ace_keyword,\\n.ace-github-dark .ace_meta,\\n.ace-github-dark .ace_storage,\\n.ace-github-dark .ace_storage.ace_type,\\n.ace-github-dark .ace_support.ace_type {\\n color: #ff7b72\\n}\\n\\n.ace-github-dark .ace_keyword.ace_operator {\\n color: #79c0ff\\n}\\n\\n.ace-github-dark .ace_constant.ace_character,\\n.ace-github-dark .ace_constant.ace_language,\\n.ace-github-dark .ace_constant.ace_numeric,\\n.ace-github-dark .ace_keyword.ace_other.ace_unit,\\n.ace-github-dark .ace_support.ace_constant,\\n.ace-github-dark .ace_variable.ace_parameter {\\n color: #FFC58F\\n}\\n\\n.ace-github-dark .ace_invalid {\\n color: #FFFFFF;\\n background-color: #F99DA5\\n}\\n\\n.ace-github-dark .ace_invalid.ace_deprecated {\\n color: #FFFFFF;\\n background-color: #ff7b72\\n}\\n\\n.ace-github-dark .ace_fold {\\n background-color: #BBDAFF;\\n border-color: #FFFFFF\\n}\\n\\n.ace-github-dark .ace_entity.ace_name.ace_function,\\n.ace-github-dark .ace_support.ace_function,\\n.ace-github-dark .ace_variable {\\n color: #BBDAFF\\n}\\n\\n.ace-github-dark .ace_support.ace_class,\\n.ace-github-dark .ace_support.ace_type {\\n color: #FFEEAD\\n}\\n\\n.ace-github-dark .ace_heading,\\n.ace-github-dark .ace_markup.ace_heading,\\n.ace-github-dark .ace_string {\\n color: #9fcef6\\n}\\n\\n.ace-github-dark .ace_entity.ace_name.ace_tag,\\n.ace-github-dark .ace_entity.ace_other.ace_attribute-name,\\n.ace-github-dark .ace_meta.ace_tag,\\n.ace-github-dark .ace_string.ace_regexp,\\n.ace-github-dark .ace_variable {\\n color: #FF9DA4\\n}\\n\\n.ace-github-dark .ace_comment {\\n color: #7285B7\\n}\\n\\n.ace-github-dark .ace_indent-guide {\\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\\n}\\n\\n.ace-github-dark .ace_indent-guide-active {\\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\\n}\\n\\n.ace-github-dark .ace_constant.ace_buildin {\\n color: #0086B3;\\n}\\n\\n.ace-github-dark .ace_variable.ace_language {\\n color: #ffffff;\\n}\\n \";\n\n});\n\nace.define(\"ace/theme/github_dark\",[\"require\",\"exports\",\"module\",\"ace/theme/github_dark-css\",\"ace/lib/dom\"], function(require, exports, module){exports.isDark = true;\nexports.cssClass = \"ace-github-dark\";\nexports.cssText = require(\"./github_dark-css\");\nvar dom = require(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass, false);\n\n}); (function() {\n ace.require([\"ace/theme/github_dark\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * Class containing the diff, match and patch methods.\n * @constructor\n */\nvar diff_match_patch = function() {\n\n // Defaults.\n // Redefine these in your program to override the defaults.\n\n // Number of seconds to map a diff before giving up (0 for infinity).\n this.Diff_Timeout = 1.0;\n // Cost of an empty edit operation in terms of edit characters.\n this.Diff_EditCost = 4;\n // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n this.Match_Threshold = 0.5;\n // How far to search for a match (0 = exact location, 1000+ = broad match).\n // A match this many characters away from the expected location will add\n // 1.0 to the score (0.0 is a perfect match).\n this.Match_Distance = 1000;\n // When deleting a large block of text (over ~64 characters), how close do\n // the contents have to be to match the expected contents. (0.0 = perfection,\n // 1.0 = very loose). Note that Match_Threshold controls how closely the\n // end points of a delete need to match.\n this.Patch_DeleteThreshold = 0.5;\n // Chunk size for context length.\n this.Patch_Margin = 4;\n\n // The number of bits in an int.\n this.Match_MaxBits = 32;\n};\n\n\n// DIFF FUNCTIONS\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Class representing one diff tuple.\n * ~Attempts to look like a two-element array (which is what this used to be).~\n * Constructor returns an actual two-element array, to allow destructing @JackuB\n * See https://github.com/JackuB/diff-match-patch/issues/14 for details\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\ndiff_match_patch.Diff = function(op, text) {\n return [op, text];\n};\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} opt_checklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @param {number=} opt_deadline Optional time when the diff should be complete\n * by. Used internally for recursive calls. Users should set DiffTimeout\n * instead.\n * @return {!Array.} Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,\n opt_deadline) {\n // Set a deadline by which time the diff must be complete.\n if (typeof opt_deadline == 'undefined') {\n if (this.Diff_Timeout <= 0) {\n opt_deadline = Number.MAX_VALUE;\n } else {\n opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;\n }\n }\n var deadline = opt_deadline;\n\n // Check for null inputs.\n if (text1 == null || text2 == null) {\n throw new Error('Null input. (diff_main)');\n }\n\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [new diff_match_patch.Diff(DIFF_EQUAL, text1)];\n }\n return [];\n }\n\n if (typeof opt_checklines == 'undefined') {\n opt_checklines = true;\n }\n var checklines = opt_checklines;\n\n // Trim off common prefix (speedup).\n var commonlength = this.diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = this.diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = this.diff_compute_(text1, text2, checklines, deadline);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, commonprefix));\n }\n if (commonsuffix) {\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, commonsuffix));\n }\n this.diff_cleanupMerge(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,\n deadline) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [new diff_match_patch.Diff(DIFF_DELETE, text1)];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [new diff_match_patch.Diff(DIFF_INSERT, longtext.substring(0, i)),\n new diff_match_patch.Diff(DIFF_EQUAL, shorttext),\n new diff_match_patch.Diff(DIFF_INSERT,\n longtext.substring(i + shorttext.length))];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n // Check to see if the problem can be split in two.\n var hm = this.diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);\n var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);\n // Merge the results.\n return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],\n diffs_b);\n }\n\n if (checklines && text1.length > 100 && text2.length > 100) {\n return this.diff_lineMode_(text1, text2, deadline);\n }\n\n return this.diff_bisect_(text1, text2, deadline);\n};\n\n\n/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {\n // Scan the text on a line-by-line basis first.\n var a = this.diff_linesToChars_(text1, text2);\n text1 = a.chars1;\n text2 = a.chars2;\n var linearray = a.lineArray;\n\n var diffs = this.diff_main(text1, text2, false, deadline);\n\n // Convert the diff back to original text.\n this.diff_charsToLines_(diffs, linearray);\n // Eliminate freak matches (e.g. blank lines)\n this.diff_cleanupSemantic(diffs);\n\n // Rediff any replacement blocks, this time character-by-character.\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete >= 1 && count_insert >= 1) {\n // Delete the offending records and add the merged ones.\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert);\n pointer = pointer - count_delete - count_insert;\n var subDiff =\n this.diff_main(text_delete, text_insert, false, deadline);\n for (var j = subDiff.length - 1; j >= 0; j--) {\n diffs.splice(pointer, 0, subDiff[j]);\n }\n pointer = pointer + subDiff.length;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n pointer++;\n }\n diffs.pop(); // Remove the dummy entry at the end.\n\n return diffs;\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Bail out if deadline is reached.\n if ((new Date()).getTime() > deadline) {\n break;\n }\n\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,\n deadline) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = this.diff_main(text1a, text2a, false, deadline);\n var diffsb = this.diff_main(text1b, text2b, false, deadline);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\ndiff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {\n var lineArray = []; // e.g. lineArray[4] == 'Hello\\n'\n var lineHash = {}; // e.g. lineHash['Hello\\n'] == 4\n\n // '\\x00' is a valid character, but various debuggers don't like it.\n // So we'll insert a junk entry to avoid generating a null character.\n lineArray[0] = '';\n\n /**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n function diff_linesToCharsMunge_(text) {\n var chars = '';\n // Walk the text, pulling out a substring for each line.\n // text.split('\\n') would would temporarily double our memory footprint.\n // Modifying text would create many large strings to garbage collect.\n var lineStart = 0;\n var lineEnd = -1;\n // Keeping our own length variable is faster than looking it up.\n var lineArrayLength = lineArray.length;\n while (lineEnd < text.length - 1) {\n lineEnd = text.indexOf('\\n', lineStart);\n if (lineEnd == -1) {\n lineEnd = text.length - 1;\n }\n var line = text.substring(lineStart, lineEnd + 1);\n\n if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :\n (lineHash[line] !== undefined)) {\n chars += String.fromCharCode(lineHash[line]);\n } else {\n if (lineArrayLength == maxLines) {\n // Bail out at 65535 because\n // String.fromCharCode(65536) == String.fromCharCode(0)\n line = text.substring(lineStart);\n lineEnd = text.length;\n }\n chars += String.fromCharCode(lineArrayLength);\n lineHash[line] = lineArrayLength;\n lineArray[lineArrayLength++] = line;\n }\n lineStart = lineEnd + 1;\n }\n return chars;\n }\n // Allocate 2/3rds of the space for text1, the rest for text2.\n var maxLines = 40000;\n var chars1 = diff_linesToCharsMunge_(text1);\n maxLines = 65535;\n var chars2 = diff_linesToCharsMunge_(text2);\n return {chars1: chars1, chars2: chars2, lineArray: lineArray};\n};\n\n\n/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\ndiff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {\n for (var i = 0; i < diffs.length; i++) {\n var chars = diffs[i][1];\n var text = [];\n for (var j = 0; j < chars.length; j++) {\n text[j] = lineArray[chars.charCodeAt(j)];\n }\n diffs[i][1] = text.join('');\n }\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\ndiff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\ndiff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\ndiff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (found == 0 || text1.substring(text_length - length) ==\n text2.substring(0, length)) {\n best = length;\n length++;\n }\n }\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\ndiff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {\n if (this.Diff_Timeout <= 0) {\n // Don't risk returning a non-optimal diff if we have unlimited time.\n return null;\n }\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (lastEquality && (lastEquality.length <=\n Math.max(length_insertions1, length_deletions1)) &&\n (lastEquality.length <= Math.max(length_insertions2,\n length_deletions2))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n this.diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = this.diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n insertion.substring(0, overlap_length1)));\n diffs[pointer - 1][1] =\n deletion.substring(0, deletion.length - overlap_length1);\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n deletion.substring(0, overlap_length2)));\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] =\n insertion.substring(0, insertion.length - overlap_length2);\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] =\n deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n};\n\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(diff_match_patch.nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(diff_match_patch.nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 &&\n char1.match(diff_match_patch.whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 &&\n char2.match(diff_match_patch.whitespaceRegex_);\n var lineBreak1 = whitespace1 &&\n char1.match(diff_match_patch.linebreakRegex_);\n var lineBreak2 = whitespace2 &&\n char2.match(diff_match_patch.linebreakRegex_);\n var blankLine1 = lineBreak1 &&\n one.match(diff_match_patch.blanklineEndRegex_);\n var blankLine2 = lineBreak2 &&\n two.match(diff_match_patch.blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = this.diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n};\n\n// Define some regex patterns for matching boundaries.\ndiff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\ndiff_match_patch.whitespaceRegex_ = /\\s/;\ndiff_match_patch.linebreakRegex_ = /[\\r\\n]/;\ndiff_match_patch.blanklineEndRegex_ = /\\n\\r?\\n$/;\ndiff_match_patch.blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Is there an insertion operation before the last equality.\n var pre_ins = false;\n // Is there a deletion operation before the last equality.\n var pre_del = false;\n // Is there an insertion operation after the last equality.\n var post_ins = false;\n // Is there a deletion operation after the last equality.\n var post_del = false;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n if (diffs[pointer][1].length < this.Diff_EditCost &&\n (post_ins || post_del)) {\n // Candidate found.\n equalities[equalitiesLength++] = pointer;\n pre_ins = post_ins;\n pre_del = post_del;\n lastEquality = diffs[pointer][1];\n } else {\n // Not a candidate, and can never become one.\n equalitiesLength = 0;\n lastEquality = null;\n }\n post_ins = post_del = false;\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_DELETE) {\n post_del = true;\n } else {\n post_ins = true;\n }\n /*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n if (lastEquality && ((pre_ins && pre_del && post_ins && post_del) ||\n ((lastEquality.length < this.Diff_EditCost / 2) &&\n (pre_ins + pre_del + post_ins + post_del) == 3))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n equalitiesLength--; // Throw away the equality we just deleted;\n lastEquality = null;\n if (pre_ins && pre_del) {\n // No changes made which could affect previous entry, keep going.\n post_ins = post_del = true;\n equalitiesLength = 0;\n } else {\n equalitiesLength--; // Throw away the previous equality.\n pointer = equalitiesLength > 0 ?\n equalities[equalitiesLength - 1] : -1;\n post_ins = post_del = false;\n }\n changes = true;\n }\n }\n pointer++;\n }\n\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = this.diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n text_insert.substring(0, commonlength)));\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = this.diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n if (text_delete.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n if (text_insert.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * loc is a location in text1, compute and return the equivalent location in\n * text2.\n * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n * @param {!Array.} diffs Array of diff tuples.\n * @param {number} loc Location within text1.\n * @return {number} Location within text2.\n */\ndiff_match_patch.prototype.diff_xIndex = function(diffs, loc) {\n var chars1 = 0;\n var chars2 = 0;\n var last_chars1 = 0;\n var last_chars2 = 0;\n var x;\n for (x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.\n chars1 += diffs[x][1].length;\n }\n if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.\n chars2 += diffs[x][1].length;\n }\n if (chars1 > loc) { // Overshot the location.\n break;\n }\n last_chars1 = chars1;\n last_chars2 = chars2;\n }\n // Was the location was deleted?\n if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n return last_chars2;\n }\n // Add the remaining character length.\n return last_chars2 + (loc - last_chars1);\n};\n\n\n/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} HTML representation.\n */\ndiff_match_patch.prototype.diff_prettyHtml = function(diffs) {\n var html = [];\n var pattern_amp = /&/g;\n var pattern_lt = //g;\n var pattern_para = /\\n/g;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0]; // Operation (insert, delete, equal)\n var data = diffs[x][1]; // Text of change.\n var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')\n .replace(pattern_gt, '>').replace(pattern_para, '¶
');\n switch (op) {\n case DIFF_INSERT:\n html[x] = '' + text + '';\n break;\n case DIFF_DELETE:\n html[x] = '' + text + '';\n break;\n case DIFF_EQUAL:\n html[x] = '' + text + '';\n break;\n }\n }\n return html.join('');\n};\n\n\n/**\n * Compute and return the source text (all equalities and deletions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Source text.\n */\ndiff_match_patch.prototype.diff_text1 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute and return the destination text (all equalities and insertions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Destination text.\n */\ndiff_match_patch.prototype.diff_text2 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_DELETE) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute the Levenshtein distance; the number of inserted, deleted or\n * substituted characters.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {number} Number of changes.\n */\ndiff_match_patch.prototype.diff_levenshtein = function(diffs) {\n var levenshtein = 0;\n var insertions = 0;\n var deletions = 0;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0];\n var data = diffs[x][1];\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length;\n break;\n case DIFF_DELETE:\n deletions += data.length;\n break;\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions);\n insertions = 0;\n deletions = 0;\n break;\n }\n }\n levenshtein += Math.max(insertions, deletions);\n return levenshtein;\n};\n\n\n/**\n * Crush the diff into an encoded string which describes the operations\n * required to transform text1 into text2.\n * E.g. =3\\t-2\\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.\n * Operations are tab-separated. Inserted text is escaped using %xx notation.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Delta text.\n */\ndiff_match_patch.prototype.diff_toDelta = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n switch (diffs[x][0]) {\n case DIFF_INSERT:\n text[x] = '+' + encodeURI(diffs[x][1]);\n break;\n case DIFF_DELETE:\n text[x] = '-' + diffs[x][1].length;\n break;\n case DIFF_EQUAL:\n text[x] = '=' + diffs[x][1].length;\n break;\n }\n }\n return text.join('\\t').replace(/%20/g, ' ');\n};\n\n\n/**\n * Given the original text1, and an encoded string which describes the\n * operations required to transform text1 into text2, compute the full diff.\n * @param {string} text1 Source string for the diff.\n * @param {string} delta Delta text.\n * @return {!Array.} Array of diff tuples.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.diff_fromDelta = function(text1, delta) {\n var diffs = [];\n var diffsLength = 0; // Keeping our own length var is faster in JS.\n var pointer = 0; // Cursor in text1\n var tokens = delta.split(/\\t/g);\n for (var x = 0; x < tokens.length; x++) {\n // Each token begins with a one character parameter which specifies the\n // operation of this token (delete, insert, equality).\n var param = tokens[x].substring(1);\n switch (tokens[x].charAt(0)) {\n case '+':\n try {\n diffs[diffsLength++] =\n new diff_match_patch.Diff(DIFF_INSERT, decodeURI(param));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in diff_fromDelta: ' + param);\n }\n break;\n case '-':\n // Fall through.\n case '=':\n var n = parseInt(param, 10);\n if (isNaN(n) || n < 0) {\n throw new Error('Invalid number in diff_fromDelta: ' + param);\n }\n var text = text1.substring(pointer, pointer += n);\n if (tokens[x].charAt(0) == '=') {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_EQUAL, text);\n } else {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_DELETE, text);\n }\n break;\n default:\n // Blank tokens are ok (from a trailing \\t).\n // Anything else is an error.\n if (tokens[x]) {\n throw new Error('Invalid diff operation in diff_fromDelta: ' +\n tokens[x]);\n }\n }\n }\n if (pointer != text1.length) {\n throw new Error('Delta length (' + pointer +\n ') does not equal source text length (' + text1.length + ').');\n }\n return diffs;\n};\n\n\n// MATCH FUNCTIONS\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc'.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n */\ndiff_match_patch.prototype.match_main = function(text, pattern, loc) {\n // Check for null inputs.\n if (text == null || pattern == null || loc == null) {\n throw new Error('Null input. (match_main)');\n }\n\n loc = Math.max(0, Math.min(loc, text.length));\n if (text == pattern) {\n // Shortcut (potentially not guaranteed by the algorithm)\n return 0;\n } else if (!text.length) {\n // Nothing to match.\n return -1;\n } else if (text.substring(loc, loc + pattern.length) == pattern) {\n // Perfect match at the perfect spot! (Includes case of null pattern)\n return loc;\n } else {\n // Do a fuzzy compare.\n return this.match_bitap_(text, pattern, loc);\n }\n};\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n * Bitap algorithm.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n * @private\n */\ndiff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {\n if (pattern.length > this.Match_MaxBits) {\n throw new Error('Pattern too long for this browser.');\n }\n\n // Initialise the alphabet.\n var s = this.match_alphabet_(pattern);\n\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Compute and return the score for a match with e errors and x location.\n * Accesses loc and pattern through being a closure.\n * @param {number} e Number of errors in match.\n * @param {number} x Location of match.\n * @return {number} Overall score for match (0.0 = good, 1.0 = bad).\n * @private\n */\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length;\n var proximity = Math.abs(loc - x);\n if (!dmp.Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + (proximity / dmp.Match_Distance);\n }\n\n // Highest score beyond which we give up.\n var score_threshold = this.Match_Threshold;\n // Is there a nearby exact match? (speedup)\n var best_loc = text.indexOf(pattern, loc);\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n if (best_loc != -1) {\n score_threshold =\n Math.min(match_bitapScore_(0, best_loc), score_threshold);\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1);\n best_loc = -1;\n\n var bin_min, bin_mid;\n var bin_max = pattern.length + text.length;\n var last_rd;\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0;\n bin_mid = bin_max;\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid;\n } else {\n bin_max = bin_mid;\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid;\n var start = Math.max(1, loc - bin_mid + 1);\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n\n var rd = Array(finish + 2);\n rd[finish + 1] = (1 << d) - 1;\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)];\n if (d === 0) { // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n } else { // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |\n (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |\n last_rd[j + 1];\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1);\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score;\n best_loc = j - 1;\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc);\n } else {\n // Already passed loc, downhill from here on in.\n break;\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break;\n }\n last_rd = rd;\n }\n return best_loc;\n};\n\n\n/**\n * Initialise the alphabet for the Bitap algorithm.\n * @param {string} pattern The text to encode.\n * @return {!Object} Hash of character locations.\n * @private\n */\ndiff_match_patch.prototype.match_alphabet_ = function(pattern) {\n var s = {};\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] = 0;\n }\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);\n }\n return s;\n};\n\n\n// PATCH FUNCTIONS\n\n\n/**\n * Increase the context until it is unique,\n * but don't let the pattern expand beyond Match_MaxBits.\n * @param {!diff_match_patch.patch_obj} patch The patch to grow.\n * @param {string} text Source text.\n * @private\n */\ndiff_match_patch.prototype.patch_addContext_ = function(patch, text) {\n if (text.length == 0) {\n return;\n }\n if (patch.start2 === null) {\n throw Error('patch not initialized');\n }\n var pattern = text.substring(patch.start2, patch.start2 + patch.length1);\n var padding = 0;\n\n // Look for the first and last matches of pattern in text. If two different\n // matches are found, increase the pattern length.\n while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&\n pattern.length < this.Match_MaxBits - this.Patch_Margin -\n this.Patch_Margin) {\n padding += this.Patch_Margin;\n pattern = text.substring(patch.start2 - padding,\n patch.start2 + patch.length1 + padding);\n }\n // Add one chunk for good luck.\n padding += this.Patch_Margin;\n\n // Add the prefix.\n var prefix = text.substring(patch.start2 - padding, patch.start2);\n if (prefix) {\n patch.diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, prefix));\n }\n // Add the suffix.\n var suffix = text.substring(patch.start2 + patch.length1,\n patch.start2 + patch.length1 + padding);\n if (suffix) {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, suffix));\n }\n\n // Roll back the start points.\n patch.start1 -= prefix.length;\n patch.start2 -= prefix.length;\n // Extend the lengths.\n patch.length1 += prefix.length + suffix.length;\n patch.length2 += prefix.length + suffix.length;\n};\n\n\n/**\n * Compute a list of patches to turn text1 into text2.\n * Use diffs if provided, otherwise compute it ourselves.\n * There are four ways to call this function, depending on what data is\n * available to the caller:\n * Method 1:\n * a = text1, b = text2\n * Method 2:\n * a = diffs\n * Method 3 (optimal):\n * a = text1, b = diffs\n * Method 4 (deprecated, use method 3):\n * a = text1, b = text2, c = diffs\n *\n * @param {string|!Array.} a text1 (methods 1,3,4) or\n * Array of diff tuples for text1 to text2 (method 2).\n * @param {string|!Array.=} opt_b text2 (methods 1,4) or\n * Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).\n * @param {string|!Array.=} opt_c Array of diff tuples\n * for text1 to text2 (method 4) or undefined (methods 1,2,3).\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {\n var text1, diffs;\n if (typeof a == 'string' && typeof opt_b == 'string' &&\n typeof opt_c == 'undefined') {\n // Method 1: text1, text2\n // Compute diffs from text1 and text2.\n text1 = /** @type {string} */(a);\n diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);\n if (diffs.length > 2) {\n this.diff_cleanupSemantic(diffs);\n this.diff_cleanupEfficiency(diffs);\n }\n } else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&\n typeof opt_c == 'undefined') {\n // Method 2: diffs\n // Compute text1 from diffs.\n diffs = /** @type {!Array.} */(a);\n text1 = this.diff_text1(diffs);\n } else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&\n typeof opt_c == 'undefined') {\n // Method 3: text1, diffs\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_b);\n } else if (typeof a == 'string' && typeof opt_b == 'string' &&\n opt_c && typeof opt_c == 'object') {\n // Method 4: text1, text2, diffs\n // text2 is not used.\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_c);\n } else {\n throw new Error('Unknown call format to patch_make.');\n }\n\n if (diffs.length === 0) {\n return []; // Get rid of the null case.\n }\n var patches = [];\n var patch = new diff_match_patch.patch_obj();\n var patchDiffLength = 0; // Keeping our own length var is faster in JS.\n var char_count1 = 0; // Number of characters into the text1 string.\n var char_count2 = 0; // Number of characters into the text2 string.\n // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n // text2 (postpatch_text). We recreate the patches one by one to determine\n // context info.\n var prepatch_text = text1;\n var postpatch_text = text1;\n for (var x = 0; x < diffs.length; x++) {\n var diff_type = diffs[x][0];\n var diff_text = diffs[x][1];\n\n if (!patchDiffLength && diff_type !== DIFF_EQUAL) {\n // A new patch starts here.\n patch.start1 = char_count1;\n patch.start2 = char_count2;\n }\n\n switch (diff_type) {\n case DIFF_INSERT:\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length2 += diff_text.length;\n postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +\n postpatch_text.substring(char_count2);\n break;\n case DIFF_DELETE:\n patch.length1 += diff_text.length;\n patch.diffs[patchDiffLength++] = diffs[x];\n postpatch_text = postpatch_text.substring(0, char_count2) +\n postpatch_text.substring(char_count2 +\n diff_text.length);\n break;\n case DIFF_EQUAL:\n if (diff_text.length <= 2 * this.Patch_Margin &&\n patchDiffLength && diffs.length != x + 1) {\n // Small equality inside a patch.\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length1 += diff_text.length;\n patch.length2 += diff_text.length;\n } else if (diff_text.length >= 2 * this.Patch_Margin) {\n // Time for a new patch.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n patch = new diff_match_patch.patch_obj();\n patchDiffLength = 0;\n // Unlike Unidiff, our patch lists have a rolling context.\n // https://github.com/google/diff-match-patch/wiki/Unidiff\n // Update prepatch text & pos to reflect the application of the\n // just completed patch.\n prepatch_text = postpatch_text;\n char_count1 = char_count2;\n }\n }\n break;\n }\n\n // Update the current character count.\n if (diff_type !== DIFF_INSERT) {\n char_count1 += diff_text.length;\n }\n if (diff_type !== DIFF_DELETE) {\n char_count2 += diff_text.length;\n }\n }\n // Pick up the leftover patch if not empty.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n }\n\n return patches;\n};\n\n\n/**\n * Given an array of patches, return another array that is identical.\n * @param {!Array.} patches Array of Patch objects.\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_deepCopy = function(patches) {\n // Making deep copies is hard in JavaScript.\n var patchesCopy = [];\n for (var x = 0; x < patches.length; x++) {\n var patch = patches[x];\n var patchCopy = new diff_match_patch.patch_obj();\n patchCopy.diffs = [];\n for (var y = 0; y < patch.diffs.length; y++) {\n patchCopy.diffs[y] =\n new diff_match_patch.Diff(patch.diffs[y][0], patch.diffs[y][1]);\n }\n patchCopy.start1 = patch.start1;\n patchCopy.start2 = patch.start2;\n patchCopy.length1 = patch.length1;\n patchCopy.length2 = patch.length2;\n patchesCopy[x] = patchCopy;\n }\n return patchesCopy;\n};\n\n\n/**\n * Merge a set of patches onto the text. Return a patched text, as well\n * as a list of true/false values indicating which patches were applied.\n * @param {!Array.} patches Array of Patch objects.\n * @param {string} text Old text.\n * @return {!Array.>} Two element Array, containing the\n * new text and an array of boolean values.\n */\ndiff_match_patch.prototype.patch_apply = function(patches, text) {\n if (patches.length == 0) {\n return [text, []];\n }\n\n // Deep copy the patches so that no changes are made to originals.\n patches = this.patch_deepCopy(patches);\n\n var nullPadding = this.patch_addPadding(patches);\n text = nullPadding + text + nullPadding;\n\n this.patch_splitMax(patches);\n // delta keeps track of the offset between the expected and actual location\n // of the previous patch. If there are patches expected at positions 10 and\n // 20, but the first patch was found at 12, delta is 2 and the second patch\n // has an effective expected position of 22.\n var delta = 0;\n var results = [];\n for (var x = 0; x < patches.length; x++) {\n var expected_loc = patches[x].start2 + delta;\n var text1 = this.diff_text1(patches[x].diffs);\n var start_loc;\n var end_loc = -1;\n if (text1.length > this.Match_MaxBits) {\n // patch_splitMax will only provide an oversized pattern in the case of\n // a monster delete.\n start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),\n expected_loc);\n if (start_loc != -1) {\n end_loc = this.match_main(text,\n text1.substring(text1.length - this.Match_MaxBits),\n expected_loc + text1.length - this.Match_MaxBits);\n if (end_loc == -1 || start_loc >= end_loc) {\n // Can't find valid trailing context. Drop this patch.\n start_loc = -1;\n }\n }\n } else {\n start_loc = this.match_main(text, text1, expected_loc);\n }\n if (start_loc == -1) {\n // No match found. :(\n results[x] = false;\n // Subtract the delta for this failed patch from subsequent patches.\n delta -= patches[x].length2 - patches[x].length1;\n } else {\n // Found a match. :)\n results[x] = true;\n delta = start_loc - expected_loc;\n var text2;\n if (end_loc == -1) {\n text2 = text.substring(start_loc, start_loc + text1.length);\n } else {\n text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);\n }\n if (text1 == text2) {\n // Perfect match, just shove the replacement text in.\n text = text.substring(0, start_loc) +\n this.diff_text2(patches[x].diffs) +\n text.substring(start_loc + text1.length);\n } else {\n // Imperfect match. Run a diff to get a framework of equivalent\n // indices.\n var diffs = this.diff_main(text1, text2, false);\n if (text1.length > this.Match_MaxBits &&\n this.diff_levenshtein(diffs) / text1.length >\n this.Patch_DeleteThreshold) {\n // The end points match, but the content is unacceptably bad.\n results[x] = false;\n } else {\n this.diff_cleanupSemanticLossless(diffs);\n var index1 = 0;\n var index2;\n for (var y = 0; y < patches[x].diffs.length; y++) {\n var mod = patches[x].diffs[y];\n if (mod[0] !== DIFF_EQUAL) {\n index2 = this.diff_xIndex(diffs, index1);\n }\n if (mod[0] === DIFF_INSERT) { // Insertion\n text = text.substring(0, start_loc + index2) + mod[1] +\n text.substring(start_loc + index2);\n } else if (mod[0] === DIFF_DELETE) { // Deletion\n text = text.substring(0, start_loc + index2) +\n text.substring(start_loc + this.diff_xIndex(diffs,\n index1 + mod[1].length));\n }\n if (mod[0] !== DIFF_DELETE) {\n index1 += mod[1].length;\n }\n }\n }\n }\n }\n }\n // Strip the padding off.\n text = text.substring(nullPadding.length, text.length - nullPadding.length);\n return [text, results];\n};\n\n\n/**\n * Add some padding on text start and end so that edges can match something.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} The padding string added to each side.\n */\ndiff_match_patch.prototype.patch_addPadding = function(patches) {\n var paddingLength = this.Patch_Margin;\n var nullPadding = '';\n for (var x = 1; x <= paddingLength; x++) {\n nullPadding += String.fromCharCode(x);\n }\n\n // Bump all the patches forward.\n for (var x = 0; x < patches.length; x++) {\n patches[x].start1 += paddingLength;\n patches[x].start2 += paddingLength;\n }\n\n // Add some padding on start of first diff.\n var patch = patches[0];\n var diffs = patch.diffs;\n if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.start1 -= paddingLength; // Should be 0.\n patch.start2 -= paddingLength; // Should be 0.\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[0][1].length) {\n // Grow first equality.\n var extraLength = paddingLength - diffs[0][1].length;\n diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];\n patch.start1 -= extraLength;\n patch.start2 -= extraLength;\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n // Add some padding on end of last diff.\n patch = patches[patches.length - 1];\n diffs = patch.diffs;\n if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[diffs.length - 1][1].length) {\n // Grow last equality.\n var extraLength = paddingLength - diffs[diffs.length - 1][1].length;\n diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n return nullPadding;\n};\n\n\n/**\n * Look through the patches and break up any which are longer than the maximum\n * limit of the match algorithm.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_splitMax = function(patches) {\n var patch_size = this.Match_MaxBits;\n for (var x = 0; x < patches.length; x++) {\n if (patches[x].length1 <= patch_size) {\n continue;\n }\n var bigpatch = patches[x];\n // Remove the big old patch.\n patches.splice(x--, 1);\n var start1 = bigpatch.start1;\n var start2 = bigpatch.start2;\n var precontext = '';\n while (bigpatch.diffs.length !== 0) {\n // Create one of several smaller patches.\n var patch = new diff_match_patch.patch_obj();\n var empty = true;\n patch.start1 = start1 - precontext.length;\n patch.start2 = start2 - precontext.length;\n if (precontext !== '') {\n patch.length1 = patch.length2 = precontext.length;\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, precontext));\n }\n while (bigpatch.diffs.length !== 0 &&\n patch.length1 < patch_size - this.Patch_Margin) {\n var diff_type = bigpatch.diffs[0][0];\n var diff_text = bigpatch.diffs[0][1];\n if (diff_type === DIFF_INSERT) {\n // Insertions are harmless.\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n patch.diffs.push(bigpatch.diffs.shift());\n empty = false;\n } else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&\n patch.diffs[0][0] == DIFF_EQUAL &&\n diff_text.length > 2 * patch_size) {\n // This is a large deletion. Let it pass in one chunk.\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n empty = false;\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n bigpatch.diffs.shift();\n } else {\n // Deletion or equality. Only take as much as we can stomach.\n diff_text = diff_text.substring(0,\n patch_size - patch.length1 - this.Patch_Margin);\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n if (diff_type === DIFF_EQUAL) {\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n } else {\n empty = false;\n }\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n if (diff_text == bigpatch.diffs[0][1]) {\n bigpatch.diffs.shift();\n } else {\n bigpatch.diffs[0][1] =\n bigpatch.diffs[0][1].substring(diff_text.length);\n }\n }\n }\n // Compute the head context for the next patch.\n precontext = this.diff_text2(patch.diffs);\n precontext =\n precontext.substring(precontext.length - this.Patch_Margin);\n // Append the end context for this patch.\n var postcontext = this.diff_text1(bigpatch.diffs)\n .substring(0, this.Patch_Margin);\n if (postcontext !== '') {\n patch.length1 += postcontext.length;\n patch.length2 += postcontext.length;\n if (patch.diffs.length !== 0 &&\n patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {\n patch.diffs[patch.diffs.length - 1][1] += postcontext;\n } else {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, postcontext));\n }\n }\n if (!empty) {\n patches.splice(++x, 0, patch);\n }\n }\n }\n};\n\n\n/**\n * Take a list of patches and return a textual representation.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} Text representation of patches.\n */\ndiff_match_patch.prototype.patch_toText = function(patches) {\n var text = [];\n for (var x = 0; x < patches.length; x++) {\n text[x] = patches[x];\n }\n return text.join('');\n};\n\n\n/**\n * Parse a textual representation of patches and return a list of Patch objects.\n * @param {string} textline Text representation of patches.\n * @return {!Array.} Array of Patch objects.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.patch_fromText = function(textline) {\n var patches = [];\n if (!textline) {\n return patches;\n }\n var text = textline.split('\\n');\n var textPointer = 0;\n var patchHeader = /^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$/;\n while (textPointer < text.length) {\n var m = text[textPointer].match(patchHeader);\n if (!m) {\n throw new Error('Invalid patch string: ' + text[textPointer]);\n }\n var patch = new diff_match_patch.patch_obj();\n patches.push(patch);\n patch.start1 = parseInt(m[1], 10);\n if (m[2] === '') {\n patch.start1--;\n patch.length1 = 1;\n } else if (m[2] == '0') {\n patch.length1 = 0;\n } else {\n patch.start1--;\n patch.length1 = parseInt(m[2], 10);\n }\n\n patch.start2 = parseInt(m[3], 10);\n if (m[4] === '') {\n patch.start2--;\n patch.length2 = 1;\n } else if (m[4] == '0') {\n patch.length2 = 0;\n } else {\n patch.start2--;\n patch.length2 = parseInt(m[4], 10);\n }\n textPointer++;\n\n while (textPointer < text.length) {\n var sign = text[textPointer].charAt(0);\n try {\n var line = decodeURI(text[textPointer].substring(1));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in patch_fromText: ' + line);\n }\n if (sign == '-') {\n // Deletion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_DELETE, line));\n } else if (sign == '+') {\n // Insertion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_INSERT, line));\n } else if (sign == ' ') {\n // Minor equality.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, line));\n } else if (sign == '@') {\n // Start of next patch.\n break;\n } else if (sign === '') {\n // Blank line? Whatever.\n } else {\n // WTF?\n throw new Error('Invalid patch mode \"' + sign + '\" in: ' + line);\n }\n textPointer++;\n }\n }\n return patches;\n};\n\n\n/**\n * Class representing one patch operation.\n * @constructor\n */\ndiff_match_patch.patch_obj = function() {\n /** @type {!Array.} */\n this.diffs = [];\n /** @type {?number} */\n this.start1 = null;\n /** @type {?number} */\n this.start2 = null;\n /** @type {number} */\n this.length1 = 0;\n /** @type {number} */\n this.length2 = 0;\n};\n\n\n/**\n * Emulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indices are printed as 1-based, not 0-based.\n * @return {string} The GNU diff string.\n */\ndiff_match_patch.patch_obj.prototype.toString = function() {\n var coords1, coords2;\n if (this.length1 === 0) {\n coords1 = this.start1 + ',0';\n } else if (this.length1 == 1) {\n coords1 = this.start1 + 1;\n } else {\n coords1 = (this.start1 + 1) + ',' + this.length1;\n }\n if (this.length2 === 0) {\n coords2 = this.start2 + ',0';\n } else if (this.length2 == 1) {\n coords2 = this.start2 + 1;\n } else {\n coords2 = (this.start2 + 1) + ',' + this.length2;\n }\n var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\\n'];\n var op;\n // Escape the body of the patch with %xx notation.\n for (var x = 0; x < this.diffs.length; x++) {\n switch (this.diffs[x][0]) {\n case DIFF_INSERT:\n op = '+';\n break;\n case DIFF_DELETE:\n op = '-';\n break;\n case DIFF_EQUAL:\n op = ' ';\n break;\n }\n text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\\n';\n }\n return text.join('').replace(/%20/g, ' ');\n};\n\n\n// The following export code was added by @ForbesLindesay\nmodule.exports = diff_match_patch;\nmodule.exports['diff_match_patch'] = diff_match_patch;\nmodule.exports['DIFF_DELETE'] = DIFF_DELETE;\nmodule.exports['DIFF_INSERT'] = DIFF_INSERT;\nmodule.exports['DIFF_EQUAL'] = DIFF_EQUAL;","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import { Ace, Range } from \"ace-builds\";\nimport * as AceBuilds from \"ace-builds\";\nimport * as PropTypes from \"prop-types\";\nimport * as React from \"react\";\nconst isEqual = require(\"lodash.isequal\");\nimport {\n debounce,\n editorEvents,\n editorOptions,\n getAceInstance\n} from \"./editorOptions\";\nconst ace = getAceInstance();\n\nimport {\n IAceEditor,\n IAceOptions,\n ICommand,\n IEditorProps,\n IMarker\n} from \"./types\";\n/**\n * See https://github.com/ajaxorg/ace/wiki/Configuring-Ace\n */\n\nexport interface IAceEditorProps {\n name?: string;\n style?: React.CSSProperties;\n /** For available modes see https://github.com/thlorenz/brace/tree/master/mode */\n mode?: string | object;\n /** For available themes see https://github.com/thlorenz/brace/tree/master/theme */\n theme?: string;\n height?: string;\n width?: string;\n className?: string;\n fontSize?: number | string;\n showGutter?: boolean;\n showPrintMargin?: boolean;\n highlightActiveLine?: boolean;\n focus?: boolean;\n cursorStart?: number;\n wrapEnabled?: boolean;\n readOnly?: boolean;\n minLines?: number;\n maxLines?: number;\n navigateToFileEnd?: boolean;\n debounceChangePeriod?: number;\n enableBasicAutocompletion?: boolean | string[];\n enableLiveAutocompletion?: boolean | string[];\n tabSize?: number;\n value?: string;\n placeholder?: string;\n defaultValue?: string;\n scrollMargin?: number[];\n enableSnippets?: boolean;\n onSelectionChange?: (value: any, event?: any) => void;\n onCursorChange?: (value: any, event?: any) => void;\n onInput?: (event?: any) => void;\n onLoad?: (editor: Ace.Editor) => void;\n onValidate?: (annotations: Ace.Annotation[]) => void;\n onBeforeLoad?: (ace: typeof AceBuilds) => void;\n onChange?: (value: string, event?: any) => void;\n onSelection?: (selectedText: string, event?: any) => void;\n onCopy?: (value: string) => void;\n onPaste?: (value: string) => void;\n onFocus?: (event: any, editor?: Ace.Editor) => void;\n onBlur?: (event: any, editor?: Ace.Editor) => void;\n onScroll?: (editor: IEditorProps) => void;\n editorProps?: IEditorProps;\n setOptions?: IAceOptions;\n keyboardHandler?: string;\n commands?: ICommand[];\n annotations?: Ace.Annotation[];\n markers?: IMarker[];\n}\n\nexport default class ReactAce extends React.Component {\n public static propTypes: PropTypes.ValidationMap = {\n mode: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n focus: PropTypes.bool,\n theme: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n height: PropTypes.string,\n width: PropTypes.string,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n showGutter: PropTypes.bool,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onPaste: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onBlur: PropTypes.func,\n onScroll: PropTypes.func,\n value: PropTypes.string,\n defaultValue: PropTypes.string,\n onLoad: PropTypes.func,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n onValidate: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n debounceChangePeriod: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableSnippets: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n navigateToFileEnd: PropTypes.bool,\n commands: PropTypes.array,\n placeholder: PropTypes.string\n };\n public static defaultProps: Partial = {\n name: \"ace-editor\",\n focus: false,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n fontSize: 12,\n enableSnippets: false,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n placeholder: null,\n navigateToFileEnd: true\n };\n public editor: IAceEditor;\n public refEditor: HTMLElement;\n public debounce: (fn: any, delay: number) => (...args: any) => void;\n // [index: string]: any;\n public silent: boolean;\n constructor(props: IAceEditorProps) {\n super(props);\n editorEvents.forEach(method => {\n this[method] = this[method].bind(this);\n });\n this.debounce = debounce;\n }\n public isInShadow(node: HTMLElement): boolean {\n let parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n public componentDidMount() {\n const {\n className,\n onBeforeLoad,\n onValidate,\n mode,\n focus,\n theme,\n fontSize,\n value,\n defaultValue,\n showGutter,\n wrapEnabled,\n showPrintMargin,\n scrollMargin = [0, 0, 0, 0],\n keyboardHandler,\n onLoad,\n commands,\n annotations,\n markers,\n placeholder\n } = this.props;\n\n this.editor = ace.edit(this.refEditor);\n\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n\n const editorProps = Object.keys(this.props.editorProps);\n for (let i = 0; i < editorProps.length; i++) {\n this.editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(\n this.onChange,\n this.props.debounceChangePeriod\n );\n }\n this.editor.renderer.setScrollMargin(\n scrollMargin[0],\n scrollMargin[1],\n scrollMargin[2],\n scrollMargin[3]\n );\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor\n .getSession()\n .setMode(\n typeof mode === \"string\" ? `ace/mode/${mode}` : (mode as Ace.SyntaxMode)\n );\n if(theme && theme !== \"\")\n this.editor.setTheme(`ace/theme/${theme}`);\n this.editor.setFontSize(\n typeof fontSize === \"number\" ? `${fontSize}px` : fontSize\n );\n this.editor\n .getSession()\n .setValue(!defaultValue ? value || \"\" : defaultValue);\n\n if (this.props.navigateToFileEnd) {\n this.editor.navigateFileEnd();\n }\n this.editor.renderer.setShowGutter(showGutter);\n this.editor.getSession().setUseWrapMode(wrapEnabled);\n this.editor.setShowPrintMargin(showPrintMargin);\n this.editor.on(\"focus\", this.onFocus);\n this.editor.on(\"blur\", this.onBlur);\n this.editor.on(\"copy\", this.onCopy);\n this.editor.on(\"paste\", this.onPaste);\n this.editor.on(\"change\", this.onChange);\n this.editor.on(\"input\", this.onInput);\n if (placeholder) {\n this.updatePlaceholder();\n }\n this.editor\n .getSession()\n .selection.on(\"changeSelection\", this.onSelectionChange);\n this.editor.getSession().selection.on(\"changeCursor\", this.onCursorChange);\n if (onValidate) {\n // @ts-ignore types don't include\n this.editor.getSession().on(\"changeAnnotation\", () => {\n // tslint:disable-next-line:no-shadowed-variable\n const annotations = this.editor.getSession().getAnnotations();\n this.props.onValidate(annotations);\n });\n }\n this.editor.session.on(\"changeScrollTop\", this.onScroll);\n this.editor.getSession().setAnnotations(annotations || []);\n if (markers && markers.length > 0) {\n this.handleMarkers(markers);\n }\n\n // get a list of possible options to avoid 'misspelled option errors'\n const availableOptions = this.editor.$options;\n editorOptions.forEach(option => {\n if (availableOptions.hasOwnProperty(option)) {\n // @ts-ignore\n this.editor.setOption(option, this.props[option]);\n } else if (this.props[option]) {\n console.warn(\n `ReactAce: editor option ${option} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`\n );\n }\n });\n\n this.handleOptions(this.props);\n\n if (Array.isArray(commands)) {\n commands.forEach(command => {\n if (typeof command.exec === \"string\") {\n (this.editor.commands as any).bindKey(command.bindKey, command.exec);\n } else {\n (this.editor.commands as any).addCommand(command);\n }\n });\n }\n\n if (keyboardHandler) {\n this.editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n\n if (onLoad) {\n onLoad(this.editor);\n }\n\n this.editor.resize();\n\n if (focus) {\n this.editor.focus();\n }\n }\n\n public componentDidUpdate(prevProps: IAceEditorProps) {\n const oldProps = prevProps;\n const nextProps = this.props;\n\n for (let i = 0; i < editorOptions.length; i++) {\n const option = editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n // @ts-ignore\n this.editor.setOption(option, nextProps[option]);\n }\n }\n\n if (nextProps.className !== oldProps.className) {\n const appliedClasses = this.refEditor.className;\n const appliedClassesArray = appliedClasses.trim().split(\" \");\n const oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(oldClass => {\n const index = appliedClassesArray.indexOf(oldClass);\n appliedClassesArray.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray.join(\" \");\n }\n\n // First process editor value, as it may create a new session (see issue #300)\n const valueChanged = this.editor &&\n nextProps.value != null &&\n this.editor.getValue() !== nextProps.value;\n\n if (valueChanged) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n const pos = this.editor.session.selection.toJSON();\n this.editor.setValue(nextProps.value, nextProps.cursorStart);\n this.editor.session.selection.fromJSON(pos);\n this.silent = false;\n }\n\n if (nextProps.placeholder !== oldProps.placeholder) {\n this.updatePlaceholder();\n }\n if (nextProps.mode !== oldProps.mode) {\n this.editor\n .getSession()\n .setMode(\n typeof nextProps.mode === \"string\"\n ? `ace/mode/${nextProps.mode}`\n : (nextProps.mode as Ace.SyntaxMode)\n );\n }\n if (nextProps.theme !== oldProps.theme) {\n this.editor.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n this.editor.setKeyboardHandler(\n \"ace/keyboard/\" + nextProps.keyboardHandler\n );\n } else {\n this.editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n this.editor.setFontSize(\n typeof nextProps.fontSize === \"number\"\n ? `${nextProps.fontSize}px`\n : nextProps.fontSize\n );\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n this.editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n this.editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n this.editor.renderer.setShowGutter(nextProps.showGutter);\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps);\n }\n // if the value or annotations changed, set the annotations\n // changing the value may create create a new session which will require annotations to be re-set\n if (valueChanged || !isEqual(nextProps.annotations, oldProps.annotations)) {\n this.editor.getSession().setAnnotations(nextProps.annotations || []);\n }\n if (\n !isEqual(nextProps.markers, oldProps.markers) &&\n Array.isArray(nextProps.markers)\n ) {\n this.handleMarkers(nextProps.markers);\n }\n\n // this doesn't look like it works at all....\n if (!isEqual(nextProps.scrollMargin, oldProps.scrollMargin)) {\n this.handleScrollMargins(nextProps.scrollMargin);\n }\n\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width\n ) {\n this.editor.resize();\n }\n if (this.props.focus && !prevProps.focus) {\n this.editor.focus();\n }\n }\n\n public handleScrollMargins(margins = [0, 0, 0, 0]) {\n this.editor.renderer.setScrollMargin(\n margins[0],\n margins[1],\n margins[2],\n margins[3]\n );\n }\n\n public componentWillUnmount() {\n if (this.editor) {\n this.editor.destroy();\n this.editor = null;\n }\n }\n\n public onChange(event: any) {\n if (this.props.onChange && !this.silent) {\n const value = this.editor.getValue();\n this.props.onChange(value, event);\n }\n }\n\n public onSelectionChange(event: any) {\n if (this.props.onSelectionChange) {\n const value = this.editor.getSelection();\n this.props.onSelectionChange(value, event);\n }\n }\n public onCursorChange(event: any) {\n if (this.props.onCursorChange) {\n const value = this.editor.getSelection();\n this.props.onCursorChange(value, event);\n }\n }\n public onInput(event?: any) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n if (this.props.placeholder) {\n this.updatePlaceholder();\n }\n }\n public onFocus(event: any) {\n if (this.props.onFocus) {\n this.props.onFocus(event, this.editor);\n }\n }\n\n public onBlur(event: any) {\n if (this.props.onBlur) {\n this.props.onBlur(event, this.editor);\n }\n }\n\n public onCopy({ text }: { text: string }) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n }\n\n public onPaste({ text }: { text: string }) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n }\n\n public onScroll() {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n }\n\n public handleOptions(props: IAceEditorProps) {\n const setOptions = Object.keys(props.setOptions);\n for (let y = 0; y < setOptions.length; y++) {\n // @ts-ignore\n this.editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n }\n\n public handleMarkers(markers: IMarker[]) {\n // remove foreground markers\n let currentMarkers = this.editor.getSession().getMarkers(true);\n for (const i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers except active line marker and selected word marker\n currentMarkers = this.editor.getSession().getMarkers(false);\n for (const i in currentMarkers) {\n if (\n currentMarkers.hasOwnProperty(i) &&\n currentMarkers[i].clazz !== \"ace_active-line\" &&\n currentMarkers[i].clazz !== \"ace_selected-word\"\n ) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(\n ({\n startRow,\n startCol,\n endRow,\n endCol,\n className,\n type,\n inFront = false\n }) => {\n const range = new Range(startRow, startCol, endRow, endCol);\n this.editor.getSession().addMarker(range, className, type, inFront);\n }\n );\n }\n\n public updatePlaceholder() {\n // Adapted from https://stackoverflow.com/questions/26695708/how-can-i-add-placeholder-text-when-the-editor-is-empty\n\n const editor = this.editor;\n const { placeholder } = this.props;\n\n const showPlaceholder = !editor.session.getValue().length;\n let node = editor.renderer.placeholderNode;\n\n if (!showPlaceholder && node) {\n editor.renderer.scroller.removeChild(editor.renderer.placeholderNode);\n editor.renderer.placeholderNode = null;\n } else if (showPlaceholder && !node) {\n node = editor.renderer.placeholderNode = document.createElement(\"div\");\n node.textContent = placeholder || \"\";\n node.className = \"ace_comment ace_placeholder\";\n node.style.padding = \"0 9px\";\n node.style.position = \"absolute\";\n node.style.zIndex = \"3\";\n editor.renderer.scroller.appendChild(node);\n } else if (showPlaceholder && node) {\n node.textContent = placeholder;\n }\n }\n\n public updateRef(item: HTMLElement) {\n this.refEditor = item;\n }\n\n public render() {\n const { name, width, height, style } = this.props;\n const divStyle = { width, height, ...style };\n return
;\n }\n}\n","import * as PropTypes from \"prop-types\";\nimport * as React from \"react\";\nimport SplitEditor from \"./split\";\nconst DiffMatchPatch = require(\"diff-match-patch\");\nimport { IEditorProps } from \"./types\";\n\nexport interface IDiffEditorProps {\n cursorStart?: number;\n editorProps?: object;\n enableBasicAutocompletion?: boolean | string[];\n enableLiveAutocompletion?: boolean | string[];\n focus?: boolean;\n fontSize?: number;\n height?: string;\n highlightActiveLine?: boolean;\n maxLines?: number;\n minLines?: number;\n mode?: string;\n name?: string;\n className?: string;\n onLoad?: (editor: IEditorProps) => void;\n onChange?: (value: string[], event?: any) => void;\n onPaste?: (value: string) => void;\n onScroll?: (editor: IEditorProps) => void;\n orientation?: string;\n readOnly?: boolean;\n scrollMargin?: number[];\n setOptions?: object;\n showGutter?: boolean;\n showPrintMargin?: boolean;\n splits?: number;\n style?: object;\n tabSize?: number;\n theme?: string;\n value?: string[];\n width?: string;\n wrapEnabled?: boolean;\n}\n\nexport interface IDiffEditorState {\n value: string[];\n}\n\nexport default class DiffComponent extends React.Component<\n IDiffEditorProps,\n IDiffEditorState\n> {\n public static propTypes: PropTypes.ValidationMap = {\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n enableBasicAutocompletion: PropTypes.bool,\n enableLiveAutocompletion: PropTypes.bool,\n focus: PropTypes.bool,\n fontSize: PropTypes.number,\n height: PropTypes.string,\n highlightActiveLine: PropTypes.bool,\n maxLines: PropTypes.number,\n minLines: PropTypes.number,\n mode: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n onChange: PropTypes.func,\n orientation: PropTypes.string,\n readOnly: PropTypes.bool,\n scrollMargin: PropTypes.array,\n setOptions: PropTypes.object,\n showGutter: PropTypes.bool,\n showPrintMargin: PropTypes.bool,\n splits: PropTypes.number,\n style: PropTypes.object,\n tabSize: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.array,\n width: PropTypes.string,\n wrapEnabled: PropTypes.bool\n };\n\n public static defaultProps: Partial = {\n cursorStart: 1,\n editorProps: {},\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n focus: false,\n fontSize: 12,\n height: \"500px\",\n highlightActiveLine: true,\n maxLines: null,\n minLines: null,\n mode: \"\",\n name: \"ace-editor\",\n onLoad: null,\n onScroll: null,\n onPaste: null,\n onChange: null,\n orientation: \"beside\",\n readOnly: false,\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n showGutter: true,\n showPrintMargin: true,\n splits: 2,\n style: {},\n tabSize: 4,\n theme: \"github\",\n value: [\"\", \"\"],\n width: \"500px\",\n wrapEnabled: true\n };\n constructor(props: IDiffEditorProps) {\n super(props);\n this.state = {\n value: this.props.value\n };\n this.onChange = this.onChange.bind(this);\n this.diff = this.diff.bind(this);\n }\n\n public componentDidUpdate() {\n const { value } = this.props;\n\n if (value !== this.state.value) {\n this.setState({ value });\n }\n }\n\n public onChange(value: any) {\n this.setState({\n value\n });\n if (this.props.onChange) {\n this.props.onChange(value);\n }\n }\n\n public diff() {\n const dmp = new DiffMatchPatch();\n const lhString = this.state.value[0];\n const rhString = this.state.value[1];\n\n if (lhString.length === 0 && rhString.length === 0) {\n return [];\n }\n\n const diff = dmp.diff_main(lhString, rhString);\n dmp.diff_cleanupSemantic(diff);\n\n const diffedLines = this.generateDiffedLines(diff);\n const codeEditorSettings = this.setCodeMarkers(diffedLines);\n return codeEditorSettings;\n }\n\n public generateDiffedLines(diff: any) {\n const C = {\n DIFF_EQUAL: 0,\n DIFF_DELETE: -1,\n DIFF_INSERT: 1\n };\n\n const diffedLines = {\n left: [] as any[],\n right: [] as any[]\n };\n\n const cursor = {\n left: 1,\n right: 1\n };\n\n diff.forEach((chunk: any) => {\n const chunkType = chunk[0];\n const text = chunk[1];\n let lines = text.split(\"\\n\").length - 1;\n\n // diff-match-patch sometimes returns empty strings at random\n if (text.length === 0) {\n return;\n }\n\n const firstChar = text[0];\n const lastChar = text[text.length - 1];\n let linesToHighlight = 0;\n\n switch (chunkType) {\n case C.DIFF_EQUAL:\n cursor.left += lines;\n cursor.right += lines;\n\n break;\n case C.DIFF_DELETE:\n // If the deletion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.left++;\n lines--;\n }\n\n linesToHighlight = lines;\n\n // If the deletion does not include a newline, highlight the same line on the right\n if (linesToHighlight === 0) {\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right\n });\n }\n\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left + linesToHighlight\n });\n\n cursor.left += lines;\n break;\n case C.DIFF_INSERT:\n // If the insertion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.right++;\n lines--;\n }\n\n linesToHighlight = lines;\n\n // If the insertion does not include a newline, highlight the same line on the left\n if (linesToHighlight === 0) {\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left\n });\n }\n\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right + linesToHighlight\n });\n\n cursor.right += lines;\n break;\n default:\n throw new Error(\"Diff type was not defined.\");\n }\n });\n return diffedLines;\n }\n\n // Receives a collection of line numbers and iterates through them to highlight appropriately\n // Returns an object that tells the render() method how to display the code editors\n public setCodeMarkers(diffedLines: any = { left: [], right: [] }) {\n const codeEditorSettings = [];\n\n const newMarkerSet = {\n left: [] as any[],\n right: [] as any[]\n };\n\n for (let i = 0; i < diffedLines.left.length; i++) {\n const markerObj = {\n startRow: diffedLines.left[i].startLine - 1,\n endRow: diffedLines.left[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.left.push(markerObj);\n }\n\n for (let i = 0; i < diffedLines.right.length; i++) {\n const markerObj = {\n startRow: diffedLines.right[i].startLine - 1,\n endRow: diffedLines.right[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.right.push(markerObj);\n }\n\n codeEditorSettings[0] = newMarkerSet.left;\n codeEditorSettings[1] = newMarkerSet.right;\n\n return codeEditorSettings;\n }\n\n public render() {\n const markers = this.diff();\n return (\n \n );\n }\n}\n","import * as AceBuilds from \"ace-builds\";\n\ntype EditorOption =\n | \"minLines\"\n | \"maxLines\"\n | \"readOnly\"\n | \"highlightActiveLine\"\n | \"tabSize\"\n | \"enableBasicAutocompletion\"\n | \"enableLiveAutocompletion\"\n | \"enableSnippets\";\n\nconst editorOptions: EditorOption[] = [\n \"minLines\",\n \"maxLines\",\n \"readOnly\",\n \"highlightActiveLine\",\n \"tabSize\",\n \"enableBasicAutocompletion\",\n \"enableLiveAutocompletion\",\n \"enableSnippets\"\n];\n\ntype EditorEvent =\n | \"onChange\"\n | \"onFocus\"\n | \"onInput\"\n | \"onBlur\"\n | \"onCopy\"\n | \"onPaste\"\n | \"onSelectionChange\"\n | \"onCursorChange\"\n | \"onScroll\"\n | \"handleOptions\"\n | \"updateRef\";\n\nconst editorEvents: EditorEvent[] = [\n \"onChange\",\n \"onFocus\",\n \"onInput\",\n \"onBlur\",\n \"onCopy\",\n \"onPaste\",\n \"onSelectionChange\",\n \"onCursorChange\",\n \"onScroll\",\n \"handleOptions\",\n \"updateRef\"\n];\n\n// Typescript globals definition to allow us to create a window object during SSR.\ndeclare global {\n namespace NodeJS {\n // tslint:disable-next-line\n interface Global {\n window: any;\n }\n }\n}\nconst getAceInstance = (): typeof AceBuilds => {\n let ace;\n if (typeof window === \"undefined\") {\n // ace-builds just needs some window object to attach ace to.\n // During SSR even just an empty object will work.\n global.window = {};\n ace = require(\"ace-builds\");\n // And it can be discarded immediately afterward to avoid confusing\n // other libraries that might detect SSR the same way we did.\n delete global.window;\n } else if ((window as any).ace) {\n // Fallback for ace.require when vanilla ACE is hosted over a CDN\n ace = (window as any).ace;\n ace.acequire = (window as any).ace.require || (window as any).ace.acequire;\n } else {\n ace = require(\"ace-builds\");\n }\n return ace;\n};\n\nconst debounce = (fn: (...args: any[]) => void, delay: number) => {\n let timer: any = null;\n // tslint:disable-next-line\n return function () {\n const context = this;\n const args = arguments;\n clearTimeout(timer);\n timer = setTimeout(() => {\n fn.apply(context, args);\n }, delay);\n };\n};\nexport { editorOptions, editorEvents, debounce, getAceInstance };\n","import ace, { IAceEditorProps } from \"./ace\";\nimport diff, { IDiffEditorProps, IDiffEditorState } from \"./diff\";\nimport split, { ISplitEditorProps } from \"./split\";\nimport {\n IAceOptions,\n IAnnotation,\n ICommand,\n ICommandBindKey,\n ICommandManager,\n IEditorProps,\n IMarker\n} from \"./types\";\nexport {\n split,\n diff,\n IAceOptions,\n IAceEditorProps,\n IAnnotation,\n ICommand,\n ICommandBindKey,\n ICommandManager,\n IDiffEditorProps,\n IDiffEditorState,\n IEditorProps,\n IMarker,\n ISplitEditorProps\n};\nexport default ace;\n","import {\n debounce,\n editorEvents,\n editorOptions,\n getAceInstance\n} from \"./editorOptions\";\nconst ace = getAceInstance();\nimport { Ace, Range } from \"ace-builds\";\nimport Editor = Ace.Editor;\nimport { Split } from \"ace-builds/src-noconflict/ext-split\";\nimport * as PropTypes from \"prop-types\";\nimport * as React from \"react\";\nconst isEqual = require(\"lodash.isequal\");\nconst get = require(\"lodash.get\");\nimport {\n IAceOptions,\n IAnnotation,\n ICommand,\n IEditorProps,\n IMarker\n} from \"./types\";\n\ninterface IAceEditorClass extends Editor {\n [index: string]: any;\n $options?: any;\n}\n\nexport interface ISplitEditorProps {\n [index: string]: any;\n name?: string;\n style?: object;\n /** For available modes see https://github.com/thlorenz/brace/tree/master/mode */\n mode?: string;\n /** For available themes see https://github.com/thlorenz/brace/tree/master/theme */\n theme?: string;\n height?: string;\n width?: string;\n className?: string;\n fontSize?: number | string;\n showGutter?: boolean;\n showPrintMargin?: boolean;\n highlightActiveLine?: boolean;\n focus?: boolean;\n splits: number;\n debounceChangePeriod?: number;\n cursorStart?: number;\n wrapEnabled?: boolean;\n readOnly?: boolean;\n minLines?: number;\n maxLines?: number;\n enableBasicAutocompletion?: boolean | string[];\n enableLiveAutocompletion?: boolean | string[];\n tabSize?: number;\n value?: string[];\n defaultValue?: string[];\n scrollMargin?: number[];\n orientation?: string;\n onSelectionChange?: (value: any, event?: any) => void;\n onCursorChange?: (value: any, event?: any) => void;\n onInput?: (event?: any) => void;\n onLoad?: (editor: IEditorProps) => void;\n onBeforeLoad?: (ace: any) => void;\n onChange?: (value: string[], event?: any) => void;\n onSelection?: (selectedText: string, event?: any) => void;\n onCopy?: (value: string) => void;\n onPaste?: (value: string) => void;\n onFocus?: (value: Event) => void;\n onBlur?: (value: Event) => void;\n onScroll?: (editor: IEditorProps) => void;\n editorProps?: IEditorProps;\n setOptions?: IAceOptions;\n keyboardHandler?: string;\n commands?: ICommand[];\n annotations?: IAnnotation[][];\n markers?: IMarker[][];\n}\n\nexport default class SplitComponent extends React.Component<\n ISplitEditorProps,\n undefined\n> {\n [index: string]: any;\n\n public static propTypes: PropTypes.ValidationMap = {\n className: PropTypes.string,\n debounceChangePeriod: PropTypes.number,\n defaultValue: PropTypes.arrayOf(PropTypes.string),\n focus: PropTypes.bool,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.string,\n mode: PropTypes.string,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n orientation: PropTypes.string,\n showGutter: PropTypes.bool,\n splits: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.arrayOf(PropTypes.string),\n width: PropTypes.string,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n commands: PropTypes.array\n };\n public static defaultProps: Partial = {\n name: \"ace-editor\",\n focus: false,\n orientation: \"beside\",\n splits: 2,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n value: [],\n fontSize: 12,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false\n };\n public editor: IAceEditorClass;\n public refEditor: HTMLElement;\n public silent: boolean;\n public split: IAceEditorClass;\n public splitEditor: IAceEditorClass;\n public debounce: (fn: any, delay: number) => (...args: any) => void;\n constructor(props: ISplitEditorProps) {\n super(props);\n editorEvents.forEach(method => {\n this[method] = this[method].bind(this);\n });\n this.debounce = debounce;\n }\n public isInShadow(node: HTMLElement): boolean {\n let parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n public componentDidMount() {\n const {\n className,\n onBeforeLoad,\n mode,\n focus,\n theme,\n fontSize,\n value,\n defaultValue,\n cursorStart,\n showGutter,\n wrapEnabled,\n showPrintMargin,\n scrollMargin = [0, 0, 0, 0],\n keyboardHandler,\n onLoad,\n commands,\n annotations,\n markers,\n splits\n } = this.props;\n\n this.editor = ace.edit(this.refEditor);\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor.setTheme(`ace/theme/${theme}`);\n\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n\n const editorProps = Object.keys(this.props.editorProps);\n\n const split = new Split(\n this.editor.container,\n `ace/theme/${theme}`,\n splits\n );\n this.editor.env.split = split;\n\n this.splitEditor = split.getEditor(0);\n this.split = split;\n // in a split scenario we don't want a print margin for the entire application\n this.editor.setShowPrintMargin(false);\n this.editor.renderer.setShowGutter(false);\n // get a list of possible options to avoid 'misspelled option errors'\n const availableOptions = this.splitEditor.$options;\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(\n this.onChange,\n this.props.debounceChangePeriod\n );\n }\n split.forEach((editor: IAceEditorClass, index: number) => {\n for (let i = 0; i < editorProps.length; i++) {\n editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n const defaultValueForEditor = get(defaultValue, index);\n const valueForEditor = get(value, index, \"\");\n editor.session.setUndoManager(new ace.UndoManager());\n editor.setTheme(`ace/theme/${theme}`);\n editor.renderer.setScrollMargin(\n scrollMargin[0],\n scrollMargin[1],\n scrollMargin[2],\n scrollMargin[3]\n );\n editor.getSession().setMode(`ace/mode/${mode}`);\n editor.setFontSize(fontSize as any);\n editor.renderer.setShowGutter(showGutter);\n editor.getSession().setUseWrapMode(wrapEnabled);\n editor.setShowPrintMargin(showPrintMargin);\n editor.on(\"focus\", this.onFocus);\n editor.on(\"blur\", this.onBlur);\n editor.on(\"input\" as any, this.onInput);\n editor.on(\"copy\", this.onCopy as any);\n editor.on(\"paste\", this.onPaste as any);\n editor.on(\"change\", this.onChange);\n editor\n .getSession()\n .selection.on(\"changeSelection\", this.onSelectionChange);\n editor.getSession().selection.on(\"changeCursor\", this.onCursorChange);\n editor.session.on(\"changeScrollTop\", this.onScroll);\n editor.setValue(\n defaultValueForEditor === undefined\n ? valueForEditor\n : defaultValueForEditor,\n cursorStart\n );\n const newAnnotations = get(annotations, index, []);\n const newMarkers = get(markers, index, []);\n editor.getSession().setAnnotations(newAnnotations);\n if (newMarkers && newMarkers.length > 0) {\n this.handleMarkers(newMarkers, editor);\n }\n\n for (let i = 0; i < editorOptions.length; i++) {\n const option = editorOptions[i];\n if (availableOptions.hasOwnProperty(option)) {\n editor.setOption(option as any, this.props[option]);\n } else if (this.props[option]) {\n console.warn(\n `ReaceAce: editor option ${option} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`\n );\n }\n }\n this.handleOptions(this.props, editor);\n\n if (Array.isArray(commands)) {\n commands.forEach(command => {\n if (typeof command.exec === \"string\") {\n (editor.commands as any).bindKey(command.bindKey, command.exec);\n } else {\n (editor.commands as any).addCommand(command);\n }\n });\n }\n\n if (keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n });\n\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n\n if (focus) {\n this.splitEditor.focus();\n }\n\n const sp = this.editor.env.split;\n sp.setOrientation(\n this.props.orientation === \"below\" ? sp.BELOW : sp.BESIDE\n );\n sp.resize(true);\n if (onLoad) {\n onLoad(sp);\n }\n }\n\n public componentDidUpdate(prevProps: ISplitEditorProps) {\n const oldProps = prevProps;\n const nextProps = this.props;\n\n const split = this.editor.env.split;\n\n if (nextProps.splits !== oldProps.splits) {\n split.setSplits(nextProps.splits);\n }\n\n if (nextProps.orientation !== oldProps.orientation) {\n split.setOrientation(\n nextProps.orientation === \"below\" ? split.BELOW : split.BESIDE\n );\n }\n\n split.forEach((editor: IAceEditorClass, index: number) => {\n if (nextProps.mode !== oldProps.mode) {\n editor.getSession().setMode(\"ace/mode/\" + nextProps.mode);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n editor.setKeyboardHandler(\n \"ace/keyboard/\" + nextProps.keyboardHandler\n );\n } else {\n editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n editor.setFontSize(nextProps.fontSize as any);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n editor.renderer.setShowGutter(nextProps.showGutter);\n }\n\n for (let i = 0; i < editorOptions.length; i++) {\n const option = editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n editor.setOption(option as any, nextProps[option]);\n }\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps, editor);\n }\n const nextValue = get(nextProps.value, index, \"\");\n if (editor.getValue() !== nextValue) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n const pos = (editor.session.selection as any).toJSON();\n editor.setValue(nextValue, nextProps.cursorStart);\n (editor.session.selection as any).fromJSON(pos);\n this.silent = false;\n }\n const newAnnotations = get(nextProps.annotations, index, []);\n const oldAnnotations = get(oldProps.annotations, index, []);\n if (!isEqual(newAnnotations, oldAnnotations)) {\n editor.getSession().setAnnotations(newAnnotations);\n }\n\n const newMarkers = get(nextProps.markers, index, []);\n const oldMarkers = get(oldProps.markers, index, []);\n if (!isEqual(newMarkers, oldMarkers) && Array.isArray(newMarkers)) {\n this.handleMarkers(newMarkers, editor);\n }\n });\n\n if (nextProps.className !== oldProps.className) {\n const appliedClasses = this.refEditor.className;\n const appliedClassesArray = appliedClasses.trim().split(\" \");\n const oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(oldClass => {\n const index = appliedClassesArray.indexOf(oldClass);\n appliedClassesArray.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray.join(\" \");\n }\n\n if (nextProps.theme !== oldProps.theme) {\n split.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n\n if (nextProps.focus && !oldProps.focus) {\n this.splitEditor.focus();\n }\n if (\n nextProps.height !== this.props.height ||\n nextProps.width !== this.props.width\n ) {\n this.editor.resize();\n }\n }\n\n public componentWillUnmount() {\n this.editor.destroy();\n this.editor = null;\n }\n\n public onChange(event: any) {\n if (this.props.onChange && !this.silent) {\n const value: any = [];\n this.editor.env.split.forEach((editor: IAceEditorClass) => {\n value.push(editor.getValue());\n });\n this.props.onChange(value, event);\n }\n }\n\n public onSelectionChange(event: any) {\n if (this.props.onSelectionChange) {\n const value: any = [];\n this.editor.env.split.forEach((editor: IAceEditorClass) => {\n value.push(editor.getSelection());\n });\n this.props.onSelectionChange(value, event);\n }\n }\n public onCursorChange(event: any) {\n if (this.props.onCursorChange) {\n const value: any = [];\n this.editor.env.split.forEach((editor: IAceEditorClass) => {\n value.push(editor.getSelection());\n });\n this.props.onCursorChange(value, event);\n }\n }\n public onFocus(event: any) {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }\n\n public onInput(event: any) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n }\n\n public onBlur(event: any) {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n }\n\n public onCopy(text: string) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n }\n\n public onPaste(text: string) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n }\n\n public onScroll() {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n }\n\n public handleOptions(props: ISplitEditorProps, editor: IAceEditorClass) {\n const setOptions = Object.keys(props.setOptions);\n for (let y = 0; y < setOptions.length; y++) {\n editor.setOption(setOptions[y] as any, props.setOptions[setOptions[y]]);\n }\n }\n\n public handleMarkers(markers: IMarker[], editor: IAceEditorClass) {\n // remove foreground markers\n let currentMarkers = editor.getSession().getMarkers(true);\n for (const i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers\n currentMarkers = editor.getSession().getMarkers(false);\n for (const i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(\n ({\n startRow,\n startCol,\n endRow,\n endCol,\n className,\n type,\n inFront = false\n }) => {\n const range = new Range(startRow, startCol, endRow, endCol);\n editor\n .getSession()\n .addMarker(range as any, className, type as any, inFront);\n }\n );\n }\n\n public updateRef(item: HTMLElement) {\n this.refEditor = item;\n }\n\n public render() {\n const { name, width, height, style } = this.props;\n const divStyle = { width, height, ...style };\n return
;\n }\n}\n"],"names":["global","this","window","define","module","deps","payload","arguments","length","modules","payloads","original","apply","console","error","trace","_require","parentId","callback","lookup","undefined","Object","prototype","toString","call","params","i","l","dep","require","push","packagedModule","normalizeModule","moduleName","indexOf","chunks","split","charAt","slice","join","previous","replace","exports","mod","id","uri","packaged","ns","root","exportAce","ace","defineProp","obj","name","val","defineProperty","value","enumerable","writable","configurable","String","startsWith","searchString","position","lastIndexOf","endsWith","subjectString","lastIndex","repeat","count","result","string","includes","str","assign","target","TypeError","output","index","source","keys","forEach","key","values","o","map","k","Array","find","predicate","len","thisArg","kValue","findIndex","item","fill","O","relativeStart","Math","max","min","end","relativeEnd","final","of","deepCopy","copy","isArray","last","a","stringReverse","reverse","stringRepeat","trimBeginRegexp","trimEndRegexp","stringTrimLeft","stringTrimRight","copyObject","copyArray","array","arrayToMap","arr","createMap","props","create","arrayRemove","splice","escapeRegExp","escapeHTML","getMatchOffsets","regExp","matches","offset","deferredCall","fcn","timer","deferred","timeout","cancel","setTimeout","schedule","clearTimeout","isPending","delayedCall","defaultTimeout","_self","delay","supportsLookbehind","RegExp","e","skipEmptyMatch","line","supportsUnicodeFlag","codePointAt","OS","LINUX","MAC","WINDOWS","getOS","isMac","isLinux","_navigator","navigator","os","exec","platform","toLowerCase","ua","userAgent","appName","isWin","isIE","parseFloat","match","isOldIE","isGecko","isMozilla","isOpera","opera","isWebKit","isChrome","isSafari","isEdge","isAIR","isAndroid","isChromeOS","isIOS","test","isMobile","strictCSP","useragent","buildDom","parent","refs","txt","document","createTextNode","appendChild","els","ch","el","createElement","options","childIndex","n","className","style","cssText","setAttribute","getDocumentHead","doc","head","getElementsByTagName","documentElement","tag","createElementNS","removeChildren","element","innerHTML","textContent","ownerDocument","createFragment","createDocumentFragment","hasCssClass","addCssClass","removeCssClass","classes","toggleCssClass","add","setCssClass","node","include","hasCssString","sheets","querySelectorAll","removeElementById","getElementById","remove","cssCache","insertPendingStyles","cache","importCssString","container","getRootNode","insertBefore","firstChild","useStrictCSP","importCssStylsheet","rel","href","scrollbarWidth","inner","width","minWidth","height","display","outer","left","overflow","body","noScrollbar","offsetWidth","withScrollbar","clientWidth","removeChild","computedStyle","getComputedStyle","setStyle","styles","property","HAS_CSS_ANIMATION","HAS_CSS_TRANSFORMS","HI_DPI","devicePixelRatio","div","transform","animationName","translate","tx","ty","round","top","dom","get","url","xhr","XMLHttpRequest","open","onreadystatechange","readyState","responseText","send","loadScript","path","s","src","onload","_","isAbort","qualifyURL","inherits","ctor","superCtor","super_","constructor","mixin","implement","proto","EventEmitter","stopPropagation","propagationStopped","preventDefault","defaultPrevented","_emit","_dispatchEvent","eventName","_eventRegistry","_defaultHandlers","listeners","defaultHandler","type","_signal","once","on","newCallback","off","Promise","resolve","setDefaultHandler","handlers","_disabled_","old","disabled","removeDefaultHandler","pop","addEventListener","capturing","removeListener","removeEventListener","removeAllListeners","reportError","msg","data","Error","defaultEnglishMessages","messages","oop","optionsProvider","setOptions","optList","setOption","getOptions","optionNames","$options","filter","hidden","getOption","opt","warn","forwardTo","handlesSet","set","message","AppConfig","$defaultOptions","defineOptions","initialValue","resetOptions","setDefaultValue","opts","setDefaultValues","optionHash","setMessages","nls","defaultString","translated","isDark","cssClass","$id","lang","net","workerPath","modePath","themePath","basePath","suffix","$moduleUrls","loadWorkerFromBlob","sharedPopups","hasOwnProperty","all","$modes","moduleUrl","component","parts","sep","base","re","setModuleUrl","subst","customLoader","setLoader","cb","dynamicModules","$loading","$loaded","loadModule","moduleId","onLoad","loadedModule","moduleType","load","afterLoad","loader","err","reportErrorIfPathIsNotConfigured","then","default","$require","setModuleLoader","version","config","init","scriptOptions","scriptUrl","currentScript","_currentScript","currentDocument","scripts","script","getAttribute","attributes","j","attr","m","m1","toUpperCase","Range","startRow","startColumn","endRow","endColumn","start","row","column","isEqual","range","contains","compare","compareRange","cmp","comparePoint","p","containsRange","intersects","isEnd","isStart","setStart","setEnd","inside","insideStart","insideEnd","isMultiLine","compareStart","compareEnd","compareInside","clipRows","firstRow","lastRow","fromPoints","extend","isEmpty","clone","collapseRows","toScreenRange","session","screenPosStart","documentToScreenPosition","screenPosEnd","moveBy","comparePoints","p1","p2","Keys","MODIFIER_KEYS","KEY_MODS","FUNCTION_KEYS","PRINTABLE_KEYS","codeToKeyCode","Command","Backspace","Tab","Return","Enter","Pause","Escape","PageUp","PageDown","End","Home","Insert","Delete","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Backquote","Minus","Equal","BracketLeft","Backslash","BracketRight","Semicolon","Quote","Comma","Period","Slash","Space","NumpadAdd","NumpadDecimal","NumpadSubtract","NumpadDivide","NumpadMultiply","chr","fromCharCode","modifiers","Shift","Control","Alt","Meta","$codeToKeyCode","parseInt","enter","escape","esc","del","mods","pow","x","keyCodeToString","keyCode","keyString","activeListenerOptions","pressedKeys","ts","getListenerOptions","createComment","passive","detectListenerOptionsSupport","EventListener","elem","destroy","addListener","destroyer","$toDestroy","getModifierHash","ctrlKey","altKey","shiftKey","metaKey","resetPressedKeys","stopEvent","getButton","button","capture","eventHandler","releaseCaptureHandler","onMouseUp","addMouseWheelListener","deltaX","deltaY","deltaMode","DOM_DELTA_PIXEL","wheelX","wheelY","DOM_DELTA_LINE","DOM_DELTA_PAGE","addMultiMouseDownListener","elements","timeouts","callbackName","startX","startY","clicks","eventNames","onMousedown","detail","isNewClick","abs","clientX","clientY","_clicks","getModifierString","addCommandKeyListener","lastDefaultPrevented","hashId","code","getModifierState","altGr","location","timeStamp","normalizeCommandKeys","postMessage","postMessageId","nextTick","win","messageName","listener","$idleBlocked","onIdle","handler","$idleBlockId","blockIdle","nextFrame","requestAnimationFrame","bind","$cancelT","lineMode","pasteCancelled","Date","now","TextInput","event","clipboard","BROKEN_SETDATA","USE_IE_MIME_TYPE","HAS_FOCUS_ARGS","MAX_LINE_LENGTH","KEYS","MODS","valueResetRegex","parentNode","host","text","opacity","copied","pasted","inComposition","sendingText","tempStyle","fontSize","commandMode","ignoreFocusEvents","lastValue","lastSelectionStart","lastSelectionEnd","lastRestoreEnd","rowStart","Number","MAX_SAFE_INTEGER","rowEnd","MIN_SAFE_INTEGER","numberOfExtraLines","isFocused","activeElement","setNumberOfExtraLines","number","setAriaOptions","activeDescendant","inline","removeAttribute","role","setLabel","selection","cursor","onBlur","hasFocus","onFocus","resetSelection","$focusScroll","focus","renderer","enableKeyboardAccessibility","preventScroll","isTransformed","getBoundingClientRect","ancestors","t","parentElement","nodeType","blur","curOp","commandName","command","isUserAction","docChanged","selectionChanged","onCompositionEnd","positionToSelection","getLine","newValue","selectionEnd","setSelectionRange","afterContextMenu","selectionStart","getRange","lines","prevLine","nextLine","inputHandler","setInputHandler","getInputHandler","sendText","fromInput","onPaste","extendLeft","extendRight","inserted","restoreStart","restoreEnd","endIndex","shouldReset","onTextInput","onInput","onCompositionUpdate","inputType","execCommand","handleClipboardData","forceIEMime","clipboardData","mime","setData","getData","doCopy","isCut","getCopyText","onCut","onCopy","select","onCommandKey","isAllSelected","selectAll","$readOnly","cancelComposition","useTextareaForIME","markerRange","context","compositionStartOffset","closeTimeout","syncComposition","onContextMenuClose","$isMousePressed","$keepTextAreaAtCursor","$moveTextAreaToCursor","onCompositionStart","getSelectionRange","msGetInputContext","getInputContext","getElement","setCommandMode","readOnly","setReadOnly","setCopyWithEmptySelection","onContextMenu","domEvent","moveToMouse","bringToFront","characterWidth","rect","borderTopWidth","borderLeftWidth","maxTop","bottom","clientHeight","move","textInput","scroller","typingResetTimeout","typing","detectArrowKeys","$mouseHandler","isMousePressed","modifier","up","home","option","down","right","shift","commands","findKeyCommand","addIosSelectionHandler","$setUserAgentForTests","_isMobile","_isIOS","DefaultHandlers","mouseHandler","$clickSelection","editor","onMouseDown","onDoubleClick","onTripleClick","onQuadClick","onMouseWheel","extendSelectionBy","ev","inSelection","pos","getDocumentPosition","mousedownEvent","moveToPosition","time","$focusTimeout","inMultiSelectMode","captureMouse","startSelect","setState","waitForClickSelection","screenToTextCoordinates","y","getShiftKey","selectToPosition","anchor","orientedRange","calcRangeOrientation","setSelectionAnchor","scrollCursorIntoView","unitName","cmpStart","cmpEnd","selectByLinesEnd","unsetStyle","focusWait","ax","ay","bx","by","distance","sqrt","getBracketRange","getWordRange","getLineRange","getAccelKey","$lastScroll","vx","vy","allowed","prevScroll","dt","direction","canScroll","isScrollableBy","speed","scrollBy","stop","selectEnd","selectAllEnd","selectByWordsEnd","preventParentScroll","currentTarget","scrollHeight","__extends","extendStatics","d","b","setPrototypeOf","__proto__","__","__values","Symbol","iterator","next","done","CLASSNAME","Tooltip","isOpen","$element","$parentNode","$init","setText","setHtml","html","setPosition","setClassName","setTheme","theme","show","hide","getHeight","offsetHeight","getWidth","popupManager","PopupManager","popups","addPopup","popup","updatePopups","removePopup","e_1","_a","e_2","_b","sort","priority","visiblepopups","_c","_d","shouldDisplay","visiblepopups_1","visiblepopups_1_1","visiblePopup","doPopupsOverlap","e_2_1","return","e_1_1","popupA","popupB","rectA","rectB","HoverTooltip","_super","_this","lastT","idleTime","lastEvent","onMouseOut","onMouseMove","waitForHover","whiteSpace","pointerEvents","tabIndex","addToEditor","getMouseEventTarget","removeFromEditor","isOutsideOfText","$gatherData","docPos","screenPos","pixelToScreenCoordinates","clippedPos","setDataProvider","showForRange","domNode","startingEvent","$registerCloseEvents","addMarker","textToScreenCoordinates","pageX","maxHeight","labelHeight","labelWidth","spaceBelow","innerHeight","pageY","lineHeight","isAbove","innerWidth","marker","$markerSession","removeMarker","$removeCloseEvents","relatedTarget","classList","GutterHandler","tooltipTimeout","mouseEvent","gutter","$gutterLayer","tooltip","GutterTooltip","hideTooltip","moveTooltip","getRegion","selectTo","srcElement","$tooltipFollowsMouse","getLength","screenRow","$pos","documentToScreenRow","showTooltip","gutterRow","getGutterRow","gutterCell","$lines","querySelector","$gutter","windowWidth","windowHeight","singular","plural","warning","info","annotation","annotationsInRow","$annotations","from","fold","getFoldLine","$showFoldedAnnotations","mostSevereAnnotationInFoldType","annotationsInFold","annotationType","summaryFoldedAnnotations","concat","annotationsToSummaryString","annotationMessages","iconClassName","$useSvgGutterIcons","annotationLabels","tooltipContent","annotations","summary","annotationTypes_1","annotationTypes_1_1","label","MouseEvent","$inSelection","documentRow","selectionRange","DragdropHandler","dragImage","dragSelectionMarker","timerId","dragCursor","dragOperation","isInternal","autoScrollStartTime","cursorMovedTime","cursorPointOnCaretMoved","mouseTarget","counter","onDragInterval","prevCursor","vMovement","hMovement","moveCursorToPosition","calcDistance","layerConfig","editorRect","offsets","nearestXOffset","nearestYOffset","scrollCursor","vScroll","hScroll","autoScroll","addDragMarker","toOrientedRange","getSelectionStyle","clearSelection","$cursorLayer","setBlinking","clearInterval","setInterval","clearDragMarker","fromOrientedRange","$resetCursorStyle","onDragStart","cancelDrag","draggable","self","dataTransfer","effectAllowed","getReadOnly","setDragImage","clearData","getTextRange","onDragEnd","dropEffect","setCursorStyle","onDragEnter","canAccept","getDropEffect","onDragOver","onMouseMoveTimer","onDragLeave","onDrop","moveText","dropData","insert","types","some","copyAllowed","copyModifierState","dragWait","getDragDelay","startDrag","dragWaitEnd","dragReadyEnd","cursorStyle","onMouseDrag","state","dragDrop","$dragEnabled","eventTarget","unselectable","addTouchListeners","touchStartT","longTouchTimer","animationTimer","pressed","contextMenu","mode","animationSteps","clickCount","vX","vY","createContextMenu","handleClick","action","selected","hasUndo","getUndoManager","replaceChild","class","updateMenu","readText","writeText","ontouchstart","ontouchend","onclick","showContextMenu","pagePos","leftOffset","scrollLeft","hideContextMenu","handleLongTap","selectWord","touches","h","w","touchObj","setRange","switchToSelectionMode","cursorPos","getPixelPosition","anchorPos","offsetTop","offsetLeft","weightedDistance","diff1","diff2","oldScrollTop","getScrollTop","DefaultGutterHandler","MouseHandler","$dragDelay","$mouseMoved","focusEditor","onMouseEvent","scrollBarV","scrollBarH","Boolean","gutterEl","character","mousemove","$scrollSpeed","mouseMoveHandler","which","releaseMouse","onCaptureEnd","onOperationEnd","onCaptureInterval","$onCaptureMouseMove","endOperation","startOperation","cancelContextMenu","scrollSpeed","dragDelay","dragEnabled","focusTimeout","tooltipFollowsMouse","FoldHandler","getFoldAt","removeFold","expandFold","getUseWrapMode","foldWidgets","onFoldWidgetClick","getParentFoldRangeData","firstRange","addFold","keyUtil","KeyBinding","$editor","$data","$handlers","kb","removeKeyboardHandler","$defaultHandler","addKeyboardHandler","setKeyboardHandler","handleKeyboard","attach","detach","getKeyboardHandler","getStatusText","$callKeyboardHandlers","toExecute","success","args","dir","hiLevel","lastArabic","hasUBAT_B","hasUBAT_S","impTab_LTR","impTab_RTL","L","R","EN","AN","ON","B","S","AL","WS","CS","ES","ET","NSM","LRE","RLE","PDF","LRO","RLO","BN","UnicodeTBL00","UnicodeTBL20","_invertLevel","lev","levels","_array","lo","hi","tmp","_getCharClass","chars","ix","wType","nType","cType","c","rtlCandidate","_getCharacterType","uc","charCodeAt","ON_R","R_H","DOT","doBidiReorder","textCharTypes","isRtl","logicalFromVisual","bidiLevels","charTypes","impTab","prevState","newClass","newLevel","newState","condPos","_computeLevels","hasBidiCharacters","ret","getVisualFromLogicalIdx","logIdx","rowMap","bidiUtil","bidiRE","BidiHandler","bidiMap","currentRow","charWidths","EOL","showInvisibles","isRtlDir","$isRtl","wrapIndent","EOF","contentWidth","fontMetrics","rtlLineOffset","wrapOffset","isMoveLeftOperation","seenBidi","getValue","isBidiRow","docRow","splitIndex","updateRowLine","updateBidiMap","onChange","delta","getDocumentRow","rowCache","$screenRowCache","$getRowCacheIndex","$docRowCache","getSplitIndex","currentIndex","prevIndex","endOfLine","$useWrapMode","splits","$wrapData","indent","substring","size","isFullWidth","getScreenTabSize","$main","substr","markAsDirty","updateCharacterWidths","$characterSize","bidiCharWidth","$measureCharWidth","setShowInvisibles","setEolChar","eolChar","setContentWidth","isRtlLine","setRtlDirection","getCursorPosition","getSelectionAnchor","$bidiHandler","removeInLine","getPosLeft","col","leftBoundary","logicalIdx","getOverwrite","visualIdx","getSelections","startCol","endCol","level","selections","selColMin","selColMax","isSelected","isSelectedPrev","visIdx","offsetToCol","posX","charWidth","Selection","getDocument","lead","createAnchor","$silent","$cursorChanged","$isEmpty","$keepDesiredColumnOnChange","$desiredColumn","$anchorChanged","getCursor","getPosition","setAnchor","getAnchor","getSelectionLead","isBackwards","$setSelection","MAX_VALUE","anchorRow","anchorColumn","cursorRow","cursorColumn","wasEmpty","wasMultiselect","$moveSelection","mover","moveCursorTo","moveTo","selectUp","moveCursorUp","selectDown","moveCursorDown","selectRight","moveCursorRight","selectLeft","moveCursorLeft","selectLineStart","moveCursorLineStart","selectLineEnd","moveCursorLineEnd","selectFileEnd","moveCursorFileEnd","selectFileStart","moveCursorFileStart","selectWordRight","moveCursorWordRight","selectWordLeft","moveCursorWordLeft","selectAWord","getAWordRange","excludeLastChar","foldLine","selectLine","moveCursorBy","wouldMoveIntoSoftTab","tabSize","isTabStop","getTabSize","getNavigateWithinSoftTabs","firstColumnPosition","screenToDocumentPosition","leadingSpace","getDisplayLine","$useEmacsStyleLineStart","lineEnd","getDocumentLastRowColumnPosition","textEnd","search","moveCursorLongWordRight","rightOfCursor","nonTokenRe","tokenRe","moveCursorLongWordLeft","getFoldStringAt","leftOfCursor","$shortWordEndIndex","whitespaceRe","moveCursorShortWordRight","moveCursorShortWordLeft","$selectLongWords","rows","offsetX","lineWidgets","widget","rowsAbove","rowCount","keepDesiredColumn","moveCursorToScreen","desiredColumn","r","getRangeOfMovements","func","toJSON","rangeCount","ranges","r1","fromJSON","rangeList","toSingleRange","addRange","MAX_TOKEN_COUNT","Tokenizer","rules","splitRegex","states","regExps","matchMappings","ruleRegExps","matchTotal","mapping","defaultToken","flag","splitterRurles","rule","caseInsensitive","unicode","regex","adjustedregex","matchcount","token","groupCount","tokenArray","onMatch","$arrayTokens","$applyToken","digit","removeCapturingGroups","createSplitterRegexp","$setMaxTokenCount","tokens","stack","inChClass","lastCapture","parenOpen","parenClose","square","getLineTokens","startState","currentState","matchAttempts","skipped","consumeLineEnd","merge","unshift","TextHighlightRules","addRules","prefix","nextState","$rules","getRules","embedRules","HighlightRules","escapeRules","append","$embeds","getEmbeds","pushState","popState","normalizeRules","processState","toInsert","stateName","includeName","noEscape","keywordMap","createKeywordMapper","ignoreCase","splitChar","keywords","$keywordList","list","word","getKeywords","$keywords","Behaviour","$behaviours","addBehaviours","behaviours","inherit","getBehaviours","TokenIterator","initialRow","initialColumn","$session","$row","$rowTokens","getTokens","getTokenAt","$tokenIndex","stepBackward","stepForward","getCurrentToken","getCurrentTokenRow","getCurrentTokenColumn","rowTokens","tokenIndex","getCurrentTokenPosition","getCurrentTokenRange","CstyleBehaviour","SAFE_INSERT_IN_TOKENS","SAFE_INSERT_BEFORE_TOKENS","contextCache","defaultQuotes","initContext","multiSelect","autoInsertedBrackets","autoInsertedRow","autoInsertedLineEnd","maybeInsertedBrackets","maybeInsertedRow","maybeInsertedLineStart","maybeInsertedLineEnd","getWrapped","opening","closing","rowDiff","getWrapBehavioursEnabled","recordAutoInsert","isSaneInsertion","braces","recordMaybeInsert","$findOpeningBracket","isAutoInsertedClosing","popAutoInsertedClosing","isMaybeInsertedClosing","clearMaybeInsertedClosing","openBracePos","findMatchingBracket","next_indent","$getIndent","getTabString","quotes","$mode","$quotes","lineCommentStart","quote","leftChar","rightChar","rightToken","pair","stringBefore","stringAfter","wordRe","isWordBefore","isWordAfter","pairQuotesAfter","$pairQuotesAfter","charBefore","closeDocComment","$matchTokenType","iterator2","bracket","wordChars","Mode","$defaultBehaviour","getTokenizer","$tokenizer","$highlightRules","$highlightRuleConfig","blockComment","toggleCommentLines","ignoreBlankLines","shouldRemove","minIndent","Infinity","insertAtTabStop","regexpStart","getUseSoftTabs","uncomment","shouldInsertSpace","commentWithSpace","comment","insertInLine","testRemove","before","after","spaces","lineCommentEnd","regexpEnd","iter","fun","minEmptyLength","floor","toggleBlockComment","colDiff","initialRange","startRange","endRange","getNextLineIndent","tab","checkOutdent","input","autoOutdent","createWorker","createModeDelegates","delegations","_loop_1","scope","functionName","$delegator","this_1","method","language","transformAction","param","$behaviour","completionKeywords","ruleItr","aLength","$createKeywordList","getCompletions","score","meta","applyDelta","docLines","doNotValidate","Anchor","$onChange","$clipPositionToDocument","point","moveIfEqual","deltaIsInsert","deltaRowShift","deltaColShift","deltaStart","deltaEnd","$pointsInOrder","$getTransformedPoint","$insertRight","noClip","point1","point2","equalPointsInOrder","bColIsAfter","Document","textOrLines","insertMergedLines","setValue","getAllLines","getNewLineCharacter","$detectNewLine","$autoNewLine","$newLineMode","setNewLineMode","newLineMode","getNewLineMode","isNewLine","getLines","getLinesForRange","insertLines","insertFullLines","removeLines","removeFullLines","insertNewLine","$split","clonePos","$clipPosition","deleteFirstNewLine","deleteLastNewLine","deletedLines","removeNewLine","applyDeltas","deltas","revertDeltas","revertDelta","isInsert","$splitAndapplyLargeDelta","$safeApplyDelta","docLength","MAX","to","chunk","indexToPosition","newlineLength","positionToIndex","BackgroundTokenizer","tokenizer","running","currentLine","$worker","workerStart","endLine","startLine","processedLines","$tokenizeRow","fireUpdateEvent","setTokenizer","setDocument","first","scheduleStart","$updateOnChange","getState","cleanup","SearchHighlight","clazz","setRegexp","update","markerLayer","renderedMarkerRanges","MAX_RANGES","rangeToAddMarkerTo","rangeAsString","drawSingleLineMarker","UndoManager","$keepRedoStack","$maxRev","$fromUndo","$undoDepth","reset","addSession","allowMerge","$lastDelta","$redoStack","lastDeltas","undoStackLength","$undoStack","$rev","addSelection","rev","startNewGroup","markIgnored","ignore","getSelection","getRevision","getDeltas","getChangedRanges","getChangedLines","undo","dontSelect","deltaSet","swapped","swapGroups","rearrangeUndoStack","$redoStackBaseRev","undoSelectionRange","undoChanges","$syncRev","redo","diff","redoStack","deltaSets","moveDeltasByOne","rebaseRedoStack","redoSelectionRange","redoChanges","nextDelta","mark","canUndo","canRedo","bookmark","isAtBookmark","json","$prettyPrint","stringifyDelta","hasRedo","isClean","markClean","stringifyRange","swap","d1","d2","i1","i2","ds1","ds2","selectionBefore","selectionAfter","xform","c1","splitDelta","shiftPos","rowsBefore","otherLines","cloneDelta","xformed","FoldLine","foldData","folds","setFoldLine","shiftRow","sameRow","containsRow","walk","lastEnd","isNewRow","placeholder","getNextFoldTo","kind","addRemoveChars","log","foldBefore","newFoldLine","foldLineNext","idxToPosition","idx","lastFoldEndColumn","RangeList","$bias","pointIndex","excludeEdges","startIndex","addList","removed","substractPoint","containsPoint","rangeAtPoint","clipped","removeAll","lineDif","Fold","subFolds","subFold","collapseChildren","addSubFold","consumePoint","afterStart","firstConsumed","consumedFolds","restoreRange","restorePoint","Folding","side","getFoldsInRange","foldLines","$foldData","foundFolds","getFoldsInRangeList","getAllFolds","trim","lastFold","startFoldLine","getNextFoldLine","getFoldedRowCount","$addFoldLine","added","$clipRangeToDocument","startFold","endFold","removeFolds","$updateWrapData","$updateRowLengthCache","$modified","addFolds","$updating","cloneFolds","foldAll","expandFolds","unfold","expandInner","outermostFolds","isRowFolded","startFoldRow","getRowFoldEnd","getRowFoldStart","getFoldDisplayLine","textLine","lastColumn","$cloneFoldData","fd","toggleFold","tryToUnfold","bracketPos","getCommentFoldRange","depth","getFoldWidget","getFoldWidgetRange","foldToLevel","foldAllComments","$foldStyles","$foldStyle","setFoldStyle","$foldMode","$setFolding","foldMode","$updateFoldWidgets","$tokenizerUpdateFoldWidgets","updateFoldWidgets","tokenizerUpdateFoldWidgets","ignoreCurrent","fw","children","siblings","$toggleFoldWidget","toggleFoldWidget","toggleParent","BracketMatch","charBeforeCursor","$findClosingBracket","getMatchingBracketRanges","bracketsRegExp","$brackets","typeRe","openBracket","valueIndex","closingBracket","valueLength","getMatchingTags","$findTagName","$findClosingTag","$findOpeningTag","found","backward","prevToken","currentTag","openTagStart","openTagName","foundOpenTagEnd","openTagEnd","closeTagStart","closeTagName","closeTagEnd","openTag","closeTag","stepCount","tmpToken","TextMode","EditSession","$breakpoints","$decorations","$frontMarkers","$backMarkers","$markerId","$undoSelect","$uid","bgTokenizer","onChangeFold","setMode","destroyed","resetCaches","$resetRowCache","cacheArray","low","mid","$rowLengthCache","removedFolds","$updateInternalDataOnChange","$undoManager","mergeUndoDeltas","$informUndoManager","setUndoManager","JSON","parse","undoManager","history","editSession","setAnnotations","setBreakpoints","breakpoints","setScrollLeft","setScrollTop","scrollTop","$scrollLeft","$scrollTop","$syncInformUndoManager","markUndoGroup","$defaultUndoManager","setUseSoftTabs","$useSoftTabs","$indentWithTabs","setTabSize","$tabSize","setNavigateWithinSoftTabs","navigateWithinSoftTabs","$navigateWithinSoftTabs","setOverwrite","overwrite","$overwrite","toggleOverwrite","addGutterDecoration","removeGutterDecoration","getBreakpoints","clearBreakpoints","setBreakpoint","clearBreakpoint","inFront","addDynamicMarker","markerId","getMarkers","highlight","$searchHighlight","highlightLines","getAnnotations","clearAnnotations","inToken","wordRange","setUseWorker","useWorker","getUseWorker","$useWorker","onReloadTokenizer","$onChangeMode","$modeId","$isPlaceholder","oldMode","$stopWorker","$startWorker","attachToSession","wrapMethod","$wrapMethod","foldingRules","terminate","getMode","isNaN","getScrollLeft","getScreenWidth","$computeWidth","getLineWidgetMaxWidth","screenWidth","lineWidgetsWidth","lineWidgetWidth","force","$wrapLimit","longestScreenLine","foldIndex","foldStart","$getStringScreenWidth","$getUndoSelection","setUndoSelect","enable","isUndo","fromRange","toPosition","toRange","collDiff","oldStart","newStart","indentRows","indentString","outdentRows","rowRange","deleteRange","$moveLines","$clipRowToDocument","moveLinesUp","moveLinesDown","duplicateLines","$clipColumnToRow","setUseWrapMode","useWrapMode","setWrapLimitRange","$wrapLimitRange","adjustWrapLimit","desiredLimit","$printMargin","limits","wrapLimit","$constrainWrapLimit","getWrapLimit","setWrapLimit","limit","getWrapLimitRange","foldLineBefore","wrapData","walkTokens","$getDisplayTokens","PLACEHOLDER_START","PLACEHOLDER_BODY","$computeWrapSplits","displayLength","lastSplit","lastDocSplit","isCode","$wrapAsCode","indentedSoftWrap","$indentedSoftWrap","maxIndent","addSplit","indentation","SPACE","TAB","TAB_SPACE","getWrapIndent","minSplit","PUNCTUATION","CHAR_EXT","CHAR","maxScreenColumn","screenColumn","getRowLength","getRowLineCount","getRowWrapIndent","getScreenLastRowColumn","documentToScreenColumn","getDocumentLastRowColumn","docColumn","getRowSplitData","screenToDocumentRow","screenToDocumentColumn","rowLength","doCache","maxRow","foldStartRow","wrapRow","screenRowOffset","getScreenLength","screenRows","$getWidgetScreenLength","$setFontMetrics","fm","$enableVarChar","getCharacterWidth","getPrecedingCharacter","wrap","$wrap","firstLineNumber","useSoftTabs","foldStyle","Search","$matchIterator","sr","sc","er","ec","skipCurrent","findAll","needle","$assembleRegExp","$isMultiLine","prevRange","replacement","preserveCase","$disableFakeMultiline","caseSensitive","$supportsUnicodeFlag","wholeWord","wordBoundary","firstChar","needleArray","lastChar","addWordBoundary","$assembleMultilineRegExp","backwards","forEachInLine","MultiHashHandler","$singleCommand","commandKeyBinding","addCommands","addCommand","removeCommand","bindKey","_buildKeyHash","keepCommand","ckb","keyId","cmdGroup","keyPart","chain","binding","parseKeys","_addCommandToBinding","removeCommands","bindKeys","keyList","$keyChain","isDefault","HashHandler","CommandManager","byName","$checkCommandState","isAvailable","returnValue","toggleRecording","$inReplay","recording","macro","$addCommandToMacro","oldMacro","replay","trimMacro","mac","description","showSettingsMenu","showErrorMarker","scrollIntoView","centerSelection","gotoLine","prompt","$type","multiSelectAction","getAllRanges","findNext","findPrevious","aceCommandGroup","navigateFileStart","navigateUp","times","navigateFileEnd","navigateDown","navigateWordLeft","navigateLineStart","navigateLeft","navigateWordRight","navigateLineEnd","navigateRight","selectPageDown","scrollPageDown","gotoPageDown","selectPageUp","scrollPageUp","gotoPageUp","jumpToMatching","passEvent","$copyWithEmptySelection","$handlePaste","duplicateSelection","sortLines","modifyNumber","copyLinesUp","copyLinesDown","removeToLineStart","removeToLineEnd","removeWordLeft","removeWordRight","blockOutdent","blockIndent","splitLine","transposeLetters","transposeSelections","autoIndent","openLink","firstLineEndCol","selectedCount","insertLine","curLine","newRanges","exitMultiSelectMode","LineWidgets","widgetManager","updateOnChange","renderWidgets","measureWidgets","_changedWidgets","$onChangeEditor","updateOnFold","_inDocument","removeLineWidget","$updateRows","noWidgets","$oldWidget","$registerLineWidget","addLineWidget","zIndex","coverGutter","pixelHeight","$fold","onWidgetChanged","w1","getWidgetsAtRow","updateFull","changedWidgets","fixedWidth","ceil","coverLine","gutterWidth","fullWidth","padding","scrollBar","GutterKeyboardHandler","gutterLayer","activeRowIndex","activeLane","annotationTooltip","$onGutterKeyDown","$blurGutter","isRowVisible","scrollToLine","$rowToRowIndex","$cursorCell","nearestFoldIndex","$findNearestFoldWidget","nearestAnnotationIndex","$findNearestAnnotation","$focusAnnotation","$focusFoldWidget","$handleGutterKeyboardInteraction","GutterKeyboardEvent","lane","$switchLane","$rowIndexToRow","rowFoldingWidget","$blurFoldWidget","cells","childNodes","$moveFoldWidgetDown","$moveAnnotationDown","$moveFoldWidgetUp","$moveAnnotationUp","$blurAnnotation","$isFoldWidgetVisible","isRowFullyVisible","isIconVisible","$getFoldWidget","$isAnnotationVisible","$getAnnotation","foldWidget","keyboardFocusClassName","desinationLane","annotationIndex","foldWidgetIndex","cell","gutterKeyboardHandler","getKey","getRow","isInAnnotationLane","isInFoldLane","defaultCommands","Editor","getContainerElement","getTextAreaContainer","textarea","keyBinding","$search","$historyTracker","$initOperationListeners","_$emitInputEvent","setSession","$opResetTimer","$lastSel","commandEvent","prevOp","previousCommand","scrollSelectionIntoView","animateScrolling","sel","$mergeUndoDeltas","prev","mergeableCommands","$mergeableCommands","shouldMerge","mergeNextCommand","sequenceStartTime","keyboardHandler","$keybindingId","oldSession","$onDocumentChange","$onTokenizerUpdate","$onChangeTabSize","$onChangeWrapLimit","$onChangeWrapMode","$onChangeFold","$onChangeFrontMarker","$onChangeBackMarker","$onChangeBreakpoint","$onChangeAnnotation","$onCursorChange","$onScrollTopChange","$onScrollLeftChange","$onSelectionChange","onDocumentChange","onChangeMode","onTokenizerUpdate","onChangeTabSize","onChangeWrapLimit","onChangeWrapMode","onChangeFrontMarker","onChangeBackMarker","onChangeBreakpoint","onChangeAnnotation","onCursorChange","onScrollTopChange","onScrollLeftChange","onSelectionChange","oldEditor","getSession","resize","onResize","getTheme","getFontSize","setFontSize","$highlightBrackets","$highlightPending","$bracketHighlight","markerIds","$getDirectionForHighlight","tagNamesRanges","getMatching","markerType","getHighlightIndentGuides","$textLayer","$highlightIndentGuide","$isFocused","showCursor","visualizeFocus","hideCursor","visualizeBlur","$cursorChange","updateCursor","$updateHighlightActiveLine","updateLines","scrollToY","scrollToX","$highlightActiveLine","$selectionStyle","$selectionColorConflict","$maxLines","$minLines","$highlightLineMarker","$selectionMarker","$highlightSelectedWord","$getSelectionHighLightRegexp","wordWithBoundary","updateFrontMarkers","updateBackMarkers","updateBreakpoints","updateText","getSelectedText","nl","copyLine","inVirtualSelectionMode","isFullLine","getBehavioursEnabled","lineState","shouldOutdent","$enableAutoIndent","lineIndent","prevLineState","currIndent","composition","applyComposition","forEachSelection","setScrollSpeed","getScrollSpeed","setDragDelay","setSelectionStyle","setHighlightActiveLine","shouldHighlight","getHighlightActiveLine","setHighlightGutterLine","getHighlightGutterLine","setHighlightSelectedWord","getHighlightSelectedWord","setAnimatedScroll","shouldAnimate","getAnimatedScroll","getShowInvisibles","setDisplayIndentGuides","getDisplayIndentGuides","setHighlightIndentGuides","setShowPrintMargin","showPrintMargin","getShowPrintMargin","setPrintMarginColumn","getPrintMarginColumn","setBehavioursEnabled","enabled","setWrapBehavioursEnabled","setShowFoldWidgets","getShowFoldWidgets","setFadeFoldWidgets","fade","getFadeFoldWidgets","new_range","setGhostText","removeGhostText","originalRange","$getSelectedRows","getNumberAt","_numberRx","amount","charRange","isFinite","nr","fp","decimals","nnr","toFixed","replaceRange","toggleWord","currWordStart","wordParts","curLength","itLength","that","reg","wordPairs","$toggleWordPairs","negate","firstCondition","res","findLinkAt","columnPosition","previousPosition","currentPosition","wordParts_1","wordParts_1_1","endPoint","moved","totalDiff","rangeIndex","subRows","compositionState","showComposition","setCompositionText","hideComposition","getFirstVisibleRow","getLastVisibleRow","getFirstFullyVisibleRow","getLastFullyVisibleRow","$getVisibleRowCount","getScrollBottomRow","getScrollTopRow","$moveByPage","scrollToRow","center","animate","alignCursor","getCursorPositionScreen","expand","tokenCount","matchType","bracketType","brackets","tagsRanges","lineNumber","navigateTo","replaced","$tryReplace","replaceAll","getLastSearchOptions","newRange","revealRange","setAutoScrollEditorIntoView","shouldScroll","$scrollAnchor","scrollAnchor","onChangeSelection","onBeforeRender","onAfterRender","searchBox","$pixelPos","$cursorStyle","cursorLayer","setSmoothBlinking","isBlinking","selectionStyle","highlightActiveLine","highlightSelectedWord","copyWithEmptySelection","behavioursEnabled","wrapBehavioursEnabled","enableAutoIndent","autoScrollEditorIntoView","showLineNumbers","setShowLineNumbers","$loop","CHANGE_GUTTER","$relativeLineNumbers","relativeNumberRenderer","relativeLineNumbers","$showLineNumbers","$updatePlaceholder","hasValue","$composition","placeholderNode","$placeholder","content","blurCommand","focusOnEnterKeyup","customScrollbar","hScrollBarAlwaysVisible","vScrollBarAlwaysVisible","highlightGutterLine","animatedScroll","printMarginColumn","printMargin","fadeFoldWidgets","showFoldWidgets","displayIndentGuides","highlightIndentGuides","showGutter","fontFamily","maxLines","minLines","scrollPastEnd","fixedWidthGutter","hasCssTransforms","maxPixelHeight","useResizeObserver","useSvgGutterIcons","showFoldedAnnotations","getText","lastLineNumber","$renderer","Lines","canvasHeight","cellCache","$offsetCoefficient","moveContainer","firstRowScreen","pageChanged","oldConfig","newConfig","computeLineTop","screenTop","screenPage","computeLineHeight","$cacheCell","fragment","insertAdjacentElement","createCell","initElement","Gutter","parentEl","$showFoldWidgets","$updateAnnotations","rowInfo","annoText","annoType","gutterOffset","oldLastRow","$updateCursorRow","onCreateCell","$renderCell","$updateGutterWidth","gutterRenderer","$firstLineNumber","lastLineText","$fixedWidth","$padding","$computePadding","$highlightGutterLine","$cursorRow","updateLineHighlight","scrollLines","$renderLines","textNode","annotationNode","annotationIconNode","decorations","rowText","foldClass","isClosedFold","foldAnnotationClass","annotationInFold","foldRange","ariaLabel","getShowLineNumbers","paddingLeft","borderRightWidth","paddingRight","Marker","setPadding","setMarkers","markers","elt","css","$getTop","drawFullLineMarker","drawScreenLineMarker","drawTextMarker","drawMultiLineMarker","childElementCount","lastChild","stringBuilder","extraStyle","curr","lineRange","range1","drawBidiSingleLineMarker","radiusClass","extraLength","textTokens","Set","isTextToken","tokenType","has","Text","$updateEolChar","EOL_CHAR","EOL_CHAR_LF","EOL_CHAR_CRLF","margin","getLineHeight","$fontMetrics","measure","$pollSizeChanges","checkForSizeChanges","$pollSizeChangesTimer","$computeTabString","showSpaces","showTabs","showEOL","$highlightIndentGuides","tabStr","$tabStrings","span","TAB_CHAR","$indentGuideRe","spaceClass","spaceContent","SPACE_CHAR","tabClass","tabContent","lineElements","lineElementsIdx","heightChanged","lineElement","$renderLine","$renderLinesFragment","lineEl","$useLineGroups","$renderToken","valueFragment","simpleSpace","controlCharacter","cjkSpace","cjk","cloneNode","renderIndentGuide","cols","$highlightIndentGuideMarker","indentLevel","initialIndent","elementIndentLevel","currentIndent","$renderHighlightIndentGuide","$clearActiveIndentGuide","$setIndentGuideActive","$createLineElement","$renderWrappedLine","splitChars","$renderOverflowMessage","$renderSimpleLine","overflowEl","$getFoldLineTokens","lastLineEl","invisibleEl","EOF_CHAR","renderTokens","addTokens","Cursor","isVisible","blinkInterval","smoothBlinking","cursors","addCursor","$updateCursors","$updateOpacity","$startCssAnimation","animationDuration","$isAnimating","$stopCssAnimation","blinking","restartTimer","setBlinkInterval","removeCursor","intervalId","timeoutId","$isSmoothBlinking","blink","onScreen","isCursorInView","pixelPos","$selectionMarkers","cursorIndex","drawCursor","$setOverwrite","MAX_SCROLL_H","Scrollbar","classSuffix","setVisible","skipEvent","onScroll","coeff","VScrollBar","$scrollbarWidth","$minWidth","setHeight","setScrollHeight","setInnerHeight","HScrollBar","setWidth","setInnerWidth","setScrollWidth","ScrollBar","ScrollBarV","ScrollBarH","VScrollWidth","HScrollHeight","eType","mousePageY","startTop","thumbTop","scrollTopFromThumbTop","thumbHeight","pageHeight","viewHeight","slideHeight","scrollWidth","mousePageX","startLeft","thumbLeft","scrollLeftFromThumbLeft","thumbWidth","pageWidth","viewWidth","slideWidth","RenderLoop","onRender","pending","changes","$recursionLimit","_flush","change","clear","CHAR_COUNT","USE_OBSERVER","ResizeObserver","FontMetrics","$setMeasureNodeStyles","$measureNode","$addObserver","isRoot","visibility","font","$measureSizes","fontWeight","boldSize","charSizes","allowBoldFonts","$observer","observe","setPolling","disconnect","$getZoom","$initTransformMeasureNodes","transformCoordinates","clientPos","elPos","mul","solve","l1","l2","det","sub","m2","ut","u","f","Decorator","canvas","pixelRatio","heightRatio","canvasWidth","minDecorationHeight","halfMinDecorationHeight","colors","dark","light","$updateDecorators","ctx","getContext","clearRect","priorities","compensateFold","compensateFoldRows","currentY","y1","y2","yCenter","fillStyle","fillRect","GutterLayer","MarkerLayer","TextLayer","CursorLayer","HScrollBarCustom","VScrollBarCustom","editorCss","VirtualRenderer","onGutterResize","$markerBack","textLayer","$markerFront","$horizScroll","$vScroll","$scrollAnimation","scrollMargin","updateCharacterSize","$size","scrollerHeight","scrollerWidth","$dirty","minHeight","v","$renderChanges","defaultView","CHANGE_FULL","$addResizeObserver","$allowBoldFonts","$updatePrintMargin","onChangeNewLineMode","$changedLines","CHANGE_LINES","CHANGE_TEXT","CHANGE_MARKER","updateFontSize","$updateSizeAsync","resizing","$updateCachedSize","$resizeTimer","$changes","$customScrollbar","$updateCustomScrollbar","$extraHeight","oldSize","CHANGE_SIZE","CHANGE_SCROLL","$showGutter","$computeLayerConfig","availableWidth","$showPrintMargin","$printMarginColumn","$animatedScroll","getShowGutter","setShowGutter","$printMarginEl","containerEl","posTop","posLeft","setScrollMargin","sm","setMargin","getHScrollBarAlwaysVisible","$hScrollBarAlwaysVisible","setHScrollBarAlwaysVisible","alwaysVisible","getVScrollBarAlwaysVisible","$vScrollBarAlwaysVisible","setVScrollBarAlwaysVisible","$updateScrollBarV","$scrollPastEnd","$updateScrollBarH","freeze","$frozen","unfreeze","CHANGE_H_SCROLL","st","$scrollDecorator","$updateLines","CHANGE_CURSOR","CHANGE_MARKER_FRONT","CHANGE_MARKER_BACK","$autosize","desiredHeight","$maxPixelHeight","$gutterWidth","hideScrollbars","longestLine","$getLongestLine","horizScroll","hScrollChanged","vScrollBefore","vScrollChanged","firstRowHeight","lineCount","charCount","_rows","$viewMargin","newLeft","newTop","topMargin","bottomMargin","$stopAnimation","currentTop","currentLeft","twoCharsWidth","alignment","$calcSteps","fromValue","toValue","x_min","STEPS","steps","initialScroll","oldSteps","$timer","endAnimation","scrollTo","canvasPos","$hasCssTransforms","$blockCursor","$useTextareaForIME","addToken","removeExtraToken","insertPosition","textChunks","$calculateWrappedTextChunks","$ghostText","divs","wrapped","$ghostTextWidget","pixelPosition","ghostTextHeight","textLines","displayTokens","wrapSplits","textSlice","newToken","$themeId","$theme","setMouseCursor","attachToShadowRoot","$resizeObserver","contentRect","workerUrl","Worker","blob","Blob","blobBuilder","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","getBlob","$workerBlob","blobURL","URL","webkitURL","createObjectURL","WorkerClient","worker","$createWorkerFromOldConfig","$sendDeltaQueue","changeListener","onMessage","callbackId","callbacks","onmessage","topLevelNamespaces","classname","importScripts","nameToUrl","toUrl","normalizePath","$normalizePath","tlns","deltaQueue","onerror","$doc","cmd","emit","ex","attachToDocument","q","UIWorkerClient","main","emitSync","sender","messageBuffer","workerClient","processNext","setEmitSync","Main","PlaceHolder","others","mainClass","othersClass","$onUpdate","onUpdate","$others","undoStack","$undoStackDepth","setup","other","showOtherMarkers","othersActive","hideOtherMarkers","updateAnchors","lengthDiff","inMainRange","distanceFromStart","newPos","otherPos","updateMarkers","updateMarker","undosRequired","isSamePoint","alt","ctrl","accel","selectionMode","isMultiSelect","mouseX","mouseY","screenAnchor","screenCursor","$enableJumpToDef","$blockSelectEnabled","addSelectionMarker","oldRange","removeSelectionMarker","tmpSel","rectSel","blockSelect","newCursor","removeSelectionMarkers","rectangularRangeBlock","updateSelectionMarkers","onSelectionInterval","selectMoreLines","selectMore","joinSelections","splitIntoLines","alignCursors","multiSelectCommands","getSelectionMarkers","$blockChangeEvents","$onAddRange","$onRemoveRange","mergeOverlappingRanges","lastRange","$initRangeList","toggleBlockSelection","includeEmptyLines","xBackwards","startOffsetX","endOffsetX","docEnd","yBackwards","MultiSelect","$multiselectOnSessionChange","$onMultiSelect","$onSingleSelect","onSessionChange","$checkMultiselectChange","altCursor","altDown","addAltCursorListeners","selectionMarkerCount","markerList","$onMultiSelectExec","inVirtualMode","keepOrder","$byLines","cmdResult","anim","buf","additive","skip","screenLead","toRemove","tmp_1","words","stopAtFirst","sameRowRanges","maxCol","minSpace","spaceOffsets","spaceOffset","fr","lr","guessRange","$reAlignText","forceLeft","startW","textW","endW","isLeftAligned","isRightAligned","alignLeft","enableMultiselect","enableBlockSelect","FoldMode","foldingStartMarker","foldingStopMarker","indentationBlock","startLevel","openingBracketBlock","closingBracketBlock","oldWidget","gutterAnno","comparator","binarySearch","matched","findAnnotations","arrow","onmousedown","Renderer","edit","_id","env","tagName","oldNode","createEditSession","VARIABLES","CURRENT_WORD","SELECTION","CURRENT_LINE","PREV_LINE","LINE_INDEX","LINE_NUMBER","SOFT_TABS","TAB_SIZE","CLIPBOARD","FILENAME","FILEPATH","FILENAME_BASE","DIRECTORY","WORKSPACE_NAME","FULLNAME","BLOCK_COMMENT_START","BLOCK_COMMENT_END","LINE_COMMENT","CURRENT_YEAR","date","year","CURRENT_YEAR_SHORT","CURRENT_MONTH","month","CURRENT_MONTH_NAME","CURRENT_MONTH_NAME_SHORT","CURRENT_DATE","day","CURRENT_DAY_NAME","weekday","CURRENT_DAY_NAME_SHORT","CURRENT_HOUR","hour","hour12","CURRENT_MINUTE","minute","CURRENT_SECOND","second","dateFormat","toLocaleString","SELECTED_TEXT","SnippetManager","snippetMap","snippetNameMap","variables","createTokenizer","TabstopToken","tabstopId","formatMatcher","fmtString","guard","snippetVar","choices","operator","formatString","expectElse","ifEnd","elseEnd","changeCase","local","formatStringVar","formatFunction","tokenizeTmSnippet","getVariableValue","tmStrFormat","fmt","fmtTokens","formatted","oldArgs","fmtParts","resolveVariables","gChangeCase","tmFormatFunction","snippet","afterNewLine","gotoNext","getDisplayTextForSnippet","snippetText","processSnippetText","insertSnippetForSelection","processedSnippet","tabstopManager","TabstopManager","selectionId","addTabstops","tabstops","insertSnippet","tabNext","$getScope","inlinePhp","getActiveScopes","scopes","includeScopes","expandWithTab","expandSnippetForSelection","snippets","findMatchingSnippet","dryRun","replaceBefore","replaceAfter","M__","matchBefore","T__","matchAfter","snippetList","startRe","endRe","triggerRe","endTriggerRe","register","wrapRegexp","guardedRegexp","addSnippet","unregister","tabTrigger","trigger","endTrigger","endGuard","removeSnippet","nameMap","parseSnippetFile","guardRe","getSnippetByName","tabString","excludeExtraIndent","parents","expanding","copyValue","$onChangeSelection","$onChangeSession","onChangeSession","$onAfterExec","onAfterExec","$openTabstops","selectedTabstop","removeTabstopMarkers","isRemove","active","parentActive","removeRange","$inChange","updateLinkedFields","hasLinkedRanges","firstNonLinked","linked","snippetManager","containsLead","containsAnchor","selectTabstop","updateTabstopMarkers","addTabstopMarkers","useLink","moveRelative","arg","snippetId","dest","movePoint","tabstop","currentSnippetId","expandSnippet","getAriaId","popupAriaRole","optionAriaRole","ariaActiveState","$singleLineEditor","$highlightTagPending","AcePopup","lastMouseEvent","noop","selectionMarker","hoverMarker","setSelectOnHover","isMouseOver","setRow","setHoverMarker","selectedNode","ariaId","caption","hideHoverMarker","suppressRedraw","getHoveredRow","lower","filterText","lastI","matchMask","isTopdown","autoSelect","tryShow","forceShow","screenHeight","maxH","dims","$borderSize","spaceAbove","fitsX","topdownOnly","goTo","where","getTextLeftOffset","$imageSize","AceInlineScreenReader","screenReaderDiv","setScreenReaderContent","completer","idString","lineIndex","_lines","codeElement","createCodeBlock","AceInline","completion","inlineScreenReader","displayText","hideInlinePreview","parForEach","fn","completed","arLength","ID_REGEX","retrievePrecedingIdentifier","retrieveFollowingIdentifier","getCompletionPrefix","completers","identifierRegexps","identifierRegex","triggerAutocomplete","previousChar","triggerCharacters","util","destroyCompleter","Autocomplete","autoInsert","autoShown","exactMatch","inlineEnabled","hasSeen","showLoadingState","stickySelectionDelay","blurListener","mousedownListener","mousewheelListener","onLayoutChange","changeTimer","updateCompletions","tooltipTimer","updateDocTooltip","popupTimer","$updatePopupPosition","stickySelectionTimer","stickySelection","$firstOpenTimer","initialPosition","completionProvider","completions","FilteredList","completionsForLoading","openPopup","insertMatch","$onPopupShow","$onHidePopup","$onPopupChange","mouseOutListener","$onPopupRender","$initInline","inlineRenderer","getPopup","hideDocTooltip","$seen","onSeen","$updateGhostText","filtered","observeLayoutChanges","$elements","unObserveLayoutChanges","posGhostText","editorContainerBottom","lowestPosition","keepPopupPosition","newRow","oldRow","previousSelectedItem","tooltipNode","activated","fromTooltip","getCompletionProvider","showPopup","CompletionProvider","gatherCompletions","setFilter","completionOptions","ignoreCaption","provideCompletions","finished","emptyMessage","completionsForEmpty","completersLength","getDocTooltip","completerId","docText","docHTML","showDocTooltip","overscrollBehavior","onblur","onTooltipClick","nodeName","deleteSuffix","for","startCommand","insertByIndex","$insertString","onInsert","total","results","processResults","isImmediate","immediateResults","filterCompletions","$score","localeCompare","items","upper","loop","penalty","fullMatchIndex","wordDistance","prefixPos","getWordIndex","wordScores","currentWord","wordScore","textCompleter","keyWordCompleter","transformSnippetTooltip","record","p3","snippetCompleter","setCompleters","addCompleter","lastExecEvent","loadSnippetsForMode","files","loadSnippetFile","snippetFileId","modes","snippetFilePath","doLiveAutocomplete","hasCompleter","$liveAutocompletionDelay","liveAutocompleteTimer","showLiveAutocomplete","$liveAutocompletionThreshold","enableBasicAutocompletion","enableLiveAutocompletion","liveAutocompletionDelay","liveAutocompletionThreshold","enableSnippets","Split","$createEditor","$editorCSS","$container","$editors","$fontSize","setSplits","$splits","getSplits","getEditor","getCurrentEditor","$cEditor","keybinding","$cloneSession","isUsed","getOrientation","$orientation","setOrientation","orientation","BESIDE","editorWidth","editorHeight","BELOW","JsDocCommentHighlightRules","getTagRule","getStartRule","getEndRule","DocCommentHighlightRules","identifierRe","JavaScriptHighlightRules","keywordMapper","escapedRe","anonymousFunctionRe","functionCallStartRule","comments","noES6","no_regex","jsx","JSX","tagRegex","jsxTag","jsxJsRule","jsxAttributes","reference","MatchingBraceOutdent","is","XmlBehaviour","rightSpace","tokenEndColumn","nextToken","tokenRow","tokenColumn","voidElements","nextIndent","JavaScriptBehaviour","xmlBehaviours","closeCurlyBraces","BaseFoldMode","optionalEndTags","Tag","selfClosing","_getFirstTagInLine","_findEndTagInLine","getCommentFoldWidget","tags","commentRegex","singleLineBlockCommentRe","tripleStarBlockCommentRe","startRegionRe","_getFoldWidgetBase","forceMultiline","getCommentRegionBlock","getSectionRange","startIndent","subRange","XmlFoldMode","CFoldMode","xmlFoldMode","getFoldWidgetRangeBase","getFoldWidgetBase","JavaScriptFoldMode","$outdent","tokenizedLine","endState","diff_match_patch","Diff_Timeout","Diff_EditCost","Match_Threshold","Match_Distance","Patch_DeleteThreshold","Patch_Margin","Match_MaxBits","DIFF_DELETE","Diff","op","diff_main","text1","text2","opt_checklines","opt_deadline","getTime","deadline","checklines","commonlength","diff_commonPrefix","commonprefix","diff_commonSuffix","commonsuffix","diffs","diff_compute_","diff_cleanupMerge","longtext","shorttext","hm","diff_halfMatch_","text1_a","text1_b","text2_a","text2_b","mid_common","diffs_a","diffs_b","diff_lineMode_","diff_bisect_","diff_linesToChars_","chars1","chars2","linearray","lineArray","diff_charsToLines_","diff_cleanupSemantic","pointer","count_delete","count_insert","text_delete","text_insert","subDiff","text1_length","text2_length","max_d","v_offset","v_length","v1","v2","front","k1start","k1end","k2start","k2end","k1","k1_offset","x1","k2_offset","x2","diff_bisectSplit_","k2","text1a","text2a","text1b","text2b","diffsb","lineHash","diff_linesToCharsMunge_","lineStart","lineArrayLength","pointermin","pointermax","pointermid","pointerstart","pointerend","diff_commonOverlap_","text_length","best","pattern","dmp","diff_halfMatchI_","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","seed","best_common","prefixLength","suffixLength","hm1","hm2","equalities","equalitiesLength","lastEquality","length_insertions1","length_deletions1","length_insertions2","length_deletions2","diff_cleanupSemanticLossless","deletion","insertion","overlap_length1","overlap_length2","diff_cleanupSemanticScore_","one","two","char1","char2","nonAlphaNumeric1","nonAlphaNumericRegex_","nonAlphaNumeric2","whitespace1","whitespaceRegex_","whitespace2","lineBreak1","linebreakRegex_","lineBreak2","blankLine1","blanklineEndRegex_","blankLine2","blanklineStartRegex_","equality1","equality2","commonOffset","commonString","bestEquality1","bestEdit","bestEquality2","bestScore","diff_cleanupEfficiency","pre_ins","pre_del","post_ins","post_del","diff_xIndex","loc","last_chars1","last_chars2","diff_prettyHtml","pattern_amp","pattern_lt","pattern_gt","pattern_para","diff_text1","diff_text2","diff_levenshtein","levenshtein","insertions","deletions","diff_toDelta","encodeURI","diff_fromDelta","diffsLength","decodeURI","match_main","match_bitap_","match_alphabet_","match_bitapScore_","accuracy","proximity","score_threshold","best_loc","bin_min","bin_mid","matchmask","last_rd","bin_max","finish","rd","charMatch","patch_addContext_","patch","start2","length1","start1","length2","patch_make","opt_b","opt_c","patches","patch_obj","patchDiffLength","char_count1","char_count2","prepatch_text","postpatch_text","diff_type","diff_text","patch_deepCopy","patchesCopy","patchCopy","patch_apply","nullPadding","patch_addPadding","patch_splitMax","start_loc","expected_loc","end_loc","index2","index1","paddingLength","patch_size","bigpatch","precontext","empty","postcontext","patch_toText","patch_fromText","textline","textPointer","patchHeader","sign","HASH_UNDEFINED","INFINITY","funcTag","genTag","symbolTag","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reEscapeChar","reIsHostCtor","freeGlobal","freeSelf","Function","arrayProto","funcProto","objectProto","coreJsData","maskSrcKey","uid","IE_PROTO","funcToString","objectToString","reIsNative","Map","getNative","nativeCreate","symbolProto","symbolToString","Hash","entries","entry","ListCache","MapCache","assocIndexOf","baseGet","object","isSymbol","isKey","stringToPath","toKey","baseIsNative","isObject","isFunction","isHostObject","toSource","getMapData","__data__","isKeyable","memoize","baseToString","resolver","memoized","Cache","isObjectLike","defaultValue","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","reIsUint","typedArrayTags","freeExports","freeModule","moduleExports","freeProcess","process","nodeUtil","nodeIsTypedArray","isTypedArray","arraySome","mapToArray","setToArray","nativeObjectToString","Buffer","Uint8Array","propertyIsEnumerable","symToStringTag","toStringTag","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeKeys","DataView","WeakMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolValueOf","valueOf","SetCache","Stack","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","iteratee","baseTimes","isIndex","eq","baseGetTag","isOwn","unmasked","getRawTag","baseIsArguments","baseIsEqual","bitmask","customizer","equalFunc","objIsArr","othIsArr","objTag","getTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","byteLength","byteOffset","buffer","convert","isPartial","stacked","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","getAllKeys","objLength","othProps","othLength","skipCtor","objValue","othValue","compared","objCtor","othCtor","equalObjects","baseIsEqualDeep","isMasked","baseKeys","Ctor","isPrototype","arrLength","seen","arrValue","othIndex","keysFunc","symbolsFunc","arrayPush","baseGetAllKeys","getSymbols","pairs","LARGE_ARRAY_SIZE","resIndex","arrayFilter","symbol","ArrayBuffer","ctorString","isLength","baseUnary","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","bigint","bool","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","ace_builds_1","React","editorOptions_1","getAceInstance","ReactAce","editorEvents","debounce","isInShadow","componentDidMount","onBeforeLoad","onValidate","wrapEnabled","refEditor","editorProps","debounceChangePeriod","navigateToFileEnd","updatePlaceholder","handleMarkers","availableOptions","editorOptions","handleOptions","componentDidUpdate","prevProps","oldProps","nextProps","appliedClassesArray_1","oldClass","valueChanged","silent","cursorStart","handleScrollMargins","margins","componentWillUnmount","currentMarkers","showPlaceholder","updateRef","render","divStyle","__assign","ref","propTypes","defaultProps","Component","split_1","DiffMatchPatch","DiffComponent","lhString","rhString","diffedLines","generateDiffedLines","setCodeMarkers","C","chunkType","linesToHighlight","codeEditorSettings","newMarkerSet","markerObj","acequire","ace_1","ext_split_1","SplitComponent","splitEditor","defaultValueForEditor","valueForEditor","newAnnotations","newMarkers","sp","nextValue","oldAnnotations","oldMarkers","value_1","value_2","value_3"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/671.5426ab3a.chunk.js b/static/js/671.5426ab3a.chunk.js deleted file mode 100644 index 474d22d..0000000 --- a/static/js/671.5426ab3a.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 671.5426ab3a.chunk.js.LICENSE.txt */ -(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[671],{6603:(e,t,n)=>{e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"===typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=r(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;an.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0,i=arguments[1]|0,o=i<0?Math.max(n+i,0):Math.min(i,n),r=arguments[2],s=void 0===r?n:r|0,a=s<0?Math.max(n+s,0):Math.min(s,n);o0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),r=i.userAgent||"",s=i.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(r.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isAndroid=r.indexOf("Android")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i,o=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],s=0;s=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||"undefined"===typeof l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),o=document.createElement("script");o.src=e,n.appendChild(o),o.onload=o.onreadystatechange=function(e,n){!n&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var i={},o=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=r),n=n.slice();for(var s=0;s1&&(o=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+o+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l;t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,i){var r;if(Array.isArray(n))var s=n[0],a=n[1];else if("string"==typeof n)a=n;var h=function(n){if(n&&!t.$loading[a])return i&&i(n);if(t.$loading[a]||(t.$loading[a]=[]),t.$loading[a].push(i),!(t.$loading[a].length>1)){var r=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(null,e("./theme/textmate")):l?l(t,n):console.error("loader is not configured")}(a,(function(e,n){n&&(t.$loaded[a]=n),t._emit("load.module",{name:a,module:n});var i=t.$loading[a];t.$loading[a]=null,i.forEach((function(e){e&&e(n)}))}))};if(!t.get("packaged"))return r();o.loadScript(t.moduleUrl(a,s),r),c()}};if(t.dynamicModules[a])t.dynamicModules[a]().then((function(e){e.default?h(e.default):h(e)}));else{try{r=this.$require(a)}catch(u){}h(r||t.$loaded[a])}},t.$require=function(e){if("function"==typeof n.require){return n.require(e)}},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.32.7"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var o=e("./config");o.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||"undefined"!=typeof window&&window}();function s(t){if(r&&r.document){o.set("packaged",t||e.packaged||i.packaged||r.define&&n.amdD.packaged);var s={},a="",l=document.currentScript||document._currentScript,c=l&&l.ownerDocument||document;l&&l.src&&(a=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var h,u=c.getElementsByTagName("script"),d=0;d ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var i={row:n+1,column:0};else if(this.end.rown)var o={row:n+1,column:0};else if(this.start.row1?++u>4&&(u=1):u=1,r.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!s||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=e.clientX,l=e.clientY)}if(e._clicks=u,i[o]("mousedown",e),u>4)u=0;else if(u>1)return i[o](d[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){h(e,"mousedown",p,s)}))},t.getModifierString=function(e){return o.KEY_MODS[d(e)]},t.addCommandKeyListener=function(e,n,i){var l=null;h(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=function(e,t,n){var i=d(t);if(!r.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==s[n]&&(a=t.timeStamp):18===n&&3===i&&2===l&&t.timeStamp-a<50&&(s.altGr=!0)}}if(n in o.MODIFIER_KEYS&&(n=-1),i||13!==n||3!==t.location||(e(t,i,-n),!t.defaultPrevented)){if(r.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,i,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t}),i),h(e,"keypress",(function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),i),h(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(p(),h(window,"focus",p))},"object"==typeof window&&window.postMessage&&!r.isOldIE){var g=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+g++,o=function(r){r.data==i&&(t.stopPropagation(r),u(n,"message",o),e())};h(n,"message",o),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i,o=e("../lib/event"),r=e("../config").nls,s=e("../lib/useragent"),a=e("../lib/dom"),l=e("../lib/lang"),c=e("../clipboard"),h=s.isChrome<18,u=s.isIE,d=s.isChrome>63,p=400,g=e("../lib/keys"),f=g.KEY_MODS,m=s.isIOS,v=m?/\s/:/\n/,y=s.isMobile;i=function(e,t){var n=a.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",e.insertBefore(n,e.firstChild);var i=!1,w=!1,b=!1,$=!1,x="";y||(n.style.fontSize="1px");var S=!1,C=!1,k="",A=0,_=0,L=0,M=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,R=0;try{var E=document.activeElement===n}catch(Q){}this.setNumberOfExtraLines=function(e){M=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,R=e<0?0:e},this.setAriaOptions=function(e){if(e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role),e.setLabel&&(n.setAttribute("aria-roledescription",r("editor")),t.session)){var i=t.session.selection.cursor.row;n.setAttribute("aria-label",r("Cursor at row $0",[i+1]))}},this.setAriaOptions({role:"textbox"}),o.addListener(n,"blur",(function(e){C||(t.onBlur(e),E=!1)}),t),o.addListener(n,"focus",(function(e){if(!C){if(E=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(O):O()}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),x||d||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var i=0!=n.getBoundingClientRect().top}catch(Q){return}var o=[];if(i)for(var r=n.parentElement;r&&1==r.nodeType;)o.push(r),r.setAttribute("ace_nocontext","true"),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),i&&o.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return E},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var o=i&&(e.docChanged||e.selectionChanged);b&&o&&(k=n.value="",V()),O()}}));var I=function(e,n){for(var i=n,o=1;o<=e-M&&o<2*R+1;o++)i+=t.session.getLine(e-o).length+1;return i},O=m?function(e){if(E&&(!i||e)&&!$){e||(e="");var o="\n ab"+e+"cde fg\n";o!=n.value&&(n.value=k=o);var r=4+(e.length||(t.selection.isEmpty()?0:1));4==A&&_==r||n.setSelectionRange(4,r),A=4,_=r}}:function(){if(!b&&!$&&(E||F)){b=!0;var e=0,i=0,o="";if(t.session){var r=t.selection,s=r.getRange(),a=r.cursor.row;a===T+1?T=(M=T+1)+2*R:a===M-1?M=(T=M-1)-2*R:(aT+1)&&(M=a>R?a-R:0,T=a>R?a+R:2*R);for(var l=[],c=M;c<=T;c++)l.push(t.session.getLine(c));if(o=l.join("\n"),e=I(s.start.row,s.start.column),i=I(s.end.row,s.end.column),s.start.rowT){var u=t.session.getLine(T+1);i=s.end.row>T+1?u.length:s.end.column,i+=o.length+1,o=o+"\n"+u}else y&&a>0&&(o="\n"+o,i+=1,e+=1);o.length>p&&(e0&&k[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&k.length-d>A-1&&k[k.length-d]==e[e.length-d];)d++,l--;h-=d-1,u-=d-1;var p=c.length-d+1;if(p<0&&(a=-p,p=0),c=c.slice(0,p),!i&&!c&&!h&&!a&&!l&&!u)return"";$=!0;var g=!1;return s.isAndroid&&". "==c&&(c=" ",g=!0),c&&!a&&!l&&!h&&!u||S?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:h,restoreEnd:u}),$=!1,k=e,A=o,_=r,L=u,g?"\n":c},P=function(e){if(b)return U();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,o=N(i,!0);(i.length>500||v.test(o)||y&&A<1&&A==_)&&O()},W=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!h){var o=u||n?"Text":"text/plain";try{return t?!1!==i.setData(o,t):i.getData(o)}catch(e){if(!n)return W(e,t,!0)}}},H=function(e,r){var s=t.getCopyText();if(!s)return o.preventDefault(e);W(e,s)?(m&&(O(s),i=s,setTimeout((function(){i=!1}),10)),r?t.onCut():t.onCopy(),o.preventDefault(e)):(i=!0,n.value=s,n.select(),setTimeout((function(){i=!1,O(),r?t.onCut():t.onCopy()})))},B=function(e){H(e,!0)},z=function(e){H(e,!1)},j=function(e){var i=W(e);c.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),s.isIE&&setTimeout(O),o.preventDefault(e)):(n.value="",w=!0))};o.addCommandKeyListener(n,(function(e,n,i){if(!b)return t.onCommandKey(e,n,i)}),t),o.addListener(n,"select",(function(e){b||(i?i=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=k.length&&e.value===k&&k&&e.selectionEnd!==_}(n)?y&&n.selectionStart!=A&&O():(t.selectAll(),O()))}),t),o.addListener(n,"input",P,t),o.addListener(n,"cut",B,t),o.addListener(n,"copy",z,t),o.addListener(n,"paste",j,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||o.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:z(e);break;case 86:j(e);break;case 88:B(e)}}),t);var U=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(S)return G();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;N(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+_-b.selectionStart+L)}}},V=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",G),e&&P())};function G(){C=!0,n.blur(),n.focus(),C=!1}var K,Y=l.delayedCall(U,50).schedule.bind(null,null);function q(){clearTimeout(K),K=setTimeout((function(){x&&(n.style.cssText=x,x=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}o.addListener(n,"compositionstart",(function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!S)){e.data&&(b.useTextareaForIME=!1),setTimeout(U,0),t._signal("compositionStart"),t.on("mousedown",G);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=A,t.onCompositionStart(b),b.useTextareaForIME?(k=n.value="",A=0,_=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}}),t),o.addListener(n,"compositionupdate",U,t),o.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length_&&"\n"==k[s]?a=g.end:o_&&k.slice(0,s).split("\n").length>2?a=g.down:s>_&&" "==k[s-1]?(a=g.right,l=f.option):(s>_||s==_&&_!=A&&o==s)&&(a=g.right),o!==s&&(l|=f.shift),a){if(!t.onCommandKey({},l,a)&&t.commands){a=g.keyCodeToString(a);var c=t.commands.findKeyCommand(l,a);c&&t.execCommand(c)}A=o,_=s,O("")}}};document.addEventListener("selectionchange",s),t.on("destroy",(function(){document.removeEventListener("selectionchange",s)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.TextInput=i,t.$setUserAgentForTests=function(e,t){y=e,m=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent"),o=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,r=e.getButton();return 0!==r?((o.getSelectionRange().isEmpty()||1==r)&&o.selection.moveToPosition(n),void(2==r&&(o.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&a<=0)t=this.$clickSelection.end,o.end.row==i.row&&o.end.column==i.column||(i=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,o.start.row==i.row&&o.start.column==i.column||(i=o.end);else if(-1==s&&1==a)i=o.end,t=o.start;else{var l=r(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,i,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),r=Date.now();(o>0||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,r=o?e.wheelX/o:n.vx,s=o?e.wheelY/o:n.vy;o<550&&(r=(r+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(r/s),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=i;else if(i-n.allowed<550){Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=r,n.vy=s,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function r(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,t.DefaultHandlers=o})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/dom"),s=(e("./lib/event"),e("./range").Range),a=e("./lib/scroll").preventParentScroll,l="ace_tooltip",c=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=r.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){r.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=l+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),h=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,i;this.popups.sort((function(e,t){return t.priority-e.priority}));var r=[];try{for(var s=o(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{for(var h=(n=void 0,o(r)),u=h.next();!u.done;u=h.next()){var d=u.value;if(this.doPopupsOverlap(d,l)){c=!1;break}}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}c?r.push(l):l.hide()}}catch(g){e={error:g}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),i=t.getElement().getBoundingClientRect();return n.lefti.left&&n.topi.top},e}());t.popupManager=h,t.Tooltip=c;var u=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var i=n.getElement();return i.style.whiteSpace="pre-wrap",i.style.pointerEvents="auto",i.addEventListener("mouseout",n.onMouseOut),i.tabIndex=-1,i.addEventListener("blur",function(){i.contains(document.activeElement)||this.hide()}.bind(n)),i.addEventListener("wheel",a),n}return i(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var i=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(i.row,i.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),i=t.session.getLine(n.row);if(n.column==i.length){var o=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),r=t.session.documentToScreenPosition(n.row,n.column);if(r.column!=o.column||r.row!=o.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,i){if((!i||i==this.lastEvent)&&(!this.isOpen||document.activeElement!=this.getElement())){var o=e.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(o.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=s.fromPoints(t.start,t.end);var r=o.textToScreenCoordinates(t.start.row,t.start.column),a=o.scroller.getBoundingClientRect();r.pageX=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("../lib/dom"),s=e("../lib/event"),a=e("../tooltip").Tooltip,l=e("../config").nls;t.GutterHandler=function(e){var t,n,i=e.editor,o=i.renderer.$gutterLayer,a=new c(i);function l(){t&&(t=clearTimeout(t)),a.isOpen&&(a.hideTooltip(),i.off("mousewheel",l))}function h(e){a.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(i.isFocused()&&0==t.getButton()&&"foldWidgets"!=o.getRegion(t)){var n=t.getDocumentPosition().row,r=i.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return i.selectAll(),t.preventDefault();e.$clickSelection=i.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(s){var c=s.domEvent.target||s.domEvent.srcElement;if(r.hasCssClass(c,"ace_fold-widget"))return l();a.isOpen&&e.$tooltipFollowsMouse&&h(s),n=s,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row;if(t==i.session.getLength()){var r=i.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(r>i.session.documentToScreenRow(s.row,s.column))return l()}if(a.showTooltip(t),a.isOpen)if(i.on("mousewheel",l),e.$tooltipFollowsMouse)h(n);else{var c=n.getGutterRow(),u=o.$lines.get(c);if(u){var d=u.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),p=a.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}else h(n)}}():l()}),50))})),s.addListener(i.renderer.$gutter,"mouseout",(function(e){n=null,a.isOpen&&!t&&(t=setTimeout((function(){t=null,l()}),50))}),i),i.on("changeSession",l),i.on("input",l)};var c=function(e){function t(t){var n=e.call(this,t.container)||this;return n.editor=t,n}return i(t,e),t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+r>i&&(t-=20+r),a.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:l("error"),plural:l("errors")},warning:{singular:l("warning"),plural:l("warnings")},info:{singular:l("information message"),plural:l("information messages")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,i=this.editor.renderer.$gutterLayer,o=i.$annotations[e];n=o?{text:Array.from(o.text),type:Array.from(o.type)}:{text:[],type:[]};var r=i.session.getFoldLine(e);if(r&&i.$showFoldedAnnotations){for(var s,a={error:[],warning:[],info:[]},l=e+1;l<=r.end.row;l++)if(i.$annotations[l])for(var c=0;c ").concat(n.text[l]);d[n.type[l].replace("_fold","")].push(g)}var f=[].concat(d.error,d.warning,d.info).join("
");this.setHtml(f),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},t.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},t.annotationsToSummaryString=function(e){var n,i,r=[];try{for(var s=o(["error","warning","info"]),a=s.next();!a.done;a=s.next()){var l=a.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;r.push("".concat(e[l].length," ").concat(c))}}}catch(h){n={error:h}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return r.join(", ")},t}(a);t.GutterTooltip=c})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return i.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=r})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/event"),r=e("../lib/useragent");function s(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var s,l,c,h,u,d,p,g,f,m,v,y=t.container,w=0;function b(){var e=d;(function(e,n){var i=Date.now(),o=!n||e.row!=n.row,r=!n||e.column!=n.column;!m||o||r?(t.moveCursorToPosition(e),m=i,v={x:l,y:c}):a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(t.renderer.scrollCursorIntoView(),m=null)})(d=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),a={x:{left:l-s.left,right:s.right-l},y:{top:c-s.top,bottom:s.bottom-c}},h=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),d={row:e.row,column:e.column};h/r<=2&&(d.column+=a.x.left=200&&t.renderer.scrollCursorIntoView(d):f=i:f=null}(d,e)}function $(){u=t.selection.toOrientedRange(),s=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(h),b(),h=setInterval(b,20),w=0,o.addListener(document,"mousemove",C)}function x(){clearInterval(h),t.session.removeMarker(s),s=null,t.selection.fromOrientedRange(u),t.isFocused()&&!g&&t.$resetCursorStyle(),u=null,d=null,w=0,f=null,m=null,o.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!y.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){if(y.draggable=!1,g=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,s||$(),w++,e.dataTransfer.dropEffect=p=A(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,s||($(),w++),null!==S&&(S=null),e.dataTransfer.dropEffect=p=A(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--w<=0&&s)return x(),p=null,o.preventDefault(e)},this.onDrop=function(e){if(d){var n=e.dataTransfer;if(g)switch(p){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:t.moveText(u,d);break;case"copy":u=t.moveText(u,d,!0)}else{var i=n.getData("Text");u={start:d,end:t.session.insert(d,i)},t.focus(),p=null}return x(),o.preventDefault(e)}},o.addListener(y,"dragstart",this.onDragStart.bind(e),t),o.addListener(y,"dragend",this.onDragEnd.bind(e),t),o.addListener(y,"dragenter",this.onDragEnter.bind(e),t),o.addListener(y,"dragover",this.onDragOver.bind(e),t),o.addListener(y,"dragleave",this.onDragLeave.bind(e),t),o.addListener(y,"drop",this.onDrop.bind(e),t);var S=null;function C(){null==S&&(S=setTimeout((function(){null!=S&&s&&x()}),20))}function k(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function A(e){var t=["copy","copymove","all","uninitialized"],n=r.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(i)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=r.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;r.isIE&&"dragReady"==this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(r.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,o=e("../lib/event"),r=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,h,u,d,p,g="scroll",f=0,m=0,v=0,y=0;function w(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var o=i.target.getAttribute("action");if("more"==o||!n)return n=!n,function(){var i=t.getCopyText(),o=t.session.getUndoManager().hasUndo();p.replaceChild(r.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild)}();"paste"==o?e.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),p.firstChild.style.display="none",n=!1,"openCommandPalette"!=o&&t.focus()};p=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function b(){p||w();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,r=t.container.getBoundingClientRect();p.style.top=n.pageY-r.top-3+"px",n.pageX-r.left1)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var r=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var w=o[0],b=w.clientX,$=w.clientY;Math.abs(n-b)+Math.abs(s-$)>r&&(a=-1),n=e.clientX=b,s=e.clientY=$,v=y=0;var S=new i(e,t);if(u=S.getDocumentPosition(),p-a<500&&1==o.length&&!f)m++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=m>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}();else{m=0;var C=t.selection.cursor,k=t.selection.isEmpty()?C:t.selection.anchor,A=t.renderer.$cursorLayer.getPixelPosition(C,!0),_=t.renderer.$cursorLayer.getPixelPosition(k,!0),L=t.renderer.scroller.getBoundingClientRect(),M=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,R=function(e,t){return(e/=h)*e+(t=t/r-.75)*t};if(e.clientXI?"cursor":"anchor"),g=I<3.5?"anchor":E<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=p}),t),o.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),"zoom"==g?(g="",f=0):c?(t.selection.moveToPosition(u),f=0,b()):"scroll"==g?(f+=60,h=setInterval((function(){f--<=0&&(clearInterval(h),h=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),f<20&&(v*=.9),f<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(f=0)}),10),$()):b(),clearTimeout(c),c=null}),t),o.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==g)){var r=o[0],a=n-r.clientX,h=s-r.clientY;if("wait"==g){if(!(a*a+h*h>4))return e.preventDefault();g="cursor"}n=r.clientX,s=r.clientY,e.clientX=r.clientX,e.clientY=r.clientY;var u=e.timeStamp,d=u-l;if(l=u,"scroll"==g){var p=new i(e,t);p.speed=1,p.wheelX=a,p.wheelY=h,10*Math.abs(a)=e){for(r=u+1;r=e;)r++;for(a=u,l=r-1;a=t.length||(l=n[o-1])!=d&&l!=p||(c=t[o+1])!=d&&c!=p?g:(r&&(c=p),c==l?c:g);case b:return(l=o>0?n[o-1]:f)==d&&o+10&&n[o-1]==d)return d;if(r)return g;for(T=o+1,M=t.length;T=1425&&E<=2303||64286==E;if(l=t[T],I&&(l==u||l==v))return u}return o<1||(l=t[o-1])==f?g:n[o-1];case f:return r=!1,s=!0,i;case m:return a=!0,g;case S:case C:case A:case _:case k:r=!1;case L:return g}}function I(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?h:M[t]:5==n?/[\u0591-\u05f4]/.test(e)?u:h:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?x:/[\u0660-\u0669\u066b-\u066c]/.test(e)?p:1642==t?$:/[\u06f0-\u06f9]/.test(e)?d:v:32==n&&t<=8287?T[255&t]:254==n&&t>=65136?v:g}t.L=h,t.R=u,t.EN=d,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,h){if(e.length<2)return{};var d=e.split(""),w=new Array(d.length),b=new Array(d.length),$=[];i=h?1:0,function(e,t,n,h){var u=i?c:l,d=null,p=null,g=null,v=0,w=null,b=-1,$=null,x=null,S=[];if(!h)for($=0,h=[];$0)if(16==w){for($=b;$-1){for($=b;$=0&&h[C]==y;C--)t[C]=i}}(d,$,d.length,n);for(var x=0;xv&&n[x]0&&"\u0644"===d[x-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[x])&&($[x-1]=$[x]=t.R_H,x++);d[d.length-1]===t.DOT&&($[d.length-1]=t.B),"\u202b"===d[0]&&($[0]=t.RLE);for(x=0;x=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[e];r&&(void 0===t&&(t=this.getSplitIndex()),t>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=i.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!==0&&o++;for(var a=0;at&&r[o]%2===0&&(s+=this.charWidths[r[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},e.prototype.getSelections=function(e,t){var n,i=this.bidiMap,o=i.bidiLevels,r=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p=a&&dn+r/2;){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!==0&&o[i]%2===0?(e0&&o[i-1]%2===0&&o[i]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===r&&o[i-1]%2===0||!this.isRtlDir&&0===i&&o[i]%2!==0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!==0&&0!==r&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},e.prototype.$setSelection=function(e,t,n,i){if(!this.$silent){var o=this.$isEmpty,r=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var r=o.stringReverse(i),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-s)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(i){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,i.implement(a.prototype,r),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,n){"use strict";var i=e("./lib/report_error").reportError,o=2e3,r=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),r[o]=l,o+=u,i.push(h),c.onMatch||(c.onMatch=null)}}i.length||(r[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}}return e.prototype.$setMaxTokenCount=function(e){o=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var i=[],o=0,r=n.length;oh){var v=e.substring(h,m-f.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var y=0;yo){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},e}();r.prototype.reportError=i,t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";var i,o=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var i,o,r=e("../../lib/oop"),s=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],h=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,n,i){var o=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}};(o=function(e){e=e||{},this.add("braces","insertion",(function(t,n,r,s,a){var c=r.getCursorPosition(),h=s.doc.getLine(c.row);if("{"==a){p(r);var u=r.getSelectionRange(),d=s.doc.getTextRange(u);if(""!==d&&"{"!==d&&r.getWrapBehavioursEnabled())return g(u,d,"{","}");if(o.isSaneInsertion(r,s))return/[\]\}\)]/.test(h[c.column])||r.inMultiSelectMode||e.braces?(o.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(o.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==a){if(p(r),"}"==h.substring(c.column,c.column+1))if(null!==s.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&o.isAutoInsertedClosing(c,h,a))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==a||"\r\n"==a){p(r);var f="";if(o.isMaybeInsertedClosing(c,h)&&(f=l.stringRepeat("}",i.maybeInsertedBrackets),o.clearMaybeInsertedClosing()),"}"===h.substring(c.column,c.column+1)){var m=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!m)return null;var v=this.$getIndent(s.getLine(m.row))}else{if(!f)return void o.clearMaybeInsertedClosing();v=this.$getIndent(h)}var y=v+s.getTabString();return{text:"\n"+y+"\n"+v+f,selection:[1,y.length,1,y.length]}}o.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(p(n),"}"==o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,r){if("("==r){p(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return g(s,a,"(",")");if(o.isSaneInsertion(n,i))return o.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,r))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r&&(p(n),")"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(e,t,n,i,r){if("["==r){p(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return g(s,a,"[","]");if(o.isSaneInsertion(n,i))return o.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,r))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r&&(p(n),"]"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,i,o){var r=i.$mode.$quotes||d;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;p(n);var s=o,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&r[l])&&n.getWrapBehavioursEnabled())return g(a,l,s,s);if(!l){var c=n.getCursorPosition(),h=i.doc.getLine(c.row),u=h.substring(c.column-1,c.column),f=h.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var y,w=m&&/string|escape/.test(m.type),b=!v||/string|escape/.test(v.type);if(f==s)(y=w!==b)&&/string\.end/.test(v.type)&&(y=!1);else{if(w&&!b)return null;if(w&&b)return null;var $=i.$mode.tokenRe;$.lastIndex=0;var x=$.test(u);$.lastIndex=0;var S=$.test(f),C=i.$mode.$pairQuotesAfter;if(!(C&&C[s]&&C[s].test(u))&&x||S)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var k=h[c.column-2];if(u==s&&(k==s||$.test(k)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,o){var r=i.$mode.$quotes||d,s=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(s)&&(p(n),i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==s))return o.end.column++,o})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,n,i,o){if("doc-start"===e&&("\n"===o||"\r\n"===o)&&n.selection.isEmpty()){var r=n.getCursorPosition(),s=i.doc.getLine(r.row),a=i.doc.getLine(r.row+1),l=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:o+l+"* ",selection:[1,3+l.length,1,3+l.length]}:{text:o+l+" * ",selection:[1,3+l.length,1,3+l.length]};if(/\/\*\*/.test(s.substring(0,r.column)))return{text:o+l+" * "+o+" "+l+"*/",selection:[1,4+l.length,1,4+l.length]}}}))}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new a(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",h)},o.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},o.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=o.row,i.autoInsertedLineEnd=n+r.substr(o.column),i.autoInsertedBrackets++},o.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=o.row,i.maybeInsertedLineStart=r.substr(0,o.column)+n,i.maybeInsertedLineEnd=r.substr(o.column),i.maybeInsertedBrackets++},o.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},o.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},o.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},o.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(o,s),t.CstyleBehaviour=o})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,r=[],s=0;s2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,g=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),m=new RegExp("(?:"+c.escapeRegExp(g)+")\\s*$"),v=function(e,t){w(e,t)||r&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},g),o.insertInLine({row:t,column:a},p))},y=function(e,t){var n;(n=e.match(m))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&o.removeInLine(t,n[1].length,n[0].length)},w=function(e,n){if(f.test(e))return!0;for(var i=t.getTokens(n),o=0;oe.length&&($=e.length)})),a==1/0&&(a=$,r=!1,s=!1),h&&a%l!=0&&(a=Math.floor(a/l)*l),b(s?y:v)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(f=new h(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var p=f.getCurrentTokenRow(),g=f.getCurrentTokenColumn()+m;c=new u(p,g,p,g+o.start.length);break}a=f.stepBackward()}var f;for(a=(f=new h(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(o.end))){p=f.getCurrentTokenRow(),g=f.getCurrentTokenColumn()+m;d=new u(p,g,p,g+o.end.length);break}a=f.stepForward()}d&&t.remove(d),c&&(t.remove(c),r=c.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,r=o.$modes[i];r||(o.$modes[i]=r=new n),o.$modes[t]||(o.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],a=function(e){!function(t){var n=s[e],i=t[n];t[s[e]]=function(){return this.$delegator(n,arguments,i)}}(l)},l=this;for(t=0;tthis.row)){var t=function(e,t,n){var i="insert"==e.action,o=(i?1:-1)*(e.end.row-e.start.row),r=(i?1:-1)*(e.end.column-e.start.column),a=e.start,l=i?a:e.end;if(s(t,a,n))return{row:t.row,column:t.column};if(s(l,t,!n))return{row:t.row+o,column:t.column+(t.row==l.row?r:0)};return{row:a.row,column:a.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function s(e,t,n){var i=n?e.column<=t.column:e.column=n&&(e=n-1,t=void 0);var i=this.getLine(e);return void 0==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),r<=i&&n.fireUpdateEvent(r,i)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();i.implement(r.prototype,o),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./range").Range,r=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l={},c=s;c<=a;c++){var h=this.cache[c];null==h&&((h=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(e){return new o(c,e.offset,c,e.offset+e.length)})),this.cache[c]=h.length?h:"");for(var u=h.length;u--;){var d=h[u].toScreenRange(n),p=d.toString();l[p]||(l[p]=!0,t.drawSingleLineMarker(e,d,this.clazz,r))}}},e}();r.prototype.MAX_RANGES=500,t.SearchHighlight=r})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var o=n[i][0];if(o.id<=e)break;o.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)},e}();i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var o=e("./range").Range,r=o.comparePoints;o.comparePoints;function s(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(r(t.start,e.end)>=0)d(t,e,-1);else{if(!(r(t.start,e.start)<=0))return null;d(e,t,1)}else if(n&&!i)if(r(t.start,e.end)>=0)d(t,e,-1);else{if(!(r(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!n&&i)if(r(t.start,e.start)>=0)d(t,e,1);else{if(!(r(t.start,e.start)<=0))return null;d(e,t,1)}else if(!n&&!i)if(r(t.start,e.start)>=0)d(t,e,1);else{if(!(r(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function h(e,t){for(var n=e.length;n--;)for(var i=0;i=0?d(e,t,-1):(r(e.start,t.start)<=0||d(e,o.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&i)r(t.start,e.end)>=0?d(t,e,-1):(r(t.start,e.start)<=0||d(t,o.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&!i)if(r(t.start,e.end)>=0)d(t,e,-1);else{var s,a;if(!(r(t.end,e.start)<=0))return r(e.start,t.start)<0&&(s=e,e=g(e,t.start)),r(e.end,t.end)>0&&(a=g(e,t.end)),p(t.end,e.start,e.end,-1),a&&!s&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,s,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,n){p(e.start,t.start,t.end,n),p(e.end,t.start,t.end,n)}function p(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function g(e,t){var n=e.lines,i=e.end;e.end=s(t);var o=e.end.row-e.start.row,r=n.splice(o,n.length),a=o?t.column:t.column-e.start.column;return n.push(r[0].substring(0,a)),r[0]=r[0].substr(a),{start:s(t),end:i,lines:r,action:e.action}}function f(e,t){t=function(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],o=0;othis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],r=1;r=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;si)break;if(h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&c>0&&sh.start.column&&h.end.column==r[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l}}else for(l=i-o,c=t.column-n.column;so)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>o&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>o&&(h.start.row+=l)}if(0!=l&&s=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;o=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof r?n=e:(n=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var g=0;g0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}for(var r=o=this.getFoldsInRangeList(n);1==o.length&&i.comparePoints(o[0].start,n.start)<0&&i.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,o){null==i&&(i=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var r=this.doc,s="";return e.walk((function(e,t,n,a){if(!(th)break}while(r&&l.test(r.type)&&!/^comment.start/.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn(),/^comment.end/.test(r.type)||(c.end.column+=r.value.length-2),c}},this.foldAll=function(e,t,n,i){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r=e=e||0;r=e&&(r=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=0;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof a&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=o.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=o.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,r=!t&&n.charAt(e.column-1),s=r&&r.match(i);if(s||(r=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(i)),!s)return null;var a=new o(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);return l?[a,new o(l.row,l.column,l.row,l.column+1)]:[a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,r=t.value,s=0,a=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward()){if(">"===t.value&&!c){var h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(r===(i=t.value))if("<"===n.value)s++;else if(""!==t.value)return;var p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(r===i&&"/>"===t.value&&--s<0)p=d=u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),h=new o(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&s>=0);if(a&&h&&u&&p&&l&&d)return{openTag:new o(a.start.row,a.start.column,h.end.row,h.end.column),closeTag:new o(u.start.row,u.start.column,p.end.row,p.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,r=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new o(s,a,s,l);e.stepForward();var h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if((t=e.stepForward())&&">"===t.value){var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),l=(a=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++r>0){var d=new o(s,a,s,l),p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var f=0,m=n;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===i){r--;break}if("<"===m.value)break;m=e.stepBackward(),f++}for(var v=0;vn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var o=n+i>>1,r=e[o];if(t>r)n=o+1;else{if(!(t=t);r++);return(n=i[r])?(n.index=r,n.start=o-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&n.charAt(r).match(o));r++}for(var s=t;se&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;ls){if((l=r.end.row+1)>=a)break;s=(r=this.$foldData[o++])?r.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(r.start.column+=c),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=c)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,i),o.length){var a=e.start,l=r.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e})))}return r},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;s0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,o=e.end,r=i.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=0;if(f=this.getFoldLine(o.row)){f.addRemoveChars(o.row,o.column,i.column-o.column),f.shiftRow(-a);var u=this.getFoldLine(r);u&&u!==f&&(u.merge(f),f=u),h=c.indexOf(f)+1}for(;h=o.row&&f.shiftRow(-a)}s=r}else{var d=Array(a);d.unshift(r,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,d);c=this.$foldData,h=0;if(f=this.getFoldLine(r)){var g=f.range.compareInside(i.row,i.column);0==g?(f=f.split(i.row,i.column))&&(f.shiftRow(a),f.addRemoveChars(s,0,o.column-i.column)):-1==g&&(f.addRemoveChars(r,0,o.column-i.column),f.shiftRow(a)),h=c.indexOf(f)+1}for(;h=r&&f.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(f=this.getFoldLine(r))&&f.addRemoveChars(r,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,i,o=this.doc.getAllLines(),r=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=e;for(t=Math.min(t,o.length-1);l<=t;)(i=this.getFoldLine(l,i))?(n=[],i.walk(function(e,t,i,r){var s;if(null!=e){(s=this.$getDisplayTokens(e,n.length))[0]=y;for(var a=1;at-u;){var d=r+t-u;if(e[d-1]>=$&&e[d]>=$)h(d);else if(e[d]!=y&&e[d]!=w){for(var p=Math.max(d-(t-(t>>2)),r-1);d>p&&e[d]p&&e[d]p&&e[d]==b;)d--}else for(;d>p&&e[d]<$;)d--;d>p?h(++d):(e[d=r+t]==v&&d--,h(d-u))}else{for(;d!=r-1&&e[d]!=y;d--);if(d>r){h(d);continue}for(d=r+t;d39&&r<48||r>57&&r<64?i.push(b):r>=4352&&C(r)?i.push(m,v):i.push(m)}return i},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),n=n||0,o=0;o=4352&&C(i)?n+=2:n+=1,!(n>t));o++);return[n,o]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[h],r=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;for(var p=this.getLength()-1,g=this.getNextFoldLine(r),f=g?g.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(r))>e||r>=p);)a+=l,++r>f&&(r=g.end.row+1,f=(g=this.getNextFoldLine(r,g))?g.start.row:1/0),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a));if(g&&g.start.row<=r)i=this.getFoldDisplayLine(g),r=g.start.row;else{if(a+l<=e||r>p)return{row:p,column:this.getLine(p).length};i=this.getLine(r),g=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var y=this.$wrapData[r];y&&(o=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,r,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),g?g.idxToPosition(s):{row:r,column:s}},e.prototype.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,o=0,r=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],o=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;a=p){if((s=d.end.row+1)>e)break;p=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;o+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(o))}var g="";d&&a>=p?(g=this.getFoldDisplayLine(d,e,t),r=d.start.row):(g=this.getLine(e).substring(0,t),r=e);var f=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){for(var v=0;g.length>=m[v];)o++,v++;g=g.substring(m[v-1]||0,g.length),f=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(o+=this.lineWidgets[a].rowsAbove),{row:o,column:f+this.$getStringScreenWidth(g)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,o=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);io&&(i=t.end.row+1,o=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;an);r++);return[i,r]})},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},e}();f.$uid=0,f.prototype.$modes=s.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=C,i.implement(f.prototype,a);var m=1,v=2,y=3,w=4,b=9,$=10,x=11,S=12;function C(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),s.defineOptions(f.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=f})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,s=function(){function e(){this.$options={}}return e.prototype.set=function(e){return o.mixin(this.$options,e),this},e.prototype.getOptions=function(){return i.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,o,s){return i=new r(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=o.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;df||(s.push(l=new r(u,f,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;v$&&s[d].end.row==x;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v=c;n--)if(p(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=h,c=l.row;n>=c;n--)if(p(n,Number.MAX_VALUE,e))return}};else u=function(e){var n=l.row;if(!p(n,l.column,e)){for(n+=1;n<=h;n++)if(p(n,0,e))return;if(0!=t.wrap)for(n=c,h=l.row;n<=h;n++)if(p(n,0,e))return}};if(t.$isMultiLine)var d=n.length,p=function(t,i,r){var s=o?t-d+1:t;if(!(s<0||s+d>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!o&&li))return!!r(s,l,s+d-1,h)||void 0}}};else if(o)p=function(t,o,r){var a,l=e.getLine(t),c=[],h=0;for(n.lastIndex=0;a=n.exec(l);){var u=a[0].length;if(h=a.index,!u){if(h>=l.length)break;n.lastIndex=h+=i.skipEmptyMatch(l,h,s)}if(a.index+u>o)break;c.push(a.index,u)}for(var d=c.length-1;d>=0;d-=2){var p=c[d-1];if(r(t,p,t,p+(u=c[d])))return!0}};else p=function(t,o,r){var a,l,c=e.getLine(t);for(n.lastIndex=o;l=n.exec(c);){var h=l[0].length;if(r(t,a=l.index,t,a+h))return!0;if(!h&&(n.lastIndex=a+=i.skipEmptyMatch(c,a,s),a>=c.length))return!1}};return{forEach:u}},e}();t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("../lib/keys"),r=e("../lib/useragent"),s=o.KEY_MODS,a=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(i[o]=r[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var r=this.parseKeys(e),a=s[r.hashId]+r.key;this._addCommandToBinding(i+a,t,n)}),this)},e.prototype._addCommandToBinding=function(e,t,n){var i,o=this.commandKeyBinding;if(t)if(!o[e]||this.$singleCommand)o[e]=t;else{Array.isArray(o[e])?-1!=(i=o[e].indexOf(t))&&o[e].splice(i,1):o[e]=[o[e]],"number"!=typeof n&&(n=l(t));var r=o[e];for(i=0;in)break}r.splice(i,0,t)}else delete o[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},e.prototype.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,i){if(!(i<0)){var o=s[t]+n,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function l(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var c=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.$singleCommand=!0,i}return i(t,e),t}(a);c.call=function(e,t,n){a.prototype.$init.call(e,t,n,!0)},a.call=function(e,t,n){a.prototype.$init.call(e,t,n,!1)},t.HashHandler=c,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,a=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.byName=i.commands,i.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),i}return i(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(r);o.implement(a.prototype,s),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),o=e("../config"),r=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=o.row+1;c++){var h=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==h.length&&(h=" "+h),l+=h}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;st[n].column&&n++,r.unshift(n,0),t.splice.apply(t,r),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var o=1/0,r=0;r0&&!i[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=o;s<=r;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}},e}();t.LineWidgets=o})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(e,t,n){"use strict";var i=e("../lib/keys"),o=e("../mouse/default_gutter_handler").GutterTooltip,r=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===i.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=i.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return null===t&&null!==n?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==t&&null===n?(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(n-e)0||e+t=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,g=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,y=e("./config"),w=e("./token_iterator").TokenIterator,b=e("./line_widgets").LineWidgets,$=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,S=e("./clipboard"),C=e("./lib/keys"),k=function(){function e(t,n,i){this.session,this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new h(this)),this.keyBinding=new u(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new d("")),y.resetOptions(this),i&&this.setOptions(i),y._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},e.prototype.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),o=this.renderer.layerConfig;(i.start.row>=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var r=this.selection.toJSON();this.curOp.selectionAfter=r,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(r),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),o=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),r=t.getMatchingBracketRanges(n,o);if(!r){var s=new w(t,n.row,n.column).getCurrentToken();if(s&&/\b(?:tag-open|tag-name)/.test(s.type)){var a=t.getMatchingTags(n);a&&(r=[a.openTagName,a.closeTagName])}}if(!r&&t.$mode.getMatching&&(r=t.$mode.getMatching(e.session)),r){var l="ace_bracket";Array.isArray(r)?1==r.length&&(l="ace_error_bracket"):r=[r],2==r.length&&(0==g.comparePoints(r[0].end,r[1].start)?r=[g.fromPoints(r[0].start,r[1].end)]:0==g.comparePoints(r[0].start,r[1].end)&&(r=[g.fromPoints(r[1].start,r[0].end)])),t.$bracketHighlight={ranges:r,markerIds:r.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,o=e.getLine(t.start.row),r=o.substring(n,i);if(!(r.length>5e3)&&/[\w\d]/.test(r)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r}),a=o.substring(n-1,i+1);if(s.test(a))return s}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),o=0;oa.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,h=n.getState(o.row),u=(a=n.getLine(o.row),i.checkOutdent(h,a,e));if(n.insert(o,e),r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new g(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new g(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(h,a.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},d)}u&&i.autoOutdent(h,n,o.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new g(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),i="",o="",r="",s=e.getTabString(),a=0;a0&&(i=e.getState(h-1),o=e.getLine(h-1),r=t.getNextLineIndent(i,o,s));var u=e.getLine(h),d=t.$getIndent(u);if(r!==d){if(d.length>0){var p=new g(h,0,h,d.length);e.remove(p)}r.length>0&&e.insert({row:h,column:0},r)}t.autoOutdent(i,e,h)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new g(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),s!==r.end&&n=a&&r<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var h,u=this.$toggleWordPairs,d=0;d=l&&s<=c&&d.match(/((?:https?|ftp):\/\/[\S]+)/)){a=d.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(p){n={error:p}}finally{try{u&&!u.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}return a},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var o=n.start.row;t.duplicateLines(o,o)}else{var r=i?n.start:n.end,s=t.insert(r,t.getTextRange(n));n.start=r,n.end=s,e.setSelectionRange(n,i)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,i,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var r=o.toOrientedRange();n=this.$getSelectedRows(r),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),r.moveBy(i,0),o.fromOrientedRange(r)}else{var s=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,h=0;hp+1)break;p=g.last}for(h--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new w(this.session,n.row,n.column),o=i.getCurrentToken(),r=0;o&&-1!==o.type.indexOf("tag-name")&&(o=i.stepBackward());var s=o||i.stepForward();if(s){var a,l,c=!1,h={},u=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u1?h[s.value]++:"=0;--r)this.$tryReplace(n[r],e)&&i++;return this.selection.setSelectionRange(o),i},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&o.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var r=this.$search.find(this.session);return t.preventScroll?r:r?(this.revealRange(r,n),r):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,r=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=r.top-s.offset;null!=(i=r.top>=0&&a+t.top<0||!(r.topwindow.innerHeight)&&null)&&(o.style.top=a+"px",o.style.left=r.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",r),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var i=this;y.loadModule("ace/ext/prompt",(function(o){o.prompt(i,e,t,n)}))},e}();k.$uid=0,k.prototype.curOp=null,k.prototype.prevOp={},k.prototype.$mergeableCommands=["backspace","del","insertstring"],k.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(k.prototype,f),y.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?A.attach(this):A.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var t=r.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},i=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",i.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor")),this.renderer.$gutter.setAttribute("aria-label",x("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new $(this)),t.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",i.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=k})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,o=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-o*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;nr&&(l=o.end.row+1,r=(o=t.getNextFoldLine(l,o))?o.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,h),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1);var r=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(r+=s.left+s.right)===this.gutterWidth||isNaN(r)||(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;o--)this.$lines.shift();if(i>n)for(o=this.session.getFoldedRowCount(n+1,i);o>0;o--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;o>s&&(o=r.end.row+1,s=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(o>n);){var a=this.$lines.createCell(o,e,this.session,h);this.$renderCell(a,e,r,o),i.push(a),o++}return i},e.prototype.$renderCell=function(e,t,n,o){var r=e.element,s=this.session,a=r.childNodes[0],c=r.childNodes[1],h=r.childNodes[2],u=h.firstChild,d=s.$firstLineNumber,p=s.$breakpoints,g=s.$decorations,f=s.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&s.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",b=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",$=(f?f.getText(s,o):o+d).toString();if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=v&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),p[o]&&(w+=p[o]),g[o]&&(w+=g[o]),this.$annotations[o]&&o!==v&&(w+=this.$annotations[o].className),m){var x=m[o];null==x&&(x=m[o]=s.getFoldWidget(o))}if(x){var S="ace_fold-widget ace_"+x,C="start"==x&&o==v&&on.right-t.right?"foldWidgets":void 0},e}();function h(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");e.appendChild(n);var o=i.createElement("span");e.appendChild(o);var r=i.createElement("span");return o.appendChild(r),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,o.implement(c.prototype,s),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("../lib/dom"),r=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var r=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;i.renderer(t,o,s,r,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,o,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,o,i.clazz,e):o.isMultiLine()?"text"==i.type?this.drawTextMarker(t,o,i.clazz,e):this.drawMultiLineMarker(t,o,i.clazz,e):this.drawSingleLineMarker(t,o,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.id?4:0)|(c==l?8:0)),o,c==l?0:1,r)},e.prototype.drawMultiLineMarker=function(e,t,n,i,o){var r=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=r+t.start.column*i.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,o)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,o)}else{a=this.$getTop(t.end.row,i);var h=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+h+"px;top:"+a+"px;left:"+r+"px;"+(o||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+r+"px;"+(o||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,i,o,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,o,r);var s=i.lineHeight,a=(t.end.column+(o||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(r||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,i,o,r){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(o||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(r||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-r),this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},e.prototype.drawScreenLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},e}();r.prototype.$padding=0,t.Marker=r})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,n){var i=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return i.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,h=function(){function e(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nh&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>o);){var u=r[s++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)for(;s0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var i=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;r>a&&(r=s.end.row+1,a=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(r>n);){var l=this.$lines.createCell(r,e,this.session),c=l.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(c,r,r==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),r++}return i},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,i){for(var o,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,h=this.dom.createFragment(this.element),u=0;o=a.exec(i);){var d=o[1],p=o[2],g=o[3],f=o[4],m=o[5];if(s.showSpaces||!p){var v=u!=o.index?i.slice(u,o.index):"";if(u=o.index+o[0].length,v&&h.appendChild(this.dom.createTextNode(v,this.element)),d){var y=s.session.getScreenTabSize(t+o.index);h.appendChild(s.$tabStrings[y].cloneNode(!0)),t+=y-1}else if(p){if(s.showSpaces)(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=r.stringRepeat(s.SPACE_CHAR,p.length),h.appendChild(b);else h.appendChild(this.dom.createTextNode(p,this.element))}else if(g){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=r.stringRepeat(s.SPACE_CHAR,g.length),h.appendChild(b)}else if(f){t+=1,(b=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",b.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=s.showSpaces?s.SPACE_CHAR:f,h.appendChild(b)}else if(m){t+=1,(b=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",b.className="ace_cjk",b.textContent=m,h.appendChild(b)}}}if(h.appendChild(this.dom.createTextNode(u?i.slice(u):i,this.element)),c(n.type))e.appendChild(h);else{var w="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");"fold"==n.type&&(b.style.width=n.value.length*this.config.characterWidth+"px",b.setAttribute("title",l("Unfold code"))),b.className=w,b.appendChild(h),e.appendChild(b)}return t+i.length},e.prototype.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var o=(i-=i%this.tabSize)/this.tabSize,r=0;ro[r].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(r=t.row+1;r0)for(var i=0;i=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row=s;)a=this.$renderToken(l,a,h,u.substring(0,s-i)),u=u.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(r.stringRepeat("\xa0",n.indent),this.element)),a=0,s=n[++o]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,o,r);n=this.$renderToken(e,n,o,r)}}},e.prototype.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var r=this.dom.createElement("span");r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"":"",e.appendChild(r)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var o=e;if(i.length){var r=this.session.getRowSplitData(t);if(r&&r.length){this.$renderWrappedLine(e,i,r);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(s)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var o=n.getTokens(e);return t.walk((function(e,t,r,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,r=0;r+e[o].value.lengthn-t&&(s=s.substring(0,n-t)),i.push({type:e[o].type,value:s}),r=t+s.length,o+=1);rn?i.push({type:e[o].type,value:s.substring(0,n-r)}):i.push(e[o]),r+=s.length,o+=1}}(o,s,r))}),t.end.row,this.session.getLine(t.end.row).length),i},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();h.prototype.EOF_CHAR="\xb6",h.prototype.EOL_CHAR_LF="\xac",h.prototype.EOL_CHAR_CRLF="\xa4",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="\u2014",h.prototype.SPACE_CHAR="\xb7",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,i.implement(h.prototype,a),t.Text=h})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[o++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();o.prototype.$padding=0,o.prototype.drawCursor=null,t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,l=32768,c=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(c.prototype,a);var h=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,n.$scrollbarWidth=i.width=r.scrollbarWidth(t.ownerDocument),i.inner.style.width=i.element.style.width=(i.width||15)+5+"px",i.$minWidth=0,i}return i(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>l?(this.coeff=l/e,e=l):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(c);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var u=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.height=n.$scrollbarWidth,i.inner.style.height=i.element.style.height=(i.height||15)+5+"px",i}return i(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(c);t.ScrollBar=h,t.ScrollBarV=h,t.ScrollBarH=u,t.VScrollBar=h,t.HScrollBar=u})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var l=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_sb"+t,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(l.prototype,a);var c=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,i.parent=t,i.width=i.VScrollWidth,i.renderer=n,i.inner.style.width=i.element.style.width=(i.width||15)+"px",i.$minWidth=0,i}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,o=t.clientY,r=this.thumbTop;s.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(r+i-o);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return s.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var h=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.scrollWidth=0,i.height=i.HScrollHeight,i.inner.style.height=i.element.style.height=(i.height||12)+"px",i.renderer=n,i}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,o=t.clientX,r=this.thumbLeft;s.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(r+i-o);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return s.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(l);h.prototype.setInnerWidth=h.prototype.setScrollWidth,t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=h,t.VScrollBar=c,t.HScrollBar=h})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event"),o=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,h="function"==typeof ResizeObserver,u=200,d=function(){function e(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",c),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=r.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){e&&(e=r(1/this.$getZoom(this.el),e));function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),d=n(i(h,l),i(h,c),i(o(l,c),o(h,a))),p=r(1+d[0],i(l,a)),g=r(1+d[1],i(c,a));if(t){var f=t,m=d[0]*f[0]/u+d[1]*f[1]/u+1,v=o(r(f[0],p),r(f[1],g));return o(r(1/m/u,v),a)}var y=i(e,a),w=n(i(p,r(d[0],y)),i(g,r(d[1],y)),y);return r(u,w)},e}();d.prototype.$characterSize={width:0,height:0},i.implement(d.prototype,l),t.FontMetrics=d})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiA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1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n white-space: pre;\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/event_emitter").EventEmitter,s=function(){function e(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var r=this.renderer.session.$foldData,s=0;sthis.canvasHeight&&(d=this.canvasHeight-this.halfMinDecorationHeight),h=Math.round(d-this.halfMinDecorationHeight),u=Math.round(d+this.halfMinDecorationHeight)}n.fillStyle=t[i[s].type]||null,n.fillRect(0,c,this.canvasWidth,u-h)}}var p=this.renderer.session.selection.getCursor();if(p){l=this.compensateFoldRows(p.row,r),c=Math.round((p.row-l)*this.lineHeight*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,c,this.canvasWidth,2)}},e.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n},e}();o.implement(s.prototype,r),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/dom"),r=e("./lib/lang"),s=e("./config"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,g=e("./scrollbar_custom").VScrollBar,f=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),w=e("./layer/decorators").Decorator,b=e("./lib/useragent");o.importCssString(y,"ace_editor.css",!1);var $=function(){function e(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var i=this.$textLayer=new c(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;i||(i=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,n,i);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){r|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",l),o.setStyle(this.scroller.style,"right",l),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)}return s.$dirty=!n||!i,r&&this._signal("resize",a),r},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,r=n.top,s=n.left;r-=i.offset;var a=t&&t.useTextareaForIME||b.isMobile?this.lineHeight:1;if(r<0||r>i.height-a)o.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0]}else r+=this.lineHeight+2;else r+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",a+"px"),o.setStyle(e,"width",l+"px"),o.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(r,c))}}}else o.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var r=n.width+2*this.$padding+"px",s=n.minHeight+"px";o.setStyle(this.content.style,"width",r),o.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),r=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==r;s&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+h.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>h.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var p,g,f=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),y=v+m,w=this.lineHeight;v=e.screenToDocumentRow(v,0);var b=e.getFoldLine(v);b&&(v=b.start.row),p=e.documentToScreenRow(v,0),g=e.getRowLength(v)*w,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(y)*w+g,f=this.scrollTop-p*w;var $=0;return(this.layerConfig.width!=o||s)&&($=this.CHANGE_H_SCROLL),(s||d)&&($|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:y,lineHeight:w,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:f,gutterOffset:w?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),$},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),o=i.left,r=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>r?(t&&l+s>r+this.lineHeight&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-a=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(r):Math.round(r);return{row:s,column:a,side:r-a>0?1:-1,offsetX:o}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=this.$blockCursor?Math.floor(r):Math.round(r),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),o)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),r=i.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+r-this.scrollTop}},e.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,i=t||{row:n.row,column:n.column};this.removeGhostText();var o=e.split("\n");if(this.addToken(o[0],"ghost_text",i.row,i.column),this.$ghostText={text:e,position:{row:i.row,column:i.column}},o.length>1){this.$ghostTextWidget={text:o.slice(1).join("\n"),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var r=this.$cursorLayer.getPixelPosition(i,!0),s=this.container.getBoundingClientRect().height,a=o.length*this.lineHeight;if(a1||Math.abs(e.$size.height-i)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,i.implement($.prototype,v),s.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=$})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/net"),r=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.$createWorkerFromOldConfig=function(t,n,i,o,r){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(o),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var i=null,o=!1,a=Object.create(r),c=[],h=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(o?setTimeout(u):u())}});h.setEmitSync=function(e){o=e};var u=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){h.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)u()})),h},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),s=function(){function e(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new i(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+r};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+r};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,o=e("./range").Range,r=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),r=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,r).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],r=e.column0;)y--;if(y>0)for(var w=0;i[w].isEmpty();)w++;for(var b=y;b>=w;b--)i[b].isEmpty()&&i.splice(b,1)}return i}}.call(r.prototype);var d=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(o?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new r(a);this.inVirtualSelectionMode=!0;for(var p=h.length;p--;){if(s)for(;p>0&&h[p].start.row==h[p-1].end.row;)p--;d.fromOrientedRange(h[p]),d.index=p,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===g||(i=g),d.toOrientedRange(h[p])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;is&&(s=n.column),ih?e.insert(i,l.stringRepeat(" ",r-h)):e.remove(new o(i.row,i.column,i.row,i.column-r+h)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,p=u==d;if(p){var g,f=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d0);u<0&&(u=0),d>=f&&(d=f-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,p),this.session.insert({row:u,column:0},m.join("\n")+"\n"),p||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var n,i,o,r=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,o=t[3].length,t):(n+i+o!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(r=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(o=t[3].length),t):[e]})).map(t?c:r?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=n||r.length,l=e.getLength(),c=t,h=t;++tc){var p=e.getLine(h).length;return new i(c,a,h,p)}}},this.openingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(o.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,o=e("../lib/dom"),r=e("../range").Range,s=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),l=a.row,c=n.widgetManager.getWidgetsAtRow(l).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():l-=t;var h,u=function(e,t,n){var i=e.getAnnotations().sort(r.comparePoints);if(i.length){var o=function(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,s=n(t,e[r]);if(s>0)i=r+1;else{if(!(s<0))return r;o=r-1}}return-(i+1)}(i,{row:t,column:-1},r.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var s=i[o];if(s&&n){if(s.row===t){do{s=i[o+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[o+=n]}while(s&&s.row==t);return a.length&&a}}}(n,l,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,h=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;h={text:[s("Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var p={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},g=p.el.appendChild(o.createElement("div")),f=p.el.appendChild(o.createElement("div"));f.className="error_widget_arrow "+h.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;f.style.left=m+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",g.className="error_widget "+h.className,g.innerHTML=h.text.join("
"),g.appendChild(o.createElement("div"));var v=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(v),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(v),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},o.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var i=e("./lib/dom"),o=e("./range").Range,r=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(!(e=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=i.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),h=new r(new l(e),c,n),u={document:c,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),h.on("destroy",(function(){u.editor.container.env=null})),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.Range=o,t.Editor=r,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var i in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(i)&&(n.ace[i]=t[i]);n.ace.default=n.ace,e&&(e.exports=n.ace)}))},454:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var i=e("./lib/dom"),o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,u=e("./clipboard"),d={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}d.SELECTED_TEXT=d.SELECTION;var g=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=d}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return e.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,i){var o=t(e.substr(1));return i.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",o=t.guard;o=new RegExp(o,i.replace(/[^gim]/g,""));var r="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(o,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(r,n),i="E",o=0;o=0&&r.splice(s,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(l){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var r=t[2],s=t[3];if("regex"==r){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==r?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):r&&(i[r]=s)}}return n},e.prototype.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var o=i[t];return o&&(n=o[e]),!!n}),this),n},e}();o.implement(g.prototype,r);var f=function(e,t,n){void 0===n&&(n={});var i=e.getCursorPosition(),o=e.session.getLine(i.row),r=e.session.getTabString(),s=o.match(/^\s*/)[0];i.column1?(y=t[t.length-1].length,v+=t.length-1):y+=e.length,w+=e}else e&&(e.start?e.end={row:v,column:y}:e.start={row:v,column:y})})),{text:w,tabstops:l,tokens:a}},m=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},o=this.tabstops.slice(),r=0;r2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new c,m.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var v=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,h=e("./../lib/useragent"),u=function(e){return"suggest-aria-id:".concat(e)},d=h.isSafari?"menu":"listbox",p=h.isSafari?"menuitem":"option",g=h.isSafari?"aria-current":"aria-selected",f=function(e){var t=new i(e);t.$maxLines=4;var n=new o(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},m=function(e){var t=l.createElement("div"),n=f(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",d),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i,o=function(){};n.focus=o,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=o,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()}));var h=new r(-1,0,-1,1/0),m=new r(-1,0,-1,1/0);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?h.id&&(n.session.removeMarker(h.id),h.id=null):h.id=n.session.addMarker(h,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(i){if(i.x!=e.x||i.y!=e.y){(i=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;h.start.row!=t&&(h.id||n.setRow(t),y(t))}}else i=e})),n.renderer.on("beforeRender",(function(){if(i&&-1!=h.start.row){i.$pos=null;var e=i.getDocumentPosition().row;h.id||n.setRow(e),y(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow],o=document.activeElement;if(i!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),o.removeAttribute("aria-activedescendant"),n.selectedNode.removeAttribute(g),n.selectedNode.removeAttribute("id")),n.selectedNode=i,i){l.addCssClass(i,"ace_selected");var r=u(e);i.id=r,t.element.setAttribute("aria-activedescendant",r),o.setAttribute("aria-activedescendant",r),i.setAttribute("role",p),i.setAttribute("aria-roledescription",c("item")),i.setAttribute("aria-label",n.getData(e).caption||n.getData(e).value),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-posinset",e+1),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute(g,"true")}}));var v=function(){y(-1)},y=function(e,t){e!==h.start.row&&(h.start.row=h.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return h.start.row},s.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,v()})),n.on("hide",v),n.on("changeSelection",v),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var w=n.session.bgTokenizer;return w.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var o=t.caption||t.value||t.name;function r(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,h=0;h<=a.length;h++)if(h!=c&&(t.matchMask&1<=h?"bottom":"top"),"top"===o?(u.bottom=e.top-this.$borderSize,u.top=u.bottom-h):"bottom"===o&&(u.top=e.top+t+this.$borderSize,u.bottom=u.top+h);var g=u.top>=0&&u.bottom<=a;if(!r&&!g)return!1;c.$maxPixelHeight=g?null:"top"===o?p:d,"top"===o?(s.style.top="",s.style.bottom=a-u.bottom+"px",n.isTopdown=!1):(s.style.top=u.top+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var f=e.left;return f+s.offsetWidth>l&&(f=l-s.offsetWidth),s.style.left=f+"px",s.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=o,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=m,t.$singleLineEditor=f,t.getAriaId=u})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,n){"use strict";var i=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var i="doc-tooltip ",o=0;o=0&&n.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var o=[],r=t;r0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,i=t.$cursorLayer.getPixelPosition(this.base,!0);i.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();i.top+=o.top-t.layerConfig.offset,i.left+=o.left-e.renderer.scrollLeft,i.left+=t.gutterWidth;var r={top:i.top,left:i.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(r.top+=t.$ghostTextWidget.el.offsetHeight);var s=e.container.getBoundingClientRect().bottom-n,a=sthis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=!this.ignoreCaption&&r.caption||r.value||r.snippet;if(a){var l,c,h=-1,u=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var p=a.toLowerCase().indexOf(o);if(p>-1)d=p;else for(var g=0;g=0&&(m<0||f0&&(-1===h&&(d+=10),d+=c,u|=1<",s.escapeHTML(e.caption),"","
",s.escapeHTML(h(e.snippet))].join(""))},id:"snippetCompleter"},d=[u,l,c];t.setCompleters=function(e){d.length=0,e&&d.push.apply(d,e)},t.addCompleter=function(e){d.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=u;var p,g={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=r.$modes[e]),e&&(i.files||(i.files={}),v(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},v=function(e,t){t&&e&&!i.files[e]&&(i.files[e]={},r.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){m("ace/mode/"+e)}))))})))},y=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){p=e;var i=e.editor.$liveAutocompletionDelay;i?w.delay(i):b(e)}},w=s.delayedCall((function(){b(p)}),0),b=function(e){var t=e.editor,n=a.getCompletionPrefix(t),i=a.triggerAutocomplete(t);if(n&&n.length>=t.$liveAutocompletionThreshold||i){var r=o.for(t);r.autoShown=!0,r.showPopup(t)}},$=e("../editor").Editor;e("../config").defineOptions($.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:d),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(g),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(g),this.off("changeMode",f))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},4878:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,n){"use strict";var i,o=e("./lib/oop"),r=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),s=e("./editor").Editor,a=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){o.implement(this,r),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new s(new a(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var i=this.$editors.some((function(t){return t.session===e}));return i&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,o=0;o{e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};i.inherits(r,o),r.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},r.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},r.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=r})),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,r=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[o.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:t,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[c("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),e&&0==e.jsx||l.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}i.inherits(a,r),t.JavaScriptHighlightRules=a})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,r=e.findMatchingBracket({row:t,column:o});if(!r||r.row==t)return 0;var s=this.$getIndent(e.getLine(r.row));e.replace(new i(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),o=e("../../range").Range,r=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,r),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(e,t,n,i){var o,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(o=r.match(this.foldingStartMarker)){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(o=r.match(this.foldingStopMarker))){s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),r=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=r)break;if(h.isMultiLine())t=h.end.row;else if(i==c)break}a=t}}return new o(r,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),r=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new o(s,i,n,t.length)}}.call(s.prototype)})),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,r=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=r,this.$outdent=new s,this.$behaviour=new l,this.foldingRules=new c};i.inherits(h,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),r=o.tokens,s=o.state;if(r.length&&"comment"==r[r.length-1].type)return i;if("start"==e||"no_regex"==e)(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(h.prototype),t.Mode=h})),ace.require(["ace/mode/javascript"],(function(t){e&&(e.exports=t)}))},6120:(e,t,n)=>{e=n.nmd(e),ace.define("ace/theme/github_dark-css",["require","exports","module"],(function(e,t,n){n.exports=".ace-github-dark .ace_gutter {\n background: #24292e;\n color: #7388b5\n}\n\n.ace-github-dark .ace_print-margin {\n width: 1px;\n background: #00204b\n}\n\n.ace-github-dark {\n background-color: #24292e;\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_constant.ace_other,\n.ace-github-dark .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_marker-layer .ace_selection {\n background: #003F8E\n}\n\n.ace-github-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #24292e;\n}\n\n.ace-github-dark .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-github-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404F7D\n}\n\n.ace-github-dark .ace_marker-layer .ace_active-line {\n background: #00346E\n}\n\n.ace-github-dark .ace_gutter-active-line {\n background-color: #24292e\n}\n\n.ace-github-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #003F8E\n}\n\n.ace-github-dark .ace_invisible {\n color: #404F7D\n}\n\n.ace-github-dark .ace_keyword,\n.ace-github-dark .ace_meta,\n.ace-github-dark .ace_storage,\n.ace-github-dark .ace_storage.ace_type,\n.ace-github-dark .ace_support.ace_type {\n color: #ff7b72\n}\n\n.ace-github-dark .ace_keyword.ace_operator {\n color: #79c0ff\n}\n\n.ace-github-dark .ace_constant.ace_character,\n.ace-github-dark .ace_constant.ace_language,\n.ace-github-dark .ace_constant.ace_numeric,\n.ace-github-dark .ace_keyword.ace_other.ace_unit,\n.ace-github-dark .ace_support.ace_constant,\n.ace-github-dark .ace_variable.ace_parameter {\n color: #FFC58F\n}\n\n.ace-github-dark .ace_invalid {\n color: #FFFFFF;\n background-color: #F99DA5\n}\n\n.ace-github-dark .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #ff7b72\n}\n\n.ace-github-dark .ace_fold {\n background-color: #BBDAFF;\n border-color: #FFFFFF\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_function,\n.ace-github-dark .ace_support.ace_function,\n.ace-github-dark .ace_variable {\n color: #BBDAFF\n}\n\n.ace-github-dark .ace_support.ace_class,\n.ace-github-dark .ace_support.ace_type {\n color: #FFEEAD\n}\n\n.ace-github-dark .ace_heading,\n.ace-github-dark .ace_markup.ace_heading,\n.ace-github-dark .ace_string {\n color: #9fcef6\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_tag,\n.ace-github-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-github-dark .ace_meta.ace_tag,\n.ace-github-dark .ace_string.ace_regexp,\n.ace-github-dark .ace_variable {\n color: #FF9DA4\n}\n\n.ace-github-dark .ace_comment {\n color: #7285B7\n}\n\n.ace-github-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-github-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n\n.ace-github-dark .ace_constant.ace_buildin {\n color: #0086B3;\n}\n\n.ace-github-dark .ace_variable.ace_language {\n color: #ffffff;\n}\n "})),ace.define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-github-dark",t.cssText=e("./github_dark-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/github_dark"],(function(t){e&&(e.exports=t)}))},5388:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,i,o){"undefined"==typeof o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var r=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];"undefined"==typeof i&&(i=!0);var s=i,a=this.diff_commonPrefix(e,n),l=e.substring(0,a);e=e.substring(a),n=n.substring(a),a=this.diff_commonSuffix(e,n);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),n=n.substring(0,n.length-a);var h=this.diff_compute_(e,n,s,r);return l&&h.unshift(new t.Diff(0,l)),c&&h.push(new t.Diff(0,c)),this.diff_cleanupMerge(h),h},t.prototype.diff_compute_=function(e,i,o,r){var s;if(!e)return[new t.Diff(1,i)];if(!i)return[new t.Diff(n,e)];var a=e.length>i.length?e:i,l=e.length>i.length?i:e,c=a.indexOf(l);if(-1!=c)return s=[new t.Diff(1,a.substring(0,c)),new t.Diff(0,l),new t.Diff(1,a.substring(c+l.length))],e.length>i.length&&(s[0][0]=s[2][0]=n),s;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var h=this.diff_halfMatch_(e,i);if(h){var u=h[0],d=h[1],p=h[2],g=h[3],f=h[4],m=this.diff_main(u,p,o,r),v=this.diff_main(d,g,o,r);return m.concat([new t.Diff(0,f)],v)}return o&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,r):this.diff_bisect_(e,i,r)},t.prototype.diff_lineMode_=function(e,i,o){var r=this.diff_linesToChars_(e,i);e=r.chars1,i=r.chars2;var s=r.lineArray,a=this.diff_main(e,i,!1,o);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push(new t.Diff(0,""));for(var l=0,c=0,h=0,u="",d="";l=1&&h>=1){a.splice(l-c-h,c+h),l=l-c-h;for(var p=this.diff_main(u,d,!1,o),g=p.length-1;g>=0;g--)a.splice(l,0,p[g]);l+=p.length}h=0,c=0,u="",d=""}l++}return a.pop(),a},t.prototype.diff_bisect_=function(e,i,o){for(var r=e.length,s=i.length,a=Math.ceil((r+s)/2),l=a,c=2*a,h=new Array(c),u=new Array(c),d=0;do);w++){for(var b=-w+f;b<=w-m;b+=2){for(var $=l+b,x=(_=b==-w||b!=w&&h[$-1]r)m+=2;else if(x>s)f+=2;else if(g){if((k=l+p-b)>=0&&k=(C=r-u[k]))return this.diff_bisectSplit_(e,i,_,x,o)}}for(var S=-w+v;S<=w-y;S+=2){for(var C,k=l+S,A=(C=S==-w||S!=w&&u[k-1]r)y+=2;else if(A>s)v+=2;else if(!g){if(($=l+p-S)>=0&&$=(C=r-C))return this.diff_bisectSplit_(e,i,_,x,o)}}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,o){var r=e.substring(0,n),s=t.substring(0,i),a=e.substring(n),l=t.substring(i),c=this.diff_main(r,s,!1,o),h=this.diff_main(a,l,!1,o);return c.concat(h)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function o(e){for(var t="",o=0,s=-1,a=n.length;si?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,r,s,a,h]:null}var s,a,l,c,h,u=r(n,i,Math.ceil(n.length/4)),d=r(n,i,Math.ceil(n.length/2));return u||d?(s=d?u&&u[4].length>d[4].length?u:d:u,e.length>t.length?(a=s[0],l=s[1],c=s[2],h=s[3]):(c=s[0],h=s[1],a=s[2],l=s[3]),[a,l,c,h,s[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,o=[],r=0,s=null,a=0,l=0,c=0,h=0,u=0;a0?o[r-1]:-1,l=0,c=0,h=0,u=0,s=null,i=!0)),a++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=f?(g>=d.length/2||g>=p.length/2)&&(e.splice(a,0,new t.Diff(0,p.substring(0,g))),e[a-1][1]=d.substring(0,d.length-g),e[a+1][1]=p.substring(g),a++):(f>=d.length/2||f>=p.length/2)&&(e.splice(a,0,new t.Diff(0,d.substring(0,f))),e[a-1][0]=1,e[a-1][1]=p.substring(0,p.length-f),e[a+1][0]=n,e[a+1][1]=d.substring(f),a++),a++}a++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),o=n.charAt(0),r=i.match(t.nonAlphaNumericRegex_),s=o.match(t.nonAlphaNumericRegex_),a=r&&i.match(t.whitespaceRegex_),l=s&&o.match(t.whitespaceRegex_),c=a&&i.match(t.linebreakRegex_),h=l&&o.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),d=h&&n.match(t.blanklineStartRegex_);return u||d?5:c||h?4:r&&!a&&l?3:a||l?2:r||s?1:0}for(var i=1;i=d&&(d=p,c=o,h=r,u=s)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=h,u?e[i+1][1]=u:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,o=[],r=0,s=null,a=0,l=!1,c=!1,h=!1,u=!1;a0?o[r-1]:-1,h=u=!1),i=!0)),a++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,o=0,r=0,s=0,a="",l="";o1?(0!==r&&0!==s&&(0!==(i=this.diff_commonPrefix(l,a))&&(o-r-s>0&&0==e[o-r-s-1][0]?e[o-r-s-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),o++),l=l.substring(i),a=a.substring(i)),0!==(i=this.diff_commonSuffix(l,a))&&(e[o][1]=l.substring(l.length-i)+e[o][1],l=l.substring(0,l.length-i),a=a.substring(0,a.length-i))),o-=r+s,e.splice(o,r+s),a.length&&(e.splice(o,0,new t.Diff(n,a)),o++),l.length&&(e.splice(o,0,new t.Diff(1,l)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,s=0,r=0,a="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(o=1;ot));i++)s=o,a=r;return e.length!=i&&e[i][0]===n?a:a+(t-s)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,o=//g,s=/\n/g,a=0;a");switch(l){case 1:t[a]=''+c+"";break;case n:t[a]=''+c+"";break;case 0:t[a]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),o=this;function r(e,i){var r=e/t.length,s=Math.abs(n-i);return o.Match_Distance?r+s/o.Match_Distance:s?1:r}var s=this.Match_Threshold,a=e.indexOf(t,n);-1!=a&&(s=Math.min(r(0,a),s),-1!=(a=e.lastIndexOf(t,n+t.length))&&(s=Math.min(r(0,a),s)));var l,c,h=1<=g;v--){var y=i[e.charAt(v-1)];if(m[v]=0===p?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(u[v+1]|u[v])<<1|1|u[v+1],m[v]&h){var w=r(p,v-1);if(w<=s){if(s=w,!((a=v-1)>n))break;g=Math.max(1,2*n-a)}}}if(r(p+1,n)>s)break;u=m}return a},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(e&&"object"==typeof e&&"undefined"==typeof i&&"undefined"==typeof o)s=e,r=this.diff_text1(s);else if("string"==typeof e&&i&&"object"==typeof i&&"undefined"==typeof o)r=e,s=i;else{if("string"!=typeof e||"string"!=typeof i||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");r=e,s=o}if(0===s.length)return[];for(var a=[],l=new t.patch_obj,c=0,h=0,u=0,d=r,p=r,g=0;g=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,d),a.push(l),l=new t.patch_obj,c=0,d=p,h=u)}1!==f&&(h+=m.length),f!==n&&(u+=m.length)}return c&&(this.patch_addContext_(l,d),a.push(l)),a},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(a=this.match_main(t,h.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,h.substring(h.length-this.Match_MaxBits),c+h.length-this.Match_MaxBits))||a>=u)&&(a=-1):a=this.match_main(t,h,c),-1==a)r[s]=!1,o-=e[s].length2-e[s].length1;else if(r[s]=!0,o=a-c,h==(l=-1==u?t.substring(a,a+h.length):t.substring(a,u+this.Match_MaxBits)))t=t.substring(0,a)+this.diff_text2(e[s].diffs)+t.substring(a+h.length);else{var d=this.diff_main(h,l,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(d)/h.length>this.Patch_DeleteThreshold)r[s]=!1;else{this.diff_cleanupSemanticLossless(d);for(var p,g=0,f=0;fs[0][1].length){var a=n-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1],r.start1-=a,r.start2-=a,r.length1+=a,r.length2+=a}if(0==(s=(r=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new t.Diff(0,i)),r.length1+=n,r.length2+=n;else if(n>s[s.length-1][1].length){a=n-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,a),r.length1+=a,r.length2+=a}return i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,o=0;o2*i?(c.length1+=d.length,s+=d.length,h=!1,c.diffs.push(new t.Diff(u,d)),r.diffs.shift()):(d=d.substring(0,i-c.length1-this.Patch_Margin),c.length1+=d.length,s+=d.length,0===u?(c.length2+=d.length,a+=d.length):h=!1,c.diffs.push(new t.Diff(u,d)),d==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(d.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var p=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new t.Diff(0,p))),h||e.splice(++o,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{var i="__lodash_hash_undefined__",o=1/0,r="[object Function]",s="[object GeneratorFunction]",a="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,h=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var v=Array.prototype,y=Function.prototype,w=Object.prototype,b=m["__core-js_shared__"],$=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=y.toString,S=w.hasOwnProperty,C=w.toString,k=RegExp("^"+x.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=m.Symbol,_=v.splice,L=W(m,"Map"),M=W(Object,"create"),T=A?A.prototype:void 0,R=T?T.toString:void 0;function E(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},I.prototype.set=function(e,t){var n=this.__data__,i=D(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new E,map:new(L||I),string:new E}},O.prototype.delete=function(e){return P(this,e).delete(e)},O.prototype.get=function(e){return P(this,e).get(e)},O.prototype.has=function(e){return P(this,e).has(e)},O.prototype.set=function(e,t){return P(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return h.test(e)&&n.push(""),e.replace(u,(function(e,t,i,o){n.push(i?o.replace(d,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var s=e.apply(this,i);return n.cache=r.set(o,s),s};return n.cache=new(z.Cache||O),n}z.Cache=O;var j=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&C.call(e)==a}e.exports=function(e,t,n){var i=null==e?void 0:F(e,t);return void 0===i?n:i}},67:(e,t,n)=>{e=n.nmd(e);var i="__lodash_hash_undefined__",o=1,r=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",v="[object Null]",y="[object Object]",w="[object Promise]",b="[object Proxy]",$="[object RegExp]",x="[object Set]",S="[object String]",C="[object Symbol]",k="[object Undefined]",A="[object WeakMap]",_="[object ArrayBuffer]",L="[object DataView]",M=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[a]=R[l]=R[_]=R[h]=R[L]=R[u]=R[d]=R[p]=R[f]=R[m]=R[y]=R[$]=R[x]=R[S]=R[A]=!1;var E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,O=E||I||Function("return this")(),D=t&&!t.nodeType&&t,F=D&&e&&!e.nodeType&&e,N=F&&F.exports===D,P=N&&E.process,W=function(){try{return P&&P.binding&&P.binding("util")}catch(e){}}(),H=W&&W.isTypedArray;function B(e,t){for(var n=-1,i=null==e?0:e.length;++nc))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var d=-1,p=!0,g=n&r?new Ae:void 0;for(a.set(e,t),a.set(t,e);++d-1},Ce.prototype.set=function(e,t){var n=this.__data__,i=Me(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ke.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(ue||Ce),string:new Se}},ke.prototype.delete=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},ke.prototype.get=function(e){return Ne(this,e).get(e)},ke.prototype.has=function(e){return Ne(this,e).has(e)},ke.prototype.set=function(e,t){var n=Ne(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Ae.prototype.add=Ae.prototype.push=function(e){return this.__data__.set(e,i),this},Ae.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new Ce,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ce){var i=n.__data__;if(!ue||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ke(i)}return n.set(e,t),this.size=n.size,this};var We=ae?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=s}function qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Xe(e){return null!=e&&"object"==typeof e}var Qe=H?function(e){return function(t){return e(t)}}(H):function(e){return Xe(e)&&Ye(e.length)&&!!R[Te(e)]};function Ze(e){return null!=(t=e)&&Ye(t.length)&&!Ke(t)?Le(e):Oe(e);var t}e.exports=function(e,t){return Ee(e,t)}},1497:(e,t,n)=>{"use strict";var i=n(3218);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},5173:(e,t,n)=>{e.exports=n(1497)()},3218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5494:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&this.handleMarkers(x);var A=this.editor.$options;c.editorOptions.forEach((function(t){A.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(b)&&b.forEach((function(t){"string"===typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),w&&w(this.editor),this.editor.resize(),s&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return"undefined"===typeof window?(n.g.window={},e=n(6603),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(6603),e};t.debounce=function(e,t){var n=null;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(i,o)}),t)}}},1869:(e,t,n)=>{"use strict";var i=n(5494);n(2734).default,n(225).default,t.Ay=i.default},225:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers($,t);for(i=0;i subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n });\n}\nif (!String.prototype.repeat) {\n defineProp(String.prototype, \"repeat\", function (count) {\n var result = \"\";\n var string = this;\n while (count > 0) {\n if (count & 1)\n result += string;\n if ((count >>= 1))\n string += string;\n }\n return result;\n });\n}\nif (!String.prototype.includes) {\n defineProp(String.prototype, \"includes\", function (str, position) {\n return this.indexOf(str, position) != -1;\n });\n}\nif (!Object.assign) {\n Object.assign = function (target) {\n if (target === undefined || target === null) {\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n Object.keys(source).forEach(function (key) {\n output[key] = source[key];\n });\n }\n }\n return output;\n };\n}\nif (!Object.values) {\n Object.values = function (o) {\n return Object.keys(o).map(function (k) {\n return o[k];\n });\n };\n}\nif (!Array.prototype.find) {\n defineProp(Array.prototype, \"find\", function (predicate) {\n var len = this.length;\n var thisArg = arguments[1];\n for (var k = 0; k < len; k++) {\n var kValue = this[k];\n if (predicate.call(thisArg, kValue, k, this)) {\n return kValue;\n }\n }\n });\n}\nif (!Array.prototype.findIndex) {\n defineProp(Array.prototype, \"findIndex\", function (predicate) {\n var len = this.length;\n var thisArg = arguments[1];\n for (var k = 0; k < len; k++) {\n var kValue = this[k];\n if (predicate.call(thisArg, kValue, k, this)) {\n return k;\n }\n }\n });\n}\nif (!Array.prototype.includes) {\n defineProp(Array.prototype, \"includes\", function (item, position) {\n return this.indexOf(item, position) != -1;\n });\n}\nif (!Array.prototype.fill) {\n defineProp(Array.prototype, \"fill\", function (value) {\n var O = this;\n var len = O.length >>> 0;\n var start = arguments[1];\n var relativeStart = start >> 0;\n var k = relativeStart < 0\n ? Math.max(len + relativeStart, 0)\n : Math.min(relativeStart, len);\n var end = arguments[2];\n var relativeEnd = end === undefined ? len : end >> 0;\n var final = relativeEnd < 0\n ? Math.max(len + relativeEnd, 0)\n : Math.min(relativeEnd, len);\n while (k < final) {\n O[k] = value;\n k++;\n }\n return O;\n });\n}\nif (!Array.of) {\n defineProp(Array, \"of\", function () {\n return Array.prototype.slice.call(arguments);\n });\n}\n\n});\n\nace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/es6-shim\"], function(require, exports, module){// vim:set ts=4 sts=4 sw=4 st:\n\"use strict\";\nrequire(\"./es6-shim\");\n\n});\n\nace.define(\"ace/lib/deep_copy\",[\"require\",\"exports\",\"module\"], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {\n if (typeof obj !== \"object\" || !obj)\n return obj;\n var copy;\n if (Array.isArray(obj)) {\n copy = [];\n for (var key = 0; key < obj.length; key++) {\n copy[key] = deepCopy(obj[key]);\n }\n return copy;\n }\n if (Object.prototype.toString.call(obj) !== \"[object Object]\")\n return obj;\n copy = {};\n for (var key in obj)\n copy[key] = deepCopy(obj[key]);\n return copy;\n};\n\n});\n\nace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\",\"ace/lib/deep_copy\"], function(require, exports, module){\"use strict\";\nexports.last = function (a) {\n return a[a.length - 1];\n};\nexports.stringReverse = function (string) {\n return string.split(\"\").reverse().join(\"\");\n};\nexports.stringRepeat = function (string, count) {\n var result = '';\n while (count > 0) {\n if (count & 1)\n result += string;\n if (count >>= 1)\n string += string;\n }\n return result;\n};\nvar trimBeginRegexp = /^\\s\\s*/;\nvar trimEndRegexp = /\\s\\s*$/;\nexports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n};\nexports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n};\nexports.copyObject = function (obj) {\n var copy = {};\n for (var key in obj) {\n copy[key] = obj[key];\n }\n return copy;\n};\nexports.copyArray = function (array) {\n var copy = [];\n for (var i = 0, l = array.length; i < l; i++) {\n if (array[i] && typeof array[i] == \"object\")\n copy[i] = this.copyObject(array[i]);\n else\n copy[i] = array[i];\n }\n return copy;\n};\nexports.deepCopy = require(\"./deep_copy\").deepCopy;\nexports.arrayToMap = function (arr) {\n var map = {};\n for (var i = 0; i < arr.length; i++) {\n map[arr[i]] = 1;\n }\n return map;\n};\nexports.createMap = function (props) {\n var map = Object.create(null);\n for (var i in props) {\n map[i] = props[i];\n }\n return map;\n};\nexports.arrayRemove = function (array, value) {\n for (var i = 0; i <= array.length; i++) {\n if (value === array[i]) {\n array.splice(i, 1);\n }\n }\n};\nexports.escapeRegExp = function (str) {\n return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g, '\\\\$1');\n};\nexports.escapeHTML = function (str) {\n return (\"\" + str).replace(/&/g, \"&\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/ 0xffff ? 2 : 1;\n};\n\n});\n\nace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nexports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n};\nexports.getOS = function () {\n if (exports.isMac) {\n return exports.OS.MAC;\n }\n else if (exports.isLinux) {\n return exports.OS.LINUX;\n }\n else {\n return exports.OS.WINDOWS;\n }\n};\nvar _navigator = typeof navigator == \"object\" ? navigator : {};\nvar os = (/mac|win|linux/i.exec(_navigator.platform) || [\"other\"])[0].toLowerCase();\nvar ua = _navigator.userAgent || \"\";\nvar appName = _navigator.appName || \"\";\nexports.isWin = (os == \"win\");\nexports.isMac = (os == \"mac\");\nexports.isLinux = (os == \"linux\");\nexports.isIE =\n (appName == \"Microsoft Internet Explorer\" || appName.indexOf(\"MSAppHost\") >= 0)\n ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/) || [])[1])\n : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/) || [])[1]); // for ie\nexports.isOldIE = exports.isIE && exports.isIE < 9;\nexports.isGecko = exports.isMozilla = ua.match(/ Gecko\\/\\d+/);\nexports.isOpera = typeof opera == \"object\" && Object.prototype.toString.call(window[\"opera\"]) == \"[object Opera]\";\nexports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\nexports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\nexports.isSafari = parseFloat(ua.split(\" Safari/\")[1]) && !exports.isChrome || undefined;\nexports.isEdge = parseFloat(ua.split(\" Edge/\")[1]) || undefined;\nexports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\nexports.isAndroid = ua.indexOf(\"Android\") >= 0;\nexports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\nexports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window[\"MSStream\"];\nif (exports.isIOS)\n exports.isMac = true;\nexports.isMobile = exports.isIOS || exports.isAndroid;\n\n});\n\nace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar useragent = require(\"./useragent\");\nvar XHTML_NS = \"http://www.w3.org/1999/xhtml\";\nexports.buildDom = function buildDom(arr, parent, refs) {\n if (typeof arr == \"string\" && arr) {\n var txt = document.createTextNode(arr);\n if (parent)\n parent.appendChild(txt);\n return txt;\n }\n if (!Array.isArray(arr)) {\n if (arr && arr.appendChild && parent)\n parent.appendChild(arr);\n return arr;\n }\n if (typeof arr[0] != \"string\" || !arr[0]) {\n var els = [];\n for (var i = 0; i < arr.length; i++) {\n var ch = buildDom(arr[i], parent, refs);\n ch && els.push(ch);\n }\n return els;\n }\n var el = document.createElement(arr[0]);\n var options = arr[1];\n var childIndex = 1;\n if (options && typeof options == \"object\" && !Array.isArray(options))\n childIndex = 2;\n for (var i = childIndex; i < arr.length; i++)\n buildDom(arr[i], el, refs);\n if (childIndex == 2) {\n Object.keys(options).forEach(function (n) {\n var val = options[n];\n if (n === \"class\") {\n el.className = Array.isArray(val) ? val.join(\" \") : val;\n }\n else if (typeof val == \"function\" || n == \"value\" || n[0] == \"$\") {\n el[n] = val;\n }\n else if (n === \"ref\") {\n if (refs)\n refs[val] = el;\n }\n else if (n === \"style\") {\n if (typeof val == \"string\")\n el.style.cssText = val;\n }\n else if (val != null) {\n el.setAttribute(n, val);\n }\n });\n }\n if (parent)\n parent.appendChild(el);\n return el;\n};\nexports.getDocumentHead = function (doc) {\n if (!doc)\n doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n};\nexports.createElement = function (tag, ns) {\n return document.createElementNS ?\n document.createElementNS(ns || XHTML_NS, tag) :\n document.createElement(tag);\n};\nexports.removeChildren = function (element) {\n element.innerHTML = \"\";\n};\nexports.createTextNode = function (textContent, element) {\n var doc = element ? element.ownerDocument : document;\n return doc.createTextNode(textContent);\n};\nexports.createFragment = function (element) {\n var doc = element ? element.ownerDocument : document;\n return doc.createDocumentFragment();\n};\nexports.hasCssClass = function (el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n};\nexports.addCssClass = function (el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n};\nexports.removeCssClass = function (el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n classes.splice(index, 1);\n }\n el.className = classes.join(\" \");\n};\nexports.toggleCssClass = function (el, name) {\n var classes = el.className.split(/\\s+/g), add = true;\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n add = false;\n classes.splice(index, 1);\n }\n if (add)\n classes.push(name);\n el.className = classes.join(\" \");\n return add;\n};\nexports.setCssClass = function (node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n }\n else {\n exports.removeCssClass(node, className);\n }\n};\nexports.hasCssString = function (id, doc) {\n var index = 0, sheets;\n doc = doc || document;\n if ((sheets = doc.querySelectorAll(\"style\"))) {\n while (index < sheets.length) {\n if (sheets[index++].id === id) {\n return true;\n }\n }\n }\n};\nexports.removeElementById = function (id, doc) {\n doc = doc || document;\n if (doc.getElementById(id)) {\n doc.getElementById(id).remove();\n }\n};\nvar strictCSP;\nvar cssCache = [];\nexports.useStrictCSP = function (value) {\n strictCSP = value;\n if (value == false)\n insertPendingStyles();\n else if (!cssCache)\n cssCache = [];\n};\nfunction insertPendingStyles() {\n var cache = cssCache;\n cssCache = null;\n cache && cache.forEach(function (item) {\n importCssString(item[0], item[1]);\n });\n}\nfunction importCssString(cssText, id, target) {\n if (typeof document == \"undefined\")\n return;\n if (cssCache) {\n if (target) {\n insertPendingStyles();\n }\n else if (target === false) {\n return cssCache.push([cssText, id]);\n }\n }\n if (strictCSP)\n return;\n var container = target;\n if (!target || !target.getRootNode) {\n container = document;\n }\n else {\n container = target.getRootNode();\n if (!container || container == target)\n container = document;\n }\n var doc = container.ownerDocument || container;\n if (id && exports.hasCssString(id, container))\n return null;\n if (id)\n cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n var style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id)\n style.id = id;\n if (container == doc)\n container = exports.getDocumentHead(doc);\n container.insertBefore(style, container.firstChild);\n}\nexports.importCssString = importCssString;\nexports.importCssStylsheet = function (uri, doc) {\n exports.buildDom([\"link\", { rel: \"stylesheet\", href: uri }], exports.getDocumentHead(doc));\n};\nexports.scrollbarWidth = function (doc) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n outer.appendChild(inner);\n var body = (doc && doc.documentElement) || (document && document.documentElement);\n if (!body)\n return 0;\n body.appendChild(outer);\n var noScrollbar = inner.offsetWidth;\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n if (noScrollbar === withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n body.removeChild(outer);\n return noScrollbar - withScrollbar;\n};\nexports.computedStyle = function (element, style) {\n return window.getComputedStyle(element, \"\") || {};\n};\nexports.setStyle = function (styles, property, value) {\n if (styles[property] !== value) {\n styles[property] = value;\n }\n};\nexports.HAS_CSS_ANIMATION = false;\nexports.HAS_CSS_TRANSFORMS = false;\nexports.HI_DPI = useragent.isWin\n ? typeof window !== \"undefined\" && window.devicePixelRatio >= 1.5\n : true;\nif (useragent.isChromeOS)\n exports.HI_DPI = false;\nif (typeof document !== \"undefined\") {\n var div = document.createElement(\"div\");\n if (exports.HI_DPI && div.style.transform !== undefined)\n exports.HAS_CSS_TRANSFORMS = true;\n if (!useragent.isEdge && typeof div.style.animationName !== \"undefined\")\n exports.HAS_CSS_ANIMATION = true;\n div = null;\n}\nif (exports.HAS_CSS_TRANSFORMS) {\n exports.translate = function (element, tx, ty) {\n element.style.transform = \"translate(\" + Math.round(tx) + \"px, \" + Math.round(ty) + \"px)\";\n };\n}\nelse {\n exports.translate = function (element, tx, ty) {\n element.style.top = Math.round(ty) + \"px\";\n element.style.left = Math.round(tx) + \"px\";\n };\n}\n\n});\n\nace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){/*\n * based on code from:\n *\n * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/requirejs for details\n */\n\"use strict\";\nvar dom = require(\"./dom\");\nexports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n xhr.send(null);\n};\nexports.loadScript = function (path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n s.src = path;\n head.appendChild(s);\n s.onload = s.onreadystatechange = function (_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort)\n callback();\n }\n };\n};\nexports.qualifyURL = function (url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n};\n\n});\n\nace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nexports.inherits = function (ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\nexports.mixin = function (obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n return obj;\n};\nexports.implement = function (proto, mixin) {\n exports.mixin(proto, mixin);\n};\n\n});\n\nace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar EventEmitter = {};\nvar stopPropagation = function () { this.propagationStopped = true; };\nvar preventDefault = function () { this.defaultPrevented = true; };\nEventEmitter._emit =\n EventEmitter._dispatchEvent = function (eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler)\n return;\n if (typeof e != \"object\" || !e)\n e = {};\n if (!e.type)\n e.type = eventName;\n if (!e.stopPropagation)\n e.stopPropagation = stopPropagation;\n if (!e.preventDefault)\n e.preventDefault = preventDefault;\n listeners = listeners.slice();\n for (var i = 0; i < listeners.length; i++) {\n listeners[i](e, this);\n if (e.propagationStopped)\n break;\n }\n if (defaultHandler && !e.defaultPrevented)\n return defaultHandler(e, this);\n };\nEventEmitter._signal = function (eventName, e) {\n var listeners = (this._eventRegistry || {})[eventName];\n if (!listeners)\n return;\n listeners = listeners.slice();\n for (var i = 0; i < listeners.length; i++)\n listeners[i](e, this);\n};\nEventEmitter.once = function (eventName, callback) {\n var _self = this;\n this.on(eventName, function newCallback() {\n _self.off(eventName, newCallback);\n callback.apply(null, arguments);\n });\n if (!callback) {\n return new Promise(function (resolve) {\n callback = resolve;\n });\n }\n};\nEventEmitter.setDefaultHandler = function (eventName, callback) {\n var handlers = this._defaultHandlers;\n if (!handlers)\n handlers = this._defaultHandlers = { _disabled_: {} };\n if (handlers[eventName]) {\n var old = handlers[eventName];\n var disabled = handlers._disabled_[eventName];\n if (!disabled)\n handlers._disabled_[eventName] = disabled = [];\n disabled.push(old);\n var i = disabled.indexOf(callback);\n if (i != -1)\n disabled.splice(i, 1);\n }\n handlers[eventName] = callback;\n};\nEventEmitter.removeDefaultHandler = function (eventName, callback) {\n var handlers = this._defaultHandlers;\n if (!handlers)\n return;\n var disabled = handlers._disabled_[eventName];\n if (handlers[eventName] == callback) {\n if (disabled)\n this.setDefaultHandler(eventName, disabled.pop());\n }\n else if (disabled) {\n var i = disabled.indexOf(callback);\n if (i != -1)\n disabled.splice(i, 1);\n }\n};\nEventEmitter.on =\n EventEmitter.addEventListener = function (eventName, callback, capturing) {\n this._eventRegistry = this._eventRegistry || {};\n var listeners = this._eventRegistry[eventName];\n if (!listeners)\n listeners = this._eventRegistry[eventName] = [];\n if (listeners.indexOf(callback) == -1)\n listeners[capturing ? \"unshift\" : \"push\"](callback);\n return callback;\n };\nEventEmitter.off =\n EventEmitter.removeListener =\n EventEmitter.removeEventListener = function (eventName, callback) {\n this._eventRegistry = this._eventRegistry || {};\n var listeners = this._eventRegistry[eventName];\n if (!listeners)\n return;\n var index = listeners.indexOf(callback);\n if (index !== -1)\n listeners.splice(index, 1);\n };\nEventEmitter.removeAllListeners = function (eventName) {\n if (!eventName)\n this._eventRegistry = this._defaultHandlers = undefined;\n if (this._eventRegistry)\n this._eventRegistry[eventName] = undefined;\n if (this._defaultHandlers)\n this._defaultHandlers[eventName] = undefined;\n};\nexports.EventEmitter = EventEmitter;\n\n});\n\nace.define(\"ace/lib/report_error\",[\"require\",\"exports\",\"module\"], function(require, exports, module){exports.reportError = function reportError(msg, data) {\n var e = new Error(msg);\n e[\"data\"] = data;\n if (typeof console == \"object\" && console.error)\n console.error(e);\n setTimeout(function () { throw e; });\n};\n\n});\n\nace.define(\"ace/lib/app_config\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/lib/report_error\"], function(require, exports, module){\"no use strict\";\nvar oop = require(\"./oop\");\nvar EventEmitter = require(\"./event_emitter\").EventEmitter;\nvar reportError = require(\"./report_error\").reportError;\nvar optionsProvider = {\n setOptions: function (optList) {\n Object.keys(optList).forEach(function (key) {\n this.setOption(key, optList[key]);\n }, this);\n },\n getOptions: function (optionNames) {\n var result = {};\n if (!optionNames) {\n var options = this.$options;\n optionNames = Object.keys(options).filter(function (key) {\n return !options[key].hidden;\n });\n }\n else if (!Array.isArray(optionNames)) {\n result = optionNames;\n optionNames = Object.keys(result);\n }\n optionNames.forEach(function (key) {\n result[key] = this.getOption(key);\n }, this);\n return result;\n },\n setOption: function (name, value) {\n if (this[\"$\" + name] === value)\n return;\n var opt = this.$options[name];\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n if (opt.forwardTo)\n return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);\n if (!opt.handlesSet)\n this[\"$\" + name] = value;\n if (opt && opt.set)\n opt.set.call(this, value);\n },\n getOption: function (name) {\n var opt = this.$options[name];\n if (!opt) {\n return warn('misspelled option \"' + name + '\"');\n }\n if (opt.forwardTo)\n return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);\n return opt && opt.get ? opt.get.call(this) : this[\"$\" + name];\n }\n};\nfunction warn(message) {\n if (typeof console != \"undefined\" && console.warn)\n console.warn.apply(console, arguments);\n}\nvar messages;\nvar AppConfig = /** @class */ (function () {\n function AppConfig() {\n this.$defaultOptions = {};\n }\n AppConfig.prototype.defineOptions = function (obj, path, options) {\n if (!obj.$options)\n this.$defaultOptions[path] = obj.$options = {};\n Object.keys(options).forEach(function (key) {\n var opt = options[key];\n if (typeof opt == \"string\")\n opt = { forwardTo: opt };\n opt.name || (opt.name = key);\n obj.$options[opt.name] = opt;\n if (\"initialValue\" in opt)\n obj[\"$\" + opt.name] = opt.initialValue;\n });\n oop.implement(obj, optionsProvider);\n return this;\n };\n AppConfig.prototype.resetOptions = function (obj) {\n Object.keys(obj.$options).forEach(function (key) {\n var opt = obj.$options[key];\n if (\"value\" in opt)\n obj.setOption(key, opt.value);\n });\n };\n AppConfig.prototype.setDefaultValue = function (path, name, value) {\n if (!path) {\n for (path in this.$defaultOptions)\n if (this.$defaultOptions[path][name])\n break;\n if (!this.$defaultOptions[path][name])\n return false;\n }\n var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});\n if (opts[name]) {\n if (opts.forwardTo)\n this.setDefaultValue(opts.forwardTo, name, value);\n else\n opts[name].value = value;\n }\n };\n AppConfig.prototype.setDefaultValues = function (path, optionHash) {\n Object.keys(optionHash).forEach(function (key) {\n this.setDefaultValue(path, key, optionHash[key]);\n }, this);\n };\n AppConfig.prototype.setMessages = function (value) {\n messages = value;\n };\n AppConfig.prototype.nls = function (string, params) {\n if (messages && !messages[string]) {\n warn(\"No message found for '\" + string + \"' in the provided messages, falling back to default English message.\");\n }\n var translated = messages && messages[string] || string;\n if (params) {\n translated = translated.replace(/\\$(\\$|[\\d]+)/g, function (_, name) {\n if (name == \"$\")\n return \"$\";\n return params[name];\n });\n }\n return translated;\n };\n return AppConfig;\n}());\nAppConfig.prototype.warn = warn;\nAppConfig.prototype.reportError = reportError;\noop.implement(AppConfig.prototype, EventEmitter);\nexports.AppConfig = AppConfig;\n\n});\n\nace.define(\"ace/theme/textmate-css\",[\"require\",\"exports\",\"module\"], function(require, exports, module){module.exports = \".ace-tm .ace_gutter {\\n background: #f0f0f0;\\n color: #333;\\n}\\n\\n.ace-tm .ace_print-margin {\\n width: 1px;\\n background: #e8e8e8;\\n}\\n\\n.ace-tm .ace_fold {\\n background-color: #6B72E6;\\n}\\n\\n.ace-tm {\\n background-color: #FFFFFF;\\n color: black;\\n}\\n\\n.ace-tm .ace_cursor {\\n color: black;\\n}\\n \\n.ace-tm .ace_invisible {\\n color: rgb(191, 191, 191);\\n}\\n\\n.ace-tm .ace_storage,\\n.ace-tm .ace_keyword {\\n color: blue;\\n}\\n\\n.ace-tm .ace_constant {\\n color: rgb(197, 6, 11);\\n}\\n\\n.ace-tm .ace_constant.ace_buildin {\\n color: rgb(88, 72, 246);\\n}\\n\\n.ace-tm .ace_constant.ace_language {\\n color: rgb(88, 92, 246);\\n}\\n\\n.ace-tm .ace_constant.ace_library {\\n color: rgb(6, 150, 14);\\n}\\n\\n.ace-tm .ace_invalid {\\n background-color: rgba(255, 0, 0, 0.1);\\n color: red;\\n}\\n\\n.ace-tm .ace_support.ace_function {\\n color: rgb(60, 76, 114);\\n}\\n\\n.ace-tm .ace_support.ace_constant {\\n color: rgb(6, 150, 14);\\n}\\n\\n.ace-tm .ace_support.ace_type,\\n.ace-tm .ace_support.ace_class {\\n color: rgb(109, 121, 222);\\n}\\n\\n.ace-tm .ace_keyword.ace_operator {\\n color: rgb(104, 118, 135);\\n}\\n\\n.ace-tm .ace_string {\\n color: rgb(3, 106, 7);\\n}\\n\\n.ace-tm .ace_comment {\\n color: rgb(76, 136, 107);\\n}\\n\\n.ace-tm .ace_comment.ace_doc {\\n color: rgb(0, 102, 255);\\n}\\n\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\n color: rgb(128, 159, 191);\\n}\\n\\n.ace-tm .ace_constant.ace_numeric {\\n color: rgb(0, 0, 205);\\n}\\n\\n.ace-tm .ace_variable {\\n color: rgb(49, 132, 149);\\n}\\n\\n.ace-tm .ace_xml-pe {\\n color: rgb(104, 104, 91);\\n}\\n\\n.ace-tm .ace_entity.ace_name.ace_function {\\n color: #0000A2;\\n}\\n\\n\\n.ace-tm .ace_heading {\\n color: rgb(12, 7, 255);\\n}\\n\\n.ace-tm .ace_list {\\n color:rgb(185, 6, 144);\\n}\\n\\n.ace-tm .ace_meta.ace_tag {\\n color:rgb(0, 22, 142);\\n}\\n\\n.ace-tm .ace_string.ace_regex {\\n color: rgb(255, 0, 0)\\n}\\n\\n.ace-tm .ace_marker-layer .ace_selection {\\n background: rgb(181, 213, 255);\\n}\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\n box-shadow: 0 0 3px 0px white;\\n}\\n.ace-tm .ace_marker-layer .ace_step {\\n background: rgb(252, 255, 0);\\n}\\n\\n.ace-tm .ace_marker-layer .ace_stack {\\n background: rgb(164, 229, 101);\\n}\\n\\n.ace-tm .ace_marker-layer .ace_bracket {\\n margin: -1px 0 0 -1px;\\n border: 1px solid rgb(192, 192, 192);\\n}\\n\\n.ace-tm .ace_marker-layer .ace_active-line {\\n background: rgba(0, 0, 0, 0.07);\\n}\\n\\n.ace-tm .ace_gutter-active-line {\\n background-color : #dcdcdc;\\n}\\n\\n.ace-tm .ace_marker-layer .ace_selected-word {\\n background: rgb(250, 250, 255);\\n border: 1px solid rgb(200, 200, 250);\\n}\\n\\n.ace-tm .ace_indent-guide {\\n background: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\n}\\n\\n.ace-tm .ace_indent-guide-active {\\n background: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC\\\") right repeat-y;\\n}\\n\";\n\n});\n\nace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/theme/textmate-css\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nexports.isDark = false;\nexports.cssClass = \"ace-tm\";\nexports.cssText = require(\"./textmate-css\");\nexports.$id = \"ace/theme/textmate\";\nvar dom = require(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass, false);\n\n});\n\nace.define(\"ace/config\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/net\",\"ace/lib/dom\",\"ace/lib/app_config\",\"ace/theme/textmate\"], function(require, exports, module){\"no use strict\";\nvar lang = require(\"./lib/lang\");\nvar net = require(\"./lib/net\");\nvar dom = require(\"./lib/dom\");\nvar AppConfig = require(\"./lib/app_config\").AppConfig;\nmodule.exports = exports = new AppConfig();\nvar options = {\n packaged: false,\n workerPath: null,\n modePath: null,\n themePath: null,\n basePath: \"\",\n suffix: \".js\",\n $moduleUrls: {},\n loadWorkerFromBlob: true,\n sharedPopups: false,\n useStrictCSP: null\n};\nexports.get = function (key) {\n if (!options.hasOwnProperty(key))\n throw new Error(\"Unknown config key: \" + key);\n return options[key];\n};\nexports.set = function (key, value) {\n if (options.hasOwnProperty(key))\n options[key] = value;\n else if (this.setDefaultValue(\"\", key, value) == false)\n throw new Error(\"Unknown config key: \" + key);\n if (key == \"useStrictCSP\")\n dom.useStrictCSP(value);\n};\nexports.all = function () {\n return lang.copyObject(options);\n};\nexports.$modes = {};\nexports.moduleUrl = function (name, component) {\n if (options.$moduleUrls[name])\n return options.$moduleUrls[name];\n var parts = name.split(\"/\");\n component = component || parts[parts.length - 2] || \"\";\n var sep = component == \"snippets\" ? \"/\" : \"-\";\n var base = parts[parts.length - 1];\n if (component == \"worker\" && sep == \"-\") {\n var re = new RegExp(\"^\" + component + \"[\\\\-_]|[\\\\-_]\" + component + \"$\", \"g\");\n base = base.replace(re, \"\");\n }\n if ((!base || base == component) && parts.length > 1)\n base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n if (path == null) {\n path = options.basePath;\n }\n else if (sep == \"/\") {\n component = sep = \"\";\n }\n if (path && path.slice(-1) != \"/\")\n path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n};\nexports.setModuleUrl = function (name, subst) {\n return options.$moduleUrls[name] = subst;\n};\nvar loader = function (moduleName, cb) {\n if (moduleName === \"ace/theme/textmate\" || moduleName === \"./theme/textmate\")\n return cb(null, require(\"./theme/textmate\"));\n if (customLoader)\n return customLoader(moduleName, cb);\n console.error(\"loader is not configured\");\n};\nvar customLoader;\nexports.setLoader = function (cb) {\n customLoader = cb;\n};\nexports.dynamicModules = Object.create(null);\nexports.$loading = {};\nexports.$loaded = {};\nexports.loadModule = function (moduleId, onLoad) {\n var loadedModule;\n if (Array.isArray(moduleId)) {\n var moduleType = moduleId[0];\n var moduleName = moduleId[1];\n }\n else if (typeof moduleId == \"string\") {\n var moduleName = moduleId;\n }\n var load = function (module) {\n if (module && !exports.$loading[moduleName])\n return onLoad && onLoad(module);\n if (!exports.$loading[moduleName])\n exports.$loading[moduleName] = [];\n exports.$loading[moduleName].push(onLoad);\n if (exports.$loading[moduleName].length > 1)\n return;\n var afterLoad = function () {\n loader(moduleName, function (err, module) {\n if (module)\n exports.$loaded[moduleName] = module;\n exports._emit(\"load.module\", { name: moduleName, module: module });\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function (onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n if (!exports.get(\"packaged\"))\n return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n reportErrorIfPathIsNotConfigured();\n };\n if (exports.dynamicModules[moduleName]) {\n exports.dynamicModules[moduleName]().then(function (module) {\n if (module.default) {\n load(module.default);\n }\n else {\n load(module);\n }\n });\n }\n else {\n try {\n loadedModule = this.$require(moduleName);\n }\n catch (e) { }\n load(loadedModule || exports.$loaded[moduleName]);\n }\n};\nexports.$require = function (moduleName) {\n if (typeof module[\"require\"] == \"function\") {\n var req = \"require\";\n return module[req](moduleName);\n }\n};\nexports.setModuleLoader = function (moduleName, onLoad) {\n exports.dynamicModules[moduleName] = onLoad;\n};\nvar reportErrorIfPathIsNotConfigured = function () {\n if (!options.basePath && !options.workerPath\n && !options.modePath && !options.themePath\n && !Object.keys(options.$moduleUrls).length) {\n console.error(\"Unable to infer path to ace from script src,\", \"use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes\", \"or with webpack use ace/webpack-resolver\");\n reportErrorIfPathIsNotConfigured = function () { };\n }\n};\nexports.version = \"1.32.7\";\n\n});\n\nace.define(\"ace/loader_build\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/config\"], function(require, exports, module) {\n\"use strict\";\n\nrequire(\"./lib/fixoldbrowsers\");\nvar config = require(\"./config\");\nconfig.setLoader(function(moduleName, cb) {\n require([moduleName], function(module) {\n cb(null, module);\n });\n});\n\nvar global = (function() {\n return this || typeof window != \"undefined\" && window;\n})();\n\nmodule.exports = function(ace) {\n config.init = init;\n config.$require = require;\n ace.require = require;\n\n if (typeof define === \"function\")\n ace.define = define;\n};\ninit(true);function init(packaged) {\n\n if (!global || !global.document)\n return;\n \n config.set(\"packaged\", packaged || require.packaged || module.packaged || (global.define && define.packaged));\n\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = (document.currentScript || document._currentScript ); // native or polyfill\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n \n if (currentScript && currentScript.src) {\n scriptUrl = currentScript.src.split(/[?#]/)[0].split(\"/\").slice(0, -1).join(\"/\") || \"\";\n }\n \n var scripts = currentDocument.getElementsByTagName(\"script\");\n for (var i=0; i [\" + this.end.row + \"/\" + this.end.column + \"]\");\n };\n Range.prototype.contains = function (row, column) {\n return this.compare(row, column) == 0;\n };\n Range.prototype.compareRange = function (range) {\n var cmp, end = range.end, start = range.start;\n cmp = this.compare(end.row, end.column);\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n if (cmp == 1) {\n return 2;\n }\n else if (cmp == 0) {\n return 1;\n }\n else {\n return 0;\n }\n }\n else if (cmp == -1) {\n return -2;\n }\n else {\n cmp = this.compare(start.row, start.column);\n if (cmp == -1) {\n return -1;\n }\n else if (cmp == 1) {\n return 42;\n }\n else {\n return 0;\n }\n }\n };\n Range.prototype.comparePoint = function (p) {\n return this.compare(p.row, p.column);\n };\n Range.prototype.containsRange = function (range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n Range.prototype.intersects = function (range) {\n var cmp = this.compareRange(range);\n return (cmp == -1 || cmp == 0 || cmp == 1);\n };\n Range.prototype.isEnd = function (row, column) {\n return this.end.row == row && this.end.column == column;\n };\n Range.prototype.isStart = function (row, column) {\n return this.start.row == row && this.start.column == column;\n };\n Range.prototype.setStart = function (row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n }\n else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n Range.prototype.setEnd = function (row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n }\n else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n Range.prototype.inside = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n }\n else {\n return true;\n }\n }\n return false;\n };\n Range.prototype.insideStart = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n }\n else {\n return true;\n }\n }\n return false;\n };\n Range.prototype.insideEnd = function (row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n }\n else {\n return true;\n }\n }\n return false;\n };\n Range.prototype.compare = function (row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);\n }\n }\n if (row < this.start.row)\n return -1;\n if (row > this.end.row)\n return 1;\n if (this.start.row === row)\n return column >= this.start.column ? 0 : -1;\n if (this.end.row === row)\n return column <= this.end.column ? 0 : 1;\n return 0;\n };\n Range.prototype.compareStart = function (row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n }\n else {\n return this.compare(row, column);\n }\n };\n Range.prototype.compareEnd = function (row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n }\n else {\n return this.compare(row, column);\n }\n };\n Range.prototype.compareInside = function (row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n }\n else if (this.start.row == row && this.start.column == column) {\n return -1;\n }\n else {\n return this.compare(row, column);\n }\n };\n Range.prototype.clipRows = function (firstRow, lastRow) {\n if (this.end.row > lastRow)\n var end = { row: lastRow + 1, column: 0 };\n else if (this.end.row < firstRow)\n var end = { row: firstRow, column: 0 };\n if (this.start.row > lastRow)\n var start = { row: lastRow + 1, column: 0 };\n else if (this.start.row < firstRow)\n var start = { row: firstRow, column: 0 };\n return Range.fromPoints(start || this.start, end || this.end);\n };\n Range.prototype.extend = function (row, column) {\n var cmp = this.compare(row, column);\n if (cmp == 0)\n return this;\n else if (cmp == -1)\n var start = { row: row, column: column };\n else\n var end = { row: row, column: column };\n return Range.fromPoints(start || this.start, end || this.end);\n };\n Range.prototype.isEmpty = function () {\n return (this.start.row === this.end.row && this.start.column === this.end.column);\n };\n Range.prototype.isMultiLine = function () {\n return (this.start.row !== this.end.row);\n };\n Range.prototype.clone = function () {\n return Range.fromPoints(this.start, this.end);\n };\n Range.prototype.collapseRows = function () {\n if (this.end.column == 0)\n return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);\n else\n return new Range(this.start.row, 0, this.end.row, 0);\n };\n Range.prototype.toScreenRange = function (session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);\n };\n Range.prototype.moveBy = function (row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n return Range;\n}());\nRange.fromPoints = function (start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n};\nRange.comparePoints = function (p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\nexports.Range = Range;\n\n});\n\nace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\"], function(require, exports, module){/*! @license\n==========================================================================\nSproutCore -- JavaScript Application Framework\ncopyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\nSproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.\n\nFor more information about SproutCore, visit http://www.sproutcore.com\n\n\n==========================================================================\n@license */\n\"use strict\";\nvar oop = require(\"./oop\");\nvar Keys = (function () {\n var ret = {\n MODIFIER_KEYS: {\n 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta',\n 91: 'MetaLeft', 92: 'MetaRight', 93: 'ContextMenu'\n },\n KEY_MODS: {\n \"ctrl\": 1, \"alt\": 2, \"option\": 2, \"shift\": 4,\n \"super\": 8, \"meta\": 8, \"command\": 8, \"cmd\": 8,\n \"control\": 1\n },\n FUNCTION_KEYS: {\n 8: \"Backspace\",\n 9: \"Tab\",\n 13: \"Return\",\n 19: \"Pause\",\n 27: \"Esc\",\n 32: \"Space\",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"Left\",\n 38: \"Up\",\n 39: \"Right\",\n 40: \"Down\",\n 44: \"Print\",\n 45: \"Insert\",\n 46: \"Delete\",\n 96: \"Numpad0\",\n 97: \"Numpad1\",\n 98: \"Numpad2\",\n 99: \"Numpad3\",\n 100: \"Numpad4\",\n 101: \"Numpad5\",\n 102: \"Numpad6\",\n 103: \"Numpad7\",\n 104: \"Numpad8\",\n 105: \"Numpad9\",\n '-13': \"NumpadEnter\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n PRINTABLE_KEYS: {\n 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',\n 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',\n 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',\n 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',\n 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',\n 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',\n 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',\n 219: '[', 220: '\\\\', 221: ']', 222: \"'\", 111: '/', 106: '*'\n }\n };\n ret.PRINTABLE_KEYS[173] = '-';\n var name, i;\n for (i in ret.FUNCTION_KEYS) {\n name = ret.FUNCTION_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n for (i in ret.PRINTABLE_KEYS) {\n name = ret.PRINTABLE_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n oop.mixin(ret, ret.MODIFIER_KEYS);\n oop.mixin(ret, ret.PRINTABLE_KEYS);\n oop.mixin(ret, ret.FUNCTION_KEYS);\n ret.enter = ret[\"return\"];\n ret.escape = ret.esc;\n ret.del = ret[\"delete\"];\n (function () {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n for (var i = Math.pow(2, mods.length); i--;) {\n ret.KEY_MODS[i] = mods.filter(function (x) {\n return i & ret.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n })();\n ret.KEY_MODS[0] = \"\";\n ret.KEY_MODS[-1] = \"input-\";\n return ret;\n})();\noop.mixin(exports, Keys);\nexports.default = exports;\nexports.keyCodeToString = function (keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\")\n keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n};\n\n});\n\nace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\"; var keys = require(\"./keys\");\nvar useragent = require(\"./useragent\");\nvar pressedKeys = null;\nvar ts = 0;\nvar activeListenerOptions;\nfunction detectListenerOptionsSupport() {\n activeListenerOptions = false;\n try {\n document.createComment(\"\").addEventListener(\"test\", function () { }, {\n get passive() {\n activeListenerOptions = { passive: false };\n return true;\n }\n });\n }\n catch (e) { }\n}\nfunction getListenerOptions() {\n if (activeListenerOptions == undefined)\n detectListenerOptionsSupport();\n return activeListenerOptions;\n}\nfunction EventListener(elem, type, callback) {\n this.elem = elem;\n this.type = type;\n this.callback = callback;\n}\nEventListener.prototype.destroy = function () {\n removeListener(this.elem, this.type, this.callback);\n this.elem = this.type = this.callback = undefined;\n};\nvar addListener = exports.addListener = function (elem, type, callback, /**@type{any?}*/ destroyer) {\n elem.addEventListener(type, callback, getListenerOptions());\n if (destroyer)\n destroyer.$toDestroy.push(new EventListener(elem, type, callback));\n};\nvar removeListener = exports.removeListener = function (elem, type, callback) {\n elem.removeEventListener(type, callback, getListenerOptions());\n};\nexports.stopEvent = function (e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n};\nexports.stopPropagation = function (e) {\n if (e.stopPropagation)\n e.stopPropagation();\n};\nexports.preventDefault = function (e) {\n if (e.preventDefault)\n e.preventDefault();\n};\nexports.getButton = function (e) {\n if (e.type == \"dblclick\")\n return 0;\n if (e.type == \"contextmenu\" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))\n return 2;\n return e.button;\n};\nexports.capture = function (el, eventHandler, releaseCaptureHandler) {\n var ownerDocument = el && el.ownerDocument || document;\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n removeListener(ownerDocument, \"mousemove\", eventHandler);\n removeListener(ownerDocument, \"mouseup\", onMouseUp);\n removeListener(ownerDocument, \"dragstart\", onMouseUp);\n }\n addListener(ownerDocument, \"mousemove\", eventHandler);\n addListener(ownerDocument, \"mouseup\", onMouseUp);\n addListener(ownerDocument, \"dragstart\", onMouseUp);\n return onMouseUp;\n};\nexports.addMouseWheelListener = function (el, callback, destroyer) {\n addListener(el, \"wheel\", function (e) {\n var factor = 0.15;\n var deltaX = e.deltaX || 0;\n var deltaY = e.deltaY || 0;\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = deltaX * factor;\n e.wheelY = deltaY * factor;\n break;\n case e.DOM_DELTA_LINE:\n var linePixels = 15;\n e.wheelX = deltaX * linePixels;\n e.wheelY = deltaY * linePixels;\n break;\n case e.DOM_DELTA_PAGE:\n var pagePixels = 150;\n e.wheelX = deltaX * pagePixels;\n e.wheelY = deltaY * pagePixels;\n break;\n }\n callback(e);\n }, destroyer);\n};\nexports.addMultiMouseDownListener = function (elements, timeouts, eventHandler, callbackName, destroyer) {\n var clicks = 0;\n var startX, startY, timer;\n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n }\n else if (e.detail > 1) {\n clicks++;\n if (clicks > 4)\n clicks = 1;\n }\n else {\n clicks = 1;\n }\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick)\n clicks = 1;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function () { timer = null; }, timeouts[clicks - 1] || 600);\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n e._clicks = clicks;\n eventHandler[callbackName](\"mousedown\", e);\n if (clicks > 4)\n clicks = 0;\n else if (clicks > 1)\n return eventHandler[callbackName](eventNames[clicks], e);\n }\n if (!Array.isArray(elements))\n elements = [elements];\n elements.forEach(function (el) {\n addListener(el, \"mousedown\", onMousedown, destroyer);\n });\n};\nfunction getModifierHash(e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n}\nexports.getModifierString = function (e) {\n return keys.KEY_MODS[getModifierHash(e)];\n};\nfunction normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\")))\n hashId |= 8;\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3)\n pressedKeys.altGr = 0;\n else\n return;\n }\n if (keyCode === 18 || keyCode === 17) {\n var location = e.location;\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1)\n ts = e.timeStamp;\n }\n else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50)\n pressedKeys.altGr = true;\n }\n }\n }\n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n if (!hashId && keyCode === 13) {\n if (e.location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented)\n return;\n }\n }\n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented)\n return;\n else\n hashId &= ~8;\n }\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n return callback(e, hashId, keyCode);\n}\nexports.addCommandKeyListener = function (el, callback, destroyer) {\n var lastDefaultPrevented = null;\n addListener(el, \"keydown\", function (e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n }, destroyer);\n addListener(el, \"keypress\", function (e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n }, destroyer);\n addListener(el, \"keyup\", function (e) {\n pressedKeys[e.keyCode] = null;\n }, destroyer);\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n};\nfunction resetPressedKeys() {\n pressedKeys = Object.create(null);\n}\nif (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n exports.nextTick = function (callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + (postMessageId++);\n var listener = function (e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n removeListener(win, \"message\", listener);\n callback();\n }\n };\n addListener(win, \"message\", listener);\n win.postMessage(messageName, \"*\");\n };\n}\nexports.$idleBlocked = false;\nexports.onIdle = function (cb, timeout) {\n return setTimeout(function handler() {\n if (!exports.$idleBlocked) {\n cb();\n }\n else {\n setTimeout(handler, 100);\n }\n }, timeout);\n};\nexports.$idleBlockId = null;\nexports.blockIdle = function (delay) {\n if (exports.$idleBlockId)\n clearTimeout(exports.$idleBlockId);\n exports.$idleBlocked = true;\n exports.$idleBlockId = setTimeout(function () {\n exports.$idleBlocked = false;\n }, delay || 100);\n};\nexports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame\n || window[\"mozRequestAnimationFrame\"]\n || window[\"webkitRequestAnimationFrame\"]\n || window[\"msRequestAnimationFrame\"]\n || window[\"oRequestAnimationFrame\"]);\nif (exports.nextFrame)\n exports.nextFrame = exports.nextFrame.bind(window);\nelse\n exports.nextFrame = function (callback) {\n setTimeout(callback, 17);\n };\n\n});\n\nace.define(\"ace/clipboard\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar $cancelT;\nmodule.exports = {\n lineMode: false,\n pasteCancelled: function () {\n if ($cancelT && $cancelT > Date.now() - 50)\n return true;\n return $cancelT = false;\n },\n cancel: function () {\n $cancelT = Date.now();\n }\n};\n\n});\n\nace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/config\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/clipboard\",\"ace/lib/keys\"], function(require, exports, module){\"use strict\";\nvar event = require(\"../lib/event\");\nvar nls = require(\"../config\").nls;\nvar useragent = require(\"../lib/useragent\");\nvar dom = require(\"../lib/dom\");\nvar lang = require(\"../lib/lang\");\nvar clipboard = require(\"../clipboard\");\nvar BROKEN_SETDATA = useragent.isChrome < 18;\nvar USE_IE_MIME_TYPE = useragent.isIE;\nvar HAS_FOCUS_ARGS = useragent.isChrome > 63;\nvar MAX_LINE_LENGTH = 400;\nvar KEYS = require(\"../lib/keys\");\nvar MODS = KEYS.KEY_MODS;\nvar isIOS = useragent.isIOS;\nvar valueResetRegex = isIOS ? /\\s/ : /\\n/;\nvar isMobile = useragent.isMobile;\nvar TextInput;\nTextInput = function (parentNode, host) {\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", \"false\");\n text.style.opacity = \"0\";\n parentNode.insertBefore(text, parentNode.firstChild);\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var sendingText = false;\n var tempStyle = '';\n if (!isMobile)\n text.style.fontSize = \"1px\";\n var commandMode = false;\n var ignoreFocusEvents = false;\n var lastValue = \"\";\n var lastSelectionStart = 0;\n var lastSelectionEnd = 0;\n var lastRestoreEnd = 0;\n var rowStart = Number.MAX_SAFE_INTEGER;\n var rowEnd = Number.MIN_SAFE_INTEGER;\n var numberOfExtraLines = 0;\n try {\n var isFocused = document.activeElement === text;\n }\n catch (e) { }\n this.setNumberOfExtraLines = function (number) {\n rowStart = Number.MAX_SAFE_INTEGER;\n rowEnd = Number.MIN_SAFE_INTEGER;\n if (number < 0) {\n numberOfExtraLines = 0;\n return;\n }\n numberOfExtraLines = number;\n };\n this.setAriaOptions = function (options) {\n if (options.activeDescendant) {\n text.setAttribute(\"aria-haspopup\", \"true\");\n text.setAttribute(\"aria-autocomplete\", options.inline ? \"both\" : \"list\");\n text.setAttribute(\"aria-activedescendant\", options.activeDescendant);\n }\n else {\n text.setAttribute(\"aria-haspopup\", \"false\");\n text.setAttribute(\"aria-autocomplete\", \"both\");\n text.removeAttribute(\"aria-activedescendant\");\n }\n if (options.role) {\n text.setAttribute(\"role\", options.role);\n }\n if (options.setLabel) {\n text.setAttribute(\"aria-roledescription\", nls(\"editor\"));\n if (host.session) {\n var row = host.session.selection.cursor.row;\n text.setAttribute(\"aria-label\", nls(\"Cursor at row $0\", [row + 1]));\n }\n }\n };\n this.setAriaOptions({ role: \"textbox\" });\n event.addListener(text, \"blur\", function (e) {\n if (ignoreFocusEvents)\n return;\n host.onBlur(e);\n isFocused = false;\n }, host);\n event.addListener(text, \"focus\", function (e) {\n if (ignoreFocusEvents)\n return;\n isFocused = true;\n if (useragent.isEdge) {\n try {\n if (!document.hasFocus())\n return;\n }\n catch (e) { }\n }\n host.onFocus(e);\n if (useragent.isEdge)\n setTimeout(resetSelection);\n else\n resetSelection();\n }, host);\n this.$focusScroll = false;\n this.focus = function () {\n this.setAriaOptions({\n setLabel: host.renderer.enableKeyboardAccessibility\n });\n if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == \"browser\")\n return text.focus({ preventScroll: true });\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n try {\n var isTransformed = text.getBoundingClientRect().top != 0;\n }\n catch (e) {\n return;\n }\n var ancestors = [];\n if (isTransformed) {\n var t = text.parentElement;\n while (t && t.nodeType == 1) {\n ancestors.push(t);\n t.setAttribute(\"ace_nocontext\", \"true\");\n if (!t.parentElement && t.getRootNode)\n t = t.getRootNode()[\"host\"];\n else\n t = t.parentElement;\n }\n }\n text.focus({ preventScroll: true });\n if (isTransformed) {\n ancestors.forEach(function (p) {\n p.removeAttribute(\"ace_nocontext\");\n });\n }\n setTimeout(function () {\n text.style.position = \"\";\n if (text.style.top == \"0px\")\n text.style.top = top;\n }, 0);\n };\n this.blur = function () {\n text.blur();\n };\n this.isFocused = function () {\n return isFocused;\n };\n host.on(\"beforeEndOperation\", function () {\n var curOp = host.curOp;\n var commandName = curOp && curOp.command && curOp.command.name;\n if (commandName == \"insertstring\")\n return;\n var isUserAction = commandName && (curOp.docChanged || curOp.selectionChanged);\n if (inComposition && isUserAction) {\n lastValue = text.value = \"\";\n onCompositionEnd();\n }\n resetSelection();\n });\n var positionToSelection = function (row, column) {\n var selection = column;\n for (var i = 1; i <= row - rowStart && i < 2 * numberOfExtraLines + 1; i++) {\n selection += host.session.getLine(row - i).length + 1;\n }\n return selection;\n };\n var resetSelection = isIOS\n ? function (value) {\n if (!isFocused || (copied && !value) || sendingText)\n return;\n if (!value)\n value = \"\";\n var newValue = \"\\n ab\" + value + \"cde fg\\n\";\n if (newValue != text.value)\n text.value = lastValue = newValue;\n var selectionStart = 4;\n var selectionEnd = 4 + (value.length || (host.selection.isEmpty() ? 0 : 1));\n if (lastSelectionStart != selectionStart || lastSelectionEnd != selectionEnd) {\n text.setSelectionRange(selectionStart, selectionEnd);\n }\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n }\n : function () {\n if (inComposition || sendingText)\n return;\n if (!isFocused && !afterContextMenu)\n return;\n inComposition = true;\n var selectionStart = 0;\n var selectionEnd = 0;\n var line = \"\";\n if (host.session) {\n var selection = host.selection;\n var range = selection.getRange();\n var row = selection.cursor.row;\n if (row === rowEnd + 1) {\n rowStart = rowEnd + 1;\n rowEnd = rowStart + 2 * numberOfExtraLines;\n }\n else if (row === rowStart - 1) {\n rowEnd = rowStart - 1;\n rowStart = rowEnd - 2 * numberOfExtraLines;\n }\n else if (row < rowStart - 1 || row > rowEnd + 1) {\n rowStart = row > numberOfExtraLines ? row - numberOfExtraLines : 0;\n rowEnd = row > numberOfExtraLines ? row + numberOfExtraLines : 2 * numberOfExtraLines;\n }\n var lines = [];\n for (var i = rowStart; i <= rowEnd; i++) {\n lines.push(host.session.getLine(i));\n }\n line = lines.join('\\n');\n selectionStart = positionToSelection(range.start.row, range.start.column);\n selectionEnd = positionToSelection(range.end.row, range.end.column);\n if (range.start.row < rowStart) {\n var prevLine = host.session.getLine(rowStart - 1);\n selectionStart = range.start.row < rowStart - 1 ? 0 : selectionStart;\n selectionEnd += prevLine.length + 1;\n line = prevLine + \"\\n\" + line;\n }\n else if (range.end.row > rowEnd) {\n var nextLine = host.session.getLine(rowEnd + 1);\n selectionEnd = range.end.row > rowEnd + 1 ? nextLine.length : range.end.column;\n selectionEnd += line.length + 1;\n line = line + \"\\n\" + nextLine;\n }\n else if (isMobile && row > 0) {\n line = \"\\n\" + line;\n selectionEnd += 1;\n selectionStart += 1;\n }\n if (line.length > MAX_LINE_LENGTH) {\n if (selectionStart < MAX_LINE_LENGTH && selectionEnd < MAX_LINE_LENGTH) {\n line = line.slice(0, MAX_LINE_LENGTH);\n }\n else {\n line = \"\\n\";\n if (selectionStart == selectionEnd) {\n selectionStart = selectionEnd = 0;\n }\n else {\n selectionStart = 0;\n selectionEnd = 1;\n }\n }\n }\n var newValue = line + \"\\n\\n\";\n if (newValue != lastValue) {\n text.value = lastValue = newValue;\n lastSelectionStart = lastSelectionEnd = newValue.length;\n }\n }\n if (afterContextMenu) {\n lastSelectionStart = text.selectionStart;\n lastSelectionEnd = text.selectionEnd;\n }\n if (lastSelectionEnd != selectionEnd\n || lastSelectionStart != selectionStart\n || text.selectionEnd != lastSelectionEnd // on ie edge selectionEnd changes silently after the initialization\n ) {\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n }\n catch (e) { }\n }\n inComposition = false;\n };\n this.resetSelection = resetSelection;\n if (isFocused)\n host.onFocus();\n var isAllSelected = function (text) {\n return text.selectionStart === 0 && text.selectionEnd >= lastValue.length\n && text.value === lastValue && lastValue\n && text.selectionEnd !== lastSelectionEnd;\n };\n var onSelect = function (e) {\n if (inComposition)\n return;\n if (copied) {\n copied = false;\n }\n else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n }\n else if (isMobile && text.selectionStart != lastSelectionStart) {\n resetSelection();\n }\n };\n var inputHandler = null;\n this.setInputHandler = function (cb) { inputHandler = cb; };\n this.getInputHandler = function () { return inputHandler; };\n var afterContextMenu = false;\n var sendText = function (value, fromInput) {\n if (afterContextMenu)\n afterContextMenu = false;\n if (pasted) {\n resetSelection();\n if (value)\n host.onPaste(value);\n pasted = false;\n return \"\";\n }\n else {\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n var extendLeft = lastSelectionStart;\n var extendRight = lastValue.length - lastSelectionEnd;\n var inserted = value;\n var restoreStart = value.length - selectionStart;\n var restoreEnd = value.length - selectionEnd;\n var i = 0;\n while (extendLeft > 0 && lastValue[i] == value[i]) {\n i++;\n extendLeft--;\n }\n inserted = inserted.slice(i);\n i = 1;\n while (extendRight > 0 && lastValue.length - i > lastSelectionStart - 1 && lastValue[lastValue.length - i] == value[value.length - i]) {\n i++;\n extendRight--;\n }\n restoreStart -= i - 1;\n restoreEnd -= i - 1;\n var endIndex = inserted.length - i + 1;\n if (endIndex < 0) {\n extendLeft = -endIndex;\n endIndex = 0;\n }\n inserted = inserted.slice(0, endIndex);\n if (!fromInput && !inserted && !restoreStart && !extendLeft && !extendRight && !restoreEnd)\n return \"\";\n sendingText = true;\n var shouldReset = false;\n if (useragent.isAndroid && inserted == \". \") {\n inserted = \" \";\n shouldReset = true;\n }\n if (inserted && !extendLeft && !extendRight && !restoreStart && !restoreEnd || commandMode) {\n host.onTextInput(inserted);\n }\n else {\n host.onTextInput(inserted, {\n extendLeft: extendLeft,\n extendRight: extendRight,\n restoreStart: restoreStart,\n restoreEnd: restoreEnd\n });\n }\n sendingText = false;\n lastValue = value;\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n lastRestoreEnd = restoreEnd;\n return shouldReset ? \"\\n\" : inserted;\n }\n };\n var onInput = function (e) {\n if (inComposition)\n return onCompositionUpdate();\n if (e && e.inputType) {\n if (e.inputType == \"historyUndo\")\n return host.execCommand(\"undo\");\n if (e.inputType == \"historyRedo\")\n return host.execCommand(\"redo\");\n }\n var data = text.value;\n var inserted = sendText(data, true);\n if (data.length > MAX_LINE_LENGTH + 100\n || valueResetRegex.test(inserted)\n || isMobile && lastSelectionStart < 1 && lastSelectionStart == lastSelectionEnd) {\n resetSelection();\n }\n };\n var handleClipboardData = function (e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window[\"clipboardData\"];\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n }\n else {\n return clipboardData.getData(mime);\n }\n }\n catch (e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n var doCopy = function (e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n if (handleClipboardData(e, data)) {\n if (isIOS) {\n resetSelection(data);\n copied = data;\n setTimeout(function () {\n copied = false;\n }, 10);\n }\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n }\n else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function () {\n copied = false;\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n var onCut = function (e) {\n doCopy(e, true);\n };\n var onCopy = function (e) {\n doCopy(e, false);\n };\n var onPaste = function (e) {\n var data = handleClipboardData(e);\n if (clipboard.pasteCancelled())\n return;\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n event.addCommandKeyListener(text, function (e, hashId, keyCode) {\n if (inComposition)\n return;\n return host.onCommandKey(e, hashId, keyCode);\n }, host);\n event.addListener(text, \"select\", onSelect, host);\n event.addListener(text, \"input\", onInput, host);\n event.addListener(text, \"cut\", onCut, host);\n event.addListener(text, \"copy\", onCopy, host);\n event.addListener(text, \"paste\", onPaste, host);\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) {\n event.addListener(parentNode, \"keydown\", function (e) {\n if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)\n return;\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n case 86:\n onPaste(e);\n break;\n case 88:\n onCut(e);\n break;\n }\n }, host);\n }\n var onCompositionStart = function (e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly)\n return;\n inComposition = {};\n if (commandMode)\n return;\n if (e.data)\n inComposition.useTextareaForIME = false;\n setTimeout(onCompositionUpdate, 0);\n host._signal(\"compositionStart\");\n host.on(\"mousedown\", cancelComposition);\n var range = host.getSelectionRange();\n range.end.row = range.start.row;\n range.end.column = range.start.column;\n inComposition.markerRange = range;\n inComposition.selectionStart = lastSelectionStart;\n host.onCompositionStart(inComposition);\n if (inComposition.useTextareaForIME) {\n lastValue = text.value = \"\";\n lastSelectionStart = 0;\n lastSelectionEnd = 0;\n }\n else {\n if (text.msGetInputContext)\n inComposition.context = text.msGetInputContext();\n if (text.getInputContext)\n inComposition.context = text.getInputContext();\n }\n };\n var onCompositionUpdate = function () {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n if (commandMode)\n return cancelComposition();\n if (inComposition.useTextareaForIME) {\n host.onCompositionUpdate(text.value);\n }\n else {\n var data = text.value;\n sendText(data);\n if (inComposition.markerRange) {\n if (inComposition.context) {\n inComposition.markerRange.start.column = inComposition.selectionStart\n = inComposition.context.compositionStartOffset;\n }\n inComposition.markerRange.end.column = inComposition.markerRange.start.column\n + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd;\n }\n }\n };\n var onCompositionEnd = function (e) {\n if (!host.onCompositionEnd || host.$readOnly)\n return;\n inComposition = false;\n host.onCompositionEnd();\n host.off(\"mousedown\", cancelComposition);\n if (e)\n onInput();\n };\n function cancelComposition() {\n ignoreFocusEvents = true;\n text.blur();\n text.focus();\n ignoreFocusEvents = false;\n }\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50).schedule.bind(null, null);\n function onKeyup(e) {\n if (e.keyCode == 27 && text.value.length < text.selectionStart) {\n if (!inComposition)\n lastValue = text.value;\n lastSelectionStart = lastSelectionEnd = -1;\n resetSelection();\n }\n syncComposition();\n }\n event.addListener(text, \"compositionstart\", onCompositionStart, host);\n event.addListener(text, \"compositionupdate\", onCompositionUpdate, host);\n event.addListener(text, \"keyup\", onKeyup, host);\n event.addListener(text, \"keydown\", syncComposition, host);\n event.addListener(text, \"compositionend\", onCompositionEnd, host);\n this.getElement = function () {\n return text;\n };\n this.setCommandMode = function (value) {\n commandMode = value;\n text.readOnly = false;\n };\n this.setReadOnly = function (readOnly) {\n if (!commandMode)\n text.readOnly = readOnly;\n };\n this.setCopyWithEmptySelection = function (value) {\n };\n this.onContextMenu = function (e) {\n afterContextMenu = true;\n resetSelection();\n host._emit(\"nativecontextmenu\", { target: host, domEvent: e });\n this.moveToMouse(e, true);\n };\n this.moveToMouse = function (e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + (useragent.isIE ? \"opacity:0.1;\" : \"\")\n + \"text-indent: -\" + (lastSelectionStart + lastSelectionEnd) * host.renderer.characterWidth * 0.5 + \"px;\";\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight - 2;\n var move = function (e) {\n dom.translate(text, e.clientX - left - 2, Math.min(e.clientY - top - 2, maxTop));\n };\n move(e);\n if (e.type != \"mousedown\")\n return;\n host.renderer.$isMousePressed = true;\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n host.renderer.$isMousePressed = false;\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$moveTextAreaToCursor();\n }, 0);\n }\n var onContextMenu = function (e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu, host);\n event.addListener(text, \"mousedown\", function (e) {\n e.preventDefault();\n onContextMenuClose();\n }, host);\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu, host);\n event.addListener(text, \"contextmenu\", onContextMenu, host);\n if (isIOS)\n addIosSelectionHandler(parentNode, host, text);\n function addIosSelectionHandler(parentNode, host, text) {\n var typingResetTimeout = null;\n var typing = false;\n text.addEventListener(\"keydown\", function (e) {\n if (typingResetTimeout)\n clearTimeout(typingResetTimeout);\n typing = true;\n }, true);\n text.addEventListener(\"keyup\", function (e) {\n typingResetTimeout = setTimeout(function () {\n typing = false;\n }, 100);\n }, true);\n var detectArrowKeys = function (e) {\n if (document.activeElement !== text)\n return;\n if (typing || inComposition || host.$mouseHandler.isMousePressed)\n return;\n if (copied) {\n return;\n }\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n var key = null;\n var modifier = 0;\n if (selectionStart == 0) {\n key = KEYS.up;\n }\n else if (selectionStart == 1) {\n key = KEYS.home;\n }\n else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd] == \"\\n\") {\n key = KEYS.end;\n }\n else if (selectionStart < lastSelectionStart && lastValue[selectionStart - 1] == \" \") {\n key = KEYS.left;\n modifier = MODS.option;\n }\n else if (selectionStart < lastSelectionStart\n || (selectionStart == lastSelectionStart\n && lastSelectionEnd != lastSelectionStart\n && selectionStart == selectionEnd)) {\n key = KEYS.left;\n }\n else if (selectionEnd > lastSelectionEnd && lastValue.slice(0, selectionEnd).split(\"\\n\").length > 2) {\n key = KEYS.down;\n }\n else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd - 1] == \" \") {\n key = KEYS.right;\n modifier = MODS.option;\n }\n else if (selectionEnd > lastSelectionEnd\n || (selectionEnd == lastSelectionEnd\n && lastSelectionEnd != lastSelectionStart\n && selectionStart == selectionEnd)) {\n key = KEYS.right;\n }\n if (selectionStart !== selectionEnd)\n modifier |= MODS.shift;\n if (key) {\n var result = host.onCommandKey({}, modifier, key);\n if (!result && host.commands) {\n key = KEYS.keyCodeToString(key);\n var command = host.commands.findKeyCommand(modifier, key);\n if (command)\n host.execCommand(command);\n }\n lastSelectionStart = selectionStart;\n lastSelectionEnd = selectionEnd;\n resetSelection(\"\");\n }\n };\n document.addEventListener(\"selectionchange\", detectArrowKeys);\n host.on(\"destroy\", function () {\n document.removeEventListener(\"selectionchange\", detectArrowKeys);\n });\n }\n this.destroy = function () {\n if (text.parentElement)\n text.parentElement.removeChild(text);\n };\n};\nexports.TextInput = TextInput;\nexports.$setUserAgentForTests = function (_isMobile, _isIOS) {\n isMobile = _isMobile;\n isIOS = _isIOS;\n};\n\n});\n\nace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar useragent = require(\"../lib/useragent\");\nvar DRAG_OFFSET = 0; // pixels\nvar SCROLL_COOLDOWN_T = 550; // milliseconds\nvar DefaultHandlers = /** @class */ (function () {\n function DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\",\n \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n exports.forEach(function (x) {\n mouseHandler[x] = this[x];\n }, this);\n mouseHandler[\"selectByLines\"] = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler[\"selectByWords\"] = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n }\n DefaultHandlers.prototype.onMouseDown = function (ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n var button = ev.getButton();\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n if (selectionEmpty || button == 1)\n editor.selection.moveToPosition(pos);\n if (button == 2) {\n editor.textInput.onContextMenu(ev.domEvent);\n if (!useragent.isMozilla)\n ev.preventDefault();\n }\n return;\n }\n this.mousedownEvent.time = Date.now();\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n if (this.$focusTimeout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n DefaultHandlers.prototype.startSelect = function (pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n if (!this.mousedownEvent)\n return;\n if (this.mousedownEvent.getShiftKey())\n editor.selection.selectToPosition(pos);\n else if (!waitForClickSelection)\n editor.selection.moveToPosition(pos);\n if (!waitForClickSelection)\n this.select();\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n };\n DefaultHandlers.prototype.select = function () {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n }\n else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n }\n else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n };\n DefaultHandlers.prototype.extendSelectionBy = function (unitName) {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column)\n cursor = range.start;\n }\n else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column)\n cursor = range.end;\n }\n else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n }\n else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n };\n DefaultHandlers.prototype.selectByLinesEnd = function () {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n };\n DefaultHandlers.prototype.focusWait = function () {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimeout)\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n DefaultHandlers.prototype.onDoubleClick = function (ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n var range = session.getBracketRange(pos);\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n this.setState(\"select\");\n }\n else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n this.$clickSelection = range;\n this.select();\n };\n DefaultHandlers.prototype.onTripleClick = function (ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n }\n else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n this.select();\n };\n DefaultHandlers.prototype.onQuadClick = function (ev) {\n var editor = this.editor;\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n DefaultHandlers.prototype.onMouseWheel = function (ev) {\n if (ev.getAccelKey())\n return;\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n var editor = this.editor;\n if (!this.$lastScroll)\n this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 };\n var prevScroll = this.$lastScroll;\n var t = ev.domEvent.timeStamp;\n var dt = t - prevScroll.t;\n var vx = dt ? ev.wheelX / dt : prevScroll.vx;\n var vy = dt ? ev.wheelY / dt : prevScroll.vy;\n if (dt < SCROLL_COOLDOWN_T) {\n vx = (vx + prevScroll.vx) / 2;\n vy = (vy + prevScroll.vy) / 2;\n }\n var direction = Math.abs(vx / vy);\n var canScroll = false;\n if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0))\n canScroll = true;\n if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed))\n canScroll = true;\n if (canScroll) {\n prevScroll.allowed = t;\n }\n else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) {\n var isSlower = Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx)\n && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy);\n if (isSlower) {\n canScroll = true;\n prevScroll.allowed = t;\n }\n else {\n prevScroll.allowed = 0;\n }\n }\n prevScroll.t = t;\n prevScroll.vx = vx;\n prevScroll.vy = vy;\n if (canScroll) {\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n return DefaultHandlers;\n}());\nDefaultHandlers.prototype.selectEnd = DefaultHandlers.prototype.selectByLinesEnd;\nDefaultHandlers.prototype.selectAllEnd = DefaultHandlers.prototype.selectByLinesEnd;\nDefaultHandlers.prototype.selectByWordsEnd = DefaultHandlers.prototype.selectByLinesEnd;\nexports.DefaultHandlers = DefaultHandlers;\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\nfunction calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row)\n var cmp = 2 * cursor.column - range.start.column - range.end.column;\n else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)\n var cmp = cursor.column - 4;\n else\n var cmp = 2 * cursor.row - range.start.row - range.end.row;\n if (cmp < 0)\n return { cursor: range.start, anchor: range.end };\n else\n return { cursor: range.end, anchor: range.start };\n}\n\n});\n\nace.define(\"ace/lib/scroll\",[\"require\",\"exports\",\"module\"], function(require, exports, module){exports.preventParentScroll = function preventParentScroll(event) {\n event.stopPropagation();\n var target = event.currentTarget;\n var contentOverflows = target.scrollHeight > target.clientHeight;\n if (!contentOverflows) {\n event.preventDefault();\n }\n};\n\n});\n\nace.define(\"ace/tooltip\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/range\",\"ace/lib/scroll\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar dom = require(\"./lib/dom\");\nvar event = require(\"./lib/event\");\nvar Range = require(\"./range\").Range;\nvar preventParentScroll = require(\"./lib/scroll\").preventParentScroll;\nvar CLASSNAME = \"ace_tooltip\";\nvar Tooltip = /** @class */ (function () {\n function Tooltip(parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n }\n Tooltip.prototype.$init = function () {\n this.$element = dom.createElement(\"div\");\n this.$element.className = CLASSNAME;\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n Tooltip.prototype.getElement = function () {\n return this.$element || this.$init();\n };\n Tooltip.prototype.setText = function (text) {\n this.getElement().textContent = text;\n };\n Tooltip.prototype.setHtml = function (html) {\n this.getElement().innerHTML = html;\n };\n Tooltip.prototype.setPosition = function (x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n Tooltip.prototype.setClassName = function (className) {\n dom.addCssClass(this.getElement(), className);\n };\n Tooltip.prototype.setTheme = function (theme) {\n this.$element.className = CLASSNAME + \" \" +\n (theme.isDark ? \"ace_dark \" : \"\") + (theme.cssClass || \"\");\n };\n Tooltip.prototype.show = function (text, x, y) {\n if (text != null)\n this.setText(text);\n if (x != null && y != null)\n this.setPosition(x, y);\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n Tooltip.prototype.hide = function (e) {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.getElement().className = CLASSNAME;\n this.isOpen = false;\n }\n };\n Tooltip.prototype.getHeight = function () {\n return this.getElement().offsetHeight;\n };\n Tooltip.prototype.getWidth = function () {\n return this.getElement().offsetWidth;\n };\n Tooltip.prototype.destroy = function () {\n this.isOpen = false;\n if (this.$element && this.$element.parentNode) {\n this.$element.parentNode.removeChild(this.$element);\n }\n };\n return Tooltip;\n}());\nvar PopupManager = /** @class */ (function () {\n function PopupManager() {\n this.popups = [];\n }\n PopupManager.prototype.addPopup = function (popup) {\n this.popups.push(popup);\n this.updatePopups();\n };\n PopupManager.prototype.removePopup = function (popup) {\n var index = this.popups.indexOf(popup);\n if (index !== -1) {\n this.popups.splice(index, 1);\n this.updatePopups();\n }\n };\n PopupManager.prototype.updatePopups = function () {\n var e_1, _a, e_2, _b;\n this.popups.sort(function (a, b) { return b.priority - a.priority; });\n var visiblepopups = [];\n try {\n for (var _c = __values(this.popups), _d = _c.next(); !_d.done; _d = _c.next()) {\n var popup = _d.value;\n var shouldDisplay = true;\n try {\n for (var visiblepopups_1 = (e_2 = void 0, __values(visiblepopups)), visiblepopups_1_1 = visiblepopups_1.next(); !visiblepopups_1_1.done; visiblepopups_1_1 = visiblepopups_1.next()) {\n var visiblePopup = visiblepopups_1_1.value;\n if (this.doPopupsOverlap(visiblePopup, popup)) {\n shouldDisplay = false;\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (visiblepopups_1_1 && !visiblepopups_1_1.done && (_b = visiblepopups_1.return)) _b.call(visiblepopups_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (shouldDisplay) {\n visiblepopups.push(popup);\n }\n else {\n popup.hide();\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n PopupManager.prototype.doPopupsOverlap = function (popupA, popupB) {\n var rectA = popupA.getElement().getBoundingClientRect();\n var rectB = popupB.getElement().getBoundingClientRect();\n return (rectA.left < rectB.right && rectA.right > rectB.left && rectA.top < rectB.bottom && rectA.bottom\n > rectB.top);\n };\n return PopupManager;\n}());\nvar popupManager = new PopupManager();\nexports.popupManager = popupManager;\nexports.Tooltip = Tooltip;\nvar HoverTooltip = /** @class */ (function (_super) {\n __extends(HoverTooltip, _super);\n function HoverTooltip(parentNode) {\n if (parentNode === void 0) { parentNode = document.body; }\n var _this = _super.call(this, parentNode) || this;\n _this.timeout = undefined;\n _this.lastT = 0;\n _this.idleTime = 350;\n _this.lastEvent = undefined;\n _this.onMouseOut = _this.onMouseOut.bind(_this);\n _this.onMouseMove = _this.onMouseMove.bind(_this);\n _this.waitForHover = _this.waitForHover.bind(_this);\n _this.hide = _this.hide.bind(_this);\n var el = _this.getElement();\n el.style.whiteSpace = \"pre-wrap\";\n el.style.pointerEvents = \"auto\";\n el.addEventListener(\"mouseout\", _this.onMouseOut);\n el.tabIndex = -1;\n el.addEventListener(\"blur\", function () {\n if (!el.contains(document.activeElement))\n this.hide();\n }.bind(_this));\n el.addEventListener(\"wheel\", preventParentScroll);\n return _this;\n }\n HoverTooltip.prototype.addToEditor = function (editor) {\n editor.on(\"mousemove\", this.onMouseMove);\n editor.on(\"mousedown\", this.hide);\n editor.renderer.getMouseEventTarget().addEventListener(\"mouseout\", this.onMouseOut, true);\n };\n HoverTooltip.prototype.removeFromEditor = function (editor) {\n editor.off(\"mousemove\", this.onMouseMove);\n editor.off(\"mousedown\", this.hide);\n editor.renderer.getMouseEventTarget().removeEventListener(\"mouseout\", this.onMouseOut, true);\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n };\n HoverTooltip.prototype.onMouseMove = function (e, editor) {\n this.lastEvent = e;\n this.lastT = Date.now();\n var isMousePressed = editor.$mouseHandler.isMousePressed;\n if (this.isOpen) {\n var pos = this.lastEvent && this.lastEvent.getDocumentPosition();\n if (!this.range\n || !this.range.contains(pos.row, pos.column)\n || isMousePressed\n || this.isOutsideOfText(this.lastEvent)) {\n this.hide();\n }\n }\n if (this.timeout || isMousePressed)\n return;\n this.lastEvent = e;\n this.timeout = setTimeout(this.waitForHover, this.idleTime);\n };\n HoverTooltip.prototype.waitForHover = function () {\n if (this.timeout)\n clearTimeout(this.timeout);\n var dt = Date.now() - this.lastT;\n if (this.idleTime - dt > 10) {\n this.timeout = setTimeout(this.waitForHover, this.idleTime - dt);\n return;\n }\n this.timeout = null;\n if (this.lastEvent && !this.isOutsideOfText(this.lastEvent)) {\n this.$gatherData(this.lastEvent, this.lastEvent.editor);\n }\n };\n HoverTooltip.prototype.isOutsideOfText = function (e) {\n var editor = e.editor;\n var docPos = e.getDocumentPosition();\n var line = editor.session.getLine(docPos.row);\n if (docPos.column == line.length) {\n var screenPos = editor.renderer.pixelToScreenCoordinates(e.clientX, e.clientY);\n var clippedPos = editor.session.documentToScreenPosition(docPos.row, docPos.column);\n if (clippedPos.column != screenPos.column\n || clippedPos.row != screenPos.row) {\n return true;\n }\n }\n return false;\n };\n HoverTooltip.prototype.setDataProvider = function (value) {\n this.$gatherData = value;\n };\n HoverTooltip.prototype.showForRange = function (editor, range, domNode, startingEvent) {\n var MARGIN = 10;\n if (startingEvent && startingEvent != this.lastEvent)\n return;\n if (this.isOpen && document.activeElement == this.getElement())\n return;\n var renderer = editor.renderer;\n if (!this.isOpen) {\n popupManager.addPopup(this);\n this.$registerCloseEvents();\n this.setTheme(renderer.theme);\n }\n this.isOpen = true;\n this.addMarker(range, editor.session);\n this.range = Range.fromPoints(range.start, range.end);\n var position = renderer.textToScreenCoordinates(range.start.row, range.start.column);\n var rect = renderer.scroller.getBoundingClientRect();\n if (position.pageX < rect.left)\n position.pageX = rect.left;\n var element = this.getElement();\n element.innerHTML = \"\";\n element.appendChild(domNode);\n element.style.maxHeight = \"\";\n element.style.display = \"block\";\n var labelHeight = element.clientHeight;\n var labelWidth = element.clientWidth;\n var spaceBelow = window.innerHeight - position.pageY - renderer.lineHeight;\n var isAbove = true;\n if (position.pageY - labelHeight < 0 && position.pageY < spaceBelow) {\n isAbove = false;\n }\n element.style.maxHeight = (isAbove ? position.pageY : spaceBelow) - MARGIN + \"px\";\n element.style.top = isAbove ? \"\" : position.pageY + renderer.lineHeight + \"px\";\n element.style.bottom = isAbove ? window.innerHeight - position.pageY + \"px\" : \"\";\n element.style.left = Math.min(position.pageX, window.innerWidth - labelWidth - MARGIN) + \"px\";\n };\n HoverTooltip.prototype.addMarker = function (range, session) {\n if (this.marker) {\n this.$markerSession.removeMarker(this.marker);\n }\n this.$markerSession = session;\n this.marker = session && session.addMarker(range, \"ace_highlight-marker\", \"text\");\n };\n HoverTooltip.prototype.hide = function (e) {\n if (!e && document.activeElement == this.getElement())\n return;\n if (e && e.target && (e.type != \"keydown\" || e.ctrlKey || e.metaKey) && this.$element.contains(e.target))\n return;\n this.lastEvent = null;\n if (this.timeout)\n clearTimeout(this.timeout);\n this.timeout = null;\n this.addMarker(null);\n if (this.isOpen) {\n this.$removeCloseEvents();\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n popupManager.removePopup(this);\n }\n };\n HoverTooltip.prototype.$registerCloseEvents = function () {\n window.addEventListener(\"keydown\", this.hide, true);\n window.addEventListener(\"wheel\", this.hide, true);\n window.addEventListener(\"mousedown\", this.hide, true);\n };\n HoverTooltip.prototype.$removeCloseEvents = function () {\n window.removeEventListener(\"keydown\", this.hide, true);\n window.removeEventListener(\"wheel\", this.hide, true);\n window.removeEventListener(\"mousedown\", this.hide, true);\n };\n HoverTooltip.prototype.onMouseOut = function (e) {\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.lastEvent = null;\n if (!this.isOpen)\n return;\n if (!e.relatedTarget || this.getElement().contains(e.relatedTarget))\n return;\n if (e && e.currentTarget.contains(e.relatedTarget))\n return;\n if (!e.relatedTarget.classList.contains(\"ace_content\"))\n this.hide();\n };\n return HoverTooltip;\n}(Tooltip));\nexports.HoverTooltip = HoverTooltip;\n\n});\n\nace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/tooltip\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar dom = require(\"../lib/dom\");\nvar event = require(\"../lib/event\");\nvar Tooltip = require(\"../tooltip\").Tooltip;\nvar nls = require(\"../config\").nls;\nfunction GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor);\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function (e) {\n if (!editor.isFocused() || e.getButton() != 0)\n return;\n var gutterRegion = gutter.getRegion(e);\n if (gutterRegion == \"foldWidgets\")\n return;\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n if (e.getShiftKey())\n selection.selectTo(row, 0);\n else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n var tooltipTimeout, mouseEvent;\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var maxRow = editor.session.getLength();\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))\n return hideTooltip();\n }\n tooltip.showTooltip(row);\n if (!tooltip.isOpen)\n return;\n editor.on(\"mousewheel\", hideTooltip);\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n }\n else {\n var gutterRow = mouseEvent.getGutterRow();\n var gutterCell = gutter.$lines.get(gutterRow);\n if (gutterCell) {\n var gutterElement = gutterCell.element.querySelector(\".ace_gutter_annotation\");\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n else {\n moveTooltip(mouseEvent);\n }\n }\n }\n function hideTooltip() {\n if (tooltipTimeout)\n tooltipTimeout = clearTimeout(tooltipTimeout);\n if (tooltip.isOpen) {\n tooltip.hideTooltip();\n editor.off(\"mousewheel\", hideTooltip);\n }\n }\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function (e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\"))\n return hideTooltip();\n if (tooltip.isOpen && mouseHandler.$tooltipFollowsMouse)\n moveTooltip(e);\n mouseEvent = e;\n if (tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function () {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed)\n showTooltip();\n else\n hideTooltip();\n }, 50);\n });\n event.addListener(editor.renderer.$gutter, \"mouseout\", function (e) {\n mouseEvent = null;\n if (!tooltip.isOpen || tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function () {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n }, editor);\n editor.on(\"changeSession\", hideTooltip);\n editor.on(\"input\", hideTooltip);\n}\nexports.GutterHandler = GutterHandler;\nvar GutterTooltip = /** @class */ (function (_super) {\n __extends(GutterTooltip, _super);\n function GutterTooltip(editor) {\n var _this = _super.call(this, editor.container) || this;\n _this.editor = editor;\n return _this;\n }\n GutterTooltip.prototype.setPosition = function (x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n if (x + width > windowWidth) {\n x -= (x + width) - windowWidth;\n }\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n Object.defineProperty(GutterTooltip, \"annotationLabels\", {\n get: function () {\n return {\n error: { singular: nls(\"error\"), plural: nls(\"errors\") },\n warning: { singular: nls(\"warning\"), plural: nls(\"warnings\") },\n info: { singular: nls(\"information message\"), plural: nls(\"information messages\") }\n };\n },\n enumerable: false,\n configurable: true\n });\n GutterTooltip.prototype.showTooltip = function (row) {\n var gutter = this.editor.renderer.$gutterLayer;\n var annotationsInRow = gutter.$annotations[row];\n var annotation;\n if (annotationsInRow)\n annotation = { text: Array.from(annotationsInRow.text), type: Array.from(annotationsInRow.type) };\n else\n annotation = { text: [], type: [] };\n var fold = gutter.session.getFoldLine(row);\n if (fold && gutter.$showFoldedAnnotations) {\n var annotationsInFold = { error: [], warning: [], info: [] };\n var mostSevereAnnotationInFoldType;\n for (var i = row + 1; i <= fold.end.row; i++) {\n if (!gutter.$annotations[i])\n continue;\n for (var j = 0; j < gutter.$annotations[i].text.length; j++) {\n var annotationType = gutter.$annotations[i].type[j];\n annotationsInFold[annotationType].push(gutter.$annotations[i].text[j]);\n if (annotationType === \"error\") {\n mostSevereAnnotationInFoldType = \"error_fold\";\n continue;\n }\n if (annotationType === \"warning\") {\n mostSevereAnnotationInFoldType = \"warning_fold\";\n continue;\n }\n }\n }\n if (mostSevereAnnotationInFoldType === \"error_fold\" || mostSevereAnnotationInFoldType === \"warning_fold\") {\n var summaryFoldedAnnotations = \"\".concat(GutterTooltip.annotationsToSummaryString(annotationsInFold), \" in folded code.\");\n annotation.text.push(summaryFoldedAnnotations);\n annotation.type.push(mostSevereAnnotationInFoldType);\n }\n }\n if (annotation.text.length === 0)\n return this.hide();\n var annotationMessages = { error: [], warning: [], info: [] };\n var iconClassName = gutter.$useSvgGutterIcons ? \"ace_icon_svg\" : \"ace_icon\";\n for (var i = 0; i < annotation.text.length; i++) {\n var line = \" \").concat(annotation.text[i]);\n annotationMessages[annotation.type[i].replace(\"_fold\", \"\")].push(line);\n }\n var tooltipContent = [].concat(annotationMessages.error, annotationMessages.warning, annotationMessages.info).join(\"
\");\n this.setHtml(tooltipContent);\n this.$element.setAttribute(\"aria-live\", \"polite\");\n if (!this.isOpen) {\n this.setTheme(this.editor.renderer.theme);\n this.setClassName(\"ace_gutter-tooltip\");\n }\n this.show();\n this.editor._signal(\"showGutterTooltip\", this);\n };\n GutterTooltip.prototype.hideTooltip = function () {\n this.$element.removeAttribute(\"aria-live\");\n this.hide();\n this.editor._signal(\"hideGutterTooltip\", this);\n };\n GutterTooltip.annotationsToSummaryString = function (annotations) {\n var e_1, _a;\n var summary = [];\n var annotationTypes = ['error', 'warning', 'info'];\n try {\n for (var annotationTypes_1 = __values(annotationTypes), annotationTypes_1_1 = annotationTypes_1.next(); !annotationTypes_1_1.done; annotationTypes_1_1 = annotationTypes_1.next()) {\n var annotationType = annotationTypes_1_1.value;\n if (!annotations[annotationType].length)\n continue;\n var label = annotations[annotationType].length === 1 ? GutterTooltip.annotationLabels[annotationType].singular : GutterTooltip.annotationLabels[annotationType].plural;\n summary.push(\"\".concat(annotations[annotationType].length, \" \").concat(label));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (annotationTypes_1_1 && !annotationTypes_1_1.done && (_a = annotationTypes_1.return)) _a.call(annotationTypes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return summary.join(\", \");\n };\n return GutterTooltip;\n}(Tooltip));\nexports.GutterTooltip = GutterTooltip;\n\n});\n\nace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar MouseEvent = /** @class */ (function () {\n function MouseEvent(domEvent, editor) { this.speed; this.wheelX; this.wheelY;\n this.domEvent = domEvent;\n this.editor = editor;\n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n this.$pos = null;\n this.$inSelection = null;\n this.propagationStopped = false;\n this.defaultPrevented = false;\n }\n MouseEvent.prototype.stopPropagation = function () {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n MouseEvent.prototype.preventDefault = function () {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n MouseEvent.prototype.stop = function () {\n this.stopPropagation();\n this.preventDefault();\n };\n MouseEvent.prototype.getDocumentPosition = function () {\n if (this.$pos)\n return this.$pos;\n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n MouseEvent.prototype.getGutterRow = function () {\n var documentRow = this.getDocumentPosition().row;\n var screenRow = this.editor.session.documentToScreenRow(documentRow, 0);\n var screenTopRow = this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row, 0);\n return screenRow - screenTopRow;\n };\n MouseEvent.prototype.inSelection = function () {\n if (this.$inSelection !== null)\n return this.$inSelection;\n var editor = this.editor;\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty())\n this.$inSelection = false;\n else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n return this.$inSelection;\n };\n MouseEvent.prototype.getButton = function () {\n return event.getButton(this.domEvent);\n };\n MouseEvent.prototype.getShiftKey = function () {\n return this.domEvent.shiftKey;\n };\n MouseEvent.prototype.getAccelKey = function () {\n return useragent.isMac ? this.domEvent.metaKey : this.domEvent.ctrlKey;\n };\n return MouseEvent;\n}());\nexports.MouseEvent = MouseEvent;\n\n});\n\nace.define(\"ace/mouse/dragdrop_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar AUTOSCROLL_DELAY = 200;\nvar SCROLL_CURSOR_DELAY = 200;\nvar SCROLL_CURSOR_HYSTERESIS = 5;\nfunction DragdropHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var dragImage = dom.createElement(\"div\");\n dragImage.style.cssText = \"top:-100px;position:absolute;z-index:2147483647;opacity:0.5\";\n dragImage.textContent = \"\\xa0\";\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n exports.forEach(function (x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.on(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor, counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n this.onDragStart = function (e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function () {\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n range = editor.getSelectionRange();\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n editor.container.appendChild(dragImage);\n dataTransfer.setDragImage && dataTransfer.setDragImage(dragImage, 0, 0);\n setTimeout(function () {\n editor.container.removeChild(dragImage);\n });\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n isInternal = true;\n this.setState(\"drag\");\n };\n this.onDragEnd = function (e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\")\n editor.session.remove(editor.getSelectionRange());\n editor.$resetCursorStyle();\n }\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n this.onDragEnter = function (e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker)\n addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n this.onDragOver = function (e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n if (onMouseMoveTimer !== null)\n onMouseMoveTimer = null;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n this.onDragLeave = function (e) {\n counter--;\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n this.onDrop = function (e) {\n if (!dragCursor)\n return;\n var dataTransfer = e.dataTransfer;\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n }\n else {\n range = editor.moveText(range, dragCursor);\n }\n break;\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n }\n else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n clearDragMarker();\n return event.preventDefault(e);\n };\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler), editor);\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler), editor);\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.moveCursorToPosition(cursor);\n cursorMovedTime = now;\n cursorPointOnCaretMoved = { x: x, y: y };\n }\n else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n }\n else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = { row: cursor.row, column: cursor.column };\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);\n }\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);\n }\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n if (vScroll || (hScroll && !vMovement)) {\n if (!autoScrollStartTime)\n autoScrollStartTime = now;\n else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)\n editor.renderer.scrollCursorIntoView(scrollCursor);\n }\n else {\n autoScrollStartTime = null;\n }\n }\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused())\n editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.selection.fromOrientedRange(range);\n if (editor.isFocused() && !isInternal)\n editor.$resetCursorStyle();\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n var onMouseMoveTimer = null;\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function () {\n if (onMouseMoveTimer != null && dragSelectionMarker)\n clearDragMarker();\n }, 20);\n }\n }\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function (type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n }\n catch (e) { }\n var dropEffect = \"none\";\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n else if (moveAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"move\";\n else if (copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n return dropEffect;\n }\n}\n(function () {\n this.dragWait = function () {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay())\n this.startDrag();\n };\n this.dragWaitEnd = function () {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n this.dragReadyEnd = function (e) {\n this.editor.$resetCursorStyle();\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n this.startDrag = function () {\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n this.onMouseDrag = function (e) {\n var target = this.editor.container;\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3)\n target.dragDrop();\n }\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n this.onMouseDown = function (e) {\n if (!this.$dragEnabled)\n return;\n this.mousedownEvent = e;\n var editor = this.editor;\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))\n return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget)\n eventTarget.unselectable = \"on\";\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n this.setState(\"dragWait\");\n }\n else {\n this.startDrag();\n }\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n}).call(DragdropHandler.prototype);\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\nexports.DragdropHandler = DragdropHandler;\n\n});\n\nace.define(\"ace/mouse/touch_handler\",[\"require\",\"exports\",\"module\",\"ace/mouse/mouse_event\",\"ace/lib/event\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar MouseEvent = require(\"./mouse_event\").MouseEvent;\nvar event = require(\"../lib/event\");\nvar dom = require(\"../lib/dom\");\nexports.addTouchListeners = function (el, editor) {\n var mode = \"scroll\";\n var startX;\n var startY;\n var touchStartT;\n var lastT;\n var longTouchTimer;\n var animationTimer;\n var animationSteps = 0;\n var pos;\n var clickCount = 0;\n var vX = 0;\n var vY = 0;\n var pressed;\n var contextMenu;\n function createContextMenu() {\n var clipboard = window.navigator && window.navigator.clipboard;\n var isOpen = false;\n var updateMenu = function () {\n var selected = editor.getCopyText();\n var hasUndo = editor.session.getUndoManager().hasUndo();\n contextMenu.replaceChild(dom.buildDom(isOpen ? [\"span\",\n !selected && [\"span\", { class: \"ace_mobile-button\", action: \"selectall\" }, \"Select All\"],\n selected && [\"span\", { class: \"ace_mobile-button\", action: \"copy\" }, \"Copy\"],\n selected && [\"span\", { class: \"ace_mobile-button\", action: \"cut\" }, \"Cut\"],\n clipboard && [\"span\", { class: \"ace_mobile-button\", action: \"paste\" }, \"Paste\"],\n hasUndo && [\"span\", { class: \"ace_mobile-button\", action: \"undo\" }, \"Undo\"],\n [\"span\", { class: \"ace_mobile-button\", action: \"find\" }, \"Find\"],\n [\"span\", { class: \"ace_mobile-button\", action: \"openCommandPalette\" }, \"Palette\"]\n ] : [\"span\"]), contextMenu.firstChild);\n };\n var handleClick = function (e) {\n var action = e.target.getAttribute(\"action\");\n if (action == \"more\" || !isOpen) {\n isOpen = !isOpen;\n return updateMenu();\n }\n if (action == \"paste\") {\n clipboard.readText().then(function (text) {\n editor.execCommand(action, text);\n });\n }\n else if (action) {\n if (action == \"cut\" || action == \"copy\") {\n if (clipboard)\n clipboard.writeText(editor.getCopyText());\n else\n document.execCommand(\"copy\");\n }\n editor.execCommand(action);\n }\n contextMenu.firstChild.style.display = \"none\";\n isOpen = false;\n if (action != \"openCommandPalette\")\n editor.focus();\n };\n contextMenu = dom.buildDom([\"div\",\n {\n class: \"ace_mobile-menu\",\n ontouchstart: function (e) {\n mode = \"menu\";\n e.stopPropagation();\n e.preventDefault();\n editor.textInput.focus();\n },\n ontouchend: function (e) {\n e.stopPropagation();\n e.preventDefault();\n handleClick(e);\n },\n onclick: handleClick\n },\n [\"span\"],\n [\"span\", { class: \"ace_mobile-button\", action: \"more\" }, \"...\"]\n ], editor.container);\n }\n function showContextMenu() {\n if (!contextMenu)\n createContextMenu();\n var cursor = editor.selection.cursor;\n var pagePos = editor.renderer.textToScreenCoordinates(cursor.row, cursor.column);\n var leftOffset = editor.renderer.textToScreenCoordinates(0, 0).pageX;\n var scrollLeft = editor.renderer.scrollLeft;\n var rect = editor.container.getBoundingClientRect();\n contextMenu.style.top = pagePos.pageY - rect.top - 3 + \"px\";\n if (pagePos.pageX - rect.left < rect.width - 70) {\n contextMenu.style.left = \"\";\n contextMenu.style.right = \"10px\";\n }\n else {\n contextMenu.style.right = \"\";\n contextMenu.style.left = leftOffset + scrollLeft - rect.left + \"px\";\n }\n contextMenu.style.display = \"\";\n contextMenu.firstChild.style.display = \"none\";\n editor.on(\"input\", hideContextMenu);\n }\n function hideContextMenu(e) {\n if (contextMenu)\n contextMenu.style.display = \"none\";\n editor.off(\"input\", hideContextMenu);\n }\n function handleLongTap() {\n longTouchTimer = null;\n clearTimeout(longTouchTimer);\n var range = editor.selection.getRange();\n var inSelection = range.contains(pos.row, pos.column);\n if (range.isEmpty() || !inSelection) {\n editor.selection.moveToPosition(pos);\n editor.selection.selectWord();\n }\n mode = \"wait\";\n showContextMenu();\n }\n function switchToSelectionMode() {\n longTouchTimer = null;\n clearTimeout(longTouchTimer);\n editor.selection.moveToPosition(pos);\n var range = clickCount >= 2\n ? editor.selection.getLineRange(pos.row)\n : editor.session.getBracketRange(pos);\n if (range && !range.isEmpty()) {\n editor.selection.setRange(range);\n }\n else {\n editor.selection.selectWord();\n }\n mode = \"wait\";\n }\n event.addListener(el, \"contextmenu\", function (e) {\n if (!pressed)\n return;\n var textarea = editor.textInput.getElement();\n textarea.focus();\n }, editor);\n event.addListener(el, \"touchstart\", function (e) {\n var touches = e.touches;\n if (longTouchTimer || touches.length > 1) {\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n touchStartT = -1;\n mode = \"zoom\";\n return;\n }\n pressed = editor.$mouseHandler.isMousePressed = true;\n var h = editor.renderer.layerConfig.lineHeight;\n var w = editor.renderer.layerConfig.lineHeight;\n var t = e.timeStamp;\n lastT = t;\n var touchObj = touches[0];\n var x = touchObj.clientX;\n var y = touchObj.clientY;\n if (Math.abs(startX - x) + Math.abs(startY - y) > h)\n touchStartT = -1;\n startX = e.clientX = x;\n startY = e.clientY = y;\n vX = vY = 0;\n var ev = new MouseEvent(e, editor);\n pos = ev.getDocumentPosition();\n if (t - touchStartT < 500 && touches.length == 1 && !animationSteps) {\n clickCount++;\n e.preventDefault();\n e.button = 0;\n switchToSelectionMode();\n }\n else {\n clickCount = 0;\n var cursor = editor.selection.cursor;\n var anchor = editor.selection.isEmpty() ? cursor : editor.selection.anchor;\n var cursorPos = editor.renderer.$cursorLayer.getPixelPosition(cursor, true);\n var anchorPos = editor.renderer.$cursorLayer.getPixelPosition(anchor, true);\n var rect = editor.renderer.scroller.getBoundingClientRect();\n var offsetTop = editor.renderer.layerConfig.offset;\n var offsetLeft = editor.renderer.scrollLeft;\n var weightedDistance = function (x, y) {\n x = x / w;\n y = y / h - 0.75;\n return x * x + y * y;\n };\n if (e.clientX < rect.left) {\n mode = \"zoom\";\n return;\n }\n var diff1 = weightedDistance(e.clientX - rect.left - cursorPos.left + offsetLeft, e.clientY - rect.top - cursorPos.top + offsetTop);\n var diff2 = weightedDistance(e.clientX - rect.left - anchorPos.left + offsetLeft, e.clientY - rect.top - anchorPos.top + offsetTop);\n if (diff1 < 3.5 && diff2 < 3.5)\n mode = diff1 > diff2 ? \"cursor\" : \"anchor\";\n if (diff2 < 3.5)\n mode = \"anchor\";\n else if (diff1 < 3.5)\n mode = \"cursor\";\n else\n mode = \"scroll\";\n longTouchTimer = setTimeout(handleLongTap, 450);\n }\n touchStartT = t;\n }, editor);\n event.addListener(el, \"touchend\", function (e) {\n pressed = editor.$mouseHandler.isMousePressed = false;\n if (animationTimer)\n clearInterval(animationTimer);\n if (mode == \"zoom\") {\n mode = \"\";\n animationSteps = 0;\n }\n else if (longTouchTimer) {\n editor.selection.moveToPosition(pos);\n animationSteps = 0;\n showContextMenu();\n }\n else if (mode == \"scroll\") {\n animate();\n hideContextMenu();\n }\n else {\n showContextMenu();\n }\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n }, editor);\n event.addListener(el, \"touchmove\", function (e) {\n if (longTouchTimer) {\n clearTimeout(longTouchTimer);\n longTouchTimer = null;\n }\n var touches = e.touches;\n if (touches.length > 1 || mode == \"zoom\")\n return;\n var touchObj = touches[0];\n var wheelX = startX - touchObj.clientX;\n var wheelY = startY - touchObj.clientY;\n if (mode == \"wait\") {\n if (wheelX * wheelX + wheelY * wheelY > 4)\n mode = \"cursor\";\n else\n return e.preventDefault();\n }\n startX = touchObj.clientX;\n startY = touchObj.clientY;\n e.clientX = touchObj.clientX;\n e.clientY = touchObj.clientY;\n var t = e.timeStamp;\n var dt = t - lastT;\n lastT = t;\n if (mode == \"scroll\") {\n var mouseEvent = new MouseEvent(e, editor);\n mouseEvent.speed = 1;\n mouseEvent.wheelX = wheelX;\n mouseEvent.wheelY = wheelY;\n if (10 * Math.abs(wheelX) < Math.abs(wheelY))\n wheelX = 0;\n if (10 * Math.abs(wheelY) < Math.abs(wheelX))\n wheelY = 0;\n if (dt != 0) {\n vX = wheelX / dt;\n vY = wheelY / dt;\n }\n editor._emit(\"mousewheel\", mouseEvent);\n if (!mouseEvent.propagationStopped) {\n vX = vY = 0;\n }\n }\n else {\n var ev = new MouseEvent(e, editor);\n var pos = ev.getDocumentPosition();\n if (mode == \"cursor\")\n editor.selection.moveCursorToPosition(pos);\n else if (mode == \"anchor\")\n editor.selection.setSelectionAnchor(pos.row, pos.column);\n editor.renderer.scrollCursorIntoView(pos);\n e.preventDefault();\n }\n }, editor);\n function animate() {\n animationSteps += 60;\n animationTimer = setInterval(function () {\n if (animationSteps-- <= 0) {\n clearInterval(animationTimer);\n animationTimer = null;\n }\n if (Math.abs(vX) < 0.01)\n vX = 0;\n if (Math.abs(vY) < 0.01)\n vY = 0;\n if (animationSteps < 20)\n vX = 0.9 * vX;\n if (animationSteps < 20)\n vY = 0.9 * vY;\n var oldScrollTop = editor.session.getScrollTop();\n editor.renderer.scrollBy(10 * vX, 10 * vY);\n if (oldScrollTop == editor.session.getScrollTop())\n animationSteps = 0;\n }, 10);\n }\n};\n\n});\n\nace.define(\"ace/mouse/mouse_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/mouse/default_handlers\",\"ace/mouse/default_gutter_handler\",\"ace/mouse/mouse_event\",\"ace/mouse/dragdrop_handler\",\"ace/mouse/touch_handler\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar DefaultHandlers = require(\"./default_handlers\").DefaultHandlers;\nvar DefaultGutterHandler = require(\"./default_gutter_handler\").GutterHandler;\nvar MouseEvent = require(\"./mouse_event\").MouseEvent;\nvar DragdropHandler = require(\"./dragdrop_handler\").DragdropHandler;\nvar addTouchListeners = require(\"./touch_handler\").addTouchListeners;\nvar config = require(\"../config\");\nvar MouseHandler = /** @class */ (function () {\n function MouseHandler(editor) { this.$dragDelay; this.$dragEnabled; this.$mouseMoved; this.mouseEvent; this.$focusTimeout;\n var _self = this;\n this.editor = editor;\n new DefaultHandlers(this);\n new DefaultGutterHandler(this);\n new DragdropHandler(this);\n var focusEditor = function (e) {\n var windowBlurred = !document.hasFocus || !document.hasFocus()\n || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement());\n if (windowBlurred)\n window.focus();\n editor.focus();\n setTimeout(function () {\n if (!editor.isFocused())\n editor.focus();\n });\n };\n var mouseTarget = editor.renderer.getMouseEventTarget();\n event.addListener(mouseTarget, \"click\", this.onMouseEvent.bind(this, \"click\"), editor);\n event.addListener(mouseTarget, \"mousemove\", this.onMouseMove.bind(this, \"mousemove\"), editor);\n event.addMultiMouseDownListener([\n mouseTarget,\n editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner,\n editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner,\n editor.textInput && editor.textInput.getElement()\n ].filter(Boolean), [400, 300, 250], this, \"onMouseEvent\", editor);\n event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, \"mousewheel\"), editor);\n addTouchListeners(editor.container, editor);\n var gutterEl = editor.renderer.$gutter;\n event.addListener(gutterEl, \"mousedown\", this.onMouseEvent.bind(this, \"guttermousedown\"), editor);\n event.addListener(gutterEl, \"click\", this.onMouseEvent.bind(this, \"gutterclick\"), editor);\n event.addListener(gutterEl, \"dblclick\", this.onMouseEvent.bind(this, \"gutterdblclick\"), editor);\n event.addListener(gutterEl, \"mousemove\", this.onMouseEvent.bind(this, \"guttermousemove\"), editor);\n event.addListener(mouseTarget, \"mousedown\", focusEditor, editor);\n event.addListener(gutterEl, \"mousedown\", focusEditor, editor);\n if (useragent.isIE && editor.renderer.scrollBarV) {\n event.addListener(editor.renderer.scrollBarV.element, \"mousedown\", focusEditor, editor);\n event.addListener(editor.renderer.scrollBarH.element, \"mousedown\", focusEditor, editor);\n }\n editor.on(\"mousemove\", function (e) {\n if (_self.state || _self.$dragDelay || !_self.$dragEnabled)\n return;\n var character = editor.renderer.screenToTextCoordinates(e.x, e.y);\n var range = editor.session.selection.getRange();\n var renderer = editor.renderer;\n if (!range.isEmpty() && range.insideStart(character.row, character.column)) {\n renderer.setCursorStyle(\"default\");\n }\n else {\n renderer.setCursorStyle(\"\");\n }\n }, //@ts-expect-error TODO: seems mistyping - should be boolean\n editor);\n }\n MouseHandler.prototype.onMouseEvent = function (name, e) {\n if (!this.editor.session)\n return;\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n MouseHandler.prototype.onMouseMove = function (name, e) {\n var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;\n if (!listeners || !listeners.length)\n return;\n this.editor._emit(name, new MouseEvent(e, this.editor));\n };\n MouseHandler.prototype.onMouseWheel = function (name, e) {\n var mouseEvent = new MouseEvent(e, this.editor);\n mouseEvent.speed = this.$scrollSpeed * 2;\n mouseEvent.wheelX = e.wheelX;\n mouseEvent.wheelY = e.wheelY;\n this.editor._emit(name, mouseEvent);\n };\n MouseHandler.prototype.setState = function (state) {\n this.state = state;\n };\n MouseHandler.prototype.captureMouse = function (ev, mouseMoveHandler) {\n this.x = ev.x;\n this.y = ev.y;\n this.isMousePressed = true;\n var editor = this.editor;\n var renderer = this.editor.renderer;\n renderer.$isMousePressed = true;\n var self = this;\n var onMouseMove = function (e) {\n if (!e)\n return;\n if (useragent.isWebKit && !e.which && self.releaseMouse)\n return self.releaseMouse();\n self.x = e.clientX;\n self.y = e.clientY;\n mouseMoveHandler && mouseMoveHandler(e);\n self.mouseEvent = new MouseEvent(e, self.editor);\n self.$mouseMoved = true;\n };\n var onCaptureEnd = function (e) {\n editor.off(\"beforeEndOperation\", onOperationEnd);\n clearInterval(timerId);\n if (editor.session)\n onCaptureInterval();\n self[self.state + \"End\"] && self[self.state + \"End\"](e);\n self.state = \"\";\n self.isMousePressed = renderer.$isMousePressed = false;\n if (renderer.$keepTextAreaAtCursor)\n renderer.$moveTextAreaToCursor();\n self.$onCaptureMouseMove = self.releaseMouse = null;\n e && self.onMouseEvent(\"mouseup\", e);\n editor.endOperation();\n };\n var onCaptureInterval = function () {\n self[self.state] && self[self.state]();\n self.$mouseMoved = false;\n };\n if (useragent.isOldIE && ev.domEvent.type == \"dblclick\") {\n return setTimeout(function () { onCaptureEnd(ev); });\n }\n var onOperationEnd = function (e) {\n if (!self.releaseMouse)\n return;\n if (editor.curOp.command.name && editor.curOp.selectionChanged) {\n self[self.state + \"End\"] && self[self.state + \"End\"]();\n self.state = \"\";\n self.releaseMouse();\n }\n };\n editor.on(\"beforeEndOperation\", onOperationEnd);\n editor.startOperation({ command: { name: \"mouse\" } });\n self.$onCaptureMouseMove = onMouseMove;\n self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);\n var timerId = setInterval(onCaptureInterval, 20);\n };\n MouseHandler.prototype.cancelContextMenu = function () {\n var stop = function (e) {\n if (e && e.domEvent && e.domEvent.type != \"contextmenu\")\n return;\n this.editor.off(\"nativecontextmenu\", stop);\n if (e && e.domEvent)\n event.stopEvent(e.domEvent);\n }.bind(this);\n setTimeout(stop, 10);\n this.editor.on(\"nativecontextmenu\", stop);\n };\n MouseHandler.prototype.destroy = function () {\n if (this.releaseMouse)\n this.releaseMouse();\n };\n return MouseHandler;\n}());\nMouseHandler.prototype.releaseMouse = null;\nconfig.defineOptions(MouseHandler.prototype, \"mouseHandler\", {\n scrollSpeed: { initialValue: 2 },\n dragDelay: { initialValue: (useragent.isMac ? 150 : 0) },\n dragEnabled: { initialValue: true },\n focusTimeout: { initialValue: 0 },\n tooltipFollowsMouse: { initialValue: true }\n});\nexports.MouseHandler = MouseHandler;\n\n});\n\nace.define(\"ace/mouse/fold_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar FoldHandler = /** @class */ (function () {\n function FoldHandler(editor) {\n editor.on(\"click\", function (e) {\n var position = e.getDocumentPosition();\n var session = editor.session;\n var fold = session.getFoldAt(position.row, position.column, 1);\n if (fold) {\n if (e.getAccelKey())\n session.removeFold(fold);\n else\n session.expandFold(fold);\n e.stop();\n }\n var target = e.domEvent && e.domEvent.target;\n if (target && dom.hasCssClass(target, \"ace_inline_button\")) {\n if (dom.hasCssClass(target, \"ace_toggle_wrap\")) {\n session.setOption(\"wrap\", !session.getUseWrapMode());\n editor.renderer.scrollCursorIntoView();\n }\n }\n });\n editor.on(\"gutterclick\", function (e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n if (session.foldWidgets && session.foldWidgets[row])\n editor.session.onFoldWidgetClick(row, e);\n if (!editor.isFocused())\n editor.focus();\n e.stop();\n }\n });\n editor.on(\"gutterdblclick\", function (e) {\n var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);\n if (gutterRegion == \"foldWidgets\") {\n var row = e.getDocumentPosition().row;\n var session = editor.session;\n var data = session.getParentFoldRangeData(row, true);\n var range = data.range || data.firstRange;\n if (range) {\n row = range.start.row;\n var fold = session.getFoldAt(row, session.getLine(row).length, 1);\n if (fold) {\n session.removeFold(fold);\n }\n else {\n session.addFold(\"...\", range);\n editor.renderer.scrollCursorIntoView({ row: range.start.row, column: 0 });\n }\n }\n e.stop();\n }\n });\n }\n return FoldHandler;\n}());\nexports.FoldHandler = FoldHandler;\n\n});\n\nace.define(\"ace/keyboard/keybinding\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/event\"], function(require, exports, module){\"use strict\";\nvar keyUtil = require(\"../lib/keys\");\nvar event = require(\"../lib/event\");\nvar KeyBinding = /** @class */ (function () {\n function KeyBinding(editor) {\n this.$editor = editor;\n this.$data = { editor: editor };\n this.$handlers = [];\n this.setDefaultHandler(editor.commands);\n }\n KeyBinding.prototype.setDefaultHandler = function (kb) {\n this.removeKeyboardHandler(this.$defaultHandler);\n this.$defaultHandler = kb;\n this.addKeyboardHandler(kb, 0);\n };\n KeyBinding.prototype.setKeyboardHandler = function (kb) {\n var h = this.$handlers;\n if (h[h.length - 1] == kb)\n return;\n while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler)\n this.removeKeyboardHandler(h[h.length - 1]);\n this.addKeyboardHandler(kb, 1);\n };\n KeyBinding.prototype.addKeyboardHandler = function (kb, pos) {\n if (!kb)\n return;\n if (typeof kb == \"function\" && !kb.handleKeyboard)\n kb.handleKeyboard = kb;\n var i = this.$handlers.indexOf(kb);\n if (i != -1)\n this.$handlers.splice(i, 1);\n if (pos == undefined)\n this.$handlers.push(kb);\n else\n this.$handlers.splice(pos, 0, kb);\n if (i == -1 && kb.attach)\n kb.attach(this.$editor);\n };\n KeyBinding.prototype.removeKeyboardHandler = function (kb) {\n var i = this.$handlers.indexOf(kb);\n if (i == -1)\n return false;\n this.$handlers.splice(i, 1);\n kb.detach && kb.detach(this.$editor);\n return true;\n };\n KeyBinding.prototype.getKeyboardHandler = function () {\n return this.$handlers[this.$handlers.length - 1];\n };\n KeyBinding.prototype.getStatusText = function () {\n var data = this.$data;\n var editor = data.editor;\n return this.$handlers.map(function (h) {\n return h.getStatusText && h.getStatusText(editor, data) || \"\";\n }).filter(Boolean).join(\" \");\n };\n KeyBinding.prototype.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {\n var toExecute;\n var success = false;\n var commands = this.$editor.commands;\n for (var i = this.$handlers.length; i--;) {\n toExecute = this.$handlers[i].handleKeyboard(\n this.$data, hashId, keyString, keyCode, e);\n if (!toExecute || !toExecute.command)\n continue;\n if (toExecute.command == \"null\") {\n success = true;\n }\n else {\n success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);\n }\n if (success && e && hashId != -1 &&\n toExecute[\"passEvent\"] != true && toExecute.command[\"passEvent\"] != true) {\n event.stopEvent(e);\n }\n if (success)\n break;\n }\n if (!success && hashId == -1) {\n toExecute = { command: \"insertstring\" };\n success = commands.exec(\"insertstring\", this.$editor, keyString);\n }\n if (success && this.$editor._signal)\n this.$editor._signal(\"keyboardActivity\", toExecute);\n return success;\n };\n KeyBinding.prototype.onCommandKey = function (e, hashId, keyCode) {\n var keyString = keyUtil.keyCodeToString(keyCode);\n return this.$callKeyboardHandlers(hashId, keyString, keyCode, e);\n };\n KeyBinding.prototype.onTextInput = function (text) {\n return this.$callKeyboardHandlers(-1, text);\n };\n return KeyBinding;\n}());\nexports.KeyBinding = KeyBinding;\n\n});\n\nace.define(\"ace/lib/bidiutil\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar ArabicAlefBetIntervalsBegine = ['\\u0621', '\\u0641'];\nvar ArabicAlefBetIntervalsEnd = ['\\u063A', '\\u064a'];\nvar dir = 0, hiLevel = 0;\nvar lastArabic = false, hasUBAT_AL = false, hasUBAT_B = false, hasUBAT_S = false, hasBlockSep = false, hasSegSep = false;\nvar impTab_LTR = [ [0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]\n];\nvar impTab_RTL = [ [2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1]\n];\nvar LTR = 0, RTL = 1;\nvar L = 0;\nvar R = 1;\nvar EN = 2;\nvar AN = 3;\nvar ON = 4;\nvar B = 5;\nvar S = 6;\nvar AL = 7;\nvar WS = 8;\nvar CS = 9;\nvar ES = 10;\nvar ET = 11;\nvar NSM = 12;\nvar LRE = 13;\nvar RLE = 14;\nvar PDF = 15;\nvar LRO = 16;\nvar RLO = 17;\nvar BN = 18;\nvar UnicodeTBL00 = [\n BN, BN, BN, BN, BN, BN, BN, BN, BN, S, B, S, WS, B, BN, BN,\n BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, B, B, B, S,\n WS, ON, ON, ET, ET, ET, ON, ON, ON, ON, ON, ES, CS, ES, CS, CS,\n EN, EN, EN, EN, EN, EN, EN, EN, EN, EN, CS, ON, ON, ON, ON, ON,\n ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,\n L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, ON,\n ON, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,\n L, L, L, L, L, L, L, L, L, L, L, ON, ON, ON, ON, BN,\n BN, BN, BN, BN, BN, B, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN,\n BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN, BN,\n CS, ON, ET, ET, ET, ET, ON, ON, ON, ON, L, ON, ON, BN, ON, ON,\n ET, ET, EN, EN, ON, L, ON, ON, ON, EN, L, ON, ON, ON, ON, ON\n];\nvar UnicodeTBL20 = [\n WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, WS, BN, BN, BN, L, R,\n ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON,\n ON, ON, ON, ON, ON, ON, ON, ON, WS, B, LRE, RLE, PDF, LRO, RLO, CS,\n ET, ET, ET, ET, ET, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON,\n ON, ON, ON, ON, CS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON,\n ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, WS\n];\nfunction _computeLevels(chars, levels, len, charTypes) {\n var impTab = dir ? impTab_RTL : impTab_LTR, prevState = null, newClass = null, newLevel = null, newState = 0, action = null, cond = null, condPos = -1, i = null, ix = null, classes = [];\n if (!charTypes) {\n for (i = 0, charTypes = []; i < len; i++) {\n charTypes[i] = _getCharacterType(chars[i]);\n }\n }\n hiLevel = dir;\n lastArabic = false;\n hasUBAT_AL = false;\n hasUBAT_B = false;\n hasUBAT_S = false;\n for (ix = 0; ix < len; ix++) {\n prevState = newState;\n classes[ix] = newClass = _getCharClass(chars, charTypes, classes, ix);\n newState = impTab[prevState][newClass];\n action = newState & 0xF0;\n newState &= 0x0F;\n levels[ix] = newLevel = impTab[newState][5];\n if (action > 0) {\n if (action == 0x10) {\n for (i = condPos; i < ix; i++) {\n levels[i] = 1;\n }\n condPos = -1;\n }\n else {\n condPos = -1;\n }\n }\n cond = impTab[newState][6];\n if (cond) {\n if (condPos == -1) {\n condPos = ix;\n }\n }\n else {\n if (condPos > -1) {\n for (i = condPos; i < ix; i++) {\n levels[i] = newLevel;\n }\n condPos = -1;\n }\n }\n if (charTypes[ix] == B) {\n levels[ix] = 0;\n }\n hiLevel |= newLevel;\n }\n if (hasUBAT_S) {\n for (i = 0; i < len; i++) {\n if (charTypes[i] == S) {\n levels[i] = dir;\n for (var j = i - 1; j >= 0; j--) {\n if (charTypes[j] == WS) {\n levels[j] = dir;\n }\n else {\n break;\n }\n }\n }\n }\n }\n}\nfunction _invertLevel(lev, levels, _array) {\n if (hiLevel < lev) {\n return;\n }\n if (lev == 1 && dir == RTL && !hasUBAT_B) {\n _array.reverse();\n return;\n }\n var len = _array.length, start = 0, end, lo, hi, tmp;\n while (start < len) {\n if (levels[start] >= lev) {\n end = start + 1;\n while (end < len && levels[end] >= lev) {\n end++;\n }\n for (lo = start, hi = end - 1; lo < hi; lo++, hi--) {\n tmp = _array[lo];\n _array[lo] = _array[hi];\n _array[hi] = tmp;\n }\n start = end;\n }\n start++;\n }\n}\nfunction _getCharClass(chars, types, classes, ix) {\n var cType = types[ix], wType, nType, len, i;\n switch (cType) {\n case L:\n case R:\n lastArabic = false;\n case ON:\n case AN:\n return cType;\n case EN:\n return lastArabic ? AN : EN;\n case AL:\n lastArabic = true;\n hasUBAT_AL = true;\n return R;\n case WS:\n return ON;\n case CS:\n if (ix < 1 || (ix + 1) >= types.length ||\n ((wType = classes[ix - 1]) != EN && wType != AN) ||\n ((nType = types[ix + 1]) != EN && nType != AN)) {\n return ON;\n }\n if (lastArabic) {\n nType = AN;\n }\n return nType == wType ? nType : ON;\n case ES:\n wType = ix > 0 ? classes[ix - 1] : B;\n if (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN) {\n return EN;\n }\n return ON;\n case ET:\n if (ix > 0 && classes[ix - 1] == EN) {\n return EN;\n }\n if (lastArabic) {\n return ON;\n }\n i = ix + 1;\n len = types.length;\n while (i < len && types[i] == ET) {\n i++;\n }\n if (i < len && types[i] == EN) {\n return EN;\n }\n return ON;\n case NSM:\n len = types.length;\n i = ix + 1;\n while (i < len && types[i] == NSM) {\n i++;\n }\n if (i < len) {\n var c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E;\n wType = types[i];\n if (rtlCandidate && (wType == R || wType == AL)) {\n return R;\n }\n }\n if (ix < 1 || (wType = types[ix - 1]) == B) {\n return ON;\n }\n return classes[ix - 1];\n case B:\n lastArabic = false;\n hasUBAT_B = true;\n return dir;\n case S:\n hasUBAT_S = true;\n return ON;\n case LRE:\n case RLE:\n case LRO:\n case RLO:\n case PDF:\n lastArabic = false;\n case BN:\n return ON;\n }\n}\nfunction _getCharacterType(ch) {\n var uc = ch.charCodeAt(0), hi = uc >> 8;\n if (hi == 0) {\n return ((uc > 0x00BF) ? L : UnicodeTBL00[uc]);\n }\n else if (hi == 5) {\n return (/[\\u0591-\\u05f4]/.test(ch) ? R : L);\n }\n else if (hi == 6) {\n if (/[\\u0610-\\u061a\\u064b-\\u065f\\u06d6-\\u06e4\\u06e7-\\u06ed]/.test(ch))\n return NSM;\n else if (/[\\u0660-\\u0669\\u066b-\\u066c]/.test(ch))\n return AN;\n else if (uc == 0x066A)\n return ET;\n else if (/[\\u06f0-\\u06f9]/.test(ch))\n return EN;\n else\n return AL;\n }\n else if (hi == 0x20 && uc <= 0x205F) {\n return UnicodeTBL20[uc & 0xFF];\n }\n else if (hi == 0xFE) {\n return (uc >= 0xFE70 ? AL : ON);\n }\n return ON;\n}\nfunction _isArabicDiacritics(ch) {\n return (ch >= '\\u064b' && ch <= '\\u0655');\n}\nexports.L = L;\nexports.R = R;\nexports.EN = EN;\nexports.ON_R = 3;\nexports.AN = 4;\nexports.R_H = 5;\nexports.B = 6;\nexports.RLE = 7;\nexports.DOT = \"\\xB7\";\nexports.doBidiReorder = function (text, textCharTypes, isRtl) {\n if (text.length < 2)\n return {};\n var chars = text.split(\"\"), logicalFromVisual = new Array(chars.length), bidiLevels = new Array(chars.length), levels = [];\n dir = isRtl ? RTL : LTR;\n _computeLevels(chars, levels, chars.length, textCharTypes);\n for (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++)\n ;\n _invertLevel(2, levels, logicalFromVisual);\n _invertLevel(1, levels, logicalFromVisual);\n for (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width\n if (textCharTypes[i] === AN) {\n levels[i] = exports.AN;\n }\n else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE)\n || textCharTypes[i] === ON || textCharTypes[i] === BN)) {\n levels[i] = exports.ON_R;\n }\n else if ((i > 0 && chars[i - 1] === '\\u0644') && /\\u0622|\\u0623|\\u0625|\\u0627/.test(chars[i])) {\n levels[i - 1] = levels[i] = exports.R_H;\n i++;\n }\n }\n if (chars[chars.length - 1] === exports.DOT)\n levels[chars.length - 1] = exports.B;\n if (chars[0] === '\\u202B')\n levels[0] = exports.RLE;\n for (var i = 0; i < logicalFromVisual.length; i++) {\n bidiLevels[i] = levels[logicalFromVisual[i]];\n }\n return { 'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels };\n};\nexports.hasBidiCharacters = function (text, textCharTypes) {\n var ret = false;\n for (var i = 0; i < text.length; i++) {\n textCharTypes[i] = _getCharacterType(text.charAt(i));\n if (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL || textCharTypes[i] == AN))\n ret = true;\n }\n return ret;\n};\nexports.getVisualFromLogicalIdx = function (logIdx, rowMap) {\n for (var i = 0; i < rowMap.logicalFromVisual.length; i++) {\n if (rowMap.logicalFromVisual[i] == logIdx)\n return i;\n }\n return 0;\n};\n\n});\n\nace.define(\"ace/bidihandler\",[\"require\",\"exports\",\"module\",\"ace/lib/bidiutil\",\"ace/lib/lang\"], function(require, exports, module){\"use strict\";\nvar bidiUtil = require(\"./lib/bidiutil\");\nvar lang = require(\"./lib/lang\");\nvar bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac\\u202B]/;\nvar BidiHandler = /** @class */ (function () {\n function BidiHandler(session) {\n this.session = session;\n this.bidiMap = {};\n this.currentRow = null;\n this.bidiUtil = bidiUtil;\n this.charWidths = [];\n this.EOL = \"\\xAC\";\n this.showInvisibles = true;\n this.isRtlDir = false;\n this.$isRtl = false;\n this.line = \"\";\n this.wrapIndent = 0;\n this.EOF = \"\\xB6\";\n this.RLE = \"\\u202B\";\n this.contentWidth = 0;\n this.fontMetrics = null;\n this.rtlLineOffset = 0;\n this.wrapOffset = 0;\n this.isMoveLeftOperation = false;\n this.seenBidi = bidiRE.test(session.getValue());\n }\n BidiHandler.prototype.isBidiRow = function (screenRow, docRow, splitIndex) {\n if (!this.seenBidi)\n return false;\n if (screenRow !== this.currentRow) {\n this.currentRow = screenRow;\n this.updateRowLine(docRow, splitIndex);\n this.updateBidiMap();\n }\n return this.bidiMap.bidiLevels;\n };\n BidiHandler.prototype.onChange = function (delta) {\n if (!this.seenBidi) {\n if (delta.action == \"insert\" && bidiRE.test(delta.lines.join(\"\\n\"))) {\n this.seenBidi = true;\n this.currentRow = null;\n }\n }\n else {\n this.currentRow = null;\n }\n };\n BidiHandler.prototype.getDocumentRow = function () {\n var docRow = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n if (index >= 0)\n docRow = this.session.$docRowCache[index];\n }\n return docRow;\n };\n BidiHandler.prototype.getSplitIndex = function () {\n var splitIndex = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n while (this.currentRow - splitIndex > 0) {\n currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);\n if (currentIndex !== prevIndex)\n break;\n prevIndex = currentIndex;\n splitIndex++;\n }\n }\n else {\n splitIndex = this.currentRow;\n }\n return splitIndex;\n };\n BidiHandler.prototype.updateRowLine = function (docRow, splitIndex) {\n if (docRow === undefined)\n docRow = this.getDocumentRow();\n var isLastRow = (docRow === this.session.getLength() - 1), endOfLine = isLastRow ? this.EOF : this.EOL;\n this.wrapIndent = 0;\n this.line = this.session.getLine(docRow);\n this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE;\n if (this.session.$useWrapMode) {\n var splits = this.session.$wrapData[docRow];\n if (splits) {\n if (splitIndex === undefined)\n splitIndex = this.getSplitIndex();\n if (splitIndex > 0 && splits.length) {\n this.wrapIndent = splits.indent;\n this.wrapOffset = this.wrapIndent * this.charWidths[bidiUtil.L];\n this.line = (splitIndex < splits.length) ?\n this.line.substring(splits[splitIndex - 1], splits[splitIndex]) :\n this.line.substring(splits[splits.length - 1]);\n }\n else {\n this.line = this.line.substring(0, splits[splitIndex]);\n }\n if (splitIndex == splits.length) {\n this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT;\n }\n }\n }\n else {\n this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT;\n }\n var session = this.session, shift = 0, size;\n this.line = this.line.replace(/\\t|[\\u1100-\\u2029, \\u202F-\\uFFE6]/g, function (ch, i) {\n if (ch === '\\t' || session.isFullWidth(ch.charCodeAt(0))) {\n size = (ch === '\\t') ? session.getScreenTabSize(i + shift) : 2;\n shift += size - 1;\n return lang.stringRepeat(bidiUtil.DOT, size);\n }\n return ch;\n });\n if (this.isRtlDir) {\n this.fontMetrics.$main.textContent = (this.line.charAt(this.line.length - 1) == bidiUtil.DOT) ? this.line.substr(0, this.line.length - 1) : this.line;\n this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width;\n }\n };\n BidiHandler.prototype.updateBidiMap = function () {\n var textCharTypes = [];\n if (bidiUtil.hasBidiCharacters(this.line, textCharTypes) || this.isRtlDir) {\n this.bidiMap = bidiUtil.doBidiReorder(this.line, textCharTypes, this.isRtlDir);\n }\n else {\n this.bidiMap = {};\n }\n };\n BidiHandler.prototype.markAsDirty = function () {\n this.currentRow = null;\n };\n BidiHandler.prototype.updateCharacterWidths = function (fontMetrics) {\n if (this.characterWidth === fontMetrics.$characterSize.width)\n return;\n this.fontMetrics = fontMetrics;\n var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;\n var bidiCharWidth = fontMetrics.$measureCharWidth(\"\\u05d4\");\n this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;\n this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;\n this.charWidths[bidiUtil.R_H] = bidiCharWidth * 0.45;\n this.charWidths[bidiUtil.B] = this.charWidths[bidiUtil.RLE] = 0;\n this.currentRow = null;\n };\n BidiHandler.prototype.setShowInvisibles = function (showInvisibles) {\n this.showInvisibles = showInvisibles;\n this.currentRow = null;\n };\n BidiHandler.prototype.setEolChar = function (eolChar) {\n this.EOL = eolChar;\n };\n BidiHandler.prototype.setContentWidth = function (width) {\n this.contentWidth = width;\n };\n BidiHandler.prototype.isRtlLine = function (row) {\n if (this.$isRtl)\n return true;\n if (row != undefined)\n return (this.session.getLine(row).charAt(0) == this.RLE);\n else\n return this.isRtlDir;\n };\n BidiHandler.prototype.setRtlDirection = function (editor, isRtlDir) {\n var cursor = editor.getCursorPosition();\n for (var row = editor.selection.getSelectionAnchor().row; row <= cursor.row; row++) {\n if (!isRtlDir && editor.session.getLine(row).charAt(0) === editor.session.$bidiHandler.RLE)\n editor.session.doc.removeInLine(row, 0, 1);\n else if (isRtlDir && editor.session.getLine(row).charAt(0) !== editor.session.$bidiHandler.RLE)\n editor.session.doc.insert({ column: 0, row: row }, editor.session.$bidiHandler.RLE);\n }\n };\n BidiHandler.prototype.getPosLeft = function (col) {\n col -= this.wrapIndent;\n var leftBoundary = (this.line.charAt(0) === this.RLE) ? 1 : 0;\n var logicalIdx = (col > leftBoundary) ? (this.session.getOverwrite() ? col : col - 1) : leftBoundary;\n var visualIdx = bidiUtil.getVisualFromLogicalIdx(logicalIdx, this.bidiMap), levels = this.bidiMap.bidiLevels, left = 0;\n if (!this.session.getOverwrite() && col <= leftBoundary && levels[visualIdx] % 2 !== 0)\n visualIdx++;\n for (var i = 0; i < visualIdx; i++) {\n left += this.charWidths[levels[i]];\n }\n if (!this.session.getOverwrite() && (col > leftBoundary) && (levels[visualIdx] % 2 === 0))\n left += this.charWidths[levels[visualIdx]];\n if (this.wrapIndent)\n left += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;\n if (this.isRtlDir)\n left += this.rtlLineOffset;\n return left;\n };\n BidiHandler.prototype.getSelections = function (startCol, endCol) {\n var map = this.bidiMap, levels = map.bidiLevels, level, selections = [], offset = 0, selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent, isSelected = false, isSelectedPrev = false, selectionStart = 0;\n if (this.wrapIndent)\n offset += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;\n for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {\n logIdx = map.logicalFromVisual[visIdx];\n level = levels[visIdx];\n isSelected = (logIdx >= selColMin) && (logIdx < selColMax);\n if (isSelected && !isSelectedPrev) {\n selectionStart = offset;\n }\n else if (!isSelected && isSelectedPrev) {\n selections.push({ left: selectionStart, width: offset - selectionStart });\n }\n offset += this.charWidths[level];\n isSelectedPrev = isSelected;\n }\n if (isSelected && (visIdx === levels.length)) {\n selections.push({ left: selectionStart, width: offset - selectionStart });\n }\n if (this.isRtlDir) {\n for (var i = 0; i < selections.length; i++) {\n selections[i].left += this.rtlLineOffset;\n }\n }\n return selections;\n };\n BidiHandler.prototype.offsetToCol = function (posX) {\n if (this.isRtlDir)\n posX -= this.rtlLineOffset;\n var logicalIdx = 0, posX = Math.max(posX, 0), offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels, charWidth = this.charWidths[levels[visualIdx]];\n if (this.wrapIndent)\n posX -= this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset;\n while (posX > offset + charWidth / 2) {\n offset += charWidth;\n if (visualIdx === levels.length - 1) {\n charWidth = 0;\n break;\n }\n charWidth = this.charWidths[levels[++visualIdx]];\n }\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)) {\n if (posX < offset)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)) {\n logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]\n : this.bidiMap.logicalFromVisual[visualIdx - 1]);\n }\n else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))\n || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))) {\n logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];\n }\n else {\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n if (logicalIdx === 0 && this.isRtlDir)\n logicalIdx++;\n return (logicalIdx + this.wrapIndent);\n };\n return BidiHandler;\n}());\nexports.BidiHandler = BidiHandler;\n\n});\n\nace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Range = require(\"./range\").Range;\nvar Selection = /** @class */ (function () {\n function Selection(session) {\n this.session = session;\n this.doc = session.getDocument();\n this.clearSelection();\n this.cursor = this.lead = this.doc.createAnchor(0, 0);\n this.anchor = this.doc.createAnchor(0, 0);\n this.$silent = false;\n var self = this;\n this.cursor.on(\"change\", function (e) {\n self.$cursorChanged = true;\n if (!self.$silent)\n self._emit(\"changeCursor\");\n if (!self.$isEmpty && !self.$silent)\n self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)\n self.$desiredColumn = null;\n });\n this.anchor.on(\"change\", function () {\n self.$anchorChanged = true;\n if (!self.$isEmpty && !self.$silent)\n self._emit(\"changeSelection\");\n });\n }\n Selection.prototype.isEmpty = function () {\n return this.$isEmpty || (this.anchor.row == this.lead.row &&\n this.anchor.column == this.lead.column);\n };\n Selection.prototype.isMultiLine = function () {\n return !this.$isEmpty && this.anchor.row != this.cursor.row;\n };\n Selection.prototype.getCursor = function () {\n return this.lead.getPosition();\n };\n Selection.prototype.setAnchor = function (row, column) {\n this.$isEmpty = false;\n this.anchor.setPosition(row, column);\n };\n Selection.prototype.getAnchor = function () {\n if (this.$isEmpty)\n return this.getSelectionLead();\n return this.anchor.getPosition();\n };\n Selection.prototype.getSelectionLead = function () {\n return this.lead.getPosition();\n };\n Selection.prototype.isBackwards = function () {\n var anchor = this.anchor;\n var lead = this.lead;\n return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));\n };\n Selection.prototype.getRange = function () {\n var anchor = this.anchor;\n var lead = this.lead;\n if (this.$isEmpty)\n return Range.fromPoints(lead, lead);\n return this.isBackwards()\n ? Range.fromPoints(lead, anchor)\n : Range.fromPoints(anchor, lead);\n };\n Selection.prototype.clearSelection = function () {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n this._emit(\"changeSelection\");\n }\n };\n Selection.prototype.selectAll = function () {\n this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE);\n };\n Selection.prototype.setRange = function (range, reverse) {\n var start = reverse ? range.end : range.start;\n var end = reverse ? range.start : range.end;\n this.$setSelection(start.row, start.column, end.row, end.column);\n };\n Selection.prototype.$setSelection = function (anchorRow, anchorColumn, cursorRow, cursorColumn) {\n if (this.$silent)\n return;\n var wasEmpty = this.$isEmpty;\n var wasMultiselect = this.inMultiSelectMode;\n this.$silent = true;\n this.$cursorChanged = this.$anchorChanged = false;\n this.anchor.setPosition(anchorRow, anchorColumn);\n this.cursor.setPosition(cursorRow, cursorColumn);\n this.$isEmpty = !Range.comparePoints(this.anchor, this.cursor);\n this.$silent = false;\n if (this.$cursorChanged)\n this._emit(\"changeCursor\");\n if (this.$cursorChanged || this.$anchorChanged || wasEmpty != this.$isEmpty || wasMultiselect)\n this._emit(\"changeSelection\");\n };\n Selection.prototype.$moveSelection = function (mover) {\n var lead = this.lead;\n if (this.$isEmpty)\n this.setSelectionAnchor(lead.row, lead.column);\n mover.call(this);\n };\n Selection.prototype.selectTo = function (row, column) {\n this.$moveSelection(function () {\n this.moveCursorTo(row, column);\n });\n };\n Selection.prototype.selectToPosition = function (pos) {\n this.$moveSelection(function () {\n this.moveCursorToPosition(pos);\n });\n };\n Selection.prototype.moveTo = function (row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n Selection.prototype.moveToPosition = function (pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n Selection.prototype.selectUp = function () {\n this.$moveSelection(this.moveCursorUp);\n };\n Selection.prototype.selectDown = function () {\n this.$moveSelection(this.moveCursorDown);\n };\n Selection.prototype.selectRight = function () {\n this.$moveSelection(this.moveCursorRight);\n };\n Selection.prototype.selectLeft = function () {\n this.$moveSelection(this.moveCursorLeft);\n };\n Selection.prototype.selectLineStart = function () {\n this.$moveSelection(this.moveCursorLineStart);\n };\n Selection.prototype.selectLineEnd = function () {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n Selection.prototype.selectFileEnd = function () {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n Selection.prototype.selectFileStart = function () {\n this.$moveSelection(this.moveCursorFileStart);\n };\n Selection.prototype.selectWordRight = function () {\n this.$moveSelection(this.moveCursorWordRight);\n };\n Selection.prototype.selectWordLeft = function () {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n Selection.prototype.getWordRange = function (row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n return this.session.getWordRange(row, column);\n };\n Selection.prototype.selectWord = function () {\n this.setSelectionRange(this.getWordRange());\n };\n Selection.prototype.selectAWord = function () {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n Selection.prototype.getLineRange = function (row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n var foldLine = this.session.getFoldLine(rowStart);\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n }\n else {\n rowEnd = rowStart;\n }\n if (excludeLastChar === true)\n return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);\n else\n return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n Selection.prototype.selectLine = function () {\n this.setSelectionRange(this.getLineRange());\n };\n Selection.prototype.moveCursorUp = function () {\n this.moveCursorBy(-1, 0);\n };\n Selection.prototype.moveCursorDown = function () {\n this.moveCursorBy(1, 0);\n };\n Selection.prototype.wouldMoveIntoSoftTab = function (cursor, tabSize, direction) {\n var start = cursor.column;\n var end = cursor.column + tabSize;\n if (direction < 0) {\n start = cursor.column - tabSize;\n end = cursor.column;\n }\n return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(\" \").length - 1 == tabSize;\n };\n Selection.prototype.moveCursorLeft = function () {\n var cursor = this.lead.getPosition(), fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n }\n else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, -tabSize);\n }\n else {\n this.moveCursorBy(0, -1);\n }\n }\n };\n Selection.prototype.moveCursorRight = function () {\n var cursor = this.lead.getPosition(), fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n }\n else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, tabSize);\n }\n else {\n this.moveCursorBy(0, 1);\n }\n }\n };\n Selection.prototype.moveCursorLineStart = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(row, null, firstColumnPosition.row, firstColumnPosition.column);\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)\n firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n Selection.prototype.moveCursorLineEnd = function () {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0)\n lineEnd.column = textEnd;\n }\n }\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n Selection.prototype.moveCursorFileEnd = function () {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n Selection.prototype.moveCursorFileStart = function () {\n this.moveCursorTo(0, 0);\n };\n Selection.prototype.moveCursorLongWordRight = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n if (this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1)\n this.moveCursorWordRight();\n return;\n }\n if (this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n this.moveCursorTo(row, column);\n };\n Selection.prototype.moveCursorLongWordLeft = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n var str = this.session.getFoldStringAt(row, column, -1);\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n var leftOfCursor = lang.stringReverse(str);\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n if (this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0)\n this.moveCursorWordLeft();\n return;\n }\n if (this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n this.moveCursorTo(row, column);\n };\n Selection.prototype.$shortWordEndIndex = function (rightOfCursor) {\n var index = 0, ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n tokenRe.lastIndex = 0;\n if (this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n }\n else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index++;\n if (index < 1) {\n tokenRe.lastIndex = 0;\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index++;\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n }\n else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index++;\n if (index > 2)\n break;\n }\n }\n }\n }\n }\n tokenRe.lastIndex = 0;\n return index;\n };\n Selection.prototype.moveCursorShortWordRight = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold)\n return this.moveCursorTo(fold.end.row, fold.end.column);\n if (column == line.length) {\n var l = this.doc.getLength();\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n if (!/^\\s+/.test(rightOfCursor))\n rightOfCursor = \"\";\n column = 0;\n }\n var index = this.$shortWordEndIndex(rightOfCursor);\n this.moveCursorTo(row, column + index);\n };\n Selection.prototype.moveCursorShortWordLeft = function () {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1))\n return this.moveCursorTo(fold.start.row, fold.start.column);\n var line = this.session.getLine(row).substring(0, column);\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n column = line.length;\n if (!/\\s+$/.test(line))\n line = \"\";\n }\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n return this.moveCursorTo(row, column - index);\n };\n Selection.prototype.moveCursorWordRight = function () {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordRight();\n else\n this.moveCursorShortWordRight();\n };\n Selection.prototype.moveCursorWordLeft = function () {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordLeft();\n else\n this.moveCursorShortWordLeft();\n };\n Selection.prototype.moveCursorBy = function (rows, chars) {\n var screenPos = this.session.documentToScreenPosition(this.lead.row, this.lead.column);\n var offsetX;\n if (chars === 0) {\n if (rows !== 0) {\n if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {\n offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);\n screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);\n }\n else {\n offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];\n }\n }\n if (this.$desiredColumn)\n screenPos.column = this.$desiredColumn;\n else\n this.$desiredColumn = screenPos.column;\n }\n if (rows != 0 && this.session.lineWidgets && this.session.lineWidgets[this.lead.row]) {\n var widget = this.session.lineWidgets[this.lead.row];\n if (rows < 0)\n rows -= widget.rowsAbove || 0;\n else if (rows > 0)\n rows += widget.rowCount - (widget.rowsAbove || 0);\n }\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);\n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n }\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n Selection.prototype.moveCursorToPosition = function (position) {\n this.moveCursorTo(position.row, position.column);\n };\n Selection.prototype.moveCursorTo = function (row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n this.$keepDesiredColumnOnChange = true;\n var line = this.session.getLine(row);\n if (/[\\uDC00-\\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) {\n if (this.lead.row == row && this.lead.column == column + 1)\n column = column - 1;\n else\n column = column + 1;\n }\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n if (!keepDesiredColumn)\n this.$desiredColumn = null;\n };\n Selection.prototype.moveCursorToScreen = function (row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n Selection.prototype.detach = function () {\n this.lead.detach();\n this.anchor.detach();\n };\n Selection.prototype.fromOrientedRange = function (range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n Selection.prototype.toOrientedRange = function (range) {\n var r = this.getRange();\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n }\n else {\n range = r;\n }\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n Selection.prototype.getRangeOfMovements = function (func) {\n var start = this.getCursor();\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start, end);\n }\n catch (e) {\n return Range.fromPoints(start, start);\n }\n finally {\n this.moveCursorToPosition(start);\n }\n };\n Selection.prototype.toJSON = function () {\n if (this.rangeCount) { var data = this.ranges.map(function (r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n }\n else { var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n return data;\n };\n Selection.prototype.fromJSON = function (data) {\n if (data.start == undefined) {\n if (this.rangeList && data.length > 1) {\n this.toSingleRange(data[0]);\n for (var i = data.length; i--;) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards)\n r.cursor = r.start;\n this.addRange(r, true);\n }\n return;\n }\n else {\n data = data[0];\n }\n }\n if (this.rangeList)\n this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n Selection.prototype.isEqual = function (data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount)\n return false;\n if (!data.length || !this.ranges)\n return this.getRange().isEqual(data);\n for (var i = this.ranges.length; i--;) {\n if (!this.ranges[i].isEqual(data[i]))\n return false;\n }\n return true;\n };\n return Selection;\n}());\nSelection.prototype.setSelectionAnchor = Selection.prototype.setAnchor;\nSelection.prototype.getSelectionAnchor = Selection.prototype.getAnchor;\nSelection.prototype.setSelectionRange = Selection.prototype.setRange;\noop.implement(Selection.prototype, EventEmitter);\nexports.Selection = Selection;\n\n});\n\nace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/report_error\"], function(require, exports, module){\"use strict\";\nvar reportError = require(\"./lib/report_error\").reportError;\nvar MAX_TOKEN_COUNT = 2000;\nvar Tokenizer = /** @class */ (function () {\n function Tokenizer(rules) {\n this.splitRegex;\n this.states = rules;\n this.regExps = {};\n this.matchMappings = {};\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = { defaultToken: \"text\" };\n var flag = \"g\";\n var splitterRurles = [];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken)\n mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive && flag.indexOf(\"i\") === -1)\n flag += \"i\";\n if (rule.unicode && flag.indexOf(\"u\") === -1)\n flag += \"u\";\n if (rule.regex == null)\n continue;\n if (rule.regex instanceof RegExp)\n rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n }\n else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", {\n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n }\n else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n }\n else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1)\n rule.onMatch = this.$applyToken;\n else\n rule.onMatch = rule.token;\n }\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function (match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n }\n else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n if (!rule.splitRegex && typeof rule.token != \"string\")\n splitterRurles.push(rule); // flag will be known only at the very end\n }\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch)\n rule.onMatch = null;\n }\n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n splitterRurles.forEach(function (rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n }\n Tokenizer.prototype.$setMaxTokenCount = function (m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n Tokenizer.prototype.$applyToken = function (str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\")\n return [{ type: types, value: str }];\n var tokens = [];\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n return tokens;\n };\n Tokenizer.prototype.$arrayTokens = function (str) {\n if (!str)\n return [];\n var values = this.splitRegex.exec(str);\n if (!values)\n return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n return tokens;\n };\n Tokenizer.prototype.removeCapturingGroups = function (src) {\n var r = src.replace(/\\\\.|\\[(?:\\\\.|[^\\\\\\]])*|\\(\\?[:=!<]|(\\()/g, function (x, y) { return y ? \"(?:\" : x; });\n return r;\n };\n Tokenizer.prototype.createSplitterRegexp = function (src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function (m, esc, parenOpen, parenClose, square, index) {\n if (inChClass) {\n inChClass = square != \"]\";\n }\n else if (square) {\n inChClass = true;\n }\n else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index + 1;\n lastCapture.stack = -1;\n }\n stack--;\n }\n else if (parenOpen) {\n stack++;\n if (parenOpen.length != 1) {\n lastCapture.stack = stack;\n lastCapture.start = index;\n }\n }\n return m;\n });\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end)))\n src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n if (src.charAt(0) != \"^\")\n src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\")\n src += \"$\";\n return new RegExp(src, (flag || \"\").replace(\"g\", \"\"));\n };\n Tokenizer.prototype.getLineTokens = function (line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n if (startState === \"#tmp\") {\n stack.shift();\n startState = stack.shift();\n }\n }\n else\n var stack = [];\n var currentState = /**@type{string}*/ (startState) || \"start\";\n var state = this.states[currentState];\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n var match, tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n var token = { type: null, value: \"\" };\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n if (token.type == type) {\n token.value += skipped;\n }\n else {\n if (token.type)\n tokens.push(token);\n token = { type: type, value: skipped };\n }\n }\n for (var i = 0; i < match.length - 2; i++) {\n if (match[i + 1] === undefined)\n continue;\n rule = state[mapping[i]];\n if (rule.onMatch)\n type = rule.onMatch(value, currentState, stack, line);\n else\n type = rule.token;\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n }\n else {\n currentState = rule.next(currentState, stack);\n }\n state = this.states[currentState];\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n if (rule.consumeLineEnd)\n lastIndex = index;\n break;\n }\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n }\n else {\n if (token.type)\n tokens.push(token);\n token = { type: type, value: value };\n }\n }\n else if (type) {\n if (token.type)\n tokens.push(token);\n token = { type: null, value: \"\" };\n for (var i = 0; i < type.length; i++)\n tokens.push(type[i]);\n }\n }\n if (lastIndex == line.length)\n break;\n lastIndex = index;\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n while (lastIndex < line.length) {\n if (token.type)\n tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 500),\n type: \"overflow\"\n };\n }\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n if (token.type)\n tokens.push(token);\n if (stack.length > 1) {\n if (stack[0] !== currentState)\n stack.unshift(\"#tmp\", currentState);\n }\n return {\n tokens: tokens,\n state: stack.length ? stack : currentState\n };\n };\n return Tokenizer;\n}());\nTokenizer.prototype.reportError = reportError;\nexports.Tokenizer = Tokenizer;\n\n});\n\nace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/deep_copy\"], function(require, exports, module){\"use strict\";\nvar deepCopy = require(\"../lib/deep_copy\").deepCopy;\nvar TextHighlightRules;\nTextHighlightRules = function () {\n this.$rules = {\n \"start\": [{\n token: \"empty_line\",\n regex: '^$'\n }, {\n defaultToken: \"text\"\n }]\n };\n};\n(function () {\n this.addRules = function (rules, prefix) {\n if (!prefix) {\n for (var key in rules)\n this.$rules[key] = rules[key];\n return;\n }\n for (var key in rules) {\n var state = rules[key];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0)\n rule.next = prefix + rule.next;\n }\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)\n rule.nextState = prefix + rule.nextState;\n }\n }\n this.$rules[prefix + key] = state;\n }\n };\n this.getRules = function () {\n return this.$rules;\n };\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\"\n ? new HighlightRules().getRules()\n : HighlightRules;\n if (states) {\n for (var i = 0; i < states.length; i++)\n states[i] = prefix + states[i];\n }\n else {\n states = [];\n for (var key in embedRules)\n states.push(prefix + key);\n }\n this.addRules(embedRules, prefix);\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n for (var i = 0; i < states.length; i++)\n addRules.apply(this.$rules[states[i]], deepCopy(escapeRules));\n }\n if (!this.$embeds)\n this.$embeds = [];\n this.$embeds.push(prefix);\n };\n this.getEmbeds = function () {\n return this.$embeds;\n };\n var pushState = function (currentState, stack) {\n if (currentState != \"start\" || stack.length)\n stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n var popState = function (currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n this.normalizeRules = function () {\n var id = 0;\n var rules = this.$rules;\n function processState(key) {\n var state = rules[key];\n state[\"processed\"] = true;\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next)\n rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n var next = rule.next || rule.push;\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\")\n stateName = stateName[0] || \"\";\n if (rules[stateName])\n stateName += id++;\n }\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n }\n else if (next == \"pop\") {\n rule.next = popState;\n }\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push)\n rules[r].push.apply(rules[r], rule.rules[r]);\n }\n else {\n rules[r] = rule.rules[r];\n }\n }\n }\n var includeName = typeof rule == \"string\" ? rule : rule.include;\n if (includeName) {\n if (includeName === \"$self\")\n includeName = \"start\";\n if (Array.isArray(includeName))\n toInsert = includeName.map(function (x) { return rules[x]; });\n else\n toInsert = rules[includeName];\n }\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape)\n args = args.filter(function (x) { return !x.next; });\n state.splice.apply(state, args);\n i--;\n }\n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive);\n delete rule.defaultToken;\n }\n }\n }\n Object.keys(rules).forEach(processState, this);\n };\n this.createKeywordMapper = function (map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n this.$keywordList = [];\n Object.keys(map).forEach(function (className) {\n var a = map[className];\n var list = a.split(splitChar || \"|\");\n for (var i = list.length; i--;) {\n var word = list[i];\n this.$keywordList.push(word);\n if (ignoreCase)\n word = word.toLowerCase();\n keywords[word] = className;\n }\n }, this);\n map = null;\n return ignoreCase\n ? function (value) { return keywords[value.toLowerCase()] || defaultToken; }\n : function (value) { return keywords[value] || defaultToken; };\n };\n this.getKeywords = function () {\n return this.$keywords;\n };\n}).call(TextHighlightRules.prototype);\nexports.TextHighlightRules = TextHighlightRules;\n\n});\n\nace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar Behaviour;\nBehaviour = function () {\n this.$behaviours = {};\n};\n(function () {\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n this.$behaviours[name][action] = callback;\n };\n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n };\n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n };\n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n }\n else {\n var behaviours = mode.getBehaviours(filter);\n }\n this.addBehaviours(behaviours);\n };\n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n }\n else {\n var ret = {};\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n return ret;\n }\n };\n}).call(Behaviour.prototype);\nexports.Behaviour = Behaviour;\n\n});\n\nace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"./range\").Range;\nvar TokenIterator = /** @class */ (function () {\n function TokenIterator(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n }\n TokenIterator.prototype.stepBackward = function () {\n this.$tokenIndex -= 1;\n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n return this.$rowTokens[this.$tokenIndex];\n };\n TokenIterator.prototype.stepForward = function () {\n this.$tokenIndex += 1;\n var rowCount;\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount)\n rowCount = this.$session.getLength();\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n return this.$rowTokens[this.$tokenIndex];\n };\n TokenIterator.prototype.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n };\n TokenIterator.prototype.getCurrentTokenRow = function () {\n return this.$row;\n };\n TokenIterator.prototype.getCurrentTokenColumn = function () {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined)\n return column;\n column = 0;\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n return column;\n };\n TokenIterator.prototype.getCurrentTokenPosition = function () {\n return { row: this.$row, column: this.getCurrentTokenColumn() };\n };\n TokenIterator.prototype.getCurrentTokenRange = function () {\n var token = this.$rowTokens[this.$tokenIndex];\n var column = this.getCurrentTokenColumn();\n return new Range(this.$row, column, this.$row, column + token.value.length);\n };\n return TokenIterator;\n}());\nexports.TokenIterator = TokenIterator;\n\n});\n\nace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Behaviour = require(\"../behaviour\").Behaviour;\nvar TokenIterator = require(\"../../token_iterator\").TokenIterator;\nvar lang = require(\"../../lib/lang\");\nvar SAFE_INSERT_IN_TOKENS = [\"text\", \"paren.rparen\", \"rparen\", \"paren\", \"punctuation.operator\"];\nvar SAFE_INSERT_BEFORE_TOKENS = [\"text\", \"paren.rparen\", \"rparen\", \"paren\", \"punctuation.operator\", \"comment\"];\nvar context;\nvar contextCache = {};\nvar defaultQuotes = { '\"': '\"', \"'\": \"'\" };\nvar initContext = function (editor) {\n var id = -1;\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount)\n contextCache = { rangeCount: editor.multiSelect.rangeCount };\n }\n if (contextCache[id])\n return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n};\nvar getWrapped = function (selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [\n 0,\n selection.start.column + 1,\n rowDiff,\n selection.end.column + (rowDiff ? 0 : 1)\n ]\n };\n};\nvar CstyleBehaviour;\nCstyleBehaviour = function (options) {\n options = options || {};\n this.add(\"braces\", \"insertion\", function (state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n }\n else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options.braces) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n }\n else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n }\n else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', { column: cursor.column + 1, row: cursor.row });\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({ row: cursor.row, column: cursor.column + 1 }, '}');\n if (!openBracePos)\n return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n }\n else if (closing) {\n var next_indent = this.$getIndent(line);\n }\n else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n var indent = next_indent + session.getTabString();\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n }\n else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n this.add(\"braces\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar == '}') {\n range.end.column++;\n return range;\n }\n else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n this.add(\"parens\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n }\n else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n }\n else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', { column: cursor.column + 1, row: cursor.row });\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n this.add(\"parens\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"brackets\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n }\n else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n }\n else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', { column: cursor.column + 1, row: cursor.row });\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n this.add(\"brackets\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n if (text.length == 1 && quotes[text]) {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)\n return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n }\n else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column - 1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type))\n return null;\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n var pair;\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type))\n pair = false;\n }\n else {\n if (stringBefore && !stringAfter)\n return null; // wrap string with different quote\n if (stringBefore && stringAfter)\n return null; // do not pair quotes inside strings\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(rightChar);\n var pairQuotesAfter = session.$mode.$pairQuotesAfter;\n var shouldPairQuotes = pairQuotesAfter && pairQuotesAfter[quote] && pairQuotesAfter[quote].test(leftChar);\n if ((!shouldPairQuotes && isWordBefore) || isWordAfter)\n return null; // before or after alphanumeric\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar))\n return null; // there is rightChar and it isn't closing\n var charBefore = line[cursor.column - 2];\n if (leftChar == quote && (charBefore == quote || wordRe.test(charBefore)))\n return null;\n pair = true;\n }\n return {\n text: pair ? quote + quote : \"\",\n selection: [1, 1]\n };\n }\n }\n });\n this.add(\"string_dquotes\", \"deletion\", function (state, action, editor, session, range) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && quotes.hasOwnProperty(selected)) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n if (options.closeDocComment !== false) {\n this.add(\"doc comment end\", \"insertion\", function (state, action, editor, session, text) {\n if (state === \"doc-start\" && (text === \"\\n\" || text === \"\\r\\n\") && editor.selection.isEmpty()) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var nextLine = session.doc.getLine(cursor.row + 1);\n var indent = this.$getIndent(line);\n if (/\\s*\\*/.test(nextLine)) {\n if (/^\\s*\\*/.test(line)) {\n return {\n text: text + indent + \"* \",\n selection: [1, 3 + indent.length, 1, 3 + indent.length]\n };\n }\n else {\n return {\n text: text + indent + \" * \",\n selection: [1, 3 + indent.length, 1, 3 + indent.length]\n };\n }\n }\n if (/\\/\\*\\*/.test(line.substring(0, cursor.column))) {\n return {\n text: text + indent + \" * \" + text + \" \" + indent + \"*/\",\n selection: [1, 4 + indent.length, 1, 4 + indent.length]\n };\n }\n }\n });\n }\n};\nCstyleBehaviour.isSaneInsertion = function (editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n if (/[)}\\]]/.test(editor.session.getLine(cursor.row)[cursor.column]))\n return true;\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS))\n return false;\n }\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row ||\n this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n};\nCstyleBehaviour[\"$matchTokenType\"] = function (token, types) {\n return types.indexOf(token.type || token) > -1;\n};\nCstyleBehaviour[\"recordAutoInsert\"] = function (editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this[\"isAutoInsertedClosing\"](cursor, line, context.autoInsertedLineEnd[0]))\n context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n};\nCstyleBehaviour[\"recordMaybeInsert\"] = function (editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this[\"isMaybeInsertedClosing\"](cursor, line))\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n};\nCstyleBehaviour[\"isAutoInsertedClosing\"] = function (cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 &&\n cursor.row === context.autoInsertedRow &&\n bracket === context.autoInsertedLineEnd[0] &&\n line.substr(cursor.column) === context.autoInsertedLineEnd;\n};\nCstyleBehaviour[\"isMaybeInsertedClosing\"] = function (cursor, line) {\n return context.maybeInsertedBrackets > 0 &&\n cursor.row === context.maybeInsertedRow &&\n line.substr(cursor.column) === context.maybeInsertedLineEnd &&\n line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n};\nCstyleBehaviour[\"popAutoInsertedClosing\"] = function () {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n};\nCstyleBehaviour[\"clearMaybeInsertedClosing\"] = function () {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n};\noop.inherits(CstyleBehaviour, Behaviour);\nexports.CstyleBehaviour = CstyleBehaviour;\n\n});\n\nace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar wordChars = [48, 9, 8, 25, 5, 0, 2, 25, 48, 0, 11, 0, 5, 0, 6, 22, 2, 30, 2, 457, 5, 11, 15, 4, 8, 0, 2, 0, 18, 116, 2, 1, 3, 3, 9, 0, 2, 2, 2, 0, 2, 19, 2, 82, 2, 138, 2, 4, 3, 155, 12, 37, 3, 0, 8, 38, 10, 44, 2, 0, 2, 1, 2, 1, 2, 0, 9, 26, 6, 2, 30, 10, 7, 61, 2, 9, 5, 101, 2, 7, 3, 9, 2, 18, 3, 0, 17, 58, 3, 100, 15, 53, 5, 0, 6, 45, 211, 57, 3, 18, 2, 5, 3, 11, 3, 9, 2, 1, 7, 6, 2, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 0, 4, 3, 3, 8, 3, 1, 3, 3, 9, 0, 5, 1, 2, 4, 3, 11, 16, 2, 2, 5, 5, 1, 3, 21, 2, 6, 2, 1, 2, 1, 2, 1, 3, 0, 2, 4, 5, 1, 3, 2, 4, 0, 8, 3, 2, 0, 8, 15, 12, 2, 2, 8, 2, 2, 2, 21, 2, 6, 2, 1, 2, 4, 3, 9, 2, 2, 2, 2, 3, 0, 16, 3, 3, 9, 18, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 3, 8, 3, 1, 3, 2, 9, 1, 5, 1, 2, 4, 3, 9, 2, 0, 17, 1, 2, 5, 4, 2, 2, 3, 4, 1, 2, 0, 2, 1, 4, 1, 4, 2, 4, 11, 5, 4, 4, 2, 2, 3, 3, 0, 7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 5, 12, 6, 2, 2, 6, 67, 1, 20, 0, 29, 0, 14, 0, 17, 4, 60, 12, 5, 0, 4, 11, 18, 0, 5, 0, 3, 9, 2, 0, 4, 4, 7, 0, 2, 0, 2, 0, 2, 3, 2, 10, 3, 3, 6, 4, 5, 0, 53, 1, 2684, 46, 2, 46, 2, 132, 7, 6, 15, 37, 11, 53, 10, 0, 17, 22, 10, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 31, 48, 0, 470, 1, 36, 5, 2, 4, 6, 1, 5, 85, 3, 1, 3, 2, 2, 89, 2, 3, 6, 40, 4, 93, 18, 23, 57, 15, 513, 6581, 75, 20939, 53, 1164, 68, 45, 3, 268, 4, 27, 21, 31, 3, 13, 13, 1, 2, 24, 9, 69, 11, 1, 38, 8, 3, 102, 3, 1, 111, 44, 25, 51, 13, 68, 12, 9, 7, 23, 4, 0, 5, 45, 3, 35, 13, 28, 4, 64, 15, 10, 39, 54, 10, 13, 3, 9, 7, 22, 4, 1, 5, 66, 25, 2, 227, 42, 2, 1, 3, 9, 7, 11171, 13, 22, 5, 48, 8453, 301, 3, 61, 3, 105, 39, 6, 13, 4, 6, 11, 2, 12, 2, 4, 2, 0, 2, 1, 2, 1, 2, 107, 34, 362, 19, 63, 3, 53, 41, 11, 5, 15, 17, 6, 13, 1, 25, 2, 33, 4, 2, 134, 20, 9, 8, 25, 5, 0, 2, 25, 12, 88, 4, 5, 3, 5, 3, 5, 3, 2];\nvar code = 0;\nvar str = [];\nfor (var i = 0; i < wordChars.length; i += 2) {\n str.push(code += wordChars[i]);\n if (wordChars[i + 1])\n str.push(45, code += wordChars[i + 1]);\n}\nexports.wordChars = String.fromCharCode.apply(null, str);\n\n});\n\nace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/config\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour/cstyle\",\"ace/unicode\",\"ace/lib/lang\",\"ace/token_iterator\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar config = require(\"../config\");\nvar Tokenizer = require(\"../tokenizer\").Tokenizer;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar CstyleBehaviour = require(\"./behaviour/cstyle\").CstyleBehaviour;\nvar unicode = require(\"../unicode\");\nvar lang = require(\"../lib/lang\");\nvar TokenIterator = require(\"../token_iterator\").TokenIterator;\nvar Range = require(\"../range\").Range;\nvar Mode;\nMode = function () {\n this.HighlightRules = TextHighlightRules;\n};\n(function () {\n this.$defaultBehaviour = new CstyleBehaviour();\n this.tokenRe = new RegExp(\"^[\" + unicode.wordChars + \"\\\\$_]+\", \"g\");\n this.nonTokenRe = new RegExp(\"^(?:[^\" + unicode.wordChars + \"\\\\$_]|\\\\s])+\", \"g\");\n this.getTokenizer = function () {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n return this.$tokenizer;\n };\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n this.toggleCommentLines = function (state, session, startRow, endRow) {\n var doc = session.doc;\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n if (!this.lineCommentStart) {\n if (!this.blockComment)\n return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n var comment = function (line, i) {\n if (testRemove(line, i))\n return;\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({ row: i, column: line.length }, lineCommentEnd);\n doc.insertInLine({ row: i, column: minIndent }, lineCommentStart);\n }\n };\n var uncomment = function (line, i) {\n var m;\n if (m = line.match(regexpEnd))\n doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart))\n doc.removeInLine(i, m[1].length, m[0].length);\n };\n var testRemove = function (line, row) {\n if (regexpStart.test(line))\n return true;\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\")\n return true;\n }\n };\n }\n else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n }\n else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n insertAtTabStop = session.getUseSoftTabs();\n var uncomment = function (line, i) {\n var m = line.match(regexpStart);\n if (!m)\n return;\n var start = m[1].length, end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \")\n end--;\n doc.removeInLine(i, start, end);\n };\n var commentWithSpace = lineCommentStart + \" \";\n var comment = function (line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent))\n doc.insertInLine({ row: i, column: minIndent }, commentWithSpace);\n else\n doc.insertInLine({ row: i, column: minIndent }, lineCommentStart);\n }\n };\n var testRemove = function (line, i) {\n return regexpStart.test(line);\n };\n var shouldInsertSpace = function (line, before, after) {\n var spaces = 0;\n while (before-- && line.charAt(before) == \" \")\n spaces++;\n if (spaces % tabSize != 0)\n return false;\n var spaces = 0;\n while (line.charAt(after++) == \" \")\n spaces++;\n if (tabSize > 2)\n return spaces % tabSize != tabSize - 1;\n else\n return spaces % tabSize == 0;\n };\n }\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++)\n fun(doc.getLine(i), i);\n }\n var minEmptyLength = Infinity;\n iter(function (line, i) {\n var indent = line.search(/\\S/);\n if (indent !== -1) {\n if (indent < minIndent)\n minIndent = indent;\n if (shouldRemove && !testRemove(line, i))\n shouldRemove = false;\n }\n else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n if (insertAtTabStop && minIndent % tabSize != 0)\n minIndent = Math.floor(minIndent / tabSize) * tabSize;\n iter(shouldRemove ? uncomment : comment);\n };\n this.toggleBlockComment = function (state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment)\n return;\n if (!comment.start && comment[0])\n comment = comment[0];\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n token = iterator.stepBackward();\n }\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n token = iterator.stepForward();\n }\n if (endRange)\n session.remove(endRange);\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n }\n else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n if (initialRange.start.row == startRow)\n initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow)\n initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n this.getNextLineIndent = function (state, line, tab) {\n return this.$getIndent(line);\n };\n this.checkOutdent = function (state, line, input) {\n return false;\n };\n this.autoOutdent = function (state, doc, row) {\n };\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n this.createWorker = function (session) {\n return null;\n };\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n for (var i in mapping) {\n if (mapping[i]) {\n var Mode = mapping[i];\n var id = Mode.prototype.$id;\n var mode = config.$modes[id];\n if (!mode)\n config.$modes[id] = mode = new Mode();\n if (!config.$modes[i])\n config.$modes[i] = mode;\n this.$embeds.push(i);\n this.$modes[i] = mode;\n }\n }\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\",\n \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n var _loop_1 = function (i) {\n (function (scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n scope[delegations[i]] =\n function () {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n }(this_1));\n };\n var this_1 = this;\n for (var i = 0; i < delegations.length; i++) {\n _loop_1(i);\n }\n };\n this.$delegator = function (method, args, defaultHandler) {\n var state = args[0] || \"start\";\n if (typeof state != \"string\") {\n if (Array.isArray(state[2])) {\n var language = state[2][state[2].length - 1];\n var mode = this.$modes[language];\n if (mode)\n return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1)));\n }\n state = state[0] || \"start\";\n }\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]])\n continue;\n var split = state.split(this.$embeds[i]);\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n this.transformAction = function (state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n this.getKeywords = function (append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer[\"rules\"];\n var completionKeywords = [];\n for (var rule in rules) {\n var ruleItr = rules[rule];\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token))\n completionKeywords.push(ruleItr[r].regex);\n }\n else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {\n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n this.completionKeywords = completionKeywords;\n }\n if (!append)\n return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n this.$createKeywordList = function () {\n if (!this.$highlightRules)\n this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n this.getCompletions = function (state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function (word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n this.$id = \"ace/mode/text\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n});\n\nace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nfunction throwDeltaError(delta, errorText) {\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n}\nfunction positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length &&\n position.column >= 0 && position.column <= docLines[position.row].length;\n}\nfunction validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\")\n throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array))\n throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end)\n throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start))\n throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end))\n throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)\n throwDeltaError(delta, \"delta.range must match delta lines\");\n}\nexports.applyDelta = function (docLines, delta, doNotValidate) {\n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n }\n else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n break;\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n }\n else {\n docLines.splice(row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn));\n }\n break;\n }\n};\n\n});\n\nace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Anchor = /** @class */ (function () {\n function Anchor(doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n if (typeof row != \"number\")\n this.setPosition(row.row, row.column);\n else\n this.setPosition(row, column);\n }\n Anchor.prototype.getPosition = function () {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n Anchor.prototype.getDocument = function () {\n return this.document;\n };\n Anchor.prototype.onChange = function (delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row)\n return;\n if (delta.start.row > this.row)\n return;\n var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n Anchor.prototype.setPosition = function (row, column, noClip) {\n var pos;\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n }\n else {\n pos = this.$clipPositionToDocument(row, column);\n }\n if (this.row == pos.row && this.column == pos.column)\n return;\n var old = {\n row: this.row,\n column: this.column\n };\n this.row = pos.row;\n this.column = pos.column;\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n Anchor.prototype.detach = function () {\n this.document.off(\"change\", this.$onChange);\n };\n Anchor.prototype.attach = function (doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n Anchor.prototype.$clipPositionToDocument = function (row, column) {\n var pos = {};\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n }\n else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n }\n else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n if (column < 0)\n pos.column = 0;\n return pos;\n };\n return Anchor;\n}());\nAnchor.prototype.$insertRight = false;\noop.implement(Anchor.prototype, EventEmitter);\nfunction $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);\n}\nfunction $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n}\nexports.Anchor = Anchor;\n\n});\n\nace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar applyDelta = require(\"./apply_delta\").applyDelta;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Range = require(\"./range\").Range;\nvar Anchor = require(\"./anchor\").Anchor;\nvar Document = /** @class */ (function () {\n function Document(textOrLines) {\n this.$lines = [\"\"];\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n }\n else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({ row: 0, column: 0 }, textOrLines);\n }\n else {\n this.insert({ row: 0, column: 0 }, textOrLines);\n }\n }\n Document.prototype.setValue = function (text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({ row: 0, column: 0 }, text || \"\");\n };\n Document.prototype.getValue = function () {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n Document.prototype.createAnchor = function (row, column) {\n return new Anchor(this, row, column);\n };\n Document.prototype.$detectNewLine = function (text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n this._signal(\"changeNewLineMode\");\n };\n Document.prototype.getNewLineCharacter = function () {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n case \"unix\":\n return \"\\n\";\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n Document.prototype.setNewLineMode = function (newLineMode) {\n if (this.$newLineMode === newLineMode)\n return;\n this.$newLineMode = newLineMode;\n this._signal(\"changeNewLineMode\");\n };\n Document.prototype.getNewLineMode = function () {\n return this.$newLineMode;\n };\n Document.prototype.isNewLine = function (text) {\n return (text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\");\n };\n Document.prototype.getLine = function (row) {\n return this.$lines[row] || \"\";\n };\n Document.prototype.getLines = function (firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n Document.prototype.getAllLines = function () {\n return this.getLines(0, this.getLength());\n };\n Document.prototype.getLength = function () {\n return this.$lines.length;\n };\n Document.prototype.getTextRange = function (range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n Document.prototype.getLinesForRange = function (range) {\n var lines;\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n }\n else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l)\n lines[l] = lines[l].substring(0, range.end.column);\n }\n return lines;\n };\n Document.prototype.insertLines = function (row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n Document.prototype.removeLines = function (firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n Document.prototype.insertNewLine = function (position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n Document.prototype.insert = function (position, text) {\n if (this.getLength() <= 1)\n this.$detectNewLine(text);\n return this.insertMergedLines(position, this.$split(text));\n };\n Document.prototype.insertInLine = function (position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n return this.clonePos(end);\n };\n Document.prototype.clippedPos = function (row, column) {\n var length = this.getLength();\n if (row === undefined) {\n row = length;\n }\n else if (row < 0) {\n row = 0;\n }\n else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n var line = this.getLine(row);\n if (column == undefined)\n column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return { row: row, column: column };\n };\n Document.prototype.clonePos = function (pos) {\n return { row: pos.row, column: pos.column };\n };\n Document.prototype.pos = function (row, column) {\n return { row: row, column: column };\n };\n Document.prototype.$clipPosition = function (position) {\n var length = this.getLength();\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n }\n else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n return position;\n };\n Document.prototype.insertFullLines = function (row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n }\n else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n this.insertMergedLines({ row: row, column: column }, lines);\n };\n Document.prototype.insertMergedLines = function (position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n return this.clonePos(end);\n };\n Document.prototype.remove = function (range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({ start: start, end: end })\n });\n return this.clonePos(start);\n };\n Document.prototype.removeInLine = function (row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({ start: start, end: end })\n }, true);\n return this.clonePos(start);\n };\n Document.prototype.removeFullLines = function (firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = (deleteFirstNewLine ? firstRow - 1 : firstRow);\n var startCol = (deleteFirstNewLine ? this.getLine(startRow).length : 0);\n var endRow = (deleteLastNewLine ? lastRow + 1 : lastRow);\n var endCol = (deleteLastNewLine ? 0 : this.getLine(endRow).length);\n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n Document.prototype.removeNewLine = function (row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n Document.prototype.replace = function (range, text) {\n if (!(range instanceof Range))\n range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty())\n return range.start;\n if (text == this.getTextRange(range))\n return range.end;\n this.remove(range);\n var end;\n if (text) {\n end = this.insert(range.start, text);\n }\n else {\n end = range.start;\n }\n return end;\n };\n Document.prototype.applyDeltas = function (deltas) {\n for (var i = 0; i < deltas.length; i++) {\n this.applyDelta(deltas[i]);\n }\n };\n Document.prototype.revertDeltas = function (deltas) {\n for (var i = deltas.length - 1; i >= 0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n Document.prototype.applyDelta = function (delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]\n : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n if (isInsert && delta.lines.length > 20000) {\n this.$splitAndapplyLargeDelta(delta, 20000);\n }\n else {\n applyDelta(this.$lines, delta, doNotValidate);\n this._signal(\"change\", delta);\n }\n };\n Document.prototype.$safeApplyDelta = function (delta) {\n var docLength = this.$lines.length;\n if (delta.action == \"remove\" && delta.start.row < docLength && delta.end.row < docLength\n || delta.action == \"insert\" && delta.start.row <= docLength) {\n this.applyDelta(delta);\n }\n };\n Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {\n var lines = delta.lines;\n var l = lines.length - MAX + 1;\n var row = delta.start.row;\n var column = delta.start.column;\n for (var from = 0, to = 0; from < l; from = to) {\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n }\n delta.lines = lines.slice(from);\n delta.start.row = row + from;\n delta.start.column = column;\n this.applyDelta(delta, true);\n };\n Document.prototype.revertDelta = function (delta) {\n this.$safeApplyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: (delta.action == \"insert\" ? \"remove\" : \"insert\"),\n lines: delta.lines.slice()\n });\n };\n Document.prototype.indexToPosition = function (index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0)\n return { row: i, column: index + lines[i].length + newlineLength };\n }\n return { row: l - 1, column: index + lines[l - 1].length + newlineLength };\n };\n Document.prototype.positionToIndex = function (pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n for (var i = startRow || 0; i < row; ++i)\n index += lines[i].length + newlineLength;\n return index + pos.column;\n };\n Document.prototype.$split = function (text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n return Document;\n}());\nDocument.prototype.$autoNewLine = \"\";\nDocument.prototype.$newLineMode = \"auto\";\noop.implement(Document.prototype, EventEmitter);\nexports.Document = Document;\n\n});\n\nace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar BackgroundTokenizer = /** @class */ (function () {\n function BackgroundTokenizer(tokenizer, session) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n var self = this;\n this.$worker = function () {\n if (!self.running) {\n return;\n }\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n var startLine = currentLine;\n while (self.lines[currentLine])\n currentLine++;\n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n processedLines++;\n if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) {\n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n self.currentLine = currentLine;\n if (endLine == -1)\n endLine = currentLine;\n if (startLine <= endLine)\n self.fireUpdateEvent(startLine, endLine);\n };\n }\n BackgroundTokenizer.prototype.setTokenizer = function (tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n this.start(0);\n };\n BackgroundTokenizer.prototype.setDocument = function (doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n this.stop();\n };\n BackgroundTokenizer.prototype.fireUpdateEvent = function (firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n this._signal(\"update\", { data: data });\n };\n BackgroundTokenizer.prototype.start = function (startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n BackgroundTokenizer.prototype.scheduleStart = function () {\n if (!this.running)\n this.running = setTimeout(this.$worker, 700);\n };\n BackgroundTokenizer.prototype.$updateOnChange = function (delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n if (len === 0) {\n this.lines[startRow] = null;\n }\n else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n }\n else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n this.stop();\n };\n BackgroundTokenizer.prototype.stop = function () {\n if (this.running)\n clearTimeout(this.running);\n this.running = false;\n };\n BackgroundTokenizer.prototype.getTokens = function (row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n BackgroundTokenizer.prototype.getState = function (row) {\n if (this.currentLine == row)\n this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n BackgroundTokenizer.prototype.$tokenizeRow = function (row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n var data = this.tokenizer.getLineTokens(line, state, row);\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1)\n this.currentLine = row + 1;\n }\n else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n return this.lines[row] = data.tokens;\n };\n BackgroundTokenizer.prototype.cleanup = function () {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.removeAllListeners();\n };\n return BackgroundTokenizer;\n}());\noop.implement(BackgroundTokenizer.prototype, EventEmitter);\nexports.BackgroundTokenizer = BackgroundTokenizer;\n\n});\n\nace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar lang = require(\"./lib/lang\");\nvar Range = require(\"./range\").Range;\nvar SearchHighlight = /** @class */ (function () {\n function SearchHighlight(regExp, clazz, type) {\n if (type === void 0) { type = \"text\"; }\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type;\n }\n SearchHighlight.prototype.setRegexp = function (regExp) {\n if (this.regExp + \"\" == regExp + \"\")\n return;\n this.regExp = regExp;\n this.cache = [];\n };\n SearchHighlight.prototype.update = function (html, markerLayer, session, config) {\n if (!this.regExp)\n return;\n var start = config.firstRow, end = config.lastRow;\n var renderedMarkerRanges = {};\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES)\n ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function (match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n for (var j = ranges.length; j--;) {\n var rangeToAddMarkerTo = ranges[j].toScreenRange(session);\n var rangeAsString = rangeToAddMarkerTo.toString();\n if (renderedMarkerRanges[rangeAsString])\n continue;\n renderedMarkerRanges[rangeAsString] = true;\n markerLayer.drawSingleLineMarker(html, rangeToAddMarkerTo, this.clazz, config);\n }\n }\n };\n return SearchHighlight;\n}());\nSearchHighlight.prototype.MAX_RANGES = 500;\nexports.SearchHighlight = SearchHighlight;\n\n});\n\nace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar UndoManager = /** @class */ (function () {\n function UndoManager() {\n this.$keepRedoStack;\n this.$maxRev = 0;\n this.$fromUndo = false;\n this.$undoDepth = Infinity;\n this.reset();\n }\n UndoManager.prototype.addSession = function (session) {\n this.$session = session;\n };\n UndoManager.prototype.add = function (delta, allowMerge, session) {\n if (this.$fromUndo)\n return;\n if (delta == this.$lastDelta)\n return;\n if (!this.$keepRedoStack)\n this.$redoStack.length = 0;\n if (allowMerge === false || !this.lastDeltas) {\n this.lastDeltas = [];\n var undoStackLength = this.$undoStack.length;\n if (undoStackLength > this.$undoDepth - 1) {\n this.$undoStack.splice(0, undoStackLength - this.$undoDepth + 1);\n }\n this.$undoStack.push(this.lastDeltas);\n delta.id = this.$rev = ++this.$maxRev;\n }\n if (delta.action == \"remove\" || delta.action == \"insert\")\n this.$lastDelta = delta;\n this.lastDeltas.push(delta);\n };\n UndoManager.prototype.addSelection = function (selection, rev) {\n this.selections.push({\n value: selection,\n rev: rev || this.$rev\n });\n };\n UndoManager.prototype.startNewGroup = function () {\n this.lastDeltas = null;\n return this.$rev;\n };\n UndoManager.prototype.markIgnored = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n var stack = this.$undoStack;\n for (var i = stack.length; i--;) {\n var delta = stack[i][0];\n if (delta.id <= from)\n break;\n if (delta.id < to)\n delta.ignore = true;\n }\n this.lastDeltas = null;\n };\n UndoManager.prototype.getSelection = function (rev, after) {\n var stack = this.selections;\n for (var i = stack.length; i--;) {\n var selection = stack[i];\n if (selection.rev < rev) {\n if (after)\n selection = stack[i + 1];\n return selection;\n }\n }\n };\n UndoManager.prototype.getRevision = function () {\n return this.$rev;\n };\n UndoManager.prototype.getDeltas = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n var stack = this.$undoStack;\n var end = null, start = 0;\n for (var i = stack.length; i--;) {\n var delta = stack[i][0];\n if (delta.id < to && !end)\n end = i + 1;\n if (delta.id <= from) {\n start = i + 1;\n break;\n }\n }\n return stack.slice(start, end);\n };\n UndoManager.prototype.getChangedRanges = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n };\n UndoManager.prototype.getChangedLines = function (from, to) {\n if (to == null)\n to = this.$rev + 1;\n };\n UndoManager.prototype.undo = function (session, dontSelect) {\n this.lastDeltas = null;\n var stack = this.$undoStack;\n if (!rearrangeUndoStack(stack, stack.length))\n return;\n if (!session)\n session = this.$session;\n if (this.$redoStackBaseRev !== this.$rev && this.$redoStack.length)\n this.$redoStack = [];\n this.$fromUndo = true;\n var deltaSet = stack.pop();\n var undoSelectionRange = null;\n if (deltaSet) {\n undoSelectionRange = session.undoChanges(deltaSet, dontSelect);\n this.$redoStack.push(deltaSet);\n this.$syncRev();\n }\n this.$fromUndo = false;\n return undoSelectionRange;\n };\n UndoManager.prototype.redo = function (session, dontSelect) {\n this.lastDeltas = null;\n if (!session)\n session = this.$session;\n this.$fromUndo = true;\n if (this.$redoStackBaseRev != this.$rev) {\n var diff = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1);\n rebaseRedoStack(this.$redoStack, diff);\n this.$redoStackBaseRev = this.$rev;\n this.$redoStack.forEach(function (x) {\n x[0].id = ++this.$maxRev;\n }, this);\n }\n var deltaSet = this.$redoStack.pop();\n var redoSelectionRange = null;\n if (deltaSet) {\n redoSelectionRange = session.redoChanges(deltaSet, dontSelect);\n this.$undoStack.push(deltaSet);\n this.$syncRev();\n }\n this.$fromUndo = false;\n return redoSelectionRange;\n };\n UndoManager.prototype.$syncRev = function () {\n var stack = this.$undoStack;\n var nextDelta = stack[stack.length - 1];\n var id = nextDelta && nextDelta[0].id || 0;\n this.$redoStackBaseRev = id;\n this.$rev = id;\n };\n UndoManager.prototype.reset = function () {\n this.lastDeltas = null;\n this.$lastDelta = null;\n this.$undoStack = [];\n this.$redoStack = [];\n this.$rev = 0;\n this.mark = 0;\n this.$redoStackBaseRev = this.$rev;\n this.selections = [];\n };\n UndoManager.prototype.canUndo = function () {\n return this.$undoStack.length > 0;\n };\n UndoManager.prototype.canRedo = function () {\n return this.$redoStack.length > 0;\n };\n UndoManager.prototype.bookmark = function (rev) {\n if (rev == undefined)\n rev = this.$rev;\n this.mark = rev;\n };\n UndoManager.prototype.isAtBookmark = function () {\n return this.$rev === this.mark;\n };\n UndoManager.prototype.toJSON = function () {\n return {\n $redoStack: this.$redoStack,\n $undoStack: this.$undoStack\n };\n };\n UndoManager.prototype.fromJSON = function (json) {\n this.reset();\n this.$undoStack = json.$undoStack;\n this.$redoStack = json.$redoStack;\n };\n UndoManager.prototype.$prettyPrint = function (delta) {\n if (delta)\n return stringifyDelta(delta);\n return stringifyDelta(this.$undoStack) + \"\\n---\\n\" + stringifyDelta(this.$redoStack);\n };\n return UndoManager;\n}());\nUndoManager.prototype.hasUndo = UndoManager.prototype.canUndo;\nUndoManager.prototype.hasRedo = UndoManager.prototype.canRedo;\nUndoManager.prototype.isClean = UndoManager.prototype.isAtBookmark;\nUndoManager.prototype.markClean = UndoManager.prototype.bookmark;\nfunction rearrangeUndoStack(stack, pos) {\n for (var i = pos; i--;) {\n var deltaSet = stack[i];\n if (deltaSet && !deltaSet[0].ignore) {\n while (i < pos - 1) {\n var swapped = swapGroups(stack[i], stack[i + 1]);\n stack[i] = swapped[0];\n stack[i + 1] = swapped[1];\n i++;\n }\n return true;\n }\n }\n}\nvar Range = require(\"./range\").Range;\nvar cmp = Range.comparePoints;\nvar comparePoints = Range.comparePoints;\nfunction $updateMarkers(delta) {\n var isInsert = delta.action == \"insert\";\n var start = delta.start;\n var end = delta.end;\n var rowShift = (end.row - start.row) * (isInsert ? 1 : -1);\n var colShift = (end.column - start.column) * (isInsert ? 1 : -1);\n if (isInsert)\n end = start;\n for (var i in this.marks) {\n var point = this.marks[i];\n var cmp = comparePoints(point, start);\n if (cmp < 0) {\n continue; // delta starts after the range\n }\n if (cmp === 0) {\n if (isInsert) {\n if (point.bias == 1) {\n cmp = 1;\n }\n else {\n point.bias == -1;\n continue;\n }\n }\n }\n var cmp2 = isInsert ? cmp : comparePoints(point, end);\n if (cmp2 > 0) {\n point.row += rowShift;\n point.column += point.row == end.row ? colShift : 0;\n continue;\n }\n if (!isInsert && cmp2 <= 0) {\n point.row = start.row;\n point.column = start.column;\n if (cmp2 === 0)\n point.bias = 1;\n }\n }\n}\nfunction clonePos(pos) {\n return { row: pos.row, column: pos.column };\n}\nfunction cloneDelta(d) {\n return {\n start: clonePos(d.start),\n end: clonePos(d.end),\n action: d.action,\n lines: d.lines.slice()\n };\n}\nfunction stringifyDelta(d) {\n d = d || this;\n if (Array.isArray(d)) {\n return d.map(stringifyDelta).join(\"\\n\");\n }\n var type = \"\";\n if (d.action) {\n type = d.action == \"insert\" ? \"+\" : \"-\";\n type += \"[\" + d.lines + \"]\";\n }\n else if (d.value) {\n if (Array.isArray(d.value)) {\n type = d.value.map(stringifyRange).join(\"\\n\");\n }\n else {\n type = stringifyRange(d.value);\n }\n }\n if (d.start) {\n type += stringifyRange(d);\n }\n if (d.id || d.rev) {\n type += \"\\t(\" + (d.id || d.rev) + \")\";\n }\n return type;\n}\nfunction stringifyRange(r) {\n return r.start.row + \":\" + r.start.column\n + \"=>\" + r.end.row + \":\" + r.end.column;\n}\nfunction swap(d1, d2) {\n var i1 = d1.action == \"insert\";\n var i2 = d2.action == \"insert\";\n if (i1 && i2) {\n if (cmp(d2.start, d1.end) >= 0) {\n shift(d2, d1, -1);\n }\n else if (cmp(d2.start, d1.start) <= 0) {\n shift(d1, d2, +1);\n }\n else {\n return null;\n }\n }\n else if (i1 && !i2) {\n if (cmp(d2.start, d1.end) >= 0) {\n shift(d2, d1, -1);\n }\n else if (cmp(d2.end, d1.start) <= 0) {\n shift(d1, d2, -1);\n }\n else {\n return null;\n }\n }\n else if (!i1 && i2) {\n if (cmp(d2.start, d1.start) >= 0) {\n shift(d2, d1, +1);\n }\n else if (cmp(d2.start, d1.start) <= 0) {\n shift(d1, d2, +1);\n }\n else {\n return null;\n }\n }\n else if (!i1 && !i2) {\n if (cmp(d2.start, d1.start) >= 0) {\n shift(d2, d1, +1);\n }\n else if (cmp(d2.end, d1.start) <= 0) {\n shift(d1, d2, -1);\n }\n else {\n return null;\n }\n }\n return [d2, d1];\n}\nfunction swapGroups(ds1, ds2) {\n for (var i = ds1.length; i--;) {\n for (var j = 0; j < ds2.length; j++) {\n if (!swap(ds1[i], ds2[j])) {\n while (i < ds1.length) {\n while (j--) {\n swap(ds2[j], ds1[i]);\n }\n j = ds2.length;\n i++;\n }\n return [ds1, ds2];\n }\n }\n }\n ds1.selectionBefore = ds2.selectionBefore =\n ds1.selectionAfter = ds2.selectionAfter = null;\n return [ds2, ds1];\n}\nfunction xform(d1, c1) {\n var i1 = d1.action == \"insert\";\n var i2 = c1.action == \"insert\";\n if (i1 && i2) {\n if (cmp(d1.start, c1.start) < 0) {\n shift(c1, d1, 1);\n }\n else {\n shift(d1, c1, 1);\n }\n }\n else if (i1 && !i2) {\n if (cmp(d1.start, c1.end) >= 0) {\n shift(d1, c1, -1);\n }\n else if (cmp(d1.start, c1.start) <= 0) {\n shift(c1, d1, +1);\n }\n else {\n shift(d1, Range.fromPoints(c1.start, d1.start), -1);\n shift(c1, d1, +1);\n }\n }\n else if (!i1 && i2) {\n if (cmp(c1.start, d1.end) >= 0) {\n shift(c1, d1, -1);\n }\n else if (cmp(c1.start, d1.start) <= 0) {\n shift(d1, c1, +1);\n }\n else {\n shift(c1, Range.fromPoints(d1.start, c1.start), -1);\n shift(d1, c1, +1);\n }\n }\n else if (!i1 && !i2) {\n if (cmp(c1.start, d1.end) >= 0) {\n shift(c1, d1, -1);\n }\n else if (cmp(c1.end, d1.start) <= 0) {\n shift(d1, c1, -1);\n }\n else {\n var before, after;\n if (cmp(d1.start, c1.start) < 0) {\n before = d1;\n d1 = splitDelta(d1, c1.start);\n }\n if (cmp(d1.end, c1.end) > 0) {\n after = splitDelta(d1, c1.end);\n }\n shiftPos(c1.end, d1.start, d1.end, -1);\n if (after && !before) {\n d1.lines = after.lines;\n d1.start = after.start;\n d1.end = after.end;\n after = d1;\n }\n return [c1, before, after].filter(Boolean);\n }\n }\n return [c1, d1];\n}\nfunction shift(d1, d2, dir) {\n shiftPos(d1.start, d2.start, d2.end, dir);\n shiftPos(d1.end, d2.start, d2.end, dir);\n}\nfunction shiftPos(pos, start, end, dir) {\n if (pos.row == (dir == 1 ? start : end).row) {\n pos.column += dir * (end.column - start.column);\n }\n pos.row += dir * (end.row - start.row);\n}\nfunction splitDelta(c, pos) {\n var lines = c.lines;\n var end = c.end;\n c.end = clonePos(pos);\n var rowsBefore = c.end.row - c.start.row;\n var otherLines = lines.splice(rowsBefore, lines.length);\n var col = rowsBefore ? pos.column : pos.column - c.start.column;\n lines.push(otherLines[0].substring(0, col));\n otherLines[0] = otherLines[0].substr(col);\n var rest = {\n start: clonePos(pos),\n end: end,\n lines: otherLines,\n action: c.action\n };\n return rest;\n}\nfunction moveDeltasByOne(redoStack, d) {\n d = cloneDelta(d);\n for (var j = redoStack.length; j--;) {\n var deltaSet = redoStack[j];\n for (var i = 0; i < deltaSet.length; i++) {\n var x = deltaSet[i];\n var xformed = xform(x, d);\n d = xformed[0];\n if (xformed.length != 2) {\n if (xformed[2]) {\n deltaSet.splice(i + 1, 1, xformed[1], xformed[2]);\n i++;\n }\n else if (!xformed[1]) {\n deltaSet.splice(i, 1);\n i--;\n }\n }\n }\n if (!deltaSet.length) {\n redoStack.splice(j, 1);\n }\n }\n return redoStack;\n}\nfunction rebaseRedoStack(redoStack, deltaSets) {\n for (var i = 0; i < deltaSets.length; i++) {\n var deltas = deltaSets[i];\n for (var j = 0; j < deltas.length; j++) {\n moveDeltasByOne(redoStack, deltas[j]);\n }\n }\n}\nexports.UndoManager = UndoManager;\n\n});\n\nace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar FoldLine = /** @class */ (function () {\n function FoldLine(foldData, folds) {\n this.foldData = foldData;\n if (Array.isArray(folds)) {\n this.folds = folds;\n }\n else {\n folds = this.folds = [folds];\n }\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n this.folds.forEach(function (fold) {\n fold.setFoldLine(this);\n }, this);\n }\n FoldLine.prototype.shiftRow = function (shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function (fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n FoldLine.prototype.addFold = function (fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n this.folds.push(fold);\n this.folds.sort(function (a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n }\n else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n }\n else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n }\n else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n fold.foldLine = this;\n };\n FoldLine.prototype.containsRow = function (row) {\n return row >= this.start.row && row <= this.end.row;\n };\n FoldLine.prototype.walk = function (callback, endRow, endColumn) {\n var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true;\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n cmp = fold.range.compareStart(endRow, endColumn);\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n if (stop || cmp === 0) {\n return;\n }\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n FoldLine.prototype.getNextFoldTo = function (row, column) {\n var fold, cmp;\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n }\n else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n return null;\n };\n FoldLine.prototype.addRemoveChars = function (row, column, len) {\n var ret = this.getNextFoldTo(row, column), fold, folds;\n if (ret) {\n fold = ret.fold;\n if (ret.kind == \"inside\"\n && fold.start.column != column\n && fold.start.row != row) {\n window.console && window.console.log(row, column, fold);\n }\n else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n if (i === 0) {\n this.start.column += len;\n }\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n if (!fold.sameRow) {\n return;\n }\n fold.end.column += len;\n }\n this.end.column += len;\n }\n }\n };\n FoldLine.prototype.split = function (row, column) {\n var pos = this.getNextFoldTo(row, column);\n if (!pos || pos.kind == \"inside\")\n return null;\n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n FoldLine.prototype.merge = function (foldLineNext) {\n var folds = foldLineNext.folds;\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n FoldLine.prototype.toString = function () {\n var ret = [this.range.toString() + \": [\"];\n this.folds.forEach(function (fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n FoldLine.prototype.idxToPosition = function (idx) {\n var lastFoldEndColumn = 0;\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n idx -= fold.start.column - lastFoldEndColumn;\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n idx -= fold.placeholder.length;\n if (idx < 0) {\n return fold.start;\n }\n lastFoldEndColumn = fold.end.column;\n }\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n return FoldLine;\n}());\nexports.FoldLine = FoldLine;\n\n});\n\nace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"./range\").Range;\nvar comparePoints = Range.comparePoints;\nvar RangeList = /** @class */ (function () {\n function RangeList() {\n this.ranges = [];\n this.$bias = 1;\n }\n RangeList.prototype.pointIndex = function (pos, excludeEdges, startIndex) {\n var list = this.ranges;\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0)\n continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0)\n return excludeEdges && cmpStart !== 0 ? -i - 2 : i;\n if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))\n return i;\n return -i - 1;\n }\n return -i - 1;\n };\n RangeList.prototype.add = function (range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n else\n endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n RangeList.prototype.addList = function (list) {\n var removed = [];\n for (var i = list.length; i--;) {\n removed.push.apply(removed, this.add(list[i]));\n }\n return removed;\n };\n RangeList.prototype.substractPoint = function (pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges.splice(i, 1);\n };\n RangeList.prototype.merge = function () {\n var removed = [];\n var list = this.ranges;\n list = list.sort(function (a, b) {\n return comparePoints(a.start, b.start);\n });\n var next = list[0], range;\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0)\n continue;\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty())\n continue;\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n this.ranges = list;\n return removed;\n };\n RangeList.prototype.contains = function (row, column) {\n return this.pointIndex({ row: row, column: column }) >= 0;\n };\n RangeList.prototype.containsPoint = function (pos) {\n return this.pointIndex(pos) >= 0;\n };\n RangeList.prototype.rangeAtPoint = function (pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges[i];\n };\n RangeList.prototype.clipRows = function (startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)\n return [];\n var startIndex = this.pointIndex({ row: startRow, column: 0 });\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({ row: endRow, column: 0 }, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n var clipped = [];\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n return clipped;\n };\n RangeList.prototype.removeAll = function () {\n return this.ranges.splice(0, this.ranges.length);\n };\n RangeList.prototype.attach = function (session) {\n if (this.session)\n this.detach();\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n this.session.on('change', this.onChange);\n };\n RangeList.prototype.detach = function () {\n if (!this.session)\n return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n RangeList.prototype.$onChange = function (delta) {\n var start = delta.start;\n var end = delta.end;\n var startRow = start.row;\n var endRow = end.row;\n var ranges = this.ranges;\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row >= startRow)\n break;\n }\n if (delta.action == \"insert\") {\n var lineDif = endRow - startRow;\n var colDiff = -start.column + end.column;\n for (; i < n; i++) {\n var r = ranges[i];\n if (r.start.row > startRow)\n break;\n if (r.start.row == startRow && r.start.column >= start.column) {\n if (r.start.column == start.column && this.$bias <= 0) {\n }\n else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$bias < 0) {\n continue;\n }\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) {\n if (r.end.column > r.start.column && r.end.column == ranges[i + 1].start.column)\n r.end.column -= colDiff;\n }\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n }\n else {\n var lineDif = startRow - endRow;\n var colDiff = start.column - end.column;\n for (; i < n; i++) {\n var r = ranges[i];\n if (r.start.row > endRow)\n break;\n if (r.end.row < endRow\n && (startRow < r.end.row\n || startRow == r.end.row && start.column < r.end.column)) {\n r.end.row = startRow;\n r.end.column = start.column;\n }\n else if (r.end.row == endRow) {\n if (r.end.column <= end.column) {\n if (lineDif || r.end.column > start.column) {\n r.end.column = start.column;\n r.end.row = start.row;\n }\n }\n else {\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n else if (r.end.row > endRow) {\n r.end.row += lineDif;\n }\n if (r.start.row < endRow\n && (startRow < r.start.row\n || startRow == r.start.row && start.column < r.start.column)) {\n r.start.row = startRow;\n r.start.column = start.column;\n }\n else if (r.start.row == endRow) {\n if (r.start.column <= end.column) {\n if (lineDif || r.start.column > start.column) {\n r.start.column = start.column;\n r.start.row = start.row;\n }\n }\n else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n else if (r.start.row > endRow) {\n r.start.row += lineDif;\n }\n }\n }\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n return RangeList;\n}());\nRangeList.prototype.comparePoints = comparePoints;\nexports.RangeList = RangeList;\n\n});\n\nace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range_list\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar RangeList = require(\"../range_list\").RangeList;\nvar Fold = /** @class */ (function (_super) {\n __extends(Fold, _super);\n function Fold(range, placeholder) {\n var _this = _super.call(this) || this;\n _this.foldLine = null;\n _this.placeholder = placeholder;\n _this.range = range;\n _this.start = range.start;\n _this.end = range.end;\n _this.sameRow = range.start.row == range.end.row;\n _this.subFolds = _this.ranges = [];\n return _this;\n }\n Fold.prototype.toString = function () {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n Fold.prototype.setFoldLine = function (foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function (fold) {\n fold.setFoldLine(foldLine);\n });\n };\n Fold.prototype.clone = function () {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function (subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n Fold.prototype.addSubFold = function (fold) {\n if (this.range.isEqual(fold))\n return;\n consumeRange(fold, this.start);\n var row = fold.start.row, column = fold.start.column;\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterStart = this.subFolds[i];\n var firstConsumed = 0;\n if (cmp == 0) {\n if (afterStart.range.containsRange(fold))\n return afterStart.addSubFold(fold);\n else\n firstConsumed = 1;\n }\n var row = fold.range.end.row, column = fold.range.end.column;\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n if (cmp == 0)\n j++;\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n var last = cmp == 0 ? consumedFolds.length - 1 : consumedFolds.length;\n for (var k = firstConsumed; k < last; k++) {\n fold.addSubFold(consumedFolds[k]);\n }\n fold.setFoldLine(this.foldLine);\n return fold;\n };\n Fold.prototype.restoreRange = function (range) {\n return restoreRange(range, this.start);\n };\n return Fold;\n}(RangeList));\nfunction consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0)\n point.column -= anchor.column;\n}\nfunction consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n}\nfunction restorePoint(point, anchor) {\n if (point.row == 0)\n point.column += anchor.column;\n point.row += anchor.row;\n}\nfunction restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n}\nexports.Fold = Fold;\n\n});\n\nace.define(\"ace/edit_session/folding\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/edit_session/fold_line\",\"ace/edit_session/fold\",\"ace/token_iterator\",\"ace/mouse/mouse_event\"], function(require, exports, module){// @ts-nocheck\n\"use strict\";\nvar Range = require(\"../range\").Range;\nvar FoldLine = require(\"./fold_line\").FoldLine;\nvar Fold = require(\"./fold\").Fold;\nvar TokenIterator = require(\"../token_iterator\").TokenIterator;\nvar MouseEvent = require(\"../mouse/mouse_event\").MouseEvent;\nfunction Folding() {\n this.getFoldAt = function (row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine)\n return null;\n var folds = foldLine.folds;\n for (var i = 0; i < folds.length; i++) {\n var range = folds[i].range;\n if (range.contains(row, column)) {\n if (side == 1 && range.isEnd(row, column) && !range.isEmpty()) {\n continue;\n }\n else if (side == -1 && range.isStart(row, column) && !range.isEmpty()) {\n continue;\n }\n return folds[i];\n }\n }\n };\n this.getFoldsInRange = function (range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n start.column += 1;\n end.column -= 1;\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n if (cmp == 2) {\n continue;\n }\n else if (cmp == -2) {\n break;\n }\n var folds = foldLines[i].folds;\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n if (cmp == -2) {\n break;\n }\n else if (cmp == 2) {\n continue;\n }\n else \n if (cmp == 42) {\n break;\n }\n foundFolds.push(fold);\n }\n }\n start.column -= 1;\n end.column += 1;\n return foundFolds;\n };\n this.getFoldsInRangeList = function (ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function (range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n }\n else {\n var folds = this.getFoldsInRange(ranges);\n }\n return folds;\n };\n this.getAllFolds = function () {\n var folds = [];\n var foldLines = this.$foldData;\n for (var i = 0; i < foldLines.length; i++)\n for (var j = 0; j < foldLines[i].folds.length; j++)\n folds.push(foldLines[i].folds[j]);\n return folds;\n };\n this.getFoldStringAt = function (row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine)\n return null;\n var lastFold = {\n end: { column: 0 }\n };\n var str, fold;\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n str = this\n .getLine(fold.start.row)\n .substring(lastFold.end.column, fold.start.column);\n break;\n }\n else if (cmp === 0) {\n return null;\n }\n lastFold = fold;\n }\n if (!str)\n str = this.getLine(fold.start.row).substring(lastFold.end.column);\n if (trim == -1)\n return str.substring(0, column - lastFold.end.column);\n else if (trim == 1)\n return str.substring(column - lastFold.end.column);\n else\n return str;\n };\n this.getFoldLine = function (docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n }\n else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n return null;\n };\n this.getNextFoldLine = function (docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n return null;\n };\n this.getFoldedRowCount = function (first, last) {\n var foldData = this.$foldData, rowCount = last - first + 1;\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row;\n if (end >= last) {\n if (start < last) {\n if (start >= first)\n rowCount -= last - start;\n else\n rowCount = 0; // in one fold\n }\n break;\n }\n else if (end >= first) {\n if (start >= first) // fold inside range\n rowCount -= end - start;\n else\n rowCount -= end - first + 1;\n }\n }\n return rowCount;\n };\n this.$addFoldLine = function (foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function (a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n this.addFold = function (placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n if (placeholder instanceof Fold)\n fold = placeholder;\n else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold)\n return startFold.addSubFold(fold);\n if (startFold && !startFold.range.isStart(startRow, startColumn))\n this.removeFold(startFold);\n if (endFold && !endFold.range.isEnd(endRow, endColumn))\n this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n if (folds.length > 0) {\n this.removeFolds(folds);\n if (!fold.collapseChildren) {\n folds.forEach(function (subFold) {\n fold.addSubFold(subFold);\n });\n }\n }\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n }\n else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n break;\n }\n else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n if (!added)\n foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n if (this.$useWrapMode)\n this.$updateWrapData(foldLine.start.row, foldLine.start.row);\n else\n this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"add\" });\n return fold;\n };\n this.addFolds = function (folds) {\n folds.forEach(function (fold) {\n this.addFold(fold);\n }, this);\n };\n this.removeFold = function (fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n }\n else \n if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n }\n else \n if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n }\n else \n if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n }\n else \n {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n if (!this.$updating) {\n if (this.$useWrapMode)\n this.$updateWrapData(startRow, endRow);\n else\n this.$updateRowLengthCache(startRow, endRow);\n }\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"remove\" });\n };\n this.removeFolds = function (folds) {\n var cloneFolds = [];\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n cloneFolds.forEach(function (fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n this.expandFold = function (fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function (subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row + 1, fold.end.row, fold.collapseChildren - 1);\n }\n fold.subFolds = [];\n };\n this.expandFolds = function (folds) {\n folds.forEach(function (fold) {\n this.expandFold(fold);\n }, this);\n };\n this.unfold = function (location, expandInner) {\n var range, folds;\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n if (expandInner == null)\n expandInner = true;\n }\n else if (typeof location == \"number\") {\n range = new Range(location, 0, location, this.getLine(location).length);\n }\n else if (\"row\" in location) {\n range = Range.fromPoints(location, location);\n }\n else if (Array.isArray(location)) {\n folds = [];\n location.forEach(function (range) {\n folds = folds.concat(this.unfold(range));\n }, this);\n return folds;\n }\n else {\n range = location;\n }\n folds = this.getFoldsInRangeList(range);\n var outermostFolds = folds;\n while (folds.length == 1\n && Range.comparePoints(folds[0].start, range.start) < 0\n && Range.comparePoints(folds[0].end, range.end) > 0) {\n this.expandFolds(folds);\n folds = this.getFoldsInRangeList(range);\n }\n if (expandInner != false) {\n this.removeFolds(folds);\n }\n else {\n this.expandFolds(folds);\n }\n if (outermostFolds.length)\n return outermostFolds;\n };\n this.isRowFolded = function (docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n this.getRowFoldEnd = function (docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n this.getRowFoldStart = function (docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n this.getFoldDisplayLine = function (foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null)\n startRow = foldLine.start.row;\n if (startColumn == null)\n startColumn = 0;\n if (endRow == null)\n endRow = foldLine.end.row;\n if (endColumn == null)\n endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n foldLine.walk(function (placeholder, row, column, lastColumn) {\n if (row < startRow)\n return;\n if (row == startRow) {\n if (column < startColumn)\n return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n if (placeholder != null) {\n textLine += placeholder;\n }\n else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n this.getDisplayLine = function (row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n }\n else {\n return this.getFoldDisplayLine(foldLine, row, endColumn, startRow, startColumn);\n }\n };\n this.$cloneFoldData = function () {\n var fd = [];\n fd = this.$foldData.map(function (foldLine) {\n var folds = foldLine.folds.map(function (fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n return fd;\n };\n this.toggleFold = function (tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n if (fold) {\n this.expandFold(fold);\n return;\n }\n else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n }\n else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n }\n else if (bracketPos = this.findMatchingBracket({ row: cursor.row, column: cursor.column + 1 })) {\n if (range.comparePoint(bracketPos) == 1)\n range.end = bracketPos;\n else\n range.start = bracketPos;\n range.start.column++;\n }\n else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n }\n else {\n var folds = this.getFoldsInRange(range);\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n }\n else if (folds.length == 1) {\n fold = folds[0];\n }\n }\n if (!fold)\n fold = this.getFoldAt(range.start.row, range.start.column);\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n var placeholder = \"...\";\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4)\n return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n this.addFold(placeholder, range);\n };\n this.getCommentFoldRange = function (row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n var type = token && token.type;\n if (token && /^comment|string/.test(type)) {\n type = type.match(/comment|string/)[0];\n if (type == \"comment\")\n type += \"|doc-start|\\\\.doc\";\n var re = new RegExp(type);\n var range = new Range();\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type) && !/^comment.end/.test(token.type));\n token = iterator.stepForward();\n }\n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + (/^comment.start/.test(token.type) ? token.value.length : 2);\n iterator = new TokenIterator(this, row, column);\n if (dir != -1) {\n var lastRow = -1;\n do {\n token = iterator.stepForward();\n if (lastRow == -1) {\n var state = this.getState(iterator.$row);\n if (!re.test(state))\n lastRow = iterator.$row;\n }\n else if (iterator.$row > lastRow) {\n break;\n }\n } while (token && re.test(token.type) && !/^comment.start/.test(token.type));\n token = iterator.stepBackward();\n }\n else\n token = iterator.getCurrentToken();\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn();\n if (!/^comment.end/.test(token.type)) {\n range.end.column += token.value.length - 2;\n }\n return range;\n }\n };\n this.foldAll = function (startRow, endRow, depth, test) {\n if (depth == undefined)\n depth = 100000; // JSON.stringify doesn't hanle Infinity\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets)\n return; // mode doesn't support folding\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null)\n foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\")\n continue;\n if (test && !test(row))\n continue;\n var range = this.getFoldWidgetRange(row);\n if (range && range.isMultiLine()\n && range.end.row <= endRow\n && range.start.row >= startRow) {\n row = range.end.row;\n range.collapseChildren = depth;\n this.addFold(\"...\", range);\n }\n }\n };\n this.foldToLevel = function (level) {\n this.foldAll();\n while (level-- > 0)\n this.unfold(null, false);\n };\n this.foldAllComments = function () {\n var session = this;\n this.foldAll(null, null, null, function (row) {\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token.type == \"text\" && /^\\s+$/.test(token.value))\n continue;\n if (/comment/.test(token.type))\n return true;\n return false;\n }\n });\n };\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n this.setFoldStyle = function (style) {\n if (!this.$foldStyles[style])\n throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n if (this.$foldStyle == style)\n return;\n this.$foldStyle = style;\n if (style == \"manual\")\n this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n this.$setFolding = function (foldMode) {\n if (this.$foldMode == foldMode)\n return;\n this.$foldMode = foldMode;\n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n this._signal(\"changeAnnotation\");\n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || (ignoreCurrent && fw[row]))\n return {};\n var i = row - 1, firstRange;\n while (i >= 0) {\n var c = fw[i];\n if (c == null)\n c = fw[i] = this.getFoldWidget(i);\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange)\n firstRange = range;\n if (range && range.end.row >= row)\n break;\n }\n i--;\n }\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n this.onFoldWidgetClick = function (row, e) {\n if (e instanceof MouseEvent)\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n var range = this.$toggleFoldWidget(row, options);\n if (!range) {\n var el = (e.target || e.srcElement);\n if (el && /ace_fold-widget/.test(el.className))\n el.className += \" ace_invalid\";\n }\n };\n this.$toggleFoldWidget = function (row, options) {\n if (!this.getFoldWidget)\n return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n if (fold) {\n if (options.children || options.all)\n this.removeFold(fold);\n else\n this.expandFold(fold);\n return fold;\n }\n var range = this.getFoldWidgetRange(row, true);\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n }\n else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n }\n else if (range) {\n if (options.all)\n range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n return range;\n };\n this.toggleFoldWidget = function (toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n if (range)\n return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n if (fold) {\n this.removeFold(fold);\n }\n else {\n this.addFold(\"...\", range);\n }\n }\n };\n this.updateFoldWidgets = function (delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n }\n else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n }\n else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n this.tokenizerUpdateFoldWidgets = function (e) {\n var rows = e.data;\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first)\n this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n}\nexports.Folding = Folding;\n\n});\n\nace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar TokenIterator = require(\"../token_iterator\").TokenIterator;\nvar Range = require(\"../range\").Range;\nfunction BracketMatch() {\n this.findMatchingBracket = function (position, chr) {\n if (position.column == 0)\n return null;\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column - 1);\n if (charBeforeCursor == \"\")\n return null;\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match)\n return null;\n if (match[1])\n return this.$findClosingBracket(match[1], position);\n else\n return this.$findOpeningBracket(match[2], position);\n };\n this.getBracketRange = function (pos) {\n var line = this.getLine(pos.row);\n var before = true, range;\n var chr = line.charAt(pos.column - 1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n chr = line.charAt(pos.column);\n pos = { row: pos.row, column: pos.column + 1 };\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n if (!match)\n return null;\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(pos, bracketPos);\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n range.cursor = range.end;\n }\n else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(bracketPos, pos);\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n range.cursor = range.start;\n }\n return range;\n };\n this.getMatchingBracketRanges = function (pos, isBackwards) {\n var line = this.getLine(pos.row);\n var bracketsRegExp = /([\\(\\[\\{])|([\\)\\]\\}])/;\n var chr = !isBackwards && line.charAt(pos.column - 1);\n var match = chr && chr.match(bracketsRegExp);\n if (!match) {\n chr = (isBackwards === undefined || isBackwards) && line.charAt(pos.column);\n pos = {\n row: pos.row,\n column: pos.column + 1\n };\n match = chr && chr.match(bracketsRegExp);\n }\n if (!match)\n return null;\n var startRange = new Range(pos.row, pos.column - 1, pos.row, pos.column);\n var bracketPos = match[1] ? this.$findClosingBracket(match[1], pos)\n : this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return [startRange];\n var endRange = new Range(bracketPos.row, bracketPos.column, bracketPos.row, bracketPos.column + 1);\n return [startRange, endRange];\n };\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\",\n \"<\": \">\",\n \">\": \"<\"\n };\n this.$findOpeningBracket = function (bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n if (!typeRe) {\n typeRe = new RegExp(\"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\")\n .replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\")\n .replace(/-close\\b/, \"-(close|open)\")\n + \")+\");\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n while (true) {\n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return { row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn() };\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n if (token == null)\n break;\n value = token.value;\n valueIndex = value.length - 1;\n }\n return null;\n };\n this.$findClosingBracket = function (bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n if (!typeRe) {\n typeRe = new RegExp(\"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\")\n .replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\")\n .replace(/-open\\b/, \"-(close|open)\")\n + \")+\");\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n while (true) {\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return { row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn() };\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n if (token == null)\n break;\n valueIndex = 0;\n }\n return null;\n };\n this.getMatchingTags = function (pos) {\n var iterator = new TokenIterator(this, pos.row, pos.column);\n var token = this.$findTagName(iterator);\n if (!token)\n return;\n var prevToken = iterator.stepBackward();\n if (prevToken.value === '<') {\n return this.$findClosingTag(iterator, token);\n }\n else {\n return this.$findOpeningTag(iterator, token);\n }\n };\n this.$findTagName = function (iterator) {\n var token = iterator.getCurrentToken();\n var found = false;\n var backward = false;\n if (token && token.type.indexOf('tag-name') === -1) {\n do {\n if (backward)\n token = iterator.stepBackward();\n else\n token = iterator.stepForward();\n if (token) {\n if (token.value === \"/>\") {\n backward = true;\n }\n else if (token.type.indexOf('tag-name') !== -1) {\n found = true;\n }\n }\n } while (token && !found);\n }\n return token;\n };\n this.$findClosingTag = function (iterator, token) {\n var prevToken;\n var currentTag = token.value;\n var tag = token.value;\n var depth = 0;\n var openTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);\n token = iterator.stepForward();\n var openTagName = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + token.value.length);\n var foundOpenTagEnd = false;\n do {\n prevToken = token;\n token = iterator.stepForward();\n if (token) {\n if (token.value === '>' && !foundOpenTagEnd) {\n var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for `>`\n foundOpenTagEnd = true;\n }\n if (token.type.indexOf('tag-name') !== -1) {\n currentTag = token.value;\n if (tag === currentTag) {\n if (prevToken.value === '<') {\n depth++;\n }\n else if (prevToken.value === '') {\n var closeTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for >\n }\n else {\n return;\n }\n }\n }\n }\n }\n else if (tag === currentTag && token.value === '/>') { // self-closing tag\n depth--;\n if (depth < 0) { //found self-closing tag end\n var closeTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 2);\n var closeTagName = closeTagStart;\n var closeTagEnd = closeTagName;\n var openTagEnd = new Range(openTagName.end.row, openTagName.end.column, openTagName.end.row, openTagName.end.column + 1);\n }\n }\n }\n } while (token && depth >= 0);\n if (openTagStart && openTagEnd && closeTagStart && closeTagEnd && openTagName && closeTagName) {\n return {\n openTag: new Range(openTagStart.start.row, openTagStart.start.column, openTagEnd.end.row, openTagEnd.end.column),\n closeTag: new Range(closeTagStart.start.row, closeTagStart.start.column, closeTagEnd.end.row, closeTagEnd.end.column),\n openTagName: openTagName,\n closeTagName: closeTagName\n };\n }\n };\n this.$findOpeningTag = function (iterator, token) {\n var prevToken = iterator.getCurrentToken();\n var tag = token.value;\n var depth = 0;\n var startRow = iterator.getCurrentTokenRow();\n var startColumn = iterator.getCurrentTokenColumn();\n var endColumn = startColumn + 2;\n var closeTagStart = new Range(startRow, startColumn, startRow, endColumn); //Range for \")\n return;\n var closeTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for >\n iterator.stepBackward();\n iterator.stepBackward();\n do {\n token = prevToken;\n startRow = iterator.getCurrentTokenRow();\n startColumn = iterator.getCurrentTokenColumn();\n endColumn = startColumn + token.value.length;\n prevToken = iterator.stepBackward();\n if (token) {\n if (token.type.indexOf('tag-name') !== -1) {\n if (tag === token.value) {\n if (prevToken.value === '<') {\n depth++;\n if (depth > 0) { //found opening tag\n var openTagName = new Range(startRow, startColumn, startRow, endColumn);\n var openTagStart = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for <\n do {\n token = iterator.stepForward();\n } while (token && token.value !== '>');\n var openTagEnd = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn(), iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1); //Range for >\n }\n }\n else if (prevToken.value === '') { // self-closing tag\n var stepCount = 0;\n var tmpToken = prevToken;\n while (tmpToken) {\n if (tmpToken.type.indexOf('tag-name') !== -1 && tmpToken.value === tag) {\n depth--;\n break;\n }\n else if (tmpToken.value === '<') {\n break;\n }\n tmpToken = iterator.stepBackward();\n stepCount++;\n }\n for (var i = 0; i < stepCount; i++) {\n iterator.stepForward();\n }\n }\n }\n } while (prevToken && depth <= 0);\n if (openTagStart && openTagEnd && closeTagStart && closeTagEnd && openTagName && closeTagName) {\n return {\n openTag: new Range(openTagStart.start.row, openTagStart.start.column, openTagEnd.end.row, openTagEnd.end.column),\n closeTag: new Range(closeTagStart.start.row, closeTagStart.start.column, closeTagEnd.end.row, closeTagEnd.end.column),\n openTagName: openTagName,\n closeTagName: closeTagName\n };\n }\n };\n}\nexports.BracketMatch = BracketMatch;\n\n});\n\nace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/bidihandler\",\"ace/config\",\"ace/lib/event_emitter\",\"ace/selection\",\"ace/mode/text\",\"ace/range\",\"ace/document\",\"ace/background_tokenizer\",\"ace/search_highlight\",\"ace/undomanager\",\"ace/edit_session/folding\",\"ace/edit_session/bracket_match\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar BidiHandler = require(\"./bidihandler\").BidiHandler;\nvar config = require(\"./config\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Selection = require(\"./selection\").Selection;\nvar TextMode = require(\"./mode/text\").Mode;\nvar Range = require(\"./range\").Range;\nvar Document = require(\"./document\").Document;\nvar BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;\nvar SearchHighlight = require(\"./search_highlight\").SearchHighlight;\nvar UndoManager = require(\"./undomanager\").UndoManager;\nvar EditSession = /** @class */ (function () {\n function EditSession(text, mode) { this.doc;\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n this.$foldData = [];\n this.id = \"session\" + (++EditSession.$uid);\n this.$foldData.toString = function () {\n return this.join(\"\\n\");\n };\n this.bgTokenizer = new BackgroundTokenizer((new TextMode()).getTokenizer(), this);\n var _self = this;\n this.bgTokenizer.on(\"update\", function (e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n if (typeof text != \"object\" || !text.getLine)\n text = new Document(/**@type{string}*/ (text));\n this.setDocument(text);\n this.selection = new Selection(this);\n this.$bidiHandler = new BidiHandler(this);\n config.resetOptions(this);\n this.setMode(mode);\n config._signal(\"session\", this);\n this.destroyed = false;\n }\n EditSession.prototype.setDocument = function (doc) {\n if (this.doc)\n this.doc.off(\"change\", this.$onChange);\n this.doc = doc;\n doc.on(\"change\", this.$onChange, true);\n this.bgTokenizer.setDocument(this.getDocument());\n this.resetCaches();\n };\n EditSession.prototype.getDocument = function () {\n return this.doc;\n };\n EditSession.prototype.$resetRowCache = function (docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n EditSession.prototype.$getRowCacheIndex = function (cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n while (low <= hi) {\n var mid = (low + hi) >> 1;\n var c = cacheArray[mid];\n if (val > c)\n low = mid + 1;\n else if (val < c)\n hi = mid - 1;\n else\n return mid;\n }\n return low - 1;\n };\n EditSession.prototype.resetCaches = function () {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (!this.destroyed)\n this.bgTokenizer.start(0);\n };\n EditSession.prototype.onChangeFold = function (e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n EditSession.prototype.onChange = function (delta) {\n this.$modified = true;\n this.$bidiHandler.onChange(delta);\n this.$resetRowCache(delta.start.row);\n var removedFolds = this.$updateInternalDataOnChange(delta);\n if (!this.$fromUndo && this.$undoManager) {\n if (removedFolds && removedFolds.length) {\n this.$undoManager.add({\n action: \"removeFolds\",\n folds: removedFolds\n }, this.mergeUndoDeltas);\n this.mergeUndoDeltas = true;\n }\n this.$undoManager.add(delta, this.mergeUndoDeltas);\n this.mergeUndoDeltas = true;\n this.$informUndoManager.schedule();\n }\n this.bgTokenizer.$updateOnChange(delta);\n this._signal(\"change\", delta);\n };\n EditSession.prototype.setValue = function (text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n this.$resetRowCache(0);\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n EditSession.fromJSON = function (session) {\n if (typeof session == \"string\")\n session = JSON.parse(session);\n var undoManager = new UndoManager();\n undoManager.$undoStack = session.history.undo;\n undoManager.$redoStack = session.history.redo;\n undoManager.mark = session.history.mark;\n undoManager.$rev = session.history.rev;\n var editSession = new EditSession(session.value);\n session.folds.forEach(function (fold) {\n editSession.addFold(\"...\", Range.fromPoints(fold.start, fold.end));\n });\n editSession.setAnnotations(session.annotations);\n editSession.setBreakpoints(session.breakpoints);\n editSession.setMode(session.mode);\n editSession.setScrollLeft(session.scrollLeft);\n editSession.setScrollTop(session.scrollTop);\n editSession.setUndoManager(undoManager);\n editSession.selection.fromJSON(session.selection);\n return editSession;\n };\n EditSession.prototype.toJSON = function () {\n return {\n annotations: this.$annotations,\n breakpoints: this.$breakpoints,\n folds: this.getAllFolds().map(function (fold) {\n return fold.range;\n }),\n history: this.getUndoManager(),\n mode: this.$mode.$id,\n scrollLeft: this.$scrollLeft,\n scrollTop: this.$scrollTop,\n selection: this.selection.toJSON(),\n value: this.doc.getValue()\n };\n };\n EditSession.prototype.toString = function () {\n return this.doc.getValue();\n };\n EditSession.prototype.getSelection = function () {\n return this.selection;\n };\n EditSession.prototype.getState = function (row) {\n return this.bgTokenizer.getState(row);\n };\n EditSession.prototype.getTokens = function (row) {\n return this.bgTokenizer.getTokens(row);\n };\n EditSession.prototype.getTokenAt = function (row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token, c = 0;\n if (column == null) {\n var i = tokens.length - 1;\n c = this.getLine(row).length;\n }\n else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column)\n break;\n }\n }\n token = tokens[i];\n if (!token)\n return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n EditSession.prototype.setUndoManager = function (undoManager) {\n this.$undoManager = undoManager;\n if (this.$informUndoManager)\n this.$informUndoManager.cancel();\n if (undoManager) {\n var self = this;\n undoManager.addSession(this);\n this.$syncInformUndoManager = function () {\n self.$informUndoManager.cancel();\n self.mergeUndoDeltas = false;\n };\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n }\n else {\n this.$syncInformUndoManager = function () { };\n }\n };\n EditSession.prototype.markUndoGroup = function () {\n if (this.$syncInformUndoManager)\n this.$syncInformUndoManager();\n };\n EditSession.prototype.getUndoManager = function () {\n return this.$undoManager || this.$defaultUndoManager;\n };\n EditSession.prototype.getTabString = function () {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n }\n else {\n return \"\\t\";\n }\n };\n EditSession.prototype.setUseSoftTabs = function (val) {\n this.setOption(\"useSoftTabs\", val);\n };\n EditSession.prototype.getUseSoftTabs = function () {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n EditSession.prototype.setTabSize = function (tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n EditSession.prototype.getTabSize = function () {\n return this.$tabSize;\n };\n EditSession.prototype.isTabStop = function (position) {\n return this.$useSoftTabs && (position.column % this.$tabSize === 0);\n };\n EditSession.prototype.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {\n this.setOption(\"navigateWithinSoftTabs\", navigateWithinSoftTabs);\n };\n EditSession.prototype.getNavigateWithinSoftTabs = function () {\n return this.$navigateWithinSoftTabs;\n };\n EditSession.prototype.setOverwrite = function (overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n EditSession.prototype.getOverwrite = function () {\n return this.$overwrite;\n };\n EditSession.prototype.toggleOverwrite = function () {\n this.setOverwrite(!this.$overwrite);\n };\n EditSession.prototype.addGutterDecoration = function (row, className) {\n if (!this.$decorations[row])\n this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.removeGutterDecoration = function (row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.getBreakpoints = function () {\n return this.$breakpoints;\n };\n EditSession.prototype.setBreakpoints = function (rows) {\n this.$breakpoints = [];\n for (var i = 0; i < rows.length; i++) {\n this.$breakpoints[rows[i]] = \"ace_breakpoint\";\n }\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.clearBreakpoints = function () {\n this.$breakpoints = [];\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.setBreakpoint = function (row, className) {\n if (className === undefined)\n className = \"ace_breakpoint\";\n if (className)\n this.$breakpoints[row] = className;\n else\n delete this.$breakpoints[row];\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.clearBreakpoint = function (row) {\n delete this.$breakpoints[row];\n this._signal(\"changeBreakpoint\", {});\n };\n EditSession.prototype.addMarker = function (range, clazz, type, inFront) {\n var id = this.$markerId++;\n var marker = {\n range: range,\n type: type || \"line\",\n renderer: typeof type == \"function\" ? type : null,\n clazz: clazz,\n inFront: !!inFront,\n id: id\n };\n if (inFront) {\n this.$frontMarkers[id] = marker;\n this._signal(\"changeFrontMarker\");\n }\n else {\n this.$backMarkers[id] = marker;\n this._signal(\"changeBackMarker\");\n }\n return id;\n };\n EditSession.prototype.addDynamicMarker = function (marker, inFront) {\n if (!marker.update)\n return;\n var id = this.$markerId++;\n marker.id = id;\n marker.inFront = !!inFront;\n if (inFront) {\n this.$frontMarkers[id] = marker;\n this._signal(\"changeFrontMarker\");\n }\n else {\n this.$backMarkers[id] = marker;\n this._signal(\"changeBackMarker\");\n }\n return marker;\n };\n EditSession.prototype.removeMarker = function (markerId) {\n var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];\n if (!marker)\n return;\n var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;\n delete (markers[markerId]);\n this._signal(marker.inFront ? \"changeFrontMarker\" : \"changeBackMarker\");\n };\n EditSession.prototype.getMarkers = function (inFront) {\n return inFront ? this.$frontMarkers : this.$backMarkers;\n };\n EditSession.prototype.highlight = function (re) {\n if (!this.$searchHighlight) {\n var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");\n this.$searchHighlight = this.addDynamicMarker(highlight);\n }\n this.$searchHighlight.setRegexp(re);\n };\n EditSession.prototype.highlightLines = function (startRow, endRow, clazz, inFront) {\n if (typeof endRow != \"number\") {\n clazz = endRow;\n endRow = startRow;\n }\n if (!clazz)\n clazz = \"ace_step\";\n var range = new Range(startRow, 0, endRow, Infinity);\n range.id = this.addMarker(range, clazz, \"fullLine\", inFront);\n return range;\n };\n EditSession.prototype.setAnnotations = function (annotations) {\n this.$annotations = annotations;\n this._signal(\"changeAnnotation\", {});\n };\n EditSession.prototype.getAnnotations = function () {\n return this.$annotations || [];\n };\n EditSession.prototype.clearAnnotations = function () {\n this.setAnnotations([]);\n };\n EditSession.prototype.$detectNewLine = function (text) {\n var match = text.match(/^.*?(\\r?\\n)/m);\n if (match) {\n this.$autoNewLine = match[1];\n }\n else {\n this.$autoNewLine = \"\\n\";\n }\n };\n EditSession.prototype.getWordRange = function (row, column) {\n var line = this.getLine(row);\n var inToken = false;\n if (column > 0)\n inToken = !!line.charAt(column - 1).match(this.tokenRe);\n if (!inToken)\n inToken = !!line.charAt(column).match(this.tokenRe);\n if (inToken)\n var re = this.tokenRe;\n else if (/^\\s+$/.test(line.slice(column - 1, column + 1)))\n var re = /\\s/;\n else\n var re = this.nonTokenRe;\n var start = column;\n if (start > 0) {\n do {\n start--;\n } while (start >= 0 && line.charAt(start).match(re));\n start++;\n }\n var end = column;\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n return new Range(row, start, row, end);\n };\n EditSession.prototype.getAWordRange = function (row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n return wordRange;\n };\n EditSession.prototype.setNewLineMode = function (newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n EditSession.prototype.getNewLineMode = function () {\n return this.doc.getNewLineMode();\n };\n EditSession.prototype.setUseWorker = function (useWorker) { this.setOption(\"useWorker\", useWorker); };\n EditSession.prototype.getUseWorker = function () { return this.$useWorker; };\n EditSession.prototype.onReloadTokenizer = function (e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n this._signal(\"tokenizerUpdate\", e);\n };\n EditSession.prototype.setMode = function (mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer)\n return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n }\n else {\n path = /**@type{string}*/ (mode) || \"ace/mode/text\";\n }\n if (!this.$modes[\"ace/mode/text\"])\n this.$modes[\"ace/mode/text\"] = new TextMode();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n this.$modeId = path;\n config.loadModule([\"mode\", path], function (m) {\n if (this.$modeId !== path)\n return cb && cb();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n }\n else if (m && m.Mode) {\n m = new m.Mode(options);\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n this.$onChangeMode(m);\n }\n cb && cb();\n }.bind(this));\n if (!this.$mode)\n this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n EditSession.prototype.$onChangeMode = function (mode, $isPlaceholder) {\n if (!$isPlaceholder)\n this.$modeId = mode.$id;\n if (this.$mode === mode)\n return;\n var oldMode = this.$mode;\n this.$mode = mode;\n this.$stopWorker();\n if (this.$useWorker)\n this.$startWorker();\n var tokenizer = mode.getTokenizer();\n if (tokenizer.on !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.on(\"update\", onReloadTokenizer);\n }\n this.bgTokenizer.setTokenizer(tokenizer);\n this.bgTokenizer.setDocument(this.getDocument());\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n if (!$isPlaceholder) {\n if (mode.attachToSession)\n mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n this._emit(\"changeMode\", { oldMode: oldMode, mode: mode });\n }\n };\n EditSession.prototype.$stopWorker = function () {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n EditSession.prototype.$startWorker = function () {\n try {\n this.$worker = this.$mode.createWorker(this);\n }\n catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n EditSession.prototype.getMode = function () {\n return this.$mode;\n };\n EditSession.prototype.setScrollTop = function (scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop))\n return;\n this.$scrollTop = scrollTop;\n this._signal(\"changeScrollTop\", scrollTop);\n };\n EditSession.prototype.getScrollTop = function () {\n return this.$scrollTop;\n };\n EditSession.prototype.setScrollLeft = function (scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))\n return;\n this.$scrollLeft = scrollLeft;\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n EditSession.prototype.getScrollLeft = function () {\n return this.$scrollLeft;\n };\n EditSession.prototype.getScreenWidth = function () {\n this.$computeWidth();\n if (this.lineWidgets)\n return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n EditSession.prototype.getLineWidgetMaxWidth = function () {\n if (this.lineWidgetsWidth != null)\n return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function (w) {\n if (w && w.screenWidth > width)\n width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n EditSession.prototype.$computeWidth = function (force) {\n if (this.$modified || force) {\n this.$modified = false;\n if (this.$useWrapMode)\n return this.screenWidth = this.$wrapLimit;\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len)\n break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (cache[i] == null)\n cache[i] = this.$getStringScreenWidth(lines[i])[0];\n if (cache[i] > longestScreenLine)\n longestScreenLine = cache[i];\n }\n this.screenWidth = longestScreenLine;\n }\n };\n EditSession.prototype.getLine = function (row) {\n return this.doc.getLine(row);\n };\n EditSession.prototype.getLines = function (firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n EditSession.prototype.getLength = function () {\n return this.doc.getLength();\n };\n EditSession.prototype.getTextRange = function (range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n EditSession.prototype.insert = function (position, text) {\n return this.doc.insert(position, text);\n };\n EditSession.prototype.remove = function (range) {\n return this.doc.remove(range);\n };\n EditSession.prototype.removeFullLines = function (firstRow, lastRow) {\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n EditSession.prototype.undoChanges = function (deltas, dontSelect) {\n if (!deltas.length)\n return;\n this.$fromUndo = true;\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n if (delta.action == \"insert\" || delta.action == \"remove\") {\n this.doc.revertDelta(delta);\n }\n else if (delta.folds) {\n this.addFolds(delta.folds);\n }\n }\n if (!dontSelect && this.$undoSelect) {\n if (deltas.selectionBefore)\n this.selection.fromJSON(deltas.selectionBefore);\n else\n this.selection.setRange(this.$getUndoSelection(deltas, true));\n }\n this.$fromUndo = false;\n };\n EditSession.prototype.redoChanges = function (deltas, dontSelect) {\n if (!deltas.length)\n return;\n this.$fromUndo = true;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (delta.action == \"insert\" || delta.action == \"remove\") {\n this.doc.$safeApplyDelta(delta);\n }\n }\n if (!dontSelect && this.$undoSelect) {\n if (deltas.selectionAfter)\n this.selection.fromJSON(deltas.selectionAfter);\n else\n this.selection.setRange(this.$getUndoSelection(deltas, false));\n }\n this.$fromUndo = false;\n };\n EditSession.prototype.setUndoSelect = function (enable) {\n this.$undoSelect = enable;\n };\n EditSession.prototype.$getUndoSelection = function (deltas, isUndo) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n var range, point;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (!delta.start)\n continue; // skip folds\n if (!range) {\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n }\n else {\n range = Range.fromPoints(delta.start, delta.start);\n }\n continue;\n }\n if (isInsert(delta)) {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n point = delta.end;\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n }\n else {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n }\n }\n return range;\n };\n EditSession.prototype.replace = function (range, text) {\n return this.doc.replace(range, text);\n };\n EditSession.prototype.moveText = function (fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n var toRange = Range.fromPoints(toPosition, toPosition);\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)\n toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)\n toRange.end.column += collDiff;\n }\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n toRange.end = this.insert(toRange.start, text);\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function (x) {\n x = x.clone();\n if (x.start.row == oldStart.row)\n x.start.column += collDiff;\n if (x.end.row == oldStart.row)\n x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n return toRange;\n };\n EditSession.prototype.indentRows = function (startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n for (var row = startRow; row <= endRow; row++)\n this.doc.insertInLine({ row: row, column: 0 }, indentString);\n };\n EditSession.prototype.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n for (var j = 0; j < size; ++j)\n if (line.charAt(j) != ' ')\n break;\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n }\n else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n this.remove(deleteRange);\n }\n };\n EditSession.prototype.$moveLines = function (firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0)\n return 0;\n var diff = row - firstRow;\n }\n else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength() - 1)\n return 0;\n var diff = row - lastRow;\n }\n else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function (x) {\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n var lines = dir == 0\n ? this.doc.getLines(firstRow, lastRow)\n : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow + diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n EditSession.prototype.moveLinesUp = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n EditSession.prototype.moveLinesDown = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n EditSession.prototype.duplicateLines = function (firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n EditSession.prototype.$clipRowToDocument = function (row) {\n return Math.max(0, Math.min(row, this.doc.getLength() - 1));\n };\n EditSession.prototype.$clipColumnToRow = function (row, column) {\n if (column < 0)\n return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n EditSession.prototype.$clipPositionToDocument = function (row, column) {\n column = Math.max(0, column);\n if (row < 0) {\n row = 0;\n column = 0;\n }\n else {\n var len = this.doc.getLength();\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len - 1).length;\n }\n else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n return {\n row: row,\n column: column\n };\n };\n EditSession.prototype.$clipRangeToDocument = function (range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n }\n else {\n range.start.column = this.$clipColumnToRow(range.start.row, range.start.column);\n }\n var len = this.doc.getLength() - 1;\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n }\n else {\n range.end.column = this.$clipColumnToRow(range.end.row, range.end.column);\n }\n return range;\n };\n EditSession.prototype.setUseWrapMode = function (useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n this._signal(\"changeWrapMode\");\n }\n };\n EditSession.prototype.getUseWrapMode = function () {\n return this.$useWrapMode;\n };\n EditSession.prototype.setWrapLimitRange = function (min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = { min: min, max: max };\n this.$modified = true;\n this.$bidiHandler.markAsDirty();\n if (this.$useWrapMode)\n this._signal(\"changeWrapMode\");\n }\n };\n EditSession.prototype.adjustWrapLimit = function (desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0)\n limits = { min: $printMargin, max: $printMargin };\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n this._signal(\"changeWrapLimit\");\n }\n return true;\n }\n return false;\n };\n EditSession.prototype.$constrainWrapLimit = function (wrapLimit, min, max) {\n if (min)\n wrapLimit = Math.max(min, wrapLimit);\n if (max)\n wrapLimit = Math.min(max, wrapLimit);\n return wrapLimit;\n };\n EditSession.prototype.getWrapLimit = function () {\n return this.$wrapLimit;\n };\n EditSession.prototype.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n EditSession.prototype.getWrapLimitRange = function () {\n return {\n min: this.$wrapLimitRange.min,\n max: this.$wrapLimitRange.max\n };\n };\n EditSession.prototype.$updateInternalDataOnChange = function (delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n this.$updating = true;\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n var foldLineBefore = this.getFoldLine(firstRow);\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n lastRow = firstRow;\n }\n else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache;\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n }\n else \n if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n }\n else {\n len = Math.abs(delta.start.column - delta.end.column);\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n len = -len;\n }\n var foldLine = this.getFoldLine(firstRow);\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n this.$updating = false;\n if (useWrapMode)\n this.$updateWrapData(firstRow, lastRow);\n else\n this.$updateRowLengthCache(firstRow, lastRow);\n return removedFolds;\n };\n EditSession.prototype.$updateRowLengthCache = function (firstRow, lastRow) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n EditSession.prototype.$updateWrapData = function (firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row++;\n }\n else {\n tokens = [];\n foldLine.walk(function (placeholder, row, column, lastColumn) {\n var walkTokens;\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n }\n else {\n walkTokens = this.$getDisplayTokens(lines[row].substring(lastColumn, column), tokens.length);\n }\n tokens = tokens.concat(walkTokens);\n }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1);\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n EditSession.prototype.$computeWrapSplits = function (tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0, lastDocSplit = 0;\n var isCode = this.$wrapAsCode;\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)\n || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0)\n return indentation;\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE)\n indentation += 1;\n else if (token == TAB)\n indentation += tabSize;\n else if (token == TAB_SPACE)\n continue;\n else\n break;\n }\n }\n if (isCode && indentedSoftWrap !== false)\n indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n function addSplit(screenPos) {\n var len = screenPos - lastSplit;\n for (var i = lastSplit; i < screenPos; i++) {\n var ch = tokens[i];\n if (ch === 12 || ch === 2)\n len -= 1;\n }\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n var indent = 0;\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n split = lastSplit + wrapLimit;\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n addSplit(split);\n continue;\n }\n var minSplit = Math.max(split - (wrapLimit - (wrapLimit >> 2)), lastSplit - 1);\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split--;\n }\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split--;\n }\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split--;\n }\n }\n else {\n while (split > minSplit && tokens[split] < SPACE) {\n split--;\n }\n }\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT)\n split--;\n addSplit(split - indent);\n }\n return splits;\n };\n EditSession.prototype.$getDisplayTokens = function (str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n }\n else if (c == 32) {\n arr.push(SPACE);\n }\n else if ((c > 39 && c < 48) || (c > 57 && c < 64)) {\n arr.push(PUNCTUATION);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n }\n else {\n arr.push(CHAR);\n }\n }\n return arr;\n };\n EditSession.prototype.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0)\n return [0, 0];\n if (maxScreenColumn == null)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n }\n else {\n screenColumn += 1;\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n return [screenColumn, column];\n };\n EditSession.prototype.getRowLength = function (row) {\n var h = 1;\n if (this.lineWidgets)\n h += this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n if (!this.$useWrapMode || !this.$wrapData[row])\n return h;\n else\n return this.$wrapData[row].length + h;\n };\n EditSession.prototype.getRowLineCount = function (row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n }\n else {\n return this.$wrapData[row].length + 1;\n }\n };\n EditSession.prototype.getRowWrapIndent = function (screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n }\n else {\n return 0;\n }\n };\n EditSession.prototype.getScreenLastRowColumn = function (screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n EditSession.prototype.getDocumentLastRowColumn = function (docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n EditSession.prototype.getDocumentLastRowColumnPosition = function (docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n EditSession.prototype.getRowSplitData = function (row) {\n if (!this.$useWrapMode) {\n return undefined;\n }\n else {\n return this.$wrapData[row];\n }\n };\n EditSession.prototype.getScreenTabSize = function (screenColumn) {\n return this.$tabSize - (screenColumn % this.$tabSize | 0);\n };\n EditSession.prototype.screenToDocumentRow = function (screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n EditSession.prototype.screenToDocumentColumn = function (screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n EditSession.prototype.screenToDocumentPosition = function (screenRow, screenColumn, offsetX) {\n if (screenRow < 0)\n return { row: 0, column: 0 };\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n }\n else {\n var doCache = !l;\n }\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n }\n else {\n row += rowLength;\n docRow++;\n if (docRow > foldStart) {\n docRow = foldLine.end.row + 1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n }\n else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n }\n else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n var wrapIndent = 0, splitIndex = Math.floor(screenRow - row);\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n if (splits) {\n column = splits[splitIndex];\n if (splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))\n screenColumn = this.$bidiHandler.offsetToCol(offsetX);\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column)\n docColumn = column - 1;\n if (foldLine)\n return foldLine.idxToPosition(docColumn);\n return { row: docRow, column: docColumn };\n };\n EditSession.prototype.documentToScreenPosition = function (docRow, docColumn) {\n if (typeof docColumn === \"undefined\")\n var pos = this.$clipPositionToDocument(/**@type{Point}*/ (docRow).row, /**@type{Point}*/ (docRow).column);\n else\n pos = this.$clipPositionToDocument(/**@type{number}*/ (docRow), docColumn);\n docRow = pos.row;\n docColumn = pos.column;\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n var rowEnd, row = 0;\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n }\n else {\n var doCache = !l;\n }\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow)\n break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n else {\n rowEnd = row + 1;\n }\n screenRow += this.getRowLength(row);\n row = rowEnd;\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n var textLine = \"\";\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n }\n else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n if (wrapRow) {\n var screenRowOffset = 0;\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow++;\n screenRowOffset++;\n }\n textLine = textLine.substring(wrapRow[screenRowOffset - 1] || 0, textLine.length);\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n if (this.lineWidgets && this.lineWidgets[row] && this.lineWidgets[row].rowsAbove)\n screenRow += this.lineWidgets[row].rowsAbove;\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n EditSession.prototype.documentToScreenColumn = function (row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n EditSession.prototype.documentToScreenRow = function (docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n EditSession.prototype.getScreenLength = function () {\n var screenRows = 0;\n var fold = null;\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n }\n else {\n var lastRow = this.$wrapData.length;\n var row = 0, i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row : Infinity;\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row++;\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = this.$foldData[i++];\n foldStart = fold ? fold.start.row : Infinity;\n }\n }\n }\n if (this.lineWidgets)\n screenRows += this.$getWidgetScreenLength();\n return screenRows;\n };\n EditSession.prototype.$setFontMetrics = function (fm) {\n if (!this.$enableVarChar)\n return;\n this.$getStringScreenWidth = function (str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0)\n return [0, 0];\n if (!maxScreenColumn)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else {\n screenColumn += fm.getCharacterWidth(c);\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n return [screenColumn, column];\n };\n };\n EditSession.prototype.destroy = function () {\n if (!this.destroyed) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer.cleanup();\n this.destroyed = true;\n }\n this.$stopWorker();\n this.removeAllListeners();\n if (this.doc) {\n this.doc.off(\"change\", this.$onChange);\n }\n this.selection.detach();\n };\n return EditSession;\n}());\nEditSession.$uid = 0;\nEditSession.prototype.$modes = config.$modes;\nEditSession.prototype.getValue = EditSession.prototype.toString;\nEditSession.prototype.$defaultUndoManager = {\n undo: function () { },\n redo: function () { },\n hasUndo: function () { },\n hasRedo: function () { },\n reset: function () { },\n add: function () { },\n addSelection: function () { },\n startNewGroup: function () { },\n addSession: function () { }\n};\nEditSession.prototype.$overwrite = false;\nEditSession.prototype.$mode = null;\nEditSession.prototype.$modeId = null;\nEditSession.prototype.$scrollTop = 0;\nEditSession.prototype.$scrollLeft = 0;\nEditSession.prototype.$wrapLimit = 80;\nEditSession.prototype.$useWrapMode = false;\nEditSession.prototype.$wrapLimitRange = {\n min: null,\n max: null\n};\nEditSession.prototype.lineWidgets = null;\nEditSession.prototype.isFullWidth = isFullWidth;\noop.implement(EditSession.prototype, EventEmitter);\nvar CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12;\nfunction isFullWidth(c) {\n if (c < 0x1100)\n return false;\n return c >= 0x1100 && c <= 0x115F ||\n c >= 0x11A3 && c <= 0x11A7 ||\n c >= 0x11FA && c <= 0x11FF ||\n c >= 0x2329 && c <= 0x232A ||\n c >= 0x2E80 && c <= 0x2E99 ||\n c >= 0x2E9B && c <= 0x2EF3 ||\n c >= 0x2F00 && c <= 0x2FD5 ||\n c >= 0x2FF0 && c <= 0x2FFB ||\n c >= 0x3000 && c <= 0x303E ||\n c >= 0x3041 && c <= 0x3096 ||\n c >= 0x3099 && c <= 0x30FF ||\n c >= 0x3105 && c <= 0x312D ||\n c >= 0x3131 && c <= 0x318E ||\n c >= 0x3190 && c <= 0x31BA ||\n c >= 0x31C0 && c <= 0x31E3 ||\n c >= 0x31F0 && c <= 0x321E ||\n c >= 0x3220 && c <= 0x3247 ||\n c >= 0x3250 && c <= 0x32FE ||\n c >= 0x3300 && c <= 0x4DBF ||\n c >= 0x4E00 && c <= 0xA48C ||\n c >= 0xA490 && c <= 0xA4C6 ||\n c >= 0xA960 && c <= 0xA97C ||\n c >= 0xAC00 && c <= 0xD7A3 ||\n c >= 0xD7B0 && c <= 0xD7C6 ||\n c >= 0xD7CB && c <= 0xD7FB ||\n c >= 0xF900 && c <= 0xFAFF ||\n c >= 0xFE10 && c <= 0xFE19 ||\n c >= 0xFE30 && c <= 0xFE52 ||\n c >= 0xFE54 && c <= 0xFE66 ||\n c >= 0xFE68 && c <= 0xFE6B ||\n c >= 0xFF01 && c <= 0xFF60 ||\n c >= 0xFFE0 && c <= 0xFFE6;\n}\nrequire(\"./edit_session/folding\").Folding.call(EditSession.prototype);\nrequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\nconfig.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function (value) {\n if (!value || value == \"off\")\n value = false;\n else if (value == \"free\")\n value = true;\n else if (value == \"printMargin\")\n value = -1;\n else if (typeof value == \"string\")\n value = parseInt(value, 10) || false;\n if (this.$wrap == value)\n return;\n this.$wrap = value;\n if (!value) {\n this.setUseWrapMode(false);\n }\n else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function () {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1)\n return \"printMargin\";\n if (!this.getWrapLimitRange().min)\n return \"free\";\n return this.$wrap;\n }\n return \"off\";\n },\n handlesSet: true\n },\n wrapMethod: {\n set: function (val) {\n val = val == \"auto\"\n ? this.$mode.type != \"text\"\n : val != \"text\";\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n if (this.$useWrapMode) {\n this.$useWrapMode = false;\n this.setUseWrapMode(true);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: {\n set: function () {\n if (this.$useWrapMode) {\n this.$useWrapMode = false;\n this.setUseWrapMode(true);\n }\n },\n initialValue: true\n },\n firstLineNumber: {\n set: function () { this._signal(\"changeBreakpoint\"); },\n initialValue: 1\n },\n useWorker: {\n set: function (useWorker) {\n this.$useWorker = useWorker;\n this.$stopWorker();\n if (useWorker)\n this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: { initialValue: true },\n tabSize: {\n set: function (tabSize) {\n tabSize = parseInt(tabSize);\n if (tabSize > 0 && this.$tabSize !== tabSize) {\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n this._signal(\"changeTabSize\");\n }\n },\n initialValue: 4,\n handlesSet: true\n },\n navigateWithinSoftTabs: { initialValue: false },\n foldStyle: {\n set: function (val) { this.setFoldStyle(val); },\n handlesSet: true\n },\n overwrite: {\n set: function (val) { this._signal(\"changeOverwrite\"); },\n initialValue: false\n },\n newLineMode: {\n set: function (val) { this.doc.setNewLineMode(val); },\n get: function () { return this.doc.getNewLineMode(); },\n handlesSet: true\n },\n mode: {\n set: function (val) { this.setMode(val); },\n get: function () { return this.$modeId; },\n handlesSet: true\n }\n});\nexports.EditSession = EditSession;\n\n});\n\nace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar lang = require(\"./lib/lang\");\nvar oop = require(\"./lib/oop\");\nvar Range = require(\"./range\").Range;\nvar Search = /** @class */ (function () {\n function Search() {\n this.$options = {};\n }\n Search.prototype.set = function (options) {\n oop.mixin(this.$options, options);\n return this;\n };\n Search.prototype.getOptions = function () {\n return lang.copyObject(this.$options);\n };\n Search.prototype.setOptions = function (options) {\n this.$options = options;\n };\n Search.prototype.find = function (session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator)\n return false;\n var firstRange = null;\n iterator.forEach(function (sr, sc, er, ec) {\n firstRange = new Range(sr, sc, er, ec);\n if (sc == ec && options.start && /**@type{Range}*/ (options.start).start\n && options.skipCurrent != false && firstRange.isEqual(/**@type{Range}*/ (options.start))) {\n firstRange = null;\n return false;\n }\n return true;\n });\n return firstRange;\n };\n Search.prototype.findAll = function (session) {\n var options = this.$options;\n if (!options.needle)\n return [];\n this.$assembleRegExp(options);\n var range = options.range;\n var lines = range\n ? session.getLines(range.start.row, range.end.row)\n : session.doc.getAllLines();\n var ranges = [];\n var re = options.re;\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++)\n if (lines[row + j].search(re[j]) == -1)\n continue outer;\n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n if (prevRange && prevRange.end.row === row &&\n prevRange.end.column > startIndex) {\n continue;\n }\n ranges.push(prevRange = new Range(row, startIndex, row + len - 1, endIndex));\n if (len > 2)\n row = row + len - 2;\n }\n }\n else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.end.column;\n var i = 0, j = ranges.length - 1;\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == 0)\n i++;\n var endRow = range.end.row - range.start.row;\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == endRow)\n j--;\n ranges = ranges.slice(i, j + 1);\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n return ranges;\n };\n Search.prototype.replace = function (input, replacement) {\n var options = this.$options;\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine)\n return replacement;\n if (!re)\n return;\n var match = re.exec(input);\n if (!match || match[0].length != input.length)\n return null;\n if (!options.regExp) {\n replacement = replacement.replace(/\\$/g, \"$$$$\");\n }\n replacement = input.replace(re, replacement);\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n for (var i = Math.min(input.length, input.length); i--;) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch)\n replacement[i] = replacement[i].toUpperCase();\n else\n replacement[i] = replacement[i].toLowerCase();\n }\n replacement = replacement.join(\"\");\n }\n return replacement;\n };\n Search.prototype.$assembleRegExp = function (options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp)\n return options.re = options.needle;\n var needle = options.needle;\n if (!options.needle)\n return options.re = false;\n if (!options.regExp)\n needle = lang.escapeRegExp(needle);\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n try {\n new RegExp(needle, \"u\");\n options.$supportsUnicodeFlag = true;\n modifier += \"u\";\n }\n catch (e) {\n options.$supportsUnicodeFlag = false; //left for backward compatibility with previous versions for cases like /ab\\{2}/gu\n }\n if (options.wholeWord)\n needle = addWordBoundary(needle, options);\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine)\n return options.re = this.$assembleMultilineRegExp(needle, modifier);\n try {\n var re = new RegExp(needle, modifier);\n }\n catch (e) {\n re = false;\n }\n return options.re = re;\n };\n Search.prototype.$assembleMultilineRegExp = function (needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n for (var i = 0; i < parts.length; i++)\n try {\n re.push(new RegExp(parts[i], modifier));\n }\n catch (e) {\n return false;\n }\n return re;\n };\n Search.prototype.$matchIterator = function (session, options) {\n var re = this.$assembleRegExp(options);\n if (!re)\n return false;\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n var supportsUnicodeFlag = re.unicode;\n var range = options.range;\n var start = options.start;\n if (!start)\n start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n if (start.start)\n start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n if (backwards) {\n var forEach = function (callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row--; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n };\n }\n else {\n var forEach = function (callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row = row + 1; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n };\n }\n if (options.$isMultiLine) {\n var len = re.length;\n var forEachInLine = function (row, offset, callback) {\n var startRow = backwards ? row - len + 1 : row;\n if (startRow < 0 || startRow + len > session.getLength())\n return;\n var line = session.getLine(startRow);\n var startIndex = line.search(re[0]);\n if (!backwards && startIndex < offset || startIndex === -1)\n return;\n for (var i = 1; i < len; i++) {\n line = session.getLine(startRow + i);\n if (line.search(re[i]) == -1)\n return;\n }\n var endIndex = line.match(re[len - 1])[0].length;\n if (backwards && endIndex > offset)\n return;\n if (callback(startRow, startIndex, startRow + len - 1, endIndex))\n return true;\n };\n }\n else if (backwards) {\n var forEachInLine = function (row, endIndex, callback) {\n var line = session.getLine(row);\n var matches = [];\n var m, last = 0;\n re.lastIndex = 0;\n while ((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (!length) {\n if (last >= line.length)\n break;\n re.lastIndex = last += lang.skipEmptyMatch(line, last, supportsUnicodeFlag);\n }\n if (m.index + length > endIndex)\n break;\n matches.push(m.index, length);\n }\n for (var i = matches.length - 1; i >= 0; i -= 2) {\n var column = matches[i - 1];\n var length = matches[i];\n if (callback(row, column, row, column + length))\n return true;\n }\n };\n }\n else {\n var forEachInLine = function (row, startIndex, callback) {\n var line = session.getLine(row);\n var last;\n var m;\n re.lastIndex = startIndex;\n while ((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (callback(row, last, row, last + length))\n return true;\n if (!length) {\n re.lastIndex = last += lang.skipEmptyMatch(line, last, supportsUnicodeFlag);\n if (last >= line.length)\n return false;\n }\n }\n };\n }\n return { forEach: forEach };\n };\n return Search;\n}());\nfunction addWordBoundary(needle, options) {\n var supportsLookbehind = lang.supportsLookbehind();\n function wordBoundary(c, firstChar) {\n if (firstChar === void 0) { firstChar = true; }\n var wordRegExp = supportsLookbehind && options.$supportsUnicodeFlag ? new RegExp(\"[\\\\p{L}\\\\p{N}_]\", \"u\") : new RegExp(\"\\\\w\");\n if (wordRegExp.test(c) || options.regExp) {\n if (supportsLookbehind && options.$supportsUnicodeFlag) {\n if (firstChar)\n return \"(?<=^|[^\\\\p{L}\\\\p{N}_])\";\n return \"(?=[^\\\\p{L}\\\\p{N}_]|$)\";\n }\n return \"\\\\b\";\n }\n return \"\";\n }\n var needleArray = Array.from(needle);\n var firstChar = needleArray[0];\n var lastChar = needleArray[needleArray.length - 1];\n return wordBoundary(firstChar) + needle + wordBoundary(lastChar, false);\n}\nexports.Search = Search;\n\n});\n\nace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})(); var keyUtil = require(\"../lib/keys\");\nvar useragent = require(\"../lib/useragent\");\nvar KEY_MODS = keyUtil.KEY_MODS;\nvar MultiHashHandler = /** @class */ (function () {\n function MultiHashHandler(config, platform) {\n this.$init(config, platform, false);\n }\n MultiHashHandler.prototype.$init = function (config, platform, $singleCommand) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = $singleCommand;\n };\n MultiHashHandler.prototype.addCommand = function (command) {\n if (this.commands[command.name])\n this.removeCommand(command);\n this.commands[command.name] = command;\n if (command.bindKey)\n this._buildKeyHash(command);\n };\n MultiHashHandler.prototype.removeCommand = function (command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand)\n delete this.commands[name];\n var ckb = this.commandKeyBinding;\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n if (cmdGroup == command) {\n delete ckb[keyId];\n }\n else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1)\n ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n MultiHashHandler.prototype.bindKey = function (key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined)\n position = key.position;\n key = key[this.platform];\n }\n if (!key)\n return;\n if (typeof command == \"function\")\n return this.addCommand({ exec: command, bindKey: key, name: command.name || /**@type{string}*/ (key) }); (key).split(\"|\").forEach(function (keyPart) {\n var chain = \"\";\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function (keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n MultiHashHandler.prototype._addCommandToBinding = function (keyId, command, position) {\n var ckb = this.commandKeyBinding, i;\n if (!command) {\n delete ckb[keyId];\n }\n else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n }\n else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n }\n else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n if (typeof position != \"number\") {\n position = getPosition(command);\n }\n var commands = ckb[keyId];\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position)\n break;\n }\n commands.splice(i, 0, command);\n }\n };\n MultiHashHandler.prototype.addCommands = function (commands) {\n commands && Object.keys(commands).forEach(function (name) {\n var command = commands[name];\n if (!command)\n return;\n if (typeof command === \"string\")\n return this.bindKey(command, name);\n if (typeof command === \"function\")\n command = { exec: command };\n if (typeof command !== \"object\")\n return;\n if (!command.name)\n command.name = name;\n this.addCommand(command);\n }, this);\n };\n MultiHashHandler.prototype.removeCommands = function (commands) {\n Object.keys(commands).forEach(function (name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n MultiHashHandler.prototype.bindKeys = function (keyList) {\n Object.keys(keyList).forEach(function (key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n MultiHashHandler.prototype._buildKeyHash = function (command) {\n this.bindKey(command.bindKey, command);\n };\n MultiHashHandler.prototype.parseKeys = function (keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function (x) { return x; });\n var key = parts.pop();\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode])\n key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();\n else if (!parts.length)\n return { key: key, hashId: -1 };\n else if (parts.length == 1 && parts[0] == \"shift\")\n return { key: key.toUpperCase(), hashId: -1 };\n var hashId = 0;\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n if (modifier == null) {\n if (typeof console != \"undefined\")\n console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n hashId |= modifier;\n }\n return { key: key, hashId: hashId };\n };\n MultiHashHandler.prototype.findKeyCommand = function (hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n MultiHashHandler.prototype.handleKeyboard = function (data, hashId, keyString, keyCode) {\n if (keyCode < 0)\n return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return { command: \"null\" };\n }\n }\n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1)\n data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0)\n data.$keyChain = \"\"; // reset keyChain\n }\n return { command: command };\n };\n MultiHashHandler.prototype.getStatusText = function (editor, data) {\n return data.$keyChain || \"\";\n };\n return MultiHashHandler;\n}());\nfunction getPosition(command) {\n return typeof command == \"object\" && command.bindKey\n && command.bindKey.position\n || (command.isDefault ? -100 : 0);\n}\nvar HashHandler = /** @class */ (function (_super) {\n __extends(HashHandler, _super);\n function HashHandler(config, platform) {\n var _this = _super.call(this, config, platform) || this;\n _this.$singleCommand = true;\n return _this;\n }\n return HashHandler;\n}(MultiHashHandler));\nHashHandler.call = function (thisArg, config, platform) {\n MultiHashHandler.prototype.$init.call(thisArg, config, platform, true);\n};\nMultiHashHandler.call = function (thisArg, config, platform) {\n MultiHashHandler.prototype.$init.call(thisArg, config, platform, false);\n};\nexports.HashHandler = HashHandler;\nexports.MultiHashHandler = MultiHashHandler;\n\n});\n\nace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar oop = require(\"../lib/oop\");\nvar MultiHashHandler = require(\"../keyboard/hash_handler\").MultiHashHandler;\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar CommandManager = /** @class */ (function (_super) {\n __extends(CommandManager, _super);\n function CommandManager(platform, commands) {\n var _this = _super.call(this, commands, platform) || this;\n _this.byName = _this.commands;\n _this.setDefaultHandler(\"exec\", function (e) {\n if (!e.args) {\n return e.command.exec(e.editor, {}, e.event, true);\n }\n return e.command.exec(e.editor, e.args, e.event, false);\n });\n return _this;\n }\n CommandManager.prototype.exec = function (command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--;) {\n if (this.exec(command[i], editor, args))\n return true;\n }\n return false;\n }\n if (typeof command === \"string\")\n command = this.commands[command];\n if (!command)\n return false;\n if (editor && editor.$readOnly && !command.readOnly)\n return false;\n if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor))\n return false;\n var e = { editor: editor, command: command, args: args };\n e.returnValue = this._emit(\"exec\", e);\n this._signal(\"afterExec\", e);\n return e.returnValue === false ? false : true;\n };\n CommandManager.prototype.toggleRecording = function (editor) {\n if (this.$inReplay)\n return;\n editor && editor._emit(\"changeStatus\");\n if (this.recording) {\n this.macro.pop();\n this.off(\"exec\", this.$addCommandToMacro);\n if (!this.macro.length)\n this.macro = this.oldMacro;\n return this.recording = false;\n }\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function (e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n CommandManager.prototype.replay = function (editor) {\n if (this.$inReplay || !this.macro)\n return;\n if (this.recording)\n return this.toggleRecording(editor);\n try {\n this.$inReplay = true;\n this.macro.forEach(function (x) {\n if (typeof x == \"string\")\n this.exec(x, editor);\n else\n this.exec(x[0], editor, x[1]);\n }, this);\n }\n finally {\n this.$inReplay = false;\n }\n };\n CommandManager.prototype.trimMacro = function (m) {\n return m.map(function (x) {\n if (typeof x[0] != \"string\")\n x[0] = x[0].name;\n if (!x[1])\n x = x[0];\n return x;\n });\n };\n return CommandManager;\n}(MultiHashHandler));\noop.implement(CommandManager.prototype, EventEmitter);\nexports.CommandManager = CommandManager;\n\n});\n\nace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar lang = require(\"../lib/lang\");\nvar config = require(\"../config\");\nvar Range = require(\"../range\").Range;\nfunction bindKey(win, mac) {\n return { win: win, mac: mac };\n}\nexports.commands = [{\n name: \"showSettingsMenu\",\n description: \"Show settings menu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/settings_menu\", function (module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n }, {\n name: \"goToNextError\",\n description: \"Go to next error\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/error_marker\", function (module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"goToPreviousError\",\n description: \"Go to previous error\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/error_marker\", function (module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"selectall\",\n description: \"Select all\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function (editor) { editor.selectAll(); },\n readOnly: true\n }, {\n name: \"centerselection\",\n description: \"Center selection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function (editor) { editor.centerSelection(); },\n readOnly: true\n }, {\n name: \"gotoline\",\n description: \"Go to line...\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function (editor, line) {\n if (typeof line === \"number\" && !isNaN(line))\n editor.gotoLine(line);\n editor.prompt({ $type: \"gotoLine\" });\n },\n readOnly: true\n }, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function (editor) { editor.session.toggleFold(false); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function (editor) { editor.session.toggleFold(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"toggleFoldWidget\",\n description: \"Toggle fold widget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function (editor) { editor.session.toggleFoldWidget(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"toggleParentFoldWidget\",\n description: \"Toggle parent fold widget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function (editor) { editor.session.toggleFoldWidget(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldall\",\n description: \"Fold all\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function (editor) { editor.session.foldAll(); },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldAllComments\",\n description: \"Fold all comments\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function (editor) { editor.session.foldAllComments(); },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"foldOther\",\n description: \"Fold other\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function (editor) {\n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"unfoldall\",\n description: \"Unfold all\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function (editor) { editor.session.unfold(); },\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"findnext\",\n description: \"Find next\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function (editor) { editor.findNext(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"findprevious\",\n description: \"Find previous\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function (editor) { editor.findPrevious(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n }, {\n name: \"selectOrFindNext\",\n description: \"Select or find next\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function (editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findNext();\n },\n readOnly: true\n }, {\n name: \"selectOrFindPrevious\",\n description: \"Select or find previous\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function (editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findPrevious();\n },\n readOnly: true\n }, {\n name: \"find\",\n description: \"Find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/searchbox\", function (e) { e.Search(editor); });\n },\n readOnly: true\n }, {\n name: \"overwrite\",\n description: \"Overwrite\",\n bindKey: \"Insert\",\n exec: function (editor) { editor.toggleOverwrite(); },\n readOnly: true\n }, {\n name: \"selecttostart\",\n description: \"Select to start\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function (editor) { editor.getSelection().selectFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"gotostart\",\n description: \"Go to start\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function (editor) { editor.navigateFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"selectup\",\n description: \"Select up\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function (editor) { editor.getSelection().selectUp(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"golineup\",\n description: \"Go line up\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function (editor, args) { editor.navigateUp(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttoend\",\n description: \"Select to end\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function (editor) { editor.getSelection().selectFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"gotoend\",\n description: \"Go to end\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function (editor) { editor.navigateFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n }, {\n name: \"selectdown\",\n description: \"Select down\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function (editor) { editor.getSelection().selectDown(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"golinedown\",\n description: \"Go line down\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function (editor, args) { editor.navigateDown(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectwordleft\",\n description: \"Select word left\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function (editor) { editor.getSelection().selectWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotowordleft\",\n description: \"Go to word left\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function (editor) { editor.navigateWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttolinestart\",\n description: \"Select to line start\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function (editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotolinestart\",\n description: \"Go to line start\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function (editor) { editor.navigateLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectleft\",\n description: \"Select left\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function (editor) { editor.getSelection().selectLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotoleft\",\n description: \"Go to left\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function (editor, args) { editor.navigateLeft(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectwordright\",\n description: \"Select word right\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function (editor) { editor.getSelection().selectWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotowordright\",\n description: \"Go to word right\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function (editor) { editor.navigateWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selecttolineend\",\n description: \"Select to line end\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function (editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotolineend\",\n description: \"Go to line end\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function (editor) { editor.navigateLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectright\",\n description: \"Select right\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function (editor) { editor.getSelection().selectRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"gotoright\",\n description: \"Go to right\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function (editor, args) { editor.navigateRight(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectpagedown\",\n description: \"Select page down\",\n bindKey: \"Shift-PageDown\",\n exec: function (editor) { editor.selectPageDown(); },\n readOnly: true\n }, {\n name: \"pagedown\",\n description: \"Page down\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function (editor) { editor.scrollPageDown(); },\n readOnly: true\n }, {\n name: \"gotopagedown\",\n description: \"Go to page down\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function (editor) { editor.gotoPageDown(); },\n readOnly: true\n }, {\n name: \"selectpageup\",\n description: \"Select page up\",\n bindKey: \"Shift-PageUp\",\n exec: function (editor) { editor.selectPageUp(); },\n readOnly: true\n }, {\n name: \"pageup\",\n description: \"Page up\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function (editor) { editor.scrollPageUp(); },\n readOnly: true\n }, {\n name: \"gotopageup\",\n description: \"Go to page up\",\n bindKey: \"PageUp\",\n exec: function (editor) { editor.gotoPageUp(); },\n readOnly: true\n }, {\n name: \"scrollup\",\n description: \"Scroll up\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function (e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n }, {\n name: \"scrolldown\",\n description: \"Scroll down\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function (e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n }, {\n name: \"selectlinestart\",\n description: \"Select line start\",\n bindKey: \"Shift-Home\",\n exec: function (editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectlineend\",\n description: \"Select line end\",\n bindKey: \"Shift-End\",\n exec: function (editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"togglerecording\",\n description: \"Toggle recording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function (editor) { editor.commands.toggleRecording(editor); },\n readOnly: true\n }, {\n name: \"replaymacro\",\n description: \"Replay macro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function (editor) { editor.commands.replay(editor); },\n readOnly: true\n }, {\n name: \"jumptomatching\",\n description: \"Jump to matching\",\n bindKey: bindKey(\"Ctrl-\\\\|Ctrl-P\", \"Command-\\\\\"),\n exec: function (editor) { editor.jumpToMatching(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"selecttomatching\",\n description: \"Select to matching\",\n bindKey: bindKey(\"Ctrl-Shift-\\\\|Ctrl-Shift-P\", \"Command-Shift-\\\\\"),\n exec: function (editor) { editor.jumpToMatching(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"expandToMatching\",\n description: \"Expand to matching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function (editor) { editor.jumpToMatching(true, true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n }, {\n name: \"passKeysToBrowser\",\n description: \"Pass keys to browser\",\n bindKey: bindKey(null, null),\n exec: function () { },\n passEvent: true,\n readOnly: true\n }, {\n name: \"copy\",\n description: \"Copy\",\n exec: function (editor) {\n },\n readOnly: true\n },\n {\n name: \"cut\",\n description: \"Cut\",\n exec: function (editor) {\n var cutLine = editor.$copyWithEmptySelection && editor.selection.isEmpty();\n var range = cutLine ? editor.selection.getLineRange() : editor.selection.getRange();\n editor._emit(\"cut\", range);\n if (!range.isEmpty())\n editor.session.remove(range);\n editor.clearSelection();\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"paste\",\n description: \"Paste\",\n exec: function (editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n }, {\n name: \"removeline\",\n description: \"Remove line\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function (editor) { editor.removeLines(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n }, {\n name: \"duplicateSelection\",\n description: \"Duplicate selection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function (editor) { editor.duplicateSelection(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"sortlines\",\n description: \"Sort lines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function (editor) { editor.sortLines(); },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n }, {\n name: \"togglecomment\",\n description: \"Toggle comment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function (editor) { editor.toggleCommentLines(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"toggleBlockComment\",\n description: \"Toggle block comment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function (editor) { editor.toggleBlockComment(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"modifyNumberUp\",\n description: \"Modify number up\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function (editor) { editor.modifyNumber(1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"modifyNumberDown\",\n description: \"Modify number down\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function (editor) { editor.modifyNumber(-1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n }, {\n name: \"replace\",\n description: \"Replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function (editor) {\n config.loadModule(\"ace/ext/searchbox\", function (e) { e.Search(editor, true); });\n }\n }, {\n name: \"undo\",\n description: \"Undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function (editor) { editor.undo(); }\n }, {\n name: \"redo\",\n description: \"Redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function (editor) { editor.redo(); }\n }, {\n name: \"copylinesup\",\n description: \"Copy lines up\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function (editor) { editor.copyLinesUp(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"movelinesup\",\n description: \"Move lines up\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function (editor) { editor.moveLinesUp(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"copylinesdown\",\n description: \"Copy lines down\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function (editor) { editor.copyLinesDown(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"movelinesdown\",\n description: \"Move lines down\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function (editor) { editor.moveLinesDown(); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"del\",\n description: \"Delete\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function (editor) { editor.remove(\"right\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"backspace\",\n description: \"Backspace\",\n bindKey: bindKey(\"Shift-Backspace|Backspace\", \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"),\n exec: function (editor) { editor.remove(\"left\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"cut_or_delete\",\n description: \"Cut or delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function (editor) {\n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n }\n else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolinestart\",\n description: \"Remove to line start\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function (editor) { editor.removeToLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolineend\",\n description: \"Remove to line end\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K|Command-Delete\"),\n exec: function (editor) { editor.removeToLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolinestarthard\",\n description: \"Remove to line start hard\",\n bindKey: bindKey(\"Ctrl-Shift-Backspace\", null),\n exec: function (editor) {\n var range = editor.selection.getRange();\n range.start.column = 0;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removetolineendhard\",\n description: \"Remove to line end hard\",\n bindKey: bindKey(\"Ctrl-Shift-Delete\", null),\n exec: function (editor) {\n var range = editor.selection.getRange();\n range.end.column = Number.MAX_VALUE;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removewordleft\",\n description: \"Remove word left\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function (editor) { editor.removeWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"removewordright\",\n description: \"Remove word right\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function (editor) { editor.removeWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"outdent\",\n description: \"Outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function (editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"indent\",\n description: \"Indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function (editor) { editor.indent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"blockoutdent\",\n description: \"Block outdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function (editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"blockindent\",\n description: \"Block indent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function (editor) { editor.blockIndent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n }, {\n name: \"insertstring\",\n description: \"Insert string\",\n exec: function (editor, str) { editor.insert(str); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"inserttext\",\n description: \"Insert text\",\n exec: function (editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"splitline\",\n description: \"Split line\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function (editor) { editor.splitLine(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"transposeletters\",\n description: \"Transpose letters\",\n bindKey: bindKey(\"Alt-Shift-X\", \"Ctrl-T\"),\n exec: function (editor) { editor.transposeLetters(); },\n multiSelectAction: function (editor) { editor.transposeSelections(1); },\n scrollIntoView: \"cursor\"\n }, {\n name: \"touppercase\",\n description: \"To uppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function (editor) { editor.toUpperCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"tolowercase\",\n description: \"To lowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function (editor) { editor.toLowerCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"autoindent\",\n description: \"Auto Indent\",\n bindKey: bindKey(null, null),\n exec: function (editor) { editor.autoIndent(); },\n scrollIntoView: \"animate\"\n }, {\n name: \"expandtoline\",\n description: \"Expand to line\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function (editor) {\n var range = editor.selection.getRange();\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"openlink\",\n bindKey: bindKey(\"Ctrl+F3\", \"F3\"),\n exec: function (editor) { editor.openLink(); }\n }, {\n name: \"joinlines\",\n description: \"Join lines\",\n bindKey: bindKey(null, null),\n exec: function (editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n insertLine += curLine;\n }\n if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n }\n else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n }, {\n name: \"invertSelection\",\n description: \"Invert selection\",\n bindKey: bindKey(null, null),\n exec: function (editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n for (var i = 0; i < ranges.length; i++) {\n if (i == (ranges.length - 1)) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n }\n else {\n newRanges.push(new Range(ranges[i - 1].end.row, ranges[i - 1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n editor.exitMultiSelectMode();\n editor.clearSelection();\n for (var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n }, {\n name: \"addLineAfter\",\n description: \"Add new line after the current line\",\n exec: function (editor) {\n editor.selection.clearSelection();\n editor.navigateLineEnd();\n editor.insert(\"\\n\");\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"addLineBefore\",\n description: \"Add new line before the current line\",\n exec: function (editor) {\n editor.selection.clearSelection();\n var cursor = editor.getCursorPosition();\n editor.selection.moveTo(cursor.row - 1, Number.MAX_VALUE);\n editor.insert(\"\\n\");\n if (cursor.row === 0)\n editor.navigateUp();\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n }, {\n name: \"openCommandPallete\",\n exec: function (editor) {\n console.warn(\"This is an obsolete command. Please use `openCommandPalette` instead.\");\n editor.prompt({ $type: \"commands\" });\n },\n readOnly: true\n }, {\n name: \"openCommandPalette\",\n description: \"Open command palette\",\n bindKey: bindKey(\"F1\", \"F1\"),\n exec: function (editor) {\n editor.prompt({ $type: \"commands\" });\n },\n readOnly: true\n }, {\n name: \"modeSelect\",\n description: \"Change language mode...\",\n bindKey: bindKey(null, null),\n exec: function (editor) {\n editor.prompt({ $type: \"modes\" });\n },\n readOnly: true\n }];\nfor (var i = 1; i < 9; i++) {\n exports.commands.push({\n name: \"foldToLevel\" + i,\n description: \"Fold To Level \" + i,\n level: i,\n exec: function (editor) { editor.session.foldToLevel(this.level); },\n scrollIntoView: \"center\",\n readOnly: true\n });\n}\n\n});\n\nace.define(\"ace/line_widgets\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"./lib/dom\");\nvar LineWidgets = /** @class */ (function () {\n function LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n }\n LineWidgets.prototype.getRowLength = function (row) {\n var h;\n if (this.lineWidgets)\n h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else\n h = 0;\n if (!this[\"$useWrapMode\"] || !this[\"$wrapData\"][row]) {\n return 1 + h;\n }\n else {\n return this[\"$wrapData\"][row].length + 1 + h;\n }\n };\n LineWidgets.prototype.$getWidgetScreenLength = function () {\n var screenRows = 0;\n this.lineWidgets.forEach(function (w) {\n if (w && w.rowCount && !w.hidden)\n screenRows += w.rowCount;\n });\n return screenRows;\n };\n LineWidgets.prototype.$onChangeEditor = function (e) {\n this.attach(e.editor);\n };\n LineWidgets.prototype.attach = function (editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this)\n editor.widgetManager.detach();\n if (this.editor == editor)\n return;\n this.detach();\n this.editor = editor;\n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n LineWidgets.prototype.detach = function (e) {\n var editor = this.editor;\n if (!editor)\n return;\n this.editor = null;\n editor.widgetManager = null;\n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function (w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n LineWidgets.prototype.updateOnFold = function (e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action)\n return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i])\n lineWidgets[i].hidden = hide;\n }\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start])\n lineWidgets[start] = lineWidgets[end];\n else\n lineWidgets[end].hidden = hide;\n }\n else {\n if (lineWidgets[start] == lineWidgets[end])\n lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n LineWidgets.prototype.updateOnChange = function (delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n if (len === 0) {\n }\n else if (delta.action == \"remove\") {\n var removed = lineWidgets.splice(startRow + 1, len);\n if (!lineWidgets[startRow] && removed[removed.length - 1]) {\n lineWidgets[startRow] = removed.pop();\n }\n removed.forEach(function (w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n }\n else {\n var args = new Array(len);\n if (lineWidgets[startRow] && lineWidgets[startRow].column != null) {\n if (delta.start.column > lineWidgets[startRow].column)\n startRow++;\n }\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n LineWidgets.prototype.$updateRows = function () {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var noWidgets = true;\n lineWidgets.forEach(function (w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets)\n this.session.lineWidgets = null;\n };\n LineWidgets.prototype.$registerLineWidget = function (w) {\n if (!this.session.lineWidgets)\n this.session.lineWidgets = new Array(this.session.getLength());\n var old = this.session.lineWidgets[w.row];\n if (old) {\n w.$oldWidget = old;\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n this.session.lineWidgets[w.row] = w;\n return w;\n };\n LineWidgets.prototype.addLineWidget = function (w) {\n this.$registerLineWidget(w);\n w.session = this.session;\n if (!this.editor)\n return w;\n var renderer = this.editor.renderer;\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n if (w.text && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.textContent = w.text;\n }\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n if (w.className) {\n dom.addCssClass(w.el, w.className);\n }\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = \"5\";\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n if (!w.coverGutter) {\n w.el.style.zIndex = \"3\";\n }\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n }\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row])\n lineWidgets[fold.start.row] = w;\n else\n w.hidden = true;\n }\n this.session._emit(\"changeFold\", { data: { start: { row: w.row } } });\n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n LineWidgets.prototype.removeLineWidget = function (w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode)\n w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy)\n try {\n w.editor.destroy();\n }\n catch (e) { }\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row];\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget)\n this.onWidgetChanged(w.$oldWidget);\n }\n else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n w1 = w1.$oldWidget;\n }\n }\n }\n this.session._emit(\"changeFold\", { data: { start: { row: w.row } } });\n this.$updateRows();\n };\n LineWidgets.prototype.getWidgetsAtRow = function (row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n return list;\n };\n LineWidgets.prototype.onWidgetChanged = function (w) {\n this.session._changedWidgets.push(w);\n this.editor && this.editor.renderer.updateFull();\n };\n LineWidgets.prototype.measureWidgets = function (e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n if (!changedWidgets || !changedWidgets.length)\n return;\n var min = Infinity;\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el)\n continue;\n if (w.session != this.session)\n continue;\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w)\n continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n w.h = w.el.offsetHeight;\n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n var rowCount = w.h / config.lineHeight;\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0)\n rowCount = 0;\n }\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min)\n min = w.row;\n }\n }\n if (min != Infinity) {\n this.session._emit(\"changeFold\", { data: { start: { row: min } } });\n this.session.lineWidgetWidth = null;\n }\n this.session._changedWidgets = [];\n };\n LineWidgets.prototype.renderWidgets = function (e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n while (first > 0 && !lineWidgets[first])\n first--;\n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n renderer.$cursorLayer.config = config;\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el)\n continue;\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n var top = renderer.$cursorLayer.getPixelPosition({ row: i, column: 0 }, true).top;\n if (!w.coverLine)\n top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth)\n left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n }\n else {\n w.el.style.right = \"\";\n }\n }\n };\n return LineWidgets;\n}());\nexports.LineWidgets = LineWidgets;\n\n});\n\nace.define(\"ace/keyboard/gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/mouse/default_gutter_handler\"], function(require, exports, module){\"use strict\";\nvar keys = require('../lib/keys');\nvar GutterTooltip = require(\"../mouse/default_gutter_handler\").GutterTooltip;\nvar GutterKeyboardHandler = /** @class */ (function () {\n function GutterKeyboardHandler(editor) {\n this.editor = editor;\n this.gutterLayer = editor.renderer.$gutterLayer;\n this.element = editor.renderer.$gutter;\n this.lines = editor.renderer.$gutterLayer.$lines;\n this.activeRowIndex = null;\n this.activeLane = null;\n this.annotationTooltip = new GutterTooltip(this.editor);\n }\n GutterKeyboardHandler.prototype.addListener = function () {\n this.element.addEventListener(\"keydown\", this.$onGutterKeyDown.bind(this));\n this.element.addEventListener(\"focusout\", this.$blurGutter.bind(this));\n this.editor.on(\"mousewheel\", this.$blurGutter.bind(this));\n };\n GutterKeyboardHandler.prototype.removeListener = function () {\n this.element.removeEventListener(\"keydown\", this.$onGutterKeyDown.bind(this));\n this.element.removeEventListener(\"focusout\", this.$blurGutter.bind(this));\n this.editor.off(\"mousewheel\", this.$blurGutter.bind(this));\n };\n GutterKeyboardHandler.prototype.$onGutterKeyDown = function (e) {\n if (this.annotationTooltip.isOpen) {\n e.preventDefault();\n if (e.keyCode === keys[\"escape\"])\n this.annotationTooltip.hideTooltip();\n return;\n }\n if (e.target === this.element) {\n if (e.keyCode != keys[\"enter\"]) {\n return;\n }\n e.preventDefault();\n var row = this.editor.getCursorPosition().row;\n if (!this.editor.isRowVisible(row))\n this.editor.scrollToLine(row, true, true);\n setTimeout(\n function () {\n var index = this.$rowToRowIndex(this.gutterLayer.$cursorCell.row);\n var nearestFoldIndex = this.$findNearestFoldWidget(index);\n var nearestAnnotationIndex = this.$findNearestAnnotation(index);\n if (nearestFoldIndex === null && nearestAnnotationIndex === null)\n return;\n if (nearestFoldIndex === null && nearestAnnotationIndex !== null) {\n this.activeRowIndex = nearestAnnotationIndex;\n this.activeLane = \"annotation\";\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n if (nearestFoldIndex !== null && nearestAnnotationIndex === null) {\n this.activeRowIndex = nearestFoldIndex;\n this.activeLane = \"fold\";\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n if (Math.abs(nearestAnnotationIndex - index) < Math.abs(nearestFoldIndex - index)) {\n this.activeRowIndex = nearestAnnotationIndex;\n this.activeLane = \"annotation\";\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n else {\n this.activeRowIndex = nearestFoldIndex;\n this.activeLane = \"fold\";\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n }.bind(this), 10);\n return;\n }\n this.$handleGutterKeyboardInteraction(e);\n setTimeout(function () {\n this.editor._signal(\"gutterkeydown\", new GutterKeyboardEvent(e, this));\n }.bind(this), 10);\n };\n GutterKeyboardHandler.prototype.$handleGutterKeyboardInteraction = function (e) {\n if (e.keyCode === keys[\"tab\"]) {\n e.preventDefault();\n return;\n }\n if (e.keyCode === keys[\"escape\"]) {\n e.preventDefault();\n this.$blurGutter();\n this.element.focus();\n this.lane = null;\n return;\n }\n if (e.keyCode === keys[\"up\"]) {\n e.preventDefault();\n switch (this.activeLane) {\n case \"fold\":\n this.$moveFoldWidgetUp();\n break;\n case \"annotation\":\n this.$moveAnnotationUp();\n break;\n }\n return;\n }\n if (e.keyCode === keys[\"down\"]) {\n e.preventDefault();\n switch (this.activeLane) {\n case \"fold\":\n this.$moveFoldWidgetDown();\n break;\n case \"annotation\":\n this.$moveAnnotationDown();\n break;\n }\n return;\n }\n if (e.keyCode === keys[\"left\"]) {\n e.preventDefault();\n this.$switchLane(\"annotation\");\n return;\n }\n if (e.keyCode === keys[\"right\"]) {\n e.preventDefault();\n this.$switchLane(\"fold\");\n return;\n }\n if (e.keyCode === keys[\"enter\"] || e.keyCode === keys[\"space\"]) {\n e.preventDefault();\n switch (this.activeLane) {\n case \"fold\":\n if (this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)] === 'start') {\n var rowFoldingWidget = this.$rowIndexToRow(this.activeRowIndex);\n this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex), e);\n setTimeout(\n function () {\n if (this.$rowIndexToRow(this.activeRowIndex) !== rowFoldingWidget) {\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = this.$rowToRowIndex(rowFoldingWidget);\n this.$focusFoldWidget(this.activeRowIndex);\n }\n }.bind(this), 10);\n break;\n }\n else if (this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)] === 'end') {\n break;\n }\n return;\n case \"annotation\":\n var gutterElement = this.lines.cells[this.activeRowIndex].element.childNodes[2];\n var rect = gutterElement.getBoundingClientRect();\n var style = this.annotationTooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));\n break;\n }\n return;\n }\n };\n GutterKeyboardHandler.prototype.$blurGutter = function () {\n if (this.activeRowIndex !== null) {\n switch (this.activeLane) {\n case \"fold\":\n this.$blurFoldWidget(this.activeRowIndex);\n break;\n case \"annotation\":\n this.$blurAnnotation(this.activeRowIndex);\n break;\n }\n }\n if (this.annotationTooltip.isOpen)\n this.annotationTooltip.hideTooltip();\n return;\n };\n GutterKeyboardHandler.prototype.$isFoldWidgetVisible = function (index) {\n var isRowFullyVisible = this.editor.isRowFullyVisible(this.$rowIndexToRow(index));\n var isIconVisible = this.$getFoldWidget(index).style.display !== \"none\";\n return isRowFullyVisible && isIconVisible;\n };\n GutterKeyboardHandler.prototype.$isAnnotationVisible = function (index) {\n var isRowFullyVisible = this.editor.isRowFullyVisible(this.$rowIndexToRow(index));\n var isIconVisible = this.$getAnnotation(index).style.display !== \"none\";\n return isRowFullyVisible && isIconVisible;\n };\n GutterKeyboardHandler.prototype.$getFoldWidget = function (index) {\n var cell = this.lines.get(index);\n var element = cell.element;\n return element.childNodes[1];\n };\n GutterKeyboardHandler.prototype.$getAnnotation = function (index) {\n var cell = this.lines.get(index);\n var element = cell.element;\n return element.childNodes[2];\n };\n GutterKeyboardHandler.prototype.$findNearestFoldWidget = function (index) {\n if (this.$isFoldWidgetVisible(index))\n return index;\n var i = 0;\n while (index - i > 0 || index + i < this.lines.getLength() - 1) {\n i++;\n if (index - i >= 0 && this.$isFoldWidgetVisible(index - i))\n return index - i;\n if (index + i <= this.lines.getLength() - 1 && this.$isFoldWidgetVisible(index + i))\n return index + i;\n }\n return null;\n };\n GutterKeyboardHandler.prototype.$findNearestAnnotation = function (index) {\n if (this.$isAnnotationVisible(index))\n return index;\n var i = 0;\n while (index - i > 0 || index + i < this.lines.getLength() - 1) {\n i++;\n if (index - i >= 0 && this.$isAnnotationVisible(index - i))\n return index - i;\n if (index + i <= this.lines.getLength() - 1 && this.$isAnnotationVisible(index + i))\n return index + i;\n }\n return null;\n };\n GutterKeyboardHandler.prototype.$focusFoldWidget = function (index) {\n if (index == null)\n return;\n var foldWidget = this.$getFoldWidget(index);\n foldWidget.classList.add(this.editor.renderer.keyboardFocusClassName);\n foldWidget.focus();\n };\n GutterKeyboardHandler.prototype.$focusAnnotation = function (index) {\n if (index == null)\n return;\n var annotation = this.$getAnnotation(index);\n annotation.classList.add(this.editor.renderer.keyboardFocusClassName);\n annotation.focus();\n };\n GutterKeyboardHandler.prototype.$blurFoldWidget = function (index) {\n var foldWidget = this.$getFoldWidget(index);\n foldWidget.classList.remove(this.editor.renderer.keyboardFocusClassName);\n foldWidget.blur();\n };\n GutterKeyboardHandler.prototype.$blurAnnotation = function (index) {\n var annotation = this.$getAnnotation(index);\n annotation.classList.remove(this.editor.renderer.keyboardFocusClassName);\n annotation.blur();\n };\n GutterKeyboardHandler.prototype.$moveFoldWidgetUp = function () {\n var index = this.activeRowIndex;\n while (index > 0) {\n index--;\n if (this.$isFoldWidgetVisible(index)) {\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$moveFoldWidgetDown = function () {\n var index = this.activeRowIndex;\n while (index < this.lines.getLength() - 1) {\n index++;\n if (this.$isFoldWidgetVisible(index)) {\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusFoldWidget(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$moveAnnotationUp = function () {\n var index = this.activeRowIndex;\n while (index > 0) {\n index--;\n if (this.$isAnnotationVisible(index)) {\n this.$blurAnnotation(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$moveAnnotationDown = function () {\n var index = this.activeRowIndex;\n while (index < this.lines.getLength() - 1) {\n index++;\n if (this.$isAnnotationVisible(index)) {\n this.$blurAnnotation(this.activeRowIndex);\n this.activeRowIndex = index;\n this.$focusAnnotation(this.activeRowIndex);\n return;\n }\n }\n return;\n };\n GutterKeyboardHandler.prototype.$switchLane = function (desinationLane) {\n switch (desinationLane) {\n case \"annotation\":\n if (this.activeLane === \"annotation\") {\n break;\n }\n var annotationIndex = this.$findNearestAnnotation(this.activeRowIndex);\n if (annotationIndex == null) {\n break;\n }\n this.activeLane = \"annotation\";\n this.$blurFoldWidget(this.activeRowIndex);\n this.activeRowIndex = annotationIndex;\n this.$focusAnnotation(this.activeRowIndex);\n break;\n case \"fold\":\n if (this.activeLane === \"fold\") {\n break;\n }\n var foldWidgetIndex = this.$findNearestFoldWidget(this.activeRowIndex);\n if (foldWidgetIndex == null) {\n break;\n }\n this.activeLane = \"fold\";\n this.$blurAnnotation(this.activeRowIndex);\n this.activeRowIndex = foldWidgetIndex;\n this.$focusFoldWidget(this.activeRowIndex);\n break;\n }\n return;\n };\n GutterKeyboardHandler.prototype.$rowIndexToRow = function (index) {\n var cell = this.lines.get(index);\n if (cell)\n return cell.row;\n return null;\n };\n GutterKeyboardHandler.prototype.$rowToRowIndex = function (row) {\n for (var i = 0; i < this.lines.getLength(); i++) {\n var cell = this.lines.get(i);\n if (cell.row == row)\n return i;\n }\n return null;\n };\n return GutterKeyboardHandler;\n}());\nexports.GutterKeyboardHandler = GutterKeyboardHandler;\nvar GutterKeyboardEvent = /** @class */ (function () {\n function GutterKeyboardEvent(domEvent, gutterKeyboardHandler) {\n this.gutterKeyboardHandler = gutterKeyboardHandler;\n this.domEvent = domEvent;\n }\n GutterKeyboardEvent.prototype.getKey = function () {\n return keys.keyCodeToString(this.domEvent.keyCode);\n };\n GutterKeyboardEvent.prototype.getRow = function () {\n return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex);\n };\n GutterKeyboardEvent.prototype.isInAnnotationLane = function () {\n return this.gutterKeyboardHandler.activeLane === \"annotation\";\n };\n GutterKeyboardEvent.prototype.isInFoldLane = function () {\n return this.gutterKeyboardHandler.activeLane === \"fold\";\n };\n return GutterKeyboardEvent;\n}());\nexports.GutterKeyboardEvent = GutterKeyboardEvent;\n\n});\n\nace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/keyboard/textinput\",\"ace/mouse/mouse_handler\",\"ace/mouse/fold_handler\",\"ace/keyboard/keybinding\",\"ace/edit_session\",\"ace/search\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/commands/command_manager\",\"ace/commands/default_commands\",\"ace/config\",\"ace/token_iterator\",\"ace/line_widgets\",\"ace/keyboard/gutter_handler\",\"ace/config\",\"ace/clipboard\",\"ace/lib/keys\"], function(require, exports, module){\"use strict\";\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar lang = require(\"./lib/lang\");\nvar useragent = require(\"./lib/useragent\");\nvar TextInput = require(\"./keyboard/textinput\").TextInput;\nvar MouseHandler = require(\"./mouse/mouse_handler\").MouseHandler;\nvar FoldHandler = require(\"./mouse/fold_handler\").FoldHandler;\nvar KeyBinding = require(\"./keyboard/keybinding\").KeyBinding;\nvar EditSession = require(\"./edit_session\").EditSession;\nvar Search = require(\"./search\").Search;\nvar Range = require(\"./range\").Range;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar CommandManager = require(\"./commands/command_manager\").CommandManager;\nvar defaultCommands = require(\"./commands/default_commands\").commands;\nvar config = require(\"./config\");\nvar TokenIterator = require(\"./token_iterator\").TokenIterator;\nvar LineWidgets = require(\"./line_widgets\").LineWidgets;\nvar GutterKeyboardHandler = require(\"./keyboard/gutter_handler\").GutterKeyboardHandler;\nvar nls = require(\"./config\").nls;\nvar clipboard = require(\"./clipboard\");\nvar keys = require('./lib/keys');\nvar Editor = /** @class */ (function () {\n function Editor(renderer, session, options) { this.session;\n this.$toDestroy = [];\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n this.id = \"editor\" + (++Editor.$uid);\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n if (typeof document == \"object\") {\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n }\n this.keyBinding = new KeyBinding(this);\n this.$search = new Search().set({\n wrap: true\n });\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n this.$initOperationListeners();\n this._$emitInputEvent = lang.delayedCall(function () {\n this._signal(\"input\", {});\n if (this.session && !this.session.destroyed)\n this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n this.on(\"change\", function (_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n this.setSession(session || options && options.session || new EditSession(\"\"));\n config.resetOptions(this);\n if (options)\n this.setOptions(options);\n config._signal(\"editor\", this);\n }\n Editor.prototype.$initOperationListeners = function () {\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this, true));\n this.on(\"change\", function () {\n if (!this.curOp) {\n this.startOperation();\n this.curOp.selectionBefore = this.$lastSel;\n }\n this.curOp.docChanged = true;\n }.bind(this), true);\n this.on(\"changeSelection\", function () {\n if (!this.curOp) {\n this.startOperation();\n this.curOp.selectionBefore = this.$lastSel;\n }\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n Editor.prototype.startOperation = function (commandEvent) {\n if (this.curOp) {\n if (!commandEvent || this.curOp.command)\n return;\n this.prevOp = this.curOp;\n }\n if (!commandEvent) {\n this.previousCommand = null;\n commandEvent = {};\n }\n this.$opResetTimer.schedule();\n this.curOp = this.session.curOp = {\n command: commandEvent.command || {},\n args: commandEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n this.curOp.selectionBefore = this.selection.toJSON();\n };\n Editor.prototype.endOperation = function (e) {\n if (this.curOp && this.session) {\n if (e && e.returnValue === false || !this.session)\n return (this.curOp = null);\n if (e == true && this.curOp.command && this.curOp.command.name == \"mouse\")\n return;\n this._signal(\"beforeEndOperation\");\n if (!this.curOp)\n return;\n var command = this.curOp.command;\n var scrollIntoView = command && command.scrollIntoView;\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n break;\n default:\n break;\n }\n if (scrollIntoView == \"animate\")\n this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n var sel = this.selection.toJSON();\n this.curOp.selectionAfter = sel;\n this.$lastSel = this.selection.toJSON();\n this.session.getUndoManager().addSelection(sel);\n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n Editor.prototype.$historyTracker = function (e) {\n if (!this.$mergeUndoDeltas)\n return;\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && (e.command.name == prev.command.name);\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined)\n this.mergeNextCommand = true;\n shouldMerge = shouldMerge\n && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n this.mergeNextCommand = true;\n }\n else {\n shouldMerge = shouldMerge\n && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n if (this.$mergeUndoDeltas != \"always\"\n && Date.now() - this.sequenceStartTime > 2000) {\n shouldMerge = false; // the sequence is too long\n }\n if (shouldMerge)\n this.session.mergeUndoDeltas = true;\n else if (mergeableCommands.indexOf(e.command.name) !== -1)\n this.sequenceStartTime = Date.now();\n };\n Editor.prototype.setKeyboardHandler = function (keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\" && keyboardHandler != \"ace\") {\n this.$keybindingId = keyboardHandler;\n var _self = this;\n config.loadModule([\"keybinding\", keyboardHandler], function (module) {\n if (_self.$keybindingId == keyboardHandler)\n _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n }\n else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n Editor.prototype.getKeyboardHandler = function () {\n return this.keyBinding.getKeyboardHandler();\n };\n Editor.prototype.setSession = function (session) {\n if (this.session == session)\n return;\n if (this.curOp)\n this.endOperation();\n this.curOp = {};\n var oldSession = this.session;\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n this.session = session;\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n this.onChangeMode();\n this.onCursorChange();\n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n }\n else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n this.curOp = null;\n oldSession && oldSession._signal(\"changeEditor\", { oldEditor: this });\n session && session._signal(\"changeEditor\", { editor: this });\n if (session && !session.destroyed)\n session.bgTokenizer.scheduleStart();\n };\n Editor.prototype.getSession = function () {\n return this.session;\n };\n Editor.prototype.setValue = function (val, cursorPos) {\n this.session.doc.setValue(val);\n if (!cursorPos)\n this.selectAll();\n else if (cursorPos == 1)\n this.navigateFileEnd();\n else if (cursorPos == -1)\n this.navigateFileStart();\n return val;\n };\n Editor.prototype.getValue = function () {\n return this.session.getValue();\n };\n Editor.prototype.getSelection = function () {\n return this.selection;\n };\n Editor.prototype.resize = function (force) {\n this.renderer.onResize(force);\n };\n Editor.prototype.setTheme = function (theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n Editor.prototype.getTheme = function () {\n return this.renderer.getTheme();\n };\n Editor.prototype.setStyle = function (style) {\n this.renderer.setStyle(style);\n };\n Editor.prototype.unsetStyle = function (style) {\n this.renderer.unsetStyle(style);\n };\n Editor.prototype.getFontSize = function () {\n return this.getOption(\"fontSize\") ||\n dom.computedStyle(this.container).fontSize;\n };\n Editor.prototype.setFontSize = function (size) {\n this.setOption(\"fontSize\", size);\n };\n Editor.prototype.$highlightBrackets = function () {\n if (this.$highlightPending) {\n return;\n }\n var self = this;\n this.$highlightPending = true;\n setTimeout(function () {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || session.destroyed)\n return;\n if (session.$bracketHighlight) {\n session.$bracketHighlight.markerIds.forEach(function (id) {\n session.removeMarker(id);\n });\n session.$bracketHighlight = null;\n }\n var pos = self.getCursorPosition();\n var handler = self.getKeyboardHandler();\n var isBackwards = handler && handler.$getDirectionForHighlight && handler.$getDirectionForHighlight(self);\n var ranges = session.getMatchingBracketRanges(pos, isBackwards);\n if (!ranges) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n if (token && /\\b(?:tag-open|tag-name)/.test(token.type)) {\n var tagNamesRanges = session.getMatchingTags(pos);\n if (tagNamesRanges)\n ranges = [tagNamesRanges.openTagName, tagNamesRanges.closeTagName];\n }\n }\n if (!ranges && session.$mode.getMatching)\n ranges = session.$mode.getMatching(self.session);\n if (!ranges) {\n if (self.getHighlightIndentGuides())\n self.renderer.$textLayer.$highlightIndentGuide();\n return;\n }\n var markerType = \"ace_bracket\";\n if (!Array.isArray(ranges)) {\n ranges = [ranges];\n }\n else if (ranges.length == 1) {\n markerType = \"ace_error_bracket\";\n }\n if (ranges.length == 2) {\n if (Range.comparePoints(ranges[0].end, ranges[1].start) == 0)\n ranges = [Range.fromPoints(ranges[0].start, ranges[1].end)];\n else if (Range.comparePoints(ranges[0].start, ranges[1].end) == 0)\n ranges = [Range.fromPoints(ranges[1].start, ranges[0].end)];\n }\n session.$bracketHighlight = {\n ranges: ranges,\n markerIds: ranges.map(function (range) {\n return session.addMarker(range, markerType, \"text\");\n })\n };\n if (self.getHighlightIndentGuides())\n self.renderer.$textLayer.$highlightIndentGuide();\n }, 50);\n };\n Editor.prototype.focus = function () {\n this.textInput.focus();\n };\n Editor.prototype.isFocused = function () {\n return this.textInput.isFocused();\n };\n Editor.prototype.blur = function () {\n this.textInput.blur();\n };\n Editor.prototype.onFocus = function (e) {\n if (this.$isFocused)\n return;\n this.$isFocused = true;\n this.renderer.showCursor();\n this.renderer.visualizeFocus();\n this._emit(\"focus\", e);\n };\n Editor.prototype.onBlur = function (e) {\n if (!this.$isFocused)\n return;\n this.$isFocused = false;\n this.renderer.hideCursor();\n this.renderer.visualizeBlur();\n this._emit(\"blur\", e);\n };\n Editor.prototype.$cursorChange = function () {\n this.renderer.updateCursor();\n this.$highlightBrackets();\n this.$updateHighlightActiveLine();\n };\n Editor.prototype.onDocumentChange = function (delta) {\n var wrap = this.session.$useWrapMode;\n var lastRow = (delta.start.row == delta.end.row ? delta.end.row : Infinity);\n this.renderer.updateLines(delta.start.row, lastRow, wrap);\n this._signal(\"change\", delta);\n this.$cursorChange();\n };\n Editor.prototype.onTokenizerUpdate = function (e) {\n var rows = e.data;\n this.renderer.updateLines(rows.first, rows.last);\n };\n Editor.prototype.onScrollTopChange = function () {\n this.renderer.scrollToY(this.session.getScrollTop());\n };\n Editor.prototype.onScrollLeftChange = function () {\n this.renderer.scrollToX(this.session.getScrollLeft());\n };\n Editor.prototype.onCursorChange = function () {\n this.$cursorChange();\n this._signal(\"changeSelection\");\n };\n Editor.prototype.$updateHighlightActiveLine = function () {\n var session = this.getSession();\n var highlight;\n if (this.$highlightActiveLine) {\n if (this.$selectionStyle != \"line\" || !this.selection.isMultiLine())\n highlight = this.getCursorPosition();\n if (this.renderer.theme && this.renderer.theme.$selectionColorConflict && !this.selection.isEmpty())\n highlight = false;\n if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))\n highlight = false;\n }\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n }\n else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n }\n else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n session._signal(\"changeBackMarker\");\n }\n };\n Editor.prototype.onSelectionChange = function (e) {\n var session = this.session;\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n session.$selectionMarker = null;\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n }\n else {\n this.$updateHighlightActiveLine();\n }\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n this._signal(\"changeSelection\");\n };\n Editor.prototype.$getSelectionHighLightRegexp = function () {\n var session = this.session;\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine())\n return;\n var startColumn = selection.start.column;\n var endColumn = selection.end.column;\n var line = session.getLine(selection.start.row);\n var needle = line.substring(startColumn, endColumn);\n if (needle.length > 5000 || !/[\\w\\d]/.test(needle))\n return;\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n var wordWithBoundary = line.substring(startColumn - 1, endColumn + 1);\n if (!re.test(wordWithBoundary))\n return;\n return re;\n };\n Editor.prototype.onChangeFrontMarker = function () {\n this.renderer.updateFrontMarkers();\n };\n Editor.prototype.onChangeBackMarker = function () {\n this.renderer.updateBackMarkers();\n };\n Editor.prototype.onChangeBreakpoint = function () {\n this.renderer.updateBreakpoints();\n };\n Editor.prototype.onChangeAnnotation = function () {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n Editor.prototype.onChangeMode = function (e) {\n this.renderer.updateText();\n this._emit(\"changeMode\", e);\n };\n Editor.prototype.onChangeWrapLimit = function () {\n this.renderer.updateFull();\n };\n Editor.prototype.onChangeWrapMode = function () {\n this.renderer.onResize(true);\n };\n Editor.prototype.onChangeFold = function () {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n Editor.prototype.getSelectedText = function () {\n return this.session.getTextRange(this.getSelectionRange());\n };\n Editor.prototype.getCopyText = function () {\n var text = this.getSelectedText();\n var nl = this.session.doc.getNewLineCharacter();\n var copyLine = false;\n if (!text && this.$copyWithEmptySelection) {\n copyLine = true;\n var ranges = this.selection.getAllRanges();\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (i && ranges[i - 1].start.row == range.start.row)\n continue;\n text += this.session.getLine(range.start.row) + nl;\n }\n }\n var e = { text: text };\n this._signal(\"copy\", e);\n clipboard.lineMode = copyLine ? e.text : false;\n return e.text;\n };\n Editor.prototype.onCopy = function () {\n this.commands.exec(\"copy\", this);\n };\n Editor.prototype.onCut = function () {\n this.commands.exec(\"cut\", this);\n };\n Editor.prototype.onPaste = function (text, event) {\n var e = { text: text, event: event };\n this.commands.exec(\"paste\", this, e);\n };\n Editor.prototype.$handlePaste = function (e) {\n if (typeof e == \"string\")\n e = { text: e };\n this._signal(\"paste\", e);\n var text = e.text;\n var lineMode = text === clipboard.lineMode;\n var session = this.session;\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n if (lineMode)\n session.insert({ row: this.selection.lead.row, column: 0 }, text);\n else\n this.insert(text);\n }\n else if (lineMode) {\n this.selection.rangeList.ranges.forEach(function (range) {\n session.insert({ row: range.start.row, column: 0 }, text);\n });\n }\n else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n var isFullLine = lines.length == 2 && (!lines[0] || !lines[1]);\n if (lines.length != ranges.length || isFullLine)\n return this.commands.exec(\"insertstring\", this, text);\n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty())\n session.remove(range);\n session.insert(range.start, lines[i]);\n }\n }\n };\n Editor.prototype.execCommand = function (command, args) {\n return this.commands.exec(command, this, args);\n };\n Editor.prototype.insert = function (text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n if (transform) {\n if (text !== transform.text) {\n if (!this.inVirtualSelectionMode) {\n this.session.mergeUndoDeltas = false;\n this.mergeNextCommand = false;\n }\n }\n text = transform.text;\n }\n }\n if (text == \"\\t\")\n text = this.session.getTabString();\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n }\n else if (this.session.getOverwrite() && text.indexOf(\"\\n\") == -1) {\n var range = Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n this.clearSelection();\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n session.insert(cursor, text);\n if (transform && transform.selection) {\n if (transform.selection.length == 2) { // Transform relative to the current column\n this.selection.setSelectionRange(new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1]));\n }\n else { // Transform relative to the current row.\n this.selection.setSelectionRange(new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3]));\n }\n }\n if (this.$enableAutoIndent) {\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n session.insert({ row: cursor.row + 1, column: 0 }, lineIndent);\n }\n if (shouldOutdent)\n mode.autoOutdent(lineState, session, cursor.row);\n }\n };\n Editor.prototype.autoIndent = function () {\n var session = this.session;\n var mode = session.getMode();\n var ranges = this.selection.isEmpty()\n ? [new Range(0, 0, session.doc.getLength() - 1, 0)]\n : this.selection.getAllRanges();\n var prevLineState = \"\";\n var prevLine = \"\";\n var lineIndent = \"\";\n var tab = session.getTabString();\n for (var i = 0; i < ranges.length; i++) {\n var startRow = ranges[i].start.row;\n var endRow = ranges[i].end.row;\n for (var row = startRow; row <= endRow; row++) {\n if (row > 0) {\n prevLineState = session.getState(row - 1);\n prevLine = session.getLine(row - 1);\n lineIndent = mode.getNextLineIndent(prevLineState, prevLine, tab);\n }\n var line = session.getLine(row);\n var currIndent = mode.$getIndent(line);\n if (lineIndent !== currIndent) {\n if (currIndent.length > 0) {\n var range = new Range(row, 0, row, currIndent.length);\n session.remove(range);\n }\n if (lineIndent.length > 0) {\n session.insert({ row: row, column: 0 }, lineIndent);\n }\n }\n mode.autoOutdent(prevLineState, session, row);\n }\n }\n };\n Editor.prototype.onTextInput = function (text, composition) {\n if (!composition)\n return this.keyBinding.onTextInput(text);\n this.startOperation({ command: { name: \"insertstring\" } });\n var applyComposition = this.applyComposition.bind(this, text, composition);\n if (this.selection.rangeCount)\n this.forEachSelection(applyComposition);\n else\n applyComposition();\n this.endOperation();\n };\n Editor.prototype.applyComposition = function (text, composition) {\n if (composition.extendLeft || composition.extendRight) {\n var r = this.selection.getRange();\n r.start.column -= composition.extendLeft;\n r.end.column += composition.extendRight;\n if (r.start.column < 0) {\n r.start.row--;\n r.start.column += this.session.getLine(r.start.row).length + 1;\n }\n this.selection.setRange(r);\n if (!text && !r.isEmpty())\n this.remove();\n }\n if (text || !this.selection.isEmpty())\n this.insert(text, true);\n if (composition.restoreStart || composition.restoreEnd) {\n var r = this.selection.getRange();\n r.start.column -= composition.restoreStart;\n r.end.column -= composition.restoreEnd;\n this.selection.setRange(r);\n }\n };\n Editor.prototype.onCommandKey = function (e, hashId, keyCode) {\n return this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n Editor.prototype.setOverwrite = function (overwrite) {\n this.session.setOverwrite(overwrite);\n };\n Editor.prototype.getOverwrite = function () {\n return this.session.getOverwrite();\n };\n Editor.prototype.toggleOverwrite = function () {\n this.session.toggleOverwrite();\n };\n Editor.prototype.setScrollSpeed = function (speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n Editor.prototype.getScrollSpeed = function () {\n return this.getOption(\"scrollSpeed\");\n };\n Editor.prototype.setDragDelay = function (dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n Editor.prototype.getDragDelay = function () {\n return this.getOption(\"dragDelay\");\n };\n Editor.prototype.setSelectionStyle = function (val) {\n this.setOption(\"selectionStyle\", val);\n };\n Editor.prototype.getSelectionStyle = function () {\n return this.getOption(\"selectionStyle\");\n };\n Editor.prototype.setHighlightActiveLine = function (shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n Editor.prototype.getHighlightActiveLine = function () {\n return this.getOption(\"highlightActiveLine\");\n };\n Editor.prototype.setHighlightGutterLine = function (shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n Editor.prototype.getHighlightGutterLine = function () {\n return this.getOption(\"highlightGutterLine\");\n };\n Editor.prototype.setHighlightSelectedWord = function (shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n Editor.prototype.getHighlightSelectedWord = function () {\n return this.$highlightSelectedWord;\n };\n Editor.prototype.setAnimatedScroll = function (shouldAnimate) {\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n Editor.prototype.getAnimatedScroll = function () {\n return this.renderer.getAnimatedScroll();\n };\n Editor.prototype.setShowInvisibles = function (showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n Editor.prototype.getShowInvisibles = function () {\n return this.renderer.getShowInvisibles();\n };\n Editor.prototype.setDisplayIndentGuides = function (display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n Editor.prototype.getDisplayIndentGuides = function () {\n return this.renderer.getDisplayIndentGuides();\n };\n Editor.prototype.setHighlightIndentGuides = function (highlight) {\n this.renderer.setHighlightIndentGuides(highlight);\n };\n Editor.prototype.getHighlightIndentGuides = function () {\n return this.renderer.getHighlightIndentGuides();\n };\n Editor.prototype.setShowPrintMargin = function (showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n Editor.prototype.getShowPrintMargin = function () {\n return this.renderer.getShowPrintMargin();\n };\n Editor.prototype.setPrintMarginColumn = function (showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n Editor.prototype.getPrintMarginColumn = function () {\n return this.renderer.getPrintMarginColumn();\n };\n Editor.prototype.setReadOnly = function (readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n Editor.prototype.getReadOnly = function () {\n return this.getOption(\"readOnly\");\n };\n Editor.prototype.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n Editor.prototype.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n Editor.prototype.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n Editor.prototype.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n Editor.prototype.setShowFoldWidgets = function (show) {\n this.setOption(\"showFoldWidgets\", show);\n };\n Editor.prototype.getShowFoldWidgets = function () {\n return this.getOption(\"showFoldWidgets\");\n };\n Editor.prototype.setFadeFoldWidgets = function (fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n Editor.prototype.getFadeFoldWidgets = function () {\n return this.getOption(\"fadeFoldWidgets\");\n };\n Editor.prototype.remove = function (dir) {\n if (this.selection.isEmpty()) {\n if (dir == \"left\")\n this.selection.selectLeft();\n else\n this.selection.selectRight();\n }\n var range = this.getSelectionRange();\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n if (new_range)\n range = new_range;\n }\n this.session.remove(range);\n this.clearSelection();\n };\n Editor.prototype.removeWordRight = function () {\n if (this.selection.isEmpty())\n this.selection.selectWordRight();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n Editor.prototype.removeWordLeft = function () {\n if (this.selection.isEmpty())\n this.selection.selectWordLeft();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n Editor.prototype.removeToLineStart = function () {\n if (this.selection.isEmpty())\n this.selection.selectLineStart();\n if (this.selection.isEmpty())\n this.selection.selectLeft();\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n Editor.prototype.removeToLineEnd = function () {\n if (this.selection.isEmpty())\n this.selection.selectLineEnd();\n var range = this.getSelectionRange();\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n this.session.remove(range);\n this.clearSelection();\n };\n Editor.prototype.splitLine = function () {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n Editor.prototype.setGhostText = function (text, position) {\n if (!this.session.widgetManager) {\n this.session.widgetManager = new LineWidgets(this.session);\n this.session.widgetManager.attach(this);\n }\n this.renderer.setGhostText(text, position);\n };\n Editor.prototype.removeGhostText = function () {\n if (!this.session.widgetManager)\n return;\n this.renderer.removeGhostText();\n };\n Editor.prototype.transposeLetters = function () {\n if (!this.selection.isEmpty()) {\n return;\n }\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0)\n return;\n var line = this.session.getLine(cursor.row);\n var swap, range;\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column - 1);\n range = new Range(cursor.row, column - 1, cursor.row, column + 1);\n }\n else {\n swap = line.charAt(column - 1) + line.charAt(column - 2);\n range = new Range(cursor.row, column - 2, cursor.row, column);\n }\n this.session.replace(range, swap);\n this.session.selection.moveToPosition(range.end);\n };\n Editor.prototype.toLowerCase = function () {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n Editor.prototype.toUpperCase = function () {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n Editor.prototype.indent = function () {\n var session = this.session;\n var range = this.getSelectionRange();\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n if (this.session.getUseSoftTabs()) {\n var count = (size - column % size);\n var indentString = lang.stringRepeat(\" \", count);\n }\n else {\n var count = column % size;\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n return this.insert(indentString);\n };\n Editor.prototype.blockIndent = function () {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n Editor.prototype.blockOutdent = function () {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n Editor.prototype.sortLines = function () {\n var rows = this.$getSelectedRows();\n var session = this.session;\n var lines = [];\n for (var i = rows.first; i <= rows.last; i++)\n lines.push(session.getLine(i));\n lines.sort(function (a, b) {\n if (a.toLowerCase() < b.toLowerCase())\n return -1;\n if (a.toLowerCase() > b.toLowerCase())\n return 1;\n return 0;\n });\n var deleteRange = new Range(0, 0, 0, 0);\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i - rows.first]);\n }\n };\n Editor.prototype.toggleCommentLines = function () {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n Editor.prototype.toggleBlockComment = function () {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n Editor.prototype.getNumberAt = function (row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n var s = this.session.getLine(row);\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n if (m.index <= column && m.index + m[0].length >= column) {\n var number = {\n value: m[0],\n start: m.index,\n end: m.index + m[0].length\n };\n return number;\n }\n }\n return null;\n };\n Editor.prototype.modifyNumber = function (amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column - 1, row, column);\n var c = this.session.getTextRange(charRange);\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n if (fp !== nr.end && column < fp) {\n amount *= Math.pow(10, nr.end - column - 1);\n }\n else {\n amount *= Math.pow(10, nr.end - column);\n }\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start + 1, column + nnr.length - nr.value.length));\n }\n }\n else {\n this.toggleWord();\n }\n };\n Editor.prototype.toggleWord = function () {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n this.selection.selectWord();\n var currentState = this.getSelectedText();\n var currWordStart = this.selection.getWordRange().start.column;\n var wordParts = currentState.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, '$1 ').split(/\\s/);\n var delta = column - currWordStart - 1;\n if (delta < 0)\n delta = 0;\n var curLength = 0, itLength = 0;\n var that = this;\n if (currentState.match(/[A-Za-z0-9_]+/)) {\n wordParts.forEach(function (item, i) {\n itLength = curLength + item.length;\n if (delta >= curLength && delta <= itLength) {\n currentState = item;\n that.selection.clearSelection();\n that.moveCursorTo(row, curLength + currWordStart);\n that.selection.selectTo(row, itLength + currWordStart);\n }\n curLength = itLength;\n });\n }\n var wordPairs = this.$toggleWordPairs;\n var reg;\n for (var i = 0; i < wordPairs.length; i++) {\n var item = wordPairs[i];\n for (var j = 0; j <= 1; j++) {\n var negate = +!j;\n var firstCondition = currentState.match(new RegExp('^\\\\s?_?(' + lang.escapeRegExp(item[j]) + ')\\\\s?$', 'i'));\n if (firstCondition) {\n var secondCondition = currentState.match(new RegExp('([_]|^|\\\\s)(' + lang.escapeRegExp(firstCondition[1]) + ')($|\\\\s)', 'g'));\n if (secondCondition) {\n reg = currentState.replace(new RegExp(lang.escapeRegExp(item[j]), 'i'), function (result) {\n var res = item[negate];\n if (result.toUpperCase() == result) {\n res = res.toUpperCase();\n }\n else if (result.charAt(0).toUpperCase() == result.charAt(0)) {\n res = res.substr(0, 0) + item[negate].charAt(0).toUpperCase() + res.substr(1);\n }\n return res;\n });\n this.insert(reg);\n reg = \"\";\n }\n }\n }\n }\n };\n Editor.prototype.findLinkAt = function (row, column) {\n var e_1, _a;\n var line = this.session.getLine(row);\n var wordParts = line.split(/((?:https?|ftp):\\/\\/[\\S]+)/);\n var columnPosition = column;\n if (columnPosition < 0)\n columnPosition = 0;\n var previousPosition = 0, currentPosition = 0, match;\n try {\n for (var wordParts_1 = __values(wordParts), wordParts_1_1 = wordParts_1.next(); !wordParts_1_1.done; wordParts_1_1 = wordParts_1.next()) {\n var item = wordParts_1_1.value;\n currentPosition = previousPosition + item.length;\n if (columnPosition >= previousPosition && columnPosition <= currentPosition) {\n if (item.match(/((?:https?|ftp):\\/\\/[\\S]+)/)) {\n match = item.replace(/[\\s:.,'\";}\\]]+$/, \"\");\n break;\n }\n }\n previousPosition = currentPosition;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (wordParts_1_1 && !wordParts_1_1.done && (_a = wordParts_1.return)) _a.call(wordParts_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return match;\n };\n Editor.prototype.openLink = function () {\n var cursor = this.selection.getCursor();\n var url = this.findLinkAt(cursor.row, cursor.column);\n if (url)\n window.open(url, '_blank');\n return url != null;\n };\n Editor.prototype.removeLines = function () {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n Editor.prototype.duplicateSelection = function () {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n }\n else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range));\n range.start = point;\n range.end = endPoint;\n sel.setSelectionRange(range, reverse);\n }\n };\n Editor.prototype.moveLinesDown = function () {\n this.$moveLines(1, false);\n };\n Editor.prototype.moveLinesUp = function () {\n this.$moveLines(-1, false);\n };\n Editor.prototype.moveText = function (range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n Editor.prototype.copyLinesUp = function () {\n this.$moveLines(-1, true);\n };\n Editor.prototype.copyLinesDown = function () {\n this.$moveLines(1, true);\n };\n Editor.prototype.$moveLines = function (dir, copy) {\n var rows, moved;\n var selection = this.selection;\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1)\n moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n }\n else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n while (++i < l) {\n if (totalDiff)\n ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last)\n break;\n else if (!copy && subRows.first > last + 1)\n break;\n last = subRows.last;\n }\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1)\n rangeIndex = i + 1;\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n if (!copy)\n diff = 0;\n totalDiff += diff;\n }\n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n Editor.prototype.$getSelectedRows = function (range) {\n range = (range || this.getSelectionRange()).collapseRows();\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n Editor.prototype.onCompositionStart = function (compositionState) {\n this.renderer.showComposition(compositionState);\n };\n Editor.prototype.onCompositionUpdate = function (text) {\n this.renderer.setCompositionText(text);\n };\n Editor.prototype.onCompositionEnd = function () {\n this.renderer.hideComposition();\n };\n Editor.prototype.getFirstVisibleRow = function () {\n return this.renderer.getFirstVisibleRow();\n };\n Editor.prototype.getLastVisibleRow = function () {\n return this.renderer.getLastVisibleRow();\n };\n Editor.prototype.isRowVisible = function (row) {\n return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());\n };\n Editor.prototype.isRowFullyVisible = function (row) {\n return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());\n };\n Editor.prototype.$getVisibleRowCount = function () {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n Editor.prototype.$moveByPage = function (dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n if (select === true) {\n this.selection.$moveSelection(function () {\n this.moveCursorBy(rows, 0);\n });\n }\n else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n var scrollTop = renderer.scrollTop;\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null)\n renderer.scrollCursorIntoView(null, 0.5);\n renderer.animateScrolling(scrollTop);\n };\n Editor.prototype.selectPageDown = function () {\n this.$moveByPage(1, true);\n };\n Editor.prototype.selectPageUp = function () {\n this.$moveByPage(-1, true);\n };\n Editor.prototype.gotoPageDown = function () {\n this.$moveByPage(1, false);\n };\n Editor.prototype.gotoPageUp = function () {\n this.$moveByPage(-1, false);\n };\n Editor.prototype.scrollPageDown = function () {\n this.$moveByPage(1);\n };\n Editor.prototype.scrollPageUp = function () {\n this.$moveByPage(-1);\n };\n Editor.prototype.scrollToRow = function (row) {\n this.renderer.scrollToRow(row);\n };\n Editor.prototype.scrollToLine = function (line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n Editor.prototype.centerSelection = function () {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n Editor.prototype.getCursorPosition = function () {\n return this.selection.getCursor();\n };\n Editor.prototype.getCursorPositionScreen = function () {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n Editor.prototype.getSelectionRange = function () {\n return this.selection.getRange();\n };\n Editor.prototype.selectAll = function () {\n this.selection.selectAll();\n };\n Editor.prototype.clearSelection = function () {\n this.selection.clearSelection();\n };\n Editor.prototype.moveCursorTo = function (row, column) {\n this.selection.moveCursorTo(row, column);\n };\n Editor.prototype.moveCursorToPosition = function (pos) {\n this.selection.moveCursorToPosition(pos);\n };\n Editor.prototype.jumpToMatching = function (select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var tokenCount = 0;\n if (prevToken && prevToken.type.indexOf('tag-name') !== -1) {\n prevToken = iterator.stepBackward();\n }\n var token = prevToken || iterator.stepForward();\n if (!token)\n return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n if (prevToken.value === '<' && tokenCount > 1) {\n depth[token.value]++;\n }\n else if (prevToken.value === '= 0; --i) {\n if (this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n this.selection.setSelectionRange(selection);\n return replaced;\n };\n Editor.prototype.$tryReplace = function (range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n }\n else {\n return null;\n }\n };\n Editor.prototype.getLastSearchOptions = function () {\n return this.$search.getOptions();\n };\n Editor.prototype.find = function (needle, options, animate) {\n if (!options)\n options = {};\n if (typeof needle == \"string\" || needle instanceof RegExp)\n options.needle = needle;\n else if (typeof needle == \"object\")\n oop.mixin(options, needle);\n var range = this.selection.getRange();\n if (options.needle == null) {\n needle = this.session.getTextRange(range)\n || this.$search.$options.needle;\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n this.$search.set({ needle: needle });\n }\n this.$search.set(options);\n if (!options.start)\n this.$search.set({ start: range });\n var newRange = this.$search.find(this.session);\n if (options.preventScroll)\n return newRange;\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n if (options.backwards)\n range.start = range.end;\n else\n range.end = range.start;\n this.selection.setRange(range);\n };\n Editor.prototype.findNext = function (options, animate) {\n this.find({ skipCurrent: true, backwards: false }, options, animate);\n };\n Editor.prototype.findPrevious = function (options, animate) {\n this.find(options, { skipCurrent: true, backwards: true }, animate);\n };\n Editor.prototype.revealRange = function (range, animate) {\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false)\n this.renderer.animateScrolling(scrollTop);\n };\n Editor.prototype.undo = function () {\n this.session.getUndoManager().undo(this.session);\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n Editor.prototype.redo = function () {\n this.session.getUndoManager().redo(this.session);\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n Editor.prototype.destroy = function () {\n if (this.$toDestroy) {\n this.$toDestroy.forEach(function (el) {\n el.destroy();\n });\n this.$toDestroy = null;\n }\n if (this.$mouseHandler)\n this.$mouseHandler.destroy();\n this.renderer.destroy();\n this._signal(\"destroy\", this);\n if (this.session)\n this.session.destroy();\n if (this._$emitInputEvent)\n this._$emitInputEvent.cancel();\n this.removeAllListeners();\n };\n Editor.prototype.setAutoScrollEditorIntoView = function (enable) {\n if (!enable)\n return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor)\n this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function () {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function () {\n if (shouldScroll)\n rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function () {\n if (shouldScroll && rect && (self.isFocused()\n || self.searchBox && self.searchBox.isFocused())) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n }\n else if (pos.top < config.height &&\n pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n }\n else {\n shouldScroll = null;\n }\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n shouldScroll = rect = null;\n }\n });\n this.setAutoScrollEditorIntoView = function (enable) {\n if (enable)\n return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n Editor.prototype.$resetCursorStyle = function () {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer)\n return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n Editor.prototype.prompt = function (message, options, callback) {\n var editor = this;\n config.loadModule(\"ace/ext/prompt\", function (module) {\n module.prompt(editor, message, options, callback);\n });\n };\n return Editor;\n}());\nEditor.$uid = 0;\nEditor.prototype.curOp = null;\nEditor.prototype.prevOp = {};\nEditor.prototype.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\nEditor.prototype.$toggleWordPairs = [\n [\"first\", \"last\"],\n [\"true\", \"false\"],\n [\"yes\", \"no\"],\n [\"width\", \"height\"],\n [\"top\", \"bottom\"],\n [\"right\", \"left\"],\n [\"on\", \"off\"],\n [\"x\", \"y\"],\n [\"get\", \"set\"],\n [\"max\", \"min\"],\n [\"horizontal\", \"vertical\"],\n [\"show\", \"hide\"],\n [\"add\", \"remove\"],\n [\"up\", \"down\"],\n [\"before\", \"after\"],\n [\"even\", \"odd\"],\n [\"in\", \"out\"],\n [\"inside\", \"outside\"],\n [\"next\", \"previous\"],\n [\"increase\", \"decrease\"],\n [\"attach\", \"detach\"],\n [\"&&\", \"||\"],\n [\"==\", \"!=\"]\n];\noop.implement(Editor.prototype, EventEmitter);\nconfig.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function (style) {\n this.onSelectionChange();\n this._signal(\"changeSelectionStyle\", { data: style });\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function () { this.$updateHighlightActiveLine(); },\n initialValue: true\n },\n highlightSelectedWord: {\n set: function (shouldHighlight) { this.$onSelectionChange(); },\n initialValue: true\n },\n readOnly: {\n set: function (readOnly) {\n this.textInput.setReadOnly(readOnly);\n this.$resetCursorStyle();\n },\n initialValue: false\n },\n copyWithEmptySelection: {\n set: function (value) {\n this.textInput.setCopyWithEmptySelection(value);\n },\n initialValue: false\n },\n cursorStyle: {\n set: function (val) { this.$resetCursorStyle(); },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: { initialValue: true },\n wrapBehavioursEnabled: { initialValue: true },\n enableAutoIndent: { initialValue: true },\n autoScrollEditorIntoView: {\n set: function (val) { this.setAutoScrollEditorIntoView(val); }\n },\n keyboardHandler: {\n set: function (val) { this.setKeyboardHandler(val); },\n get: function () { return this.$keybindingId; },\n handlesSet: true\n },\n value: {\n set: function (val) { this.session.setValue(val); },\n get: function () { return this.getValue(); },\n handlesSet: true,\n hidden: true\n },\n session: {\n set: function (val) { this.setSession(val); },\n get: function () { return this.session; },\n handlesSet: true,\n hidden: true\n },\n showLineNumbers: {\n set: function (show) {\n this.renderer.$gutterLayer.setShowLineNumbers(show);\n this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER);\n if (show && this.$relativeLineNumbers)\n relativeNumberRenderer.attach(this);\n else\n relativeNumberRenderer.detach(this);\n },\n initialValue: true\n },\n relativeLineNumbers: {\n set: function (value) {\n if (this.$showLineNumbers && value)\n relativeNumberRenderer.attach(this);\n else\n relativeNumberRenderer.detach(this);\n }\n },\n placeholder: {\n set: function (message) {\n if (!this.$updatePlaceholder) {\n this.$updatePlaceholder = function () {\n var hasValue = this.session && (this.renderer.$composition ||\n this.session.getLength() > 1 || this.session.getLine(0).length > 0);\n if (hasValue && this.renderer.placeholderNode) {\n this.renderer.off(\"afterRender\", this.$updatePlaceholder);\n dom.removeCssClass(this.container, \"ace_hasPlaceholder\");\n this.renderer.placeholderNode.remove();\n this.renderer.placeholderNode = null;\n }\n else if (!hasValue && !this.renderer.placeholderNode) {\n this.renderer.on(\"afterRender\", this.$updatePlaceholder);\n dom.addCssClass(this.container, \"ace_hasPlaceholder\");\n var el = dom.createElement(\"div\");\n el.className = \"ace_placeholder\";\n el.textContent = this.$placeholder || \"\";\n this.renderer.placeholderNode = el;\n this.renderer.content.appendChild(this.renderer.placeholderNode);\n }\n else if (!hasValue && this.renderer.placeholderNode) {\n this.renderer.placeholderNode.textContent = this.$placeholder || \"\";\n }\n }.bind(this);\n this.on(\"input\", this.$updatePlaceholder);\n }\n this.$updatePlaceholder();\n }\n },\n enableKeyboardAccessibility: {\n set: function (value) {\n var blurCommand = {\n name: \"blurTextInput\",\n description: \"Set focus to the editor content div to allow tabbing through the page\",\n bindKey: \"Esc\",\n exec: function (editor) {\n editor.blur();\n editor.renderer.scroller.focus();\n },\n readOnly: true\n };\n var focusOnEnterKeyup = function (e) {\n if (e.target == this.renderer.scroller && e.keyCode === keys['enter']) {\n e.preventDefault();\n var row = this.getCursorPosition().row;\n if (!this.isRowVisible(row))\n this.scrollToLine(row, true, true);\n this.focus();\n }\n };\n var gutterKeyboardHandler;\n if (value) {\n this.renderer.enableKeyboardAccessibility = true;\n this.renderer.keyboardFocusClassName = \"ace_keyboard-focus\";\n this.textInput.getElement().setAttribute(\"tabindex\", -1);\n this.textInput.setNumberOfExtraLines(useragent.isWin ? 3 : 0);\n this.renderer.scroller.setAttribute(\"tabindex\", 0);\n this.renderer.scroller.setAttribute(\"role\", \"group\");\n this.renderer.scroller.setAttribute(\"aria-roledescription\", nls(\"editor\"));\n this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName);\n this.renderer.scroller.setAttribute(\"aria-label\", nls(\"Editor content, press Enter to start editing, press Escape to exit\"));\n this.renderer.scroller.addEventListener(\"keyup\", focusOnEnterKeyup.bind(this));\n this.commands.addCommand(blurCommand);\n this.renderer.$gutter.setAttribute(\"tabindex\", 0);\n this.renderer.$gutter.setAttribute(\"aria-hidden\", false);\n this.renderer.$gutter.setAttribute(\"role\", \"group\");\n this.renderer.$gutter.setAttribute(\"aria-roledescription\", nls(\"editor\"));\n this.renderer.$gutter.setAttribute(\"aria-label\", nls(\"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit\"));\n this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName);\n this.renderer.content.setAttribute(\"aria-hidden\", true);\n if (!gutterKeyboardHandler)\n gutterKeyboardHandler = new GutterKeyboardHandler(this);\n gutterKeyboardHandler.addListener();\n }\n else {\n this.renderer.enableKeyboardAccessibility = false;\n this.textInput.getElement().setAttribute(\"tabindex\", 0);\n this.textInput.setNumberOfExtraLines(0);\n this.renderer.scroller.setAttribute(\"tabindex\", -1);\n this.renderer.scroller.removeAttribute(\"role\");\n this.renderer.scroller.removeAttribute(\"aria-roledescription\");\n this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName);\n this.renderer.scroller.removeAttribute(\"aria-label\");\n this.renderer.scroller.removeEventListener(\"keyup\", focusOnEnterKeyup.bind(this));\n this.commands.removeCommand(blurCommand);\n this.renderer.content.removeAttribute(\"aria-hidden\");\n this.renderer.$gutter.setAttribute(\"tabindex\", -1);\n this.renderer.$gutter.setAttribute(\"aria-hidden\", true);\n this.renderer.$gutter.removeAttribute(\"role\");\n this.renderer.$gutter.removeAttribute(\"aria-roledescription\");\n this.renderer.$gutter.removeAttribute(\"aria-label\");\n this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName);\n if (gutterKeyboardHandler)\n gutterKeyboardHandler.removeListener();\n }\n },\n initialValue: false\n },\n customScrollbar: \"renderer\",\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n displayIndentGuides: \"renderer\",\n highlightIndentGuides: \"renderer\",\n showGutter: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n hasCssTransforms: \"renderer\",\n maxPixelHeight: \"renderer\",\n useTextareaForIME: \"renderer\",\n useResizeObserver: \"renderer\",\n useSvgGutterIcons: \"renderer\",\n showFoldedAnnotations: \"renderer\",\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimeout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n navigateWithinSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n});\nvar relativeNumberRenderer = {\n getText: function (/**@type{EditSession}*/ session, /**@type{number}*/ row) {\n return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9 ? \"\\xb7\" : \"\"))) + \"\";\n },\n getWidth: function (session, /**@type{number}*/ lastLineNumber, config) {\n return Math.max(lastLineNumber.toString().length, (config.lastRow + 1).toString().length, 2) * config.characterWidth;\n },\n update: function (e, /**@type{Editor}*/ editor) {\n editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);\n },\n attach: function (/**@type{Editor}*/ editor) {\n editor.renderer.$gutterLayer.$renderer = this;\n editor.on(\"changeSelection\", this.update);\n this.update(null, editor);\n },\n detach: function (/**@type{Editor}*/ editor) {\n if (editor.renderer.$gutterLayer.$renderer == this)\n editor.renderer.$gutterLayer.$renderer = null;\n editor.off(\"changeSelection\", this.update);\n this.update(null, editor);\n }\n};\nexports.Editor = Editor;\n\n});\n\nace.define(\"ace/layer/lines\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar Lines = /** @class */ (function () {\n function Lines(element, canvasHeight) {\n this.element = element;\n this.canvasHeight = canvasHeight || 500000;\n this.element.style.height = (this.canvasHeight * 2) + \"px\";\n this.cells = [];\n this.cellCache = [];\n this.$offsetCoefficient = 0;\n }\n Lines.prototype.moveContainer = function (config) {\n dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);\n };\n Lines.prototype.pageChanged = function (oldConfig, newConfig) {\n return (Math.floor((oldConfig.firstRowScreen * oldConfig.lineHeight) / this.canvasHeight) !==\n Math.floor((newConfig.firstRowScreen * newConfig.lineHeight) / this.canvasHeight));\n };\n Lines.prototype.computeLineTop = function (row, config, session) {\n var screenTop = config.firstRowScreen * config.lineHeight;\n var screenPage = Math.floor(screenTop / this.canvasHeight);\n var lineTop = session.documentToScreenRow(row, 0) * config.lineHeight;\n return lineTop - (screenPage * this.canvasHeight);\n };\n Lines.prototype.computeLineHeight = function (row, config, session) {\n return config.lineHeight * session.getRowLineCount(row);\n };\n Lines.prototype.getLength = function () {\n return this.cells.length;\n };\n Lines.prototype.get = function (index) {\n return this.cells[index];\n };\n Lines.prototype.shift = function () {\n this.$cacheCell(this.cells.shift());\n };\n Lines.prototype.pop = function () {\n this.$cacheCell(this.cells.pop());\n };\n Lines.prototype.push = function (cell) {\n if (Array.isArray(cell)) {\n this.cells.push.apply(this.cells, cell);\n var fragment = dom.createFragment(this.element);\n for (var i = 0; i < cell.length; i++) {\n fragment.appendChild(cell[i].element);\n }\n this.element.appendChild(fragment);\n }\n else {\n this.cells.push(cell);\n this.element.appendChild(cell.element);\n }\n };\n Lines.prototype.unshift = function (cell) {\n if (Array.isArray(cell)) {\n this.cells.unshift.apply(this.cells, cell);\n var fragment = dom.createFragment(this.element);\n for (var i = 0; i < cell.length; i++) {\n fragment.appendChild(cell[i].element);\n }\n if (this.element.firstChild)\n this.element.insertBefore(fragment, this.element.firstChild);\n else\n this.element.appendChild(fragment);\n }\n else {\n this.cells.unshift(cell);\n this.element.insertAdjacentElement(\"afterbegin\", cell.element);\n }\n };\n Lines.prototype.last = function () {\n if (this.cells.length)\n return this.cells[this.cells.length - 1];\n else\n return null;\n };\n Lines.prototype.$cacheCell = function (cell) {\n if (!cell)\n return;\n cell.element.remove();\n this.cellCache.push(cell);\n };\n Lines.prototype.createCell = function (row, config, session, initElement) {\n var cell = this.cellCache.pop();\n if (!cell) {\n var element = dom.createElement(\"div\");\n if (initElement)\n initElement(element);\n this.element.appendChild(element);\n cell = {\n element: element,\n text: \"\",\n row: row\n };\n }\n cell.row = row;\n return cell;\n };\n return Lines;\n}());\nexports.Lines = Lines;\n\n});\n\nace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/layer/lines\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar oop = require(\"../lib/oop\");\nvar lang = require(\"../lib/lang\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar Lines = require(\"./lines\").Lines;\nvar nls = require(\"../config\").nls;\nvar Gutter = /** @class */ (function () {\n function Gutter(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n this.gutterWidth = 0;\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n this.$lines = new Lines(this.element);\n this.$lines.$offsetCoefficient = 1;\n }\n Gutter.prototype.setSession = function (session) {\n if (this.session)\n this.session.off(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session)\n session.on(\"change\", this.$updateAnnotations);\n };\n Gutter.prototype.addGutterDecoration = function (row, className) {\n if (window.console)\n console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n Gutter.prototype.removeGutterDecoration = function (row, className) {\n if (window.console)\n console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n Gutter.prototype.setAnnotations = function (annotations) {\n this.$annotations = [];\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo)\n rowInfo = this.$annotations[row] = { text: [], type: [] };\n var annoText = annotation.text;\n var annoType = annotation.type;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n if (rowInfo.text.indexOf(annoText) === -1) {\n rowInfo.text.push(annoText);\n rowInfo.type.push(annoType);\n }\n var className = annotation.className;\n if (className)\n rowInfo.className = className;\n else if (annoType == \"error\")\n rowInfo.className = \" ace_error\";\n else if (annoType == \"warning\" && rowInfo.className != \" ace_error\")\n rowInfo.className = \" ace_warning\";\n else if (annoType == \"info\" && (!rowInfo.className))\n rowInfo.className = \" ace_info\";\n }\n };\n Gutter.prototype.$updateAnnotations = function (delta) {\n if (!this.$annotations.length)\n return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n }\n else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n }\n else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n Gutter.prototype.update = function (config) {\n this.config = config;\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n this.oldLastRow = lastRow;\n this.config = config;\n this.$lines.moveContainer(config);\n this.$updateCursorRow();\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var cell = null;\n var index = -1;\n var row = firstRow;\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n if (row > lastRow) {\n while (this.$lines.getLength() > index + 1)\n this.$lines.pop();\n break;\n }\n cell = this.$lines.get(++index);\n if (cell) {\n cell.row = row;\n }\n else {\n cell = this.$lines.createCell(row, config, this.session, onCreateCell);\n this.$lines.push(cell);\n }\n this.$renderCell(cell, config, fold, row);\n row++;\n }\n this._signal(\"afterRender\");\n this.$updateGutterWidth(config);\n };\n Gutter.prototype.$updateGutterWidth = function (config) {\n var session = this.session;\n var gutterRenderer = session.gutterRenderer || this.$renderer;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineText = this.$lines.last() ? this.$lines.last().text : \"\";\n if (this.$fixedWidth || session.$useWrapMode)\n lastLineText = session.getLength() + firstLineNumber - 1;\n var gutterWidth = gutterRenderer\n ? gutterRenderer.getWidth(session, lastLineText, config)\n : lastLineText.toString().length * config.characterWidth;\n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth; (this.element.parentNode).style.width =\n this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n this._signal(\"changeGutterWidth\", gutterWidth);\n }\n };\n Gutter.prototype.$updateCursorRow = function () {\n if (!this.$highlightGutterLine)\n return;\n var position = this.session.selection.getCursor();\n if (this.$cursorRow === position.row)\n return;\n this.$cursorRow = position.row;\n };\n Gutter.prototype.updateLineHighlight = function () {\n if (!this.$highlightGutterLine)\n return;\n var row = this.session.selection.cursor.row;\n this.$cursorRow = row;\n if (this.$cursorCell && this.$cursorCell.row == row)\n return;\n if (this.$cursorCell)\n this.$cursorCell.element.className = this.$cursorCell.element.className.replace(\"ace_gutter-active-line \", \"\");\n var cells = this.$lines.cells;\n this.$cursorCell = null;\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n if (cell.row >= this.$cursorRow) {\n if (cell.row > this.$cursorRow) {\n var fold = this.session.getFoldLine(this.$cursorRow);\n if (i > 0 && fold && fold.start.row == cells[i - 1].row)\n cell = cells[i - 1];\n else\n break;\n }\n cell.element.className = \"ace_gutter-active-line \" + cell.element.className;\n this.$cursorCell = cell;\n break;\n }\n }\n };\n Gutter.prototype.scrollLines = function (config) {\n var oldConfig = this.config;\n this.config = config;\n this.$updateCursorRow();\n if (this.$lines.pageChanged(oldConfig, config))\n return this.update(config);\n this.$lines.moveContainer(config);\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n this.session.getLength() - 1);\n var oldLastRow = this.oldLastRow;\n this.oldLastRow = lastRow;\n if (!oldConfig || oldLastRow < config.firstRow)\n return this.update(config);\n if (lastRow < oldConfig.firstRow)\n return this.update(config);\n if (oldConfig.firstRow < config.firstRow)\n for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--)\n this.$lines.shift();\n if (oldLastRow > lastRow)\n for (var row = this.session.getFoldedRowCount(lastRow + 1, oldLastRow); row > 0; row--)\n this.$lines.pop();\n if (config.firstRow < oldConfig.firstRow) {\n this.$lines.unshift(this.$renderLines(config, config.firstRow, oldConfig.firstRow - 1));\n }\n if (lastRow > oldLastRow) {\n this.$lines.push(this.$renderLines(config, oldLastRow + 1, lastRow));\n }\n this.updateLineHighlight();\n this._signal(\"afterRender\");\n this.$updateGutterWidth(config);\n };\n Gutter.prototype.$renderLines = function (config, firstRow, lastRow) {\n var fragment = [];\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n var cell = this.$lines.createCell(row, config, this.session, onCreateCell);\n this.$renderCell(cell, config, foldLine, row);\n fragment.push(cell);\n row++;\n }\n return fragment;\n };\n Gutter.prototype.$renderCell = function (cell, config, fold, row) {\n var element = cell.element;\n var session = this.session;\n var textNode = element.childNodes[0];\n var foldWidget = element.childNodes[1];\n var annotationNode = element.childNodes[2];\n var annotationIconNode = annotationNode.firstChild;\n var firstLineNumber = session.$firstLineNumber;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var gutterRenderer = session.gutterRenderer || this.$renderer;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var foldStart = fold ? fold.start.row : Number.MAX_VALUE;\n var lineHeight = config.lineHeight + \"px\";\n var className = this.$useSvgGutterIcons ? \"ace_gutter-cell_svg-icons \" : \"ace_gutter-cell \";\n var iconClassName = this.$useSvgGutterIcons ? \"ace_icon_svg\" : \"ace_icon\";\n var rowText = (gutterRenderer\n ? gutterRenderer.getText(session, row)\n : row + firstLineNumber).toString();\n if (this.$highlightGutterLine) {\n if (row == this.$cursorRow || (fold && row < this.$cursorRow && row >= foldStart && this.$cursorRow <= fold.end.row)) {\n className += \"ace_gutter-active-line \";\n if (this.$cursorCell != cell) {\n if (this.$cursorCell)\n this.$cursorCell.element.className = this.$cursorCell.element.className.replace(\"ace_gutter-active-line \", \"\");\n this.$cursorCell = cell;\n }\n }\n }\n if (breakpoints[row])\n className += breakpoints[row];\n if (decorations[row])\n className += decorations[row];\n if (this.$annotations[row] && row !== foldStart)\n className += this.$annotations[row].className;\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null)\n c = foldWidgets[row] = session.getFoldWidget(row);\n }\n if (c) {\n var foldClass = \"ace_fold-widget ace_\" + c;\n var isClosedFold = c == \"start\" && row == foldStart && row < fold.end.row;\n if (isClosedFold) {\n foldClass += \" ace_closed\";\n var foldAnnotationClass = '';\n var annotationInFold = false;\n for (var i = row + 1; i <= fold.end.row; i++) {\n if (!this.$annotations[i])\n continue;\n if (this.$annotations[i].className === \" ace_error\") {\n annotationInFold = true;\n foldAnnotationClass = \" ace_error_fold\";\n break;\n }\n if (this.$annotations[i].className === \" ace_warning\") {\n annotationInFold = true;\n foldAnnotationClass = \" ace_warning_fold\";\n continue;\n }\n }\n className += foldAnnotationClass;\n }\n else\n foldClass += \" ace_open\";\n if (foldWidget.className != foldClass)\n foldWidget.className = foldClass;\n dom.setStyle(foldWidget.style, \"height\", lineHeight);\n dom.setStyle(foldWidget.style, \"display\", \"inline-block\");\n foldWidget.setAttribute(\"role\", \"button\");\n foldWidget.setAttribute(\"tabindex\", \"-1\");\n var foldRange = session.getFoldWidgetRange(row);\n if (foldRange)\n foldWidget.setAttribute(\"aria-label\", nls(\"Toggle code folding, rows $0 through $1\", [foldRange.start.row + 1, foldRange.end.row + 1]));\n else {\n if (fold)\n foldWidget.setAttribute(\"aria-label\", nls(\"Toggle code folding, rows $0 through $1\", [fold.start.row + 1, fold.end.row + 1]));\n else\n foldWidget.setAttribute(\"aria-label\", nls(\"Toggle code folding, row $0\", [row + 1]));\n }\n if (isClosedFold) {\n foldWidget.setAttribute(\"aria-expanded\", \"false\");\n foldWidget.setAttribute(\"title\", nls(\"Unfold code\"));\n }\n else {\n foldWidget.setAttribute(\"aria-expanded\", \"true\");\n foldWidget.setAttribute(\"title\", nls(\"Fold code\"));\n }\n }\n else {\n if (foldWidget) {\n dom.setStyle(foldWidget.style, \"display\", \"none\");\n foldWidget.setAttribute(\"tabindex\", \"0\");\n foldWidget.removeAttribute(\"role\");\n foldWidget.removeAttribute(\"aria-label\");\n }\n }\n if (annotationInFold && this.$showFoldedAnnotations) {\n annotationNode.className = \"ace_gutter_annotation\";\n annotationIconNode.className = iconClassName;\n annotationIconNode.className += foldAnnotationClass;\n dom.setStyle(annotationIconNode.style, \"height\", lineHeight);\n dom.setStyle(annotationNode.style, \"display\", \"block\");\n dom.setStyle(annotationNode.style, \"height\", lineHeight);\n annotationNode.setAttribute(\"aria-label\", nls(\"Read annotations row $0\", [rowText]));\n annotationNode.setAttribute(\"tabindex\", \"-1\");\n annotationNode.setAttribute(\"role\", \"button\");\n }\n else if (this.$annotations[row]) {\n annotationNode.className = \"ace_gutter_annotation\";\n annotationIconNode.className = iconClassName;\n if (this.$useSvgGutterIcons)\n annotationIconNode.className += this.$annotations[row].className;\n else\n element.classList.add(this.$annotations[row].className.replace(\" \", \"\"));\n dom.setStyle(annotationIconNode.style, \"height\", lineHeight);\n dom.setStyle(annotationNode.style, \"display\", \"block\");\n dom.setStyle(annotationNode.style, \"height\", lineHeight);\n annotationNode.setAttribute(\"aria-label\", nls(\"Read annotations row $0\", [rowText]));\n annotationNode.setAttribute(\"tabindex\", \"-1\");\n annotationNode.setAttribute(\"role\", \"button\");\n }\n else {\n dom.setStyle(annotationNode.style, \"display\", \"none\");\n annotationNode.removeAttribute(\"aria-label\");\n annotationNode.removeAttribute(\"role\");\n annotationNode.setAttribute(\"tabindex\", \"0\");\n }\n if (rowText !== textNode.data) {\n textNode.data = rowText;\n }\n if (element.className != className)\n element.className = className;\n dom.setStyle(cell.element.style, \"height\", this.$lines.computeLineHeight(row, config, session) + \"px\");\n dom.setStyle(cell.element.style, \"top\", this.$lines.computeLineTop(row, config, session) + \"px\");\n cell.text = rowText;\n if (annotationNode.style.display === \"none\" && foldWidget.style.display === \"none\")\n cell.element.setAttribute(\"aria-hidden\", true);\n else\n cell.element.setAttribute(\"aria-hidden\", false);\n return cell;\n };\n Gutter.prototype.setHighlightGutterLine = function (highlightGutterLine) {\n this.$highlightGutterLine = highlightGutterLine;\n };\n Gutter.prototype.setShowLineNumbers = function (show) {\n this.$renderer = !show && {\n getWidth: function () { return 0; },\n getText: function () { return \"\"; }\n };\n };\n Gutter.prototype.getShowLineNumbers = function () {\n return this.$showLineNumbers;\n };\n Gutter.prototype.setShowFoldWidgets = function (show) {\n if (show)\n dom.addCssClass(this.element, \"ace_folding-enabled\");\n else\n dom.removeCssClass(this.element, \"ace_folding-enabled\");\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n Gutter.prototype.getShowFoldWidgets = function () {\n return this.$showFoldWidgets;\n };\n Gutter.prototype.$computePadding = function () {\n if (!this.element.firstChild)\n return { left: 0, right: 0 };\n var style = dom.computedStyle(/**@type{Element}*/ (this.element.firstChild));\n this.$padding = {};\n this.$padding.left = (parseInt(style.borderLeftWidth) || 0)\n + (parseInt(style.paddingLeft) || 0) + 1;\n this.$padding.right = (parseInt(style.borderRightWidth) || 0)\n + (parseInt(style.paddingRight) || 0);\n return this.$padding;\n };\n Gutter.prototype.getRegion = function (point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left)\n return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right)\n return \"foldWidgets\";\n };\n return Gutter;\n}());\nGutter.prototype.$fixedWidth = false;\nGutter.prototype.$highlightGutterLine = true;\nGutter.prototype.$renderer = \"\";\nGutter.prototype.$showLineNumbers = true;\nGutter.prototype.$showFoldWidgets = true;\noop.implement(Gutter.prototype, EventEmitter);\nfunction onCreateCell(element) {\n var textNode = document.createTextNode('');\n element.appendChild(textNode);\n var foldWidget = dom.createElement(\"span\");\n element.appendChild(foldWidget);\n var annotationNode = dom.createElement(\"span\");\n element.appendChild(annotationNode);\n var annotationIconNode = dom.createElement(\"span\");\n annotationNode.appendChild(annotationIconNode);\n return element;\n}\nexports.Gutter = Gutter;\n\n});\n\nace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar dom = require(\"../lib/dom\");\nvar Marker = /** @class */ (function () {\n function Marker(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n }\n Marker.prototype.setPadding = function (padding) {\n this.$padding = padding;\n };\n Marker.prototype.setSession = function (session) {\n this.session = session;\n };\n Marker.prototype.setMarkers = function (markers) {\n this.markers = markers;\n };\n Marker.prototype.elt = function (className, css) {\n var x = this.i != -1 && this.element.childNodes[this.i];\n if (!x) {\n x = document.createElement(\"div\");\n this.element.appendChild(x);\n this.i = -1;\n }\n else {\n this.i++;\n }\n x.style.cssText = css;\n x.className = className;\n };\n Marker.prototype.update = function (config) {\n if (!config)\n return;\n this.config = config;\n this.i = 0;\n var html;\n for (var key in this.markers) {\n var marker = this.markers[key];\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty())\n continue;\n range = range.toScreenRange(this.session);\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n marker.renderer(html, range, left, top, config);\n }\n else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n }\n else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n }\n else if (range.isMultiLine()) {\n if (marker.type == \"text\")\n this.drawTextMarker(html, range, marker.clazz, config);\n else\n this.drawMultiLineMarker(html, range, marker.clazz, config);\n }\n else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n if (this.i != -1) {\n while (this.i < this.element.childElementCount)\n this.element.removeChild(this.element.lastChild);\n }\n };\n Marker.prototype.$getTop = function (row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n Marker.prototype.drawTextMarker = function (stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0;\n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var lineRange = new Range(row, range.start.column, row, curr);\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n this.drawSingleLineMarker(stringBuilder, lineRange, clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\"\n + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), layerConfig, row == end ? 0 : 1, extraStyle);\n }\n };\n Marker.prototype.drawMultiLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height = config.lineHeight;\n var top = this.$getTop(range.start.row, config);\n var left = padding + range.start.column * config.characterWidth;\n extraStyle = extraStyle || \"\";\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n var range1 = range.clone();\n range1.end.row = range1.start.row;\n range1.end.column = this.session.getLine(range1.start.row).length;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br1 ace_start\", config, null, extraStyle);\n }\n else {\n this.elt(clazz + \" ace_br1 ace_start\", \"height:\" + height + \"px;\" + \"right:0;\" + \"top:\" + top + \"px;left:\" + left + \"px;\" + (extraStyle || \"\"));\n }\n if (this.session.$bidiHandler.isBidiRow(range.end.row)) {\n var range1 = range.clone();\n range1.start.row = range1.end.row;\n range1.start.column = 0;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br12\", config, null, extraStyle);\n }\n else {\n top = this.$getTop(range.end.row, config);\n var width = range.end.column * config.characterWidth;\n this.elt(clazz + \" ace_br12\", \"height:\" + height + \"px;\" +\n \"width:\" + width + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + padding + \"px;\" + (extraStyle || \"\"));\n }\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0)\n return;\n top = this.$getTop(range.start.row + 1, config);\n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n this.elt(clazz + (radiusClass ? \" ace_br\" + radiusClass : \"\"), \"height:\" + height + \"px;\" +\n \"right:0;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + padding + \"px;\" + (extraStyle || \"\"));\n };\n Marker.prototype.drawSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {\n if (this.session.$bidiHandler.isBidiRow(range.start.row))\n return this.drawBidiSingleLineMarker(stringBuilder, range, clazz, config, extraLength, extraStyle);\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"width:\" + width + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + left + \"px;\" + (extraStyle || \"\"));\n };\n Marker.prototype.drawBidiSingleLineMarker = function (stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;\n var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);\n selections.forEach(function (selection) {\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"width:\" + (selection.width + (extraLength || 0)) + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:\" + (padding + selection.left) + \"px;\" + (extraStyle || \"\"));\n }, this);\n };\n Marker.prototype.drawFullLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row)\n height += this.$getTop(range.end.row, config) - top;\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:0;right:0;\" + (extraStyle || \"\"));\n };\n Marker.prototype.drawScreenLineMarker = function (stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n this.elt(clazz, \"height:\" + height + \"px;\" +\n \"top:\" + top + \"px;\" +\n \"left:0;right:0;\" + (extraStyle || \"\"));\n };\n return Marker;\n}());\nMarker.prototype.$padding = 0;\nfunction getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n}\nexports.Marker = Marker;\n\n});\n\nace.define(\"ace/layer/text_util\",[\"require\",\"exports\",\"module\"], function(require, exports, module){// Tokens for which Ace just uses a simple TextNode and does not add any special className.\nvar textTokens = new Set([\"text\", \"rparen\", \"lparen\"]);\nexports.isTextToken = function (tokenType) {\n return textTokens.has(tokenType);\n};\n\n});\n\nace.define(\"ace/layer/text\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/layer/lines\",\"ace/lib/event_emitter\",\"ace/config\",\"ace/layer/text_util\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar dom = require(\"../lib/dom\");\nvar lang = require(\"../lib/lang\");\nvar Lines = require(\"./lines\").Lines;\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar nls = require(\"../config\").nls;\nvar isTextToken = require(\"./text_util\").isTextToken;\nvar Text = /** @class */ (function () {\n function Text(parentEl) {\n this.dom = dom;\n this.element = this.dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n this.$lines = new Lines(this.element);\n }\n Text.prototype.$updateEolChar = function () {\n var doc = this.session.doc;\n var unixMode = doc.getNewLineCharacter() == \"\\n\" && doc.getNewLineMode() != \"windows\";\n var EOL_CHAR = unixMode ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF;\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n };\n Text.prototype.setPadding = function (padding) {\n this.$padding = padding;\n this.element.style.margin = \"0 \" + padding + \"px\";\n };\n Text.prototype.getLineHeight = function () {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n Text.prototype.getCharacterWidth = function () {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n Text.prototype.$setFontMetrics = function (measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", \n function (e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n };\n Text.prototype.checkForSizeChanges = function () {\n this.$fontMetrics.checkForSizeChanges();\n };\n Text.prototype.$pollSizeChanges = function () {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n Text.prototype.setSession = function (session) {\n this.session = session;\n if (session)\n this.$computeTabString();\n };\n Text.prototype.setShowInvisibles = function (showInvisibles) {\n if (this.showInvisibles == showInvisibles)\n return false;\n this.showInvisibles = showInvisibles;\n if (typeof showInvisibles == \"string\") {\n this.showSpaces = /tab/i.test(showInvisibles);\n this.showTabs = /space/i.test(showInvisibles);\n this.showEOL = /eol/i.test(showInvisibles);\n }\n else {\n this.showSpaces = this.showTabs = this.showEOL = showInvisibles;\n }\n this.$computeTabString();\n return true;\n };\n Text.prototype.setDisplayIndentGuides = function (display) {\n if (this.displayIndentGuides == display)\n return false;\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n Text.prototype.setHighlightIndentGuides = function (highlight) {\n if (this.$highlightIndentGuides === highlight)\n return false;\n this.$highlightIndentGuides = highlight;\n return highlight;\n };\n Text.prototype.$computeTabString = function () {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize; var tabStr = this.$tabStrings = [0];\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showTabs) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_tab\";\n span.textContent = lang.stringRepeat(this.TAB_CHAR, i);\n tabStr.push(span);\n }\n else {\n tabStr.push(this.dom.createTextNode(lang.stringRepeat(\" \", i), this.element));\n }\n }\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = this.showSpaces ? \" ace_invisible ace_invisible_space\" : \"\";\n var spaceContent = this.showSpaces\n ? lang.stringRepeat(this.SPACE_CHAR, this.tabSize)\n : lang.stringRepeat(\" \", this.tabSize);\n var tabClass = this.showTabs ? \" ace_invisible ace_invisible_tab\" : \"\";\n var tabContent = this.showTabs\n ? lang.stringRepeat(this.TAB_CHAR, this.tabSize)\n : spaceContent;\n var span = this.dom.createElement(\"span\");\n span.className = className + spaceClass;\n span.textContent = spaceContent;\n this.$tabStrings[\" \"] = span;\n var span = this.dom.createElement(\"span\");\n span.className = className + tabClass;\n span.textContent = tabContent;\n this.$tabStrings[\"\\t\"] = span;\n }\n };\n Text.prototype.updateLines = function (config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow ||\n this.config.firstRow != config.firstRow) {\n return this.update(config);\n }\n this.config = config;\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n }\n else {\n row = foldLine.end.row;\n }\n }\n lineElementsIdx++;\n }\n var heightChanged = false;\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > last)\n break; var lineElement = lineElements[lineElementsIdx++];\n if (lineElement) {\n this.dom.removeChildren(lineElement);\n this.$renderLine(lineElement, row, row == foldStart ? foldLine : false);\n if (heightChanged)\n lineElement.style.top = this.$lines.computeLineTop(row, config, this.session) + \"px\";\n var height = (config.lineHeight * this.session.getRowLength(row)) + \"px\";\n if (lineElement.style.height != height) {\n heightChanged = true;\n lineElement.style.height = height;\n }\n }\n row++;\n }\n if (heightChanged) {\n while (lineElementsIdx < this.$lines.cells.length) {\n var cell = this.$lines.cells[lineElementsIdx++];\n cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + \"px\";\n }\n }\n };\n Text.prototype.scrollLines = function (config) {\n var oldConfig = this.config;\n this.config = config;\n if (this.$lines.pageChanged(oldConfig, config))\n return this.update(config);\n this.$lines.moveContainer(config);\n var lastRow = config.lastRow;\n var oldLastRow = oldConfig ? oldConfig.lastRow : -1;\n if (!oldConfig || oldLastRow < config.firstRow)\n return this.update(config);\n if (lastRow < oldConfig.firstRow)\n return this.update(config);\n if (!oldConfig || oldConfig.lastRow < config.firstRow)\n return this.update(config);\n if (config.lastRow < oldConfig.firstRow)\n return this.update(config);\n if (oldConfig.firstRow < config.firstRow)\n for (var row = this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row > 0; row--)\n this.$lines.shift();\n if (oldConfig.lastRow > config.lastRow)\n for (var row = this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row > 0; row--)\n this.$lines.pop();\n if (config.firstRow < oldConfig.firstRow) {\n this.$lines.unshift(this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1));\n }\n if (config.lastRow > oldConfig.lastRow) {\n this.$lines.push(this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow));\n }\n this.$highlightIndentGuide();\n };\n Text.prototype.$renderLinesFragment = function (config, firstRow, lastRow) {\n var fragment = [];\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row + 1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n var line = this.$lines.createCell(row, config, this.session);\n var lineEl = line.element;\n this.dom.removeChildren(lineEl);\n dom.setStyle(lineEl.style, \"height\", this.$lines.computeLineHeight(row, config, this.session) + \"px\");\n dom.setStyle(lineEl.style, \"top\", this.$lines.computeLineTop(row, config, this.session) + \"px\");\n this.$renderLine(lineEl, row, row == foldStart ? foldLine : false);\n if (this.$useLineGroups()) {\n lineEl.className = \"ace_line_group\";\n }\n else {\n lineEl.className = \"ace_line\";\n }\n fragment.push(line);\n row++;\n }\n return fragment;\n };\n Text.prototype.update = function (config) {\n this.$lines.moveContainer(config);\n this.config = config;\n var firstRow = config.firstRow;\n var lastRow = config.lastRow;\n var lines = this.$lines;\n while (lines.getLength())\n lines.pop();\n lines.push(this.$renderLinesFragment(config, firstRow, lastRow));\n };\n Text.prototype.$renderToken = function (parent, screenColumn, token, value) {\n var self = this;\n var re = /(\\t)|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\uFEFF\\uFFF9-\\uFFFC\\u2066\\u2067\\u2068\\u202A\\u202B\\u202D\\u202E\\u202C\\u2069]+)|(\\u3000)|([\\u1100-\\u115F\\u11A3-\\u11A7\\u11FA-\\u11FF\\u2329-\\u232A\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3001-\\u303E\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u31BA\\u31C0-\\u31E3\\u31F0-\\u321E\\u3220-\\u3247\\u3250-\\u32FE\\u3300-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uA960-\\uA97C\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFF01-\\uFF60\\uFFE0-\\uFFE6]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n var valueFragment = this.dom.createFragment(this.element);\n var m;\n var i = 0;\n while (m = re.exec(value)) {\n var tab = m[1];\n var simpleSpace = m[2];\n var controlCharacter = m[3];\n var cjkSpace = m[4];\n var cjk = m[5];\n if (!self.showSpaces && simpleSpace)\n continue;\n var before = i != m.index ? value.slice(i, m.index) : \"\";\n i = m.index + m[0].length;\n if (before) {\n valueFragment.appendChild(this.dom.createTextNode(before, this.element));\n }\n if (tab) {\n var tabSize = self.session.getScreenTabSize(screenColumn + m.index);\n valueFragment.appendChild(self.$tabStrings[tabSize].cloneNode(true));\n screenColumn += tabSize - 1;\n }\n else if (simpleSpace) {\n if (self.showSpaces) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_space\";\n span.textContent = lang.stringRepeat(self.SPACE_CHAR, simpleSpace.length);\n valueFragment.appendChild(span);\n }\n else {\n valueFragment.appendChild(this.dom.createTextNode(simpleSpace, this.element));\n }\n }\n else if (controlCharacter) {\n var span = this.dom.createElement(\"span\");\n span.className = \"ace_invisible ace_invisible_space ace_invalid\";\n span.textContent = lang.stringRepeat(self.SPACE_CHAR, controlCharacter.length);\n valueFragment.appendChild(span);\n }\n else if (cjkSpace) {\n screenColumn += 1;\n var span = this.dom.createElement(\"span\");\n span.style.width = (self.config.characterWidth * 2) + \"px\";\n span.className = self.showSpaces ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n span.textContent = self.showSpaces ? self.SPACE_CHAR : cjkSpace;\n valueFragment.appendChild(span);\n }\n else if (cjk) {\n screenColumn += 1;\n var span = this.dom.createElement(\"span\");\n span.style.width = (self.config.characterWidth * 2) + \"px\";\n span.className = \"ace_cjk\";\n span.textContent = cjk;\n valueFragment.appendChild(span);\n }\n }\n valueFragment.appendChild(this.dom.createTextNode(i ? value.slice(i) : value, this.element));\n if (!isTextToken(token.type)) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var span = this.dom.createElement(\"span\");\n if (token.type == \"fold\") {\n span.style.width = (token.value.length * this.config.characterWidth) + \"px\";\n span.setAttribute(\"title\", nls(\"Unfold code\"));\n }\n span.className = classes;\n span.appendChild(valueFragment);\n parent.appendChild(span);\n }\n else {\n parent.appendChild(valueFragment);\n }\n return screenColumn + value.length;\n };\n Text.prototype.renderIndentGuide = function (parent, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max)\n return value;\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n var count = cols / this.tabSize;\n for (var i = 0; i < count; i++) {\n parent.appendChild(this.$tabStrings[\" \"].cloneNode(true));\n }\n this.$highlightIndentGuide();\n return value.substr(cols);\n }\n else if (value[0] == \"\\t\") {\n for (var i = 0; i < cols; i++) {\n parent.appendChild(this.$tabStrings[\"\\t\"].cloneNode(true));\n }\n this.$highlightIndentGuide();\n return value.substr(cols);\n }\n this.$highlightIndentGuide();\n return value;\n };\n Text.prototype.$highlightIndentGuide = function () {\n if (!this.$highlightIndentGuides || !this.displayIndentGuides)\n return;\n this.$highlightIndentGuideMarker = {\n indentLevel: undefined,\n start: undefined,\n end: undefined,\n dir: undefined\n };\n var lines = this.session.doc.$lines;\n if (!lines)\n return;\n var cursor = this.session.selection.getCursor();\n var initialIndent = /^\\s*/.exec(this.session.doc.getLine(cursor.row))[0].length;\n var elementIndentLevel = Math.floor(initialIndent / this.tabSize);\n this.$highlightIndentGuideMarker = {\n indentLevel: elementIndentLevel,\n start: cursor.row\n };\n var bracketHighlight = this.session.$bracketHighlight;\n if (bracketHighlight) {\n var ranges = this.session.$bracketHighlight.ranges;\n for (var i = 0; i < ranges.length; i++) {\n if (cursor.row !== ranges[i].start.row) {\n this.$highlightIndentGuideMarker.end = ranges[i].start.row;\n if (cursor.row > ranges[i].start.row) {\n this.$highlightIndentGuideMarker.dir = -1;\n }\n else {\n this.$highlightIndentGuideMarker.dir = 1;\n }\n break;\n }\n }\n }\n if (!this.$highlightIndentGuideMarker.end) {\n if (lines[cursor.row] !== '' && cursor.column === lines[cursor.row].length) {\n this.$highlightIndentGuideMarker.dir = 1;\n for (var i = cursor.row + 1; i < lines.length; i++) {\n var line = lines[i];\n var currentIndent = /^\\s*/.exec(line)[0].length;\n if (line !== '') {\n this.$highlightIndentGuideMarker.end = i;\n if (currentIndent <= initialIndent)\n break;\n }\n }\n }\n }\n this.$renderHighlightIndentGuide();\n };\n Text.prototype.$clearActiveIndentGuide = function () {\n var cells = this.$lines.cells;\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var childNodes = cell.element.childNodes;\n if (childNodes.length > 0) {\n for (var j = 0; j < childNodes.length; j++) {\n if (childNodes[j].classList && childNodes[j].classList.contains(\"ace_indent-guide-active\")) {\n childNodes[j].classList.remove(\"ace_indent-guide-active\");\n break;\n }\n }\n }\n }\n };\n Text.prototype.$setIndentGuideActive = function (cell, indentLevel) {\n var line = this.session.doc.getLine(cell.row);\n if (line !== \"\") {\n var childNodes = cell.element.childNodes;\n if (childNodes) {\n var node = childNodes[indentLevel - 1];\n if (node && node.classList && node.classList.contains(\"ace_indent-guide\"))\n node.classList.add(\"ace_indent-guide-active\");\n }\n }\n };\n Text.prototype.$renderHighlightIndentGuide = function () {\n if (!this.$lines)\n return;\n var cells = this.$lines.cells;\n this.$clearActiveIndentGuide();\n var indentLevel = this.$highlightIndentGuideMarker.indentLevel;\n if (indentLevel !== 0) {\n if (this.$highlightIndentGuideMarker.dir === 1) {\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n if (this.$highlightIndentGuideMarker.end && cell.row >= this.$highlightIndentGuideMarker.start\n + 1) {\n if (cell.row >= this.$highlightIndentGuideMarker.end)\n break;\n this.$setIndentGuideActive(cell, indentLevel);\n }\n }\n }\n else {\n for (var i = cells.length - 1; i >= 0; i--) {\n var cell = cells[i];\n if (this.$highlightIndentGuideMarker.end && cell.row < this.$highlightIndentGuideMarker.start) {\n if (cell.row <= this.$highlightIndentGuideMarker.end)\n break;\n this.$setIndentGuideActive(cell, indentLevel);\n }\n }\n }\n }\n };\n Text.prototype.$createLineElement = function (parent) {\n var lineEl = this.dom.createElement(\"div\");\n lineEl.className = \"ace_line\";\n lineEl.style.height = this.config.lineHeight + \"px\";\n return lineEl;\n };\n Text.prototype.$renderWrappedLine = function (parent, tokens, splits) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n var lineEl = this.$createLineElement();\n parent.appendChild(lineEl);\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(lineEl, value, splitChars);\n if (!value)\n continue;\n chars -= value.length;\n }\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value);\n chars += value.length;\n }\n else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value.substring(0, splitChars - chars));\n value = value.substring(splitChars - chars);\n chars = splitChars;\n lineEl = this.$createLineElement();\n parent.appendChild(lineEl);\n lineEl.appendChild(this.dom.createTextNode(lang.stringRepeat(\"\\xa0\", splits.indent), this.element));\n split++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(lineEl, screenColumn, token, value);\n }\n }\n }\n if (splits[splits.length - 1] > this.MAX_LINE_LENGTH)\n this.$renderOverflowMessage(lineEl, screenColumn, null, \"\", true);\n };\n Text.prototype.$renderSimpleLine = function (parent, tokens) {\n var screenColumn = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n value = this.renderIndentGuide(parent, value);\n if (!value)\n continue;\n }\n if (screenColumn + value.length > this.MAX_LINE_LENGTH)\n return this.$renderOverflowMessage(parent, screenColumn, token, value);\n screenColumn = this.$renderToken(parent, screenColumn, token, value);\n }\n };\n Text.prototype.$renderOverflowMessage = function (parent, screenColumn, token, value, hide) {\n token && this.$renderToken(parent, screenColumn, token, value.slice(0, this.MAX_LINE_LENGTH - screenColumn));\n var overflowEl = this.dom.createElement(\"span\");\n overflowEl.className = \"ace_inline_button ace_keyword ace_toggle_wrap\";\n overflowEl.textContent = hide ? \"\" : \"\";\n parent.appendChild(overflowEl);\n };\n Text.prototype.$renderLine = function (parent, row, foldLine) {\n if (!foldLine && foldLine != false)\n foldLine = this.session.getFoldLine(row);\n if (foldLine)\n var tokens = this.$getFoldLineTokens(row, foldLine);\n else\n var tokens = this.session.getTokens(row);\n var lastLineEl = parent;\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n if (splits && splits.length) {\n this.$renderWrappedLine(parent, tokens, splits);\n var lastLineEl = parent.lastChild;\n }\n else {\n var lastLineEl = parent;\n if (this.$useLineGroups()) {\n lastLineEl = this.$createLineElement();\n parent.appendChild(lastLineEl);\n }\n this.$renderSimpleLine(lastLineEl, tokens);\n }\n }\n else if (this.$useLineGroups()) {\n lastLineEl = this.$createLineElement();\n parent.appendChild(lastLineEl);\n }\n if (this.showEOL && lastLineEl) {\n if (foldLine)\n row = foldLine.end.row;\n var invisibleEl = this.dom.createElement(\"span\");\n invisibleEl.className = \"ace_invisible ace_invisible_eol\";\n invisibleEl.textContent = row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR;\n lastLineEl.appendChild(invisibleEl);\n }\n };\n Text.prototype.$getFoldLineTokens = function (row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n function addTokens(tokens, from, to) {\n var idx = 0, col = 0;\n while ((col + tokens[idx].value.length) < from) {\n col += tokens[idx].value.length;\n idx++;\n if (idx == tokens.length)\n return;\n }\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > (to - from))\n value = value.substring(0, to - from);\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n col = from + value.length;\n idx += 1;\n }\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n }\n else\n renderTokens.push(tokens[idx]);\n col += value.length;\n idx += 1;\n }\n }\n var tokens = session.getTokens(row);\n foldLine.walk(function (placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n }\n else {\n if (isNewRow)\n tokens = session.getTokens(row);\n if (tokens.length)\n addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n return renderTokens;\n };\n Text.prototype.$useLineGroups = function () {\n return this.session.getUseWrapMode();\n };\n return Text;\n}());\nText.prototype.EOF_CHAR = \"\\xB6\";\nText.prototype.EOL_CHAR_LF = \"\\xAC\";\nText.prototype.EOL_CHAR_CRLF = \"\\xa4\";\nText.prototype.EOL_CHAR = Text.prototype.EOL_CHAR_LF;\nText.prototype.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\nText.prototype.SPACE_CHAR = \"\\xB7\";\nText.prototype.$padding = 0;\nText.prototype.MAX_LINE_LENGTH = 10000;\nText.prototype.showInvisibles = false;\nText.prototype.showSpaces = false;\nText.prototype.showTabs = false;\nText.prototype.showEOL = false;\nText.prototype.displayIndentGuides = true;\nText.prototype.$highlightIndentGuides = true;\nText.prototype.$tabStrings = [];\nText.prototype.destroy = {};\nText.prototype.onChangeTabSize = Text.prototype.$computeTabString;\noop.implement(Text.prototype, EventEmitter);\nexports.Text = Text;\n\n});\n\nace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar Cursor = /** @class */ (function () {\n function Cursor(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = this.$updateOpacity.bind(this);\n }\n Cursor.prototype.$updateOpacity = function (val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--;)\n dom.setStyle(cursors[i].style, \"opacity\", val ? \"\" : \"0\");\n };\n Cursor.prototype.$startCssAnimation = function () {\n var cursors = this.cursors;\n for (var i = cursors.length; i--;)\n cursors[i].style.animationDuration = this.blinkInterval + \"ms\";\n this.$isAnimating = true;\n setTimeout(function () {\n if (this.$isAnimating) {\n dom.addCssClass(this.element, \"ace_animate-blinking\");\n }\n }.bind(this));\n };\n Cursor.prototype.$stopCssAnimation = function () {\n this.$isAnimating = false;\n dom.removeCssClass(this.element, \"ace_animate-blinking\");\n };\n Cursor.prototype.setPadding = function (padding) {\n this.$padding = padding;\n };\n Cursor.prototype.setSession = function (session) {\n this.session = session;\n };\n Cursor.prototype.setBlinking = function (blinking) {\n if (blinking != this.isBlinking) {\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n Cursor.prototype.setBlinkInterval = function (blinkInterval) {\n if (blinkInterval != this.blinkInterval) {\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n Cursor.prototype.setSmoothBlinking = function (smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.restartTimer();\n }\n };\n Cursor.prototype.addCursor = function () {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n Cursor.prototype.removeCursor = function () {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n Cursor.prototype.hideCursor = function () {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n Cursor.prototype.showCursor = function () {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n Cursor.prototype.restartTimer = function () {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n this.$stopCssAnimation();\n if (this.smoothBlinking) {\n this.$isSmoothBlinking = false;\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n update(true);\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible) {\n this.$stopCssAnimation();\n return;\n }\n if (this.smoothBlinking) {\n this.$isSmoothBlinking = true;\n setTimeout(function () {\n if (this.$isSmoothBlinking) {\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }\n }.bind(this));\n }\n if (dom.HAS_CSS_ANIMATION) {\n this.$startCssAnimation();\n }\n else {\n var blink = /**@this{Cursor}*/ function () {\n this.timeoutId = setTimeout(function () {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n this.intervalId = setInterval(function () {\n update(true);\n blink();\n }, this.blinkInterval);\n blink();\n }\n };\n Cursor.prototype.getPixelPosition = function (position, onScreen) {\n if (!this.config || !this.session)\n return { left: 0, top: 0 };\n if (!position)\n position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : pos.column * this.config.characterWidth);\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *\n this.config.lineHeight;\n return { left: cursorLeft, top: cursorTop };\n };\n Cursor.prototype.isCursorInView = function (pixelPos, config) {\n return pixelPos.top >= 0 && pixelPos.top < config.maxHeight;\n };\n Cursor.prototype.update = function (config) {\n this.config = config;\n var selections = this.session.$selectionMarkers;\n var i = 0, cursorIndex = 0;\n if (selections === undefined || selections.length === 0) {\n selections = [{ cursor: null }];\n }\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n if ((pixelPos.top > config.height + config.offset ||\n pixelPos.top < 0) && i > 1) {\n continue;\n }\n var element = this.cursors[cursorIndex++] || this.addCursor();\n var style = element.style;\n if (!this.drawCursor) {\n if (!this.isCursorInView(pixelPos, config)) {\n dom.setStyle(style, \"display\", \"none\");\n }\n else {\n dom.setStyle(style, \"display\", \"block\");\n dom.translate(element, pixelPos.left, pixelPos.top);\n dom.setStyle(style, \"width\", Math.round(config.characterWidth) + \"px\");\n dom.setStyle(style, \"height\", config.lineHeight + \"px\");\n }\n }\n else {\n this.drawCursor(element, pixelPos, config, selections[i], this.session);\n }\n }\n while (this.cursors.length > cursorIndex)\n this.removeCursor();\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n Cursor.prototype.$setOverwrite = function (overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite)\n dom.addCssClass(this.element, \"ace_overwrite-cursors\");\n else\n dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n Cursor.prototype.destroy = function () {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n return Cursor;\n}());\nCursor.prototype.$padding = 0;\nCursor.prototype.drawCursor = null;\nexports.Cursor = Cursor;\n\n});\n\nace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar event = require(\"./lib/event\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar MAX_SCROLL_H = 0x8000;\nvar Scrollbar = /** @class */ (function () {\n function Scrollbar(parent, classSuffix) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + classSuffix;\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.inner.textContent = \"\\xa0\";\n this.element.appendChild(this.inner);\n parent.appendChild(this.element);\n this.setVisible(false);\n this.skipEvent = false;\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n }\n Scrollbar.prototype.setVisible = function (isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n return Scrollbar;\n}());\noop.implement(Scrollbar.prototype, EventEmitter);\nvar VScrollBar = /** @class */ (function (_super) {\n __extends(VScrollBar, _super);\n function VScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-v') || this;\n _this.scrollTop = 0;\n _this.scrollHeight = 0;\n renderer.$scrollbarWidth =\n _this.width = dom.scrollbarWidth(parent.ownerDocument);\n _this.inner.style.width =\n _this.element.style.width = (_this.width || 15) + 5 + \"px\";\n _this.$minWidth = 0;\n return _this;\n }\n VScrollBar.prototype.onScroll = function () {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n this._emit(\"scroll\", { data: this.scrollTop });\n }\n this.skipEvent = false;\n };\n VScrollBar.prototype.getWidth = function () {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n VScrollBar.prototype.setHeight = function (height) {\n this.element.style.height = height + \"px\";\n };\n VScrollBar.prototype.setScrollHeight = function (height) {\n this.scrollHeight = height;\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n }\n else if (this.coeff != 1) {\n this.coeff = 1;\n }\n this.inner.style.height = height + \"px\";\n };\n VScrollBar.prototype.setScrollTop = function (scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n return VScrollBar;\n}(Scrollbar));\nVScrollBar.prototype.setInnerHeight = VScrollBar.prototype.setScrollHeight;\nvar HScrollBar = /** @class */ (function (_super) {\n __extends(HScrollBar, _super);\n function HScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-h') || this;\n _this.scrollLeft = 0;\n _this.height = renderer.$scrollbarWidth;\n _this.inner.style.height =\n _this.element.style.height = (_this.height || 15) + 5 + \"px\";\n return _this;\n }\n HScrollBar.prototype.onScroll = function () {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n this._emit(\"scroll\", { data: this.scrollLeft });\n }\n this.skipEvent = false;\n };\n HScrollBar.prototype.getHeight = function () {\n return this.isVisible ? this.height : 0;\n };\n HScrollBar.prototype.setWidth = function (width) {\n this.element.style.width = width + \"px\";\n };\n HScrollBar.prototype.setInnerWidth = function (width) {\n this.inner.style.width = width + \"px\";\n };\n HScrollBar.prototype.setScrollWidth = function (width) {\n this.inner.style.width = width + \"px\";\n };\n HScrollBar.prototype.setScrollLeft = function (scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n return HScrollBar;\n}(Scrollbar));\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n\n});\n\nace.define(\"ace/scrollbar_custom\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar event = require(\"./lib/event\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\ndom.importCssString(\".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\\n position: absolute;\\n background: rgba(128, 128, 128, 0.6);\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n border: 1px solid #bbb;\\n border-radius: 2px;\\n z-index: 8;\\n}\\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\\n position: absolute;\\n z-index: 6;\\n background: none;\\n overflow: hidden!important;\\n}\\n.ace_editor>.ace_sb-v {\\n z-index: 6;\\n right: 0;\\n top: 0;\\n width: 12px;\\n}\\n.ace_editor>.ace_sb-v div {\\n z-index: 8;\\n right: 0;\\n width: 100%;\\n}\\n.ace_editor>.ace_sb-h {\\n bottom: 0;\\n left: 0;\\n height: 12px;\\n}\\n.ace_editor>.ace_sb-h div {\\n bottom: 0;\\n height: 100%;\\n}\\n.ace_editor>.ace_sb_grabbed {\\n z-index: 8;\\n background: #000;\\n}\", \"ace_scrollbar.css\", false);\nvar ScrollBar = /** @class */ (function () {\n function ScrollBar(parent, classSuffix) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_sb\" + classSuffix;\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"\";\n this.element.appendChild(this.inner);\n this.VScrollWidth = 12;\n this.HScrollHeight = 12;\n parent.appendChild(this.element);\n this.setVisible(false);\n this.skipEvent = false;\n event.addMultiMouseDownListener(this.element, [500, 300, 300], this, \"onMouseDown\");\n }\n ScrollBar.prototype.setVisible = function (isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n return ScrollBar;\n}());\noop.implement(ScrollBar.prototype, EventEmitter);\nvar VScrollBar = /** @class */ (function (_super) {\n __extends(VScrollBar, _super);\n function VScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-v') || this;\n _this.scrollTop = 0;\n _this.scrollHeight = 0;\n _this.parent = parent;\n _this.width = _this.VScrollWidth;\n _this.renderer = renderer;\n _this.inner.style.width = _this.element.style.width = (_this.width || 15) + \"px\";\n _this.$minWidth = 0;\n return _this;\n }\n VScrollBar.prototype.onMouseDown = function (eType, e) {\n if (eType !== \"mousedown\")\n return;\n if (event.getButton(e) !== 0 || e.detail === 2) {\n return;\n }\n if (e.target === this.inner) {\n var self = this;\n var mousePageY = e.clientY;\n var onMouseMove = function (e) {\n mousePageY = e.clientY;\n };\n var onMouseUp = function () {\n clearInterval(timerId);\n };\n var startY = e.clientY;\n var startTop = this.thumbTop;\n var onScrollInterval = function () {\n if (mousePageY === undefined)\n return;\n var scrollTop = self.scrollTopFromThumbTop(startTop + mousePageY - startY);\n if (scrollTop === self.scrollTop)\n return;\n self._emit(\"scroll\", { data: scrollTop });\n };\n event.capture(this.inner, onMouseMove, onMouseUp);\n var timerId = setInterval(onScrollInterval, 20);\n return event.preventDefault(e);\n }\n var top = e.clientY - this.element.getBoundingClientRect().top - this.thumbHeight / 2;\n this._emit(\"scroll\", { data: this.scrollTopFromThumbTop(top) });\n return event.preventDefault(e);\n };\n VScrollBar.prototype.getHeight = function () {\n return this.height;\n };\n VScrollBar.prototype.scrollTopFromThumbTop = function (thumbTop) {\n var scrollTop = thumbTop * (this.pageHeight - this.viewHeight) / (this.slideHeight - this.thumbHeight);\n scrollTop = scrollTop >> 0;\n if (scrollTop < 0) {\n scrollTop = 0;\n }\n else if (scrollTop > this.pageHeight - this.viewHeight) {\n scrollTop = this.pageHeight - this.viewHeight;\n }\n return scrollTop;\n };\n VScrollBar.prototype.getWidth = function () {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n VScrollBar.prototype.setHeight = function (height) {\n this.height = Math.max(0, height);\n this.slideHeight = this.height;\n this.viewHeight = this.height;\n this.setScrollHeight(this.pageHeight, true);\n };\n VScrollBar.prototype.setScrollHeight = function (height, force) {\n if (this.pageHeight === height && !force)\n return;\n this.pageHeight = height;\n this.thumbHeight = this.slideHeight * this.viewHeight / this.pageHeight;\n if (this.thumbHeight > this.slideHeight)\n this.thumbHeight = this.slideHeight;\n if (this.thumbHeight < 15)\n this.thumbHeight = 15;\n this.inner.style.height = this.thumbHeight + \"px\";\n if (this.scrollTop > (this.pageHeight - this.viewHeight)) {\n this.scrollTop = (this.pageHeight - this.viewHeight);\n if (this.scrollTop < 0)\n this.scrollTop = 0;\n this._emit(\"scroll\", { data: this.scrollTop });\n }\n };\n VScrollBar.prototype.setScrollTop = function (scrollTop) {\n this.scrollTop = scrollTop;\n if (scrollTop < 0)\n scrollTop = 0;\n this.thumbTop = scrollTop * (this.slideHeight - this.thumbHeight) / (this.pageHeight - this.viewHeight);\n this.inner.style.top = this.thumbTop + \"px\";\n };\n return VScrollBar;\n}(ScrollBar));\nVScrollBar.prototype.setInnerHeight = VScrollBar.prototype.setScrollHeight;\nvar HScrollBar = /** @class */ (function (_super) {\n __extends(HScrollBar, _super);\n function HScrollBar(parent, renderer) {\n var _this = _super.call(this, parent, '-h') || this;\n _this.scrollLeft = 0;\n _this.scrollWidth = 0;\n _this.height = _this.HScrollHeight;\n _this.inner.style.height = _this.element.style.height = (_this.height || 12) + \"px\";\n _this.renderer = renderer;\n return _this;\n }\n HScrollBar.prototype.onMouseDown = function (eType, e) {\n if (eType !== \"mousedown\")\n return;\n if (event.getButton(e) !== 0 || e.detail === 2) {\n return;\n }\n if (e.target === this.inner) {\n var self = this;\n var mousePageX = e.clientX;\n var onMouseMove = function (e) {\n mousePageX = e.clientX;\n };\n var onMouseUp = function () {\n clearInterval(timerId);\n };\n var startX = e.clientX;\n var startLeft = this.thumbLeft;\n var onScrollInterval = function () {\n if (mousePageX === undefined)\n return;\n var scrollLeft = self.scrollLeftFromThumbLeft(startLeft + mousePageX - startX);\n if (scrollLeft === self.scrollLeft)\n return;\n self._emit(\"scroll\", { data: scrollLeft });\n };\n event.capture(this.inner, onMouseMove, onMouseUp);\n var timerId = setInterval(onScrollInterval, 20);\n return event.preventDefault(e);\n }\n var left = e.clientX - this.element.getBoundingClientRect().left - this.thumbWidth / 2;\n this._emit(\"scroll\", { data: this.scrollLeftFromThumbLeft(left) });\n return event.preventDefault(e);\n };\n HScrollBar.prototype.getHeight = function () {\n return this.isVisible ? this.height : 0;\n };\n HScrollBar.prototype.scrollLeftFromThumbLeft = function (thumbLeft) {\n var scrollLeft = thumbLeft * (this.pageWidth - this.viewWidth) / (this.slideWidth - this.thumbWidth);\n scrollLeft = scrollLeft >> 0;\n if (scrollLeft < 0) {\n scrollLeft = 0;\n }\n else if (scrollLeft > this.pageWidth - this.viewWidth) {\n scrollLeft = this.pageWidth - this.viewWidth;\n }\n return scrollLeft;\n };\n HScrollBar.prototype.setWidth = function (width) {\n this.width = Math.max(0, width);\n this.element.style.width = this.width + \"px\";\n this.slideWidth = this.width;\n this.viewWidth = this.width;\n this.setScrollWidth(this.pageWidth, true);\n };\n HScrollBar.prototype.setScrollWidth = function (width, force) {\n if (this.pageWidth === width && !force)\n return;\n this.pageWidth = width;\n this.thumbWidth = this.slideWidth * this.viewWidth / this.pageWidth;\n if (this.thumbWidth > this.slideWidth)\n this.thumbWidth = this.slideWidth;\n if (this.thumbWidth < 15)\n this.thumbWidth = 15;\n this.inner.style.width = this.thumbWidth + \"px\";\n if (this.scrollLeft > (this.pageWidth - this.viewWidth)) {\n this.scrollLeft = (this.pageWidth - this.viewWidth);\n if (this.scrollLeft < 0)\n this.scrollLeft = 0;\n this._emit(\"scroll\", { data: this.scrollLeft });\n }\n };\n HScrollBar.prototype.setScrollLeft = function (scrollLeft) {\n this.scrollLeft = scrollLeft;\n if (scrollLeft < 0)\n scrollLeft = 0;\n this.thumbLeft = scrollLeft * (this.slideWidth - this.thumbWidth) / (this.pageWidth - this.viewWidth);\n this.inner.style.left = (this.thumbLeft) + \"px\";\n };\n return HScrollBar;\n}(ScrollBar));\nHScrollBar.prototype.setInnerWidth = HScrollBar.prototype.setScrollWidth;\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n\n});\n\nace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"], function(require, exports, module){\"use strict\";\nvar event = require(\"./lib/event\");\nvar RenderLoop = /** @class */ (function () {\n function RenderLoop(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.$recursionLimit = 2;\n this.window = win || window;\n var _self = this;\n this._flush = function (ts) {\n _self.pending = false;\n var changes = _self.changes;\n if (changes) {\n event.blockIdle(100);\n _self.changes = 0;\n _self.onRender(changes);\n }\n if (_self.changes) {\n if (_self.$recursionLimit-- < 0)\n return;\n _self.schedule();\n }\n else {\n _self.$recursionLimit = 2;\n }\n };\n }\n RenderLoop.prototype.schedule = function (change) {\n this.changes = this.changes | change;\n if (this.changes && !this.pending) {\n event.nextFrame(this._flush);\n this.pending = true;\n }\n };\n RenderLoop.prototype.clear = function (change) {\n var changes = this.changes;\n this.changes = 0;\n return changes;\n };\n return RenderLoop;\n}());\nexports.RenderLoop = RenderLoop;\n\n});\n\nace.define(\"ace/layer/font_metrics\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(require, exports, module){var oop = require(\"../lib/oop\");\nvar dom = require(\"../lib/dom\");\nvar lang = require(\"../lib/lang\");\nvar event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar CHAR_COUNT = 512;\nvar USE_OBSERVER = typeof ResizeObserver == \"function\";\nvar L = 200;\nvar FontMetrics = /** @class */ (function () {\n function FontMetrics(parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n this.$measureNode.textContent = lang.stringRepeat(\"X\", CHAR_COUNT);\n this.$characterSize = { width: 0, height: 0 };\n if (USE_OBSERVER)\n this.$addObserver();\n else\n this.checkForSizeChanges();\n }\n FontMetrics.prototype.$setMeasureNodeStyles = function (style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n }\n else {\n style.font = \"inherit\";\n }\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n FontMetrics.prototype.checkForSizeChanges = function (size) {\n if (size === undefined)\n size = this.$measureSizes();\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n this._emit(\"changeCharacterSize\", { data: size });\n }\n };\n FontMetrics.prototype.$addObserver = function () {\n var self = this;\n this.$observer = new window.ResizeObserver(function (e) {\n self.checkForSizeChanges();\n });\n this.$observer.observe(this.$measureNode);\n };\n FontMetrics.prototype.$pollSizeChanges = function () {\n if (this.$pollSizeChangesTimer || this.$observer)\n return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = event.onIdle(function cb() {\n self.checkForSizeChanges();\n event.onIdle(cb, 500);\n }, 500);\n };\n FontMetrics.prototype.setPolling = function (val) {\n if (val) {\n this.$pollSizeChanges();\n }\n else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n FontMetrics.prototype.$measureSizes = function (node) {\n var size = {\n height: (node || this.$measureNode).clientHeight,\n width: (node || this.$measureNode).clientWidth / CHAR_COUNT\n };\n if (size.width === 0 || size.height === 0)\n return null;\n return size;\n };\n FontMetrics.prototype.$measureCharWidth = function (ch) {\n this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n FontMetrics.prototype.getCharacterWidth = function (ch) {\n var w = this.charSizes[ch];\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n return w;\n };\n FontMetrics.prototype.destroy = function () {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$observer)\n this.$observer.disconnect();\n if (this.el && this.el.parentNode)\n this.el.parentNode.removeChild(this.el);\n };\n FontMetrics.prototype.$getZoom = function (element) {\n if (!element || !element.parentElement)\n return 1;\n return (window.getComputedStyle(element)[\"zoom\"] || 1) * this.$getZoom(element.parentElement);\n };\n FontMetrics.prototype.$initTransformMeasureNodes = function () {\n var t = function (t, l) {\n return [\"div\", {\n style: \"position: absolute;top:\" + t + \"px;left:\" + l + \"px;\"\n }];\n };\n this.els = dom.buildDom([t(0, 0), t(L, 0), t(0, L), t(L, L)], this.el);\n };\n FontMetrics.prototype.transformCoordinates = function (clientPos, elPos) {\n if (clientPos) {\n var zoom = this.$getZoom(this.el);\n clientPos = mul(1 / zoom, clientPos);\n }\n function solve(l1, l2, r) {\n var det = l1[1] * l2[0] - l1[0] * l2[1];\n return [\n (-l2[1] * r[0] + l2[0] * r[1]) / det,\n (+l1[1] * r[0] - l1[0] * r[1]) / det\n ];\n }\n function sub(a, b) { return [a[0] - b[0], a[1] - b[1]]; }\n function add(a, b) { return [a[0] + b[0], a[1] + b[1]]; }\n function mul(a, b) { return [a * b[0], a * b[1]]; }\n if (!this.els)\n this.$initTransformMeasureNodes();\n function p(el) {\n var r = el.getBoundingClientRect();\n return [r.left, r.top];\n }\n var a = p(this.els[0]);\n var b = p(this.els[1]);\n var c = p(this.els[2]);\n var d = p(this.els[3]);\n var h = solve(sub(d, b), sub(d, c), sub(add(b, c), add(d, a)));\n var m1 = mul(1 + h[0], sub(b, a));\n var m2 = mul(1 + h[1], sub(c, a));\n if (elPos) {\n var x = elPos;\n var k = h[0] * x[0] / L + h[1] * x[1] / L + 1;\n var ut = add(mul(x[0], m1), mul(x[1], m2));\n return add(mul(1 / k / L, ut), a);\n }\n var u = sub(clientPos, a);\n var f = solve(sub(m1, mul(h[0], u)), sub(m2, mul(h[1], u)), u);\n return mul(L, f);\n };\n return FontMetrics;\n}());\nFontMetrics.prototype.$characterSize = { width: 0, height: 0 };\noop.implement(FontMetrics.prototype, EventEmitter);\nexports.FontMetrics = FontMetrics;\n\n});\n\nace.define(\"ace/css/editor-css\",[\"require\",\"exports\",\"module\"], function(require, exports, module){/*\nstyles = []\nfor (var i = 1; i < 16; i++) {\n styles.push(\".ace_br\" + i + \"{\" + (\n [\"top-left\", \"top-right\", \"bottom-right\", \"bottom-left\"]\n ).map(function(x, j) {\n return i & (1< .ace_line, .ace_text-layer > .ace_line_group {\\n contain: style size layout;\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n}\\n\\n.ace_hidpi .ace_text-layer,\\n.ace_hidpi .ace_gutter-layer,\\n.ace_hidpi .ace_content,\\n.ace_hidpi .ace_gutter {\\n contain: strict;\\n}\\n.ace_hidpi .ace_text-layer > .ace_line, \\n.ace_hidpi .ace_text-layer > .ace_line_group {\\n contain: strict;\\n}\\n\\n.ace_cjk {\\n display: inline-block;\\n text-align: center;\\n}\\n\\n.ace_cursor-layer {\\n z-index: 4;\\n}\\n\\n.ace_cursor {\\n z-index: 4;\\n position: absolute;\\n box-sizing: border-box;\\n border-left: 2px solid;\\n /* workaround for smooth cursor repaintng whole screen in chrome */\\n transform: translatez(0);\\n}\\n\\n.ace_multiselect .ace_cursor {\\n border-left-width: 1px;\\n}\\n\\n.ace_slim-cursors .ace_cursor {\\n border-left-width: 1px;\\n}\\n\\n.ace_overwrite-cursors .ace_cursor {\\n border-left-width: 0;\\n border-bottom: 1px solid;\\n}\\n\\n.ace_hidden-cursors .ace_cursor {\\n opacity: 0.2;\\n}\\n\\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\\n opacity: 0;\\n}\\n\\n.ace_smooth-blinking .ace_cursor {\\n transition: opacity 0.18s;\\n}\\n\\n.ace_animate-blinking .ace_cursor {\\n animation-duration: 1000ms;\\n animation-timing-function: step-end;\\n animation-name: blink-ace-animate;\\n animation-iteration-count: infinite;\\n}\\n\\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\\n animation-duration: 1000ms;\\n animation-timing-function: ease-in-out;\\n animation-name: blink-ace-animate-smooth;\\n}\\n \\n@keyframes blink-ace-animate {\\n from, to { opacity: 1; }\\n 60% { opacity: 0; }\\n}\\n\\n@keyframes blink-ace-animate-smooth {\\n from, to { opacity: 1; }\\n 45% { opacity: 1; }\\n 60% { opacity: 0; }\\n 85% { opacity: 0; }\\n}\\n\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\n position: absolute;\\n z-index: 3;\\n}\\n\\n.ace_marker-layer .ace_selection {\\n position: absolute;\\n z-index: 5;\\n}\\n\\n.ace_marker-layer .ace_bracket {\\n position: absolute;\\n z-index: 6;\\n}\\n\\n.ace_marker-layer .ace_error_bracket {\\n position: absolute;\\n border-bottom: 1px solid #DE5555;\\n border-radius: 0;\\n}\\n\\n.ace_marker-layer .ace_active-line {\\n position: absolute;\\n z-index: 2;\\n}\\n\\n.ace_marker-layer .ace_selected-word {\\n position: absolute;\\n z-index: 4;\\n box-sizing: border-box;\\n}\\n\\n.ace_line .ace_fold {\\n box-sizing: border-box;\\n\\n display: inline-block;\\n height: 11px;\\n margin-top: -2px;\\n vertical-align: middle;\\n\\n background-image:\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\n background-repeat: no-repeat, repeat-x;\\n background-position: center center, top left;\\n color: transparent;\\n\\n border: 1px solid black;\\n border-radius: 2px;\\n\\n cursor: pointer;\\n pointer-events: auto;\\n}\\n\\n.ace_dark .ace_fold {\\n}\\n\\n.ace_fold:hover{\\n background-image:\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\n url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\n}\\n\\n.ace_tooltip {\\n background-color: #f5f5f5;\\n border: 1px solid gray;\\n border-radius: 1px;\\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\n color: black;\\n max-width: 100%;\\n padding: 3px 4px;\\n position: fixed;\\n z-index: 999999;\\n box-sizing: border-box;\\n cursor: default;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n line-height: normal;\\n font-style: normal;\\n font-weight: normal;\\n letter-spacing: normal;\\n pointer-events: none;\\n overflow: auto;\\n max-width: min(60em, 66vw);\\n overscroll-behavior: contain;\\n}\\n.ace_tooltip pre {\\n white-space: pre-wrap;\\n}\\n\\n.ace_tooltip.ace_dark {\\n background-color: #636363;\\n color: #fff;\\n}\\n\\n.ace_tooltip:focus {\\n outline: 1px solid #5E9ED6;\\n}\\n\\n.ace_icon {\\n display: inline-block;\\n width: 18px;\\n vertical-align: top;\\n}\\n\\n.ace_icon_svg {\\n display: inline-block;\\n width: 12px;\\n vertical-align: top;\\n -webkit-mask-repeat: no-repeat;\\n -webkit-mask-size: 12px;\\n -webkit-mask-position: center;\\n}\\n\\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\\n padding-right: 13px;\\n}\\n\\n.ace_fold-widget {\\n box-sizing: border-box;\\n\\n margin: 0 -12px 0 1px;\\n display: none;\\n width: 11px;\\n vertical-align: top;\\n\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\n background-repeat: no-repeat;\\n background-position: center;\\n\\n border-radius: 3px;\\n \\n border: 1px solid transparent;\\n cursor: pointer;\\n}\\n\\n.ace_folding-enabled .ace_fold-widget {\\n display: inline-block; \\n}\\n\\n.ace_fold-widget.ace_end {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\n}\\n\\n.ace_fold-widget.ace_closed {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\n}\\n\\n.ace_fold-widget:hover {\\n border: 1px solid rgba(0, 0, 0, 0.3);\\n background-color: rgba(255, 255, 255, 0.2);\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\n}\\n\\n.ace_fold-widget:active {\\n border: 1px solid rgba(0, 0, 0, 0.4);\\n background-color: rgba(0, 0, 0, 0.05);\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\n}\\n/**\\n * Dark version for fold widgets\\n */\\n.ace_dark .ace_fold-widget {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\n}\\n.ace_dark .ace_fold-widget.ace_end {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\n}\\n.ace_dark .ace_fold-widget.ace_closed {\\n background-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\n}\\n.ace_dark .ace_fold-widget:hover {\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\n background-color: rgba(255, 255, 255, 0.1);\\n}\\n.ace_dark .ace_fold-widget:active {\\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\n}\\n\\n.ace_inline_button {\\n border: 1px solid lightgray;\\n display: inline-block;\\n margin: -1px 8px;\\n padding: 0 5px;\\n pointer-events: auto;\\n cursor: pointer;\\n}\\n.ace_inline_button:hover {\\n border-color: gray;\\n background: rgba(200,200,200,0.2);\\n display: inline-block;\\n pointer-events: auto;\\n}\\n\\n.ace_fold-widget.ace_invalid {\\n background-color: #FFB4B4;\\n border-color: #DE5555;\\n}\\n\\n.ace_fade-fold-widgets .ace_fold-widget {\\n transition: opacity 0.4s ease 0.05s;\\n opacity: 0;\\n}\\n\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\n transition: opacity 0.05s ease 0.05s;\\n opacity:1;\\n}\\n\\n.ace_underline {\\n text-decoration: underline;\\n}\\n\\n.ace_bold {\\n font-weight: bold;\\n}\\n\\n.ace_nobold .ace_bold {\\n font-weight: normal;\\n}\\n\\n.ace_italic {\\n font-style: italic;\\n}\\n\\n\\n.ace_error-marker {\\n background-color: rgba(255, 0, 0,0.2);\\n position: absolute;\\n z-index: 9;\\n}\\n\\n.ace_highlight-marker {\\n background-color: rgba(255, 255, 0,0.2);\\n position: absolute;\\n z-index: 8;\\n}\\n\\n.ace_mobile-menu {\\n position: absolute;\\n line-height: 1.5;\\n border-radius: 4px;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n user-select: none;\\n background: white;\\n box-shadow: 1px 3px 2px grey;\\n border: 1px solid #dcdcdc;\\n color: black;\\n}\\n.ace_dark > .ace_mobile-menu {\\n background: #333;\\n color: #ccc;\\n box-shadow: 1px 3px 2px grey;\\n border: 1px solid #444;\\n\\n}\\n.ace_mobile-button {\\n padding: 2px;\\n cursor: pointer;\\n overflow: hidden;\\n}\\n.ace_mobile-button:hover {\\n background-color: #eee;\\n opacity:1;\\n}\\n.ace_mobile-button:active {\\n background-color: #ddd;\\n}\\n\\n.ace_placeholder {\\n font-family: arial;\\n transform: scale(0.9);\\n transform-origin: left;\\n white-space: pre;\\n opacity: 0.7;\\n margin: 0 10px;\\n}\\n\\n.ace_ghost_text {\\n opacity: 0.5;\\n font-style: italic;\\n white-space: pre;\\n}\\n\\n.ace_screenreader-only {\\n position:absolute;\\n left:-10000px;\\n top:auto;\\n width:1px;\\n height:1px;\\n overflow:hidden;\\n}\";\n\n});\n\nace.define(\"ace/layer/decorators\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"../lib/dom\");\nvar oop = require(\"../lib/oop\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar Decorator = /** @class */ (function () {\n function Decorator(parent, renderer) {\n this.canvas = dom.createElement(\"canvas\");\n this.renderer = renderer;\n this.pixelRatio = 1;\n this.maxHeight = renderer.layerConfig.maxHeight;\n this.lineHeight = renderer.layerConfig.lineHeight;\n this.canvasHeight = parent.parent.scrollHeight;\n this.heightRatio = this.canvasHeight / this.maxHeight;\n this.canvasWidth = parent.width;\n this.minDecorationHeight = (2 * this.pixelRatio) | 0;\n this.halfMinDecorationHeight = (this.minDecorationHeight / 2) | 0;\n this.canvas.width = this.canvasWidth;\n this.canvas.height = this.canvasHeight;\n this.canvas.style.top = 0 + \"px\";\n this.canvas.style.right = 0 + \"px\";\n this.canvas.style.zIndex = 7 + \"px\";\n this.canvas.style.position = \"absolute\";\n this.colors = {};\n this.colors.dark = {\n \"error\": \"rgba(255, 18, 18, 1)\",\n \"warning\": \"rgba(18, 136, 18, 1)\",\n \"info\": \"rgba(18, 18, 136, 1)\"\n };\n this.colors.light = {\n \"error\": \"rgb(255,51,51)\",\n \"warning\": \"rgb(32,133,72)\",\n \"info\": \"rgb(35,68,138)\"\n };\n parent.element.appendChild(this.canvas);\n }\n Decorator.prototype.$updateDecorators = function (config) {\n var colors = (this.renderer.theme.isDark === true) ? this.colors.dark : this.colors.light;\n if (config) {\n this.maxHeight = config.maxHeight;\n this.lineHeight = config.lineHeight;\n this.canvasHeight = config.height;\n var allLineHeight = (config.lastRow + 1) * this.lineHeight;\n if (allLineHeight < this.canvasHeight) {\n this.heightRatio = 1;\n }\n else {\n this.heightRatio = this.canvasHeight / this.maxHeight;\n }\n }\n var ctx = this.canvas.getContext(\"2d\");\n function compare(a, b) {\n if (a.priority < b.priority)\n return -1;\n if (a.priority > b.priority)\n return 1;\n return 0;\n }\n var annotations = this.renderer.session.$annotations;\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n if (annotations) {\n var priorities = {\n \"info\": 1,\n \"warning\": 2,\n \"error\": 3\n };\n annotations.forEach(function (item) {\n item.priority = priorities[item.type] || null;\n });\n annotations = annotations.sort(compare);\n var foldData = this.renderer.session.$foldData;\n for (var i = 0; i < annotations.length; i++) {\n var row = annotations[i].row;\n var compensateFold = this.compensateFoldRows(row, foldData);\n var currentY = Math.round((row - compensateFold) * this.lineHeight * this.heightRatio);\n var y1 = Math.round(((row - compensateFold) * this.lineHeight * this.heightRatio));\n var y2 = Math.round((((row - compensateFold) * this.lineHeight + this.lineHeight) * this.heightRatio));\n var height = y2 - y1;\n if (height < this.minDecorationHeight) {\n var yCenter = ((y1 + y2) / 2) | 0;\n if (yCenter < this.halfMinDecorationHeight) {\n yCenter = this.halfMinDecorationHeight;\n }\n else if (yCenter + this.halfMinDecorationHeight > this.canvasHeight) {\n yCenter = this.canvasHeight - this.halfMinDecorationHeight;\n }\n y1 = Math.round(yCenter - this.halfMinDecorationHeight);\n y2 = Math.round(yCenter + this.halfMinDecorationHeight);\n }\n ctx.fillStyle = colors[annotations[i].type] || null;\n ctx.fillRect(0, currentY, this.canvasWidth, y2 - y1);\n }\n }\n var cursor = this.renderer.session.selection.getCursor();\n if (cursor) {\n var compensateFold = this.compensateFoldRows(cursor.row, foldData);\n var currentY = Math.round((cursor.row - compensateFold) * this.lineHeight * this.heightRatio);\n ctx.fillStyle = \"rgba(0, 0, 0, 0.5)\";\n ctx.fillRect(0, currentY, this.canvasWidth, 2);\n }\n };\n Decorator.prototype.compensateFoldRows = function (row, foldData) {\n var compensateFold = 0;\n if (foldData && foldData.length > 0) {\n for (var j = 0; j < foldData.length; j++) {\n if (row > foldData[j].start.row && row < foldData[j].end.row) {\n compensateFold += row - foldData[j].start.row;\n }\n else if (row >= foldData[j].end.row) {\n compensateFold += foldData[j].end.row - foldData[j].start.row;\n }\n }\n }\n return compensateFold;\n };\n return Decorator;\n}());\noop.implement(Decorator.prototype, EventEmitter);\nexports.Decorator = Decorator;\n\n});\n\nace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/config\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/scrollbar\",\"ace/scrollbar_custom\",\"ace/scrollbar_custom\",\"ace/renderloop\",\"ace/layer/font_metrics\",\"ace/lib/event_emitter\",\"ace/css/editor-css\",\"ace/layer/decorators\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar dom = require(\"./lib/dom\");\nvar lang = require(\"./lib/lang\");\nvar config = require(\"./config\");\nvar GutterLayer = require(\"./layer/gutter\").Gutter;\nvar MarkerLayer = require(\"./layer/marker\").Marker;\nvar TextLayer = require(\"./layer/text\").Text;\nvar CursorLayer = require(\"./layer/cursor\").Cursor;\nvar HScrollBar = require(\"./scrollbar\").HScrollBar;\nvar VScrollBar = require(\"./scrollbar\").VScrollBar;\nvar HScrollBarCustom = require(\"./scrollbar_custom\").HScrollBar;\nvar VScrollBarCustom = require(\"./scrollbar_custom\").VScrollBar;\nvar RenderLoop = require(\"./renderloop\").RenderLoop;\nvar FontMetrics = require(\"./layer/font_metrics\").FontMetrics;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar editorCss = require(\"./css/editor-css\");\nvar Decorator = require(\"./layer/decorators\").Decorator;\nvar useragent = require(\"./lib/useragent\");\ndom.importCssString(editorCss, \"ace_editor.css\", false);\nvar VirtualRenderer = /** @class */ (function () {\n function VirtualRenderer(container, theme) {\n var _self = this;\n this.container = container || dom.createElement(\"div\");\n dom.addCssClass(this.container, \"ace_editor\");\n if (dom.HI_DPI)\n dom.addCssClass(this.container, \"ace_hidpi\");\n this.setTheme(theme);\n if (config.get(\"useStrictCSP\") == null)\n config.set(\"useStrictCSP\", false);\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n this.$gutter.setAttribute(\"aria-hidden\", \"true\");\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n this.$markerBack = new MarkerLayer(this.content);\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n this.$markerFront = new MarkerLayer(this.content);\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n this.scrollBar =\n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.on(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.on(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n this.scrollTop = 0;\n this.scrollLeft = 0;\n this.cursorPos = {\n row: 0,\n column: 0\n };\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.on(\"changeCharacterSize\", function (e) {\n _self.updateCharacterSize();\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n _self._signal(\"changeCharacterSize\", e);\n });\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n this.layerConfig = {\n width: 1,\n padding: 0,\n firstRow: 0,\n firstRowScreen: 0,\n lastRow: 0,\n lineHeight: 0,\n characterWidth: 0,\n minHeight: 1,\n maxHeight: 1,\n offset: 0,\n height: 1,\n gutterOffset: 1\n };\n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n this.margin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n this.$keepTextAreaAtCursor = !useragent.isIOS;\n this.$loop = new RenderLoop(this.$renderChanges.bind(this), this.container.ownerDocument.defaultView);\n this.$loop.schedule(this.CHANGE_FULL);\n this.updateCharacterSize();\n this.setPadding(4);\n this.$addResizeObserver();\n config.resetOptions(this);\n config._signal(\"renderer\", this);\n }\n VirtualRenderer.prototype.updateCharacterSize = function () {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n this.layerConfig.characterWidth =\n this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight =\n this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n dom.setStyle(this.scroller.style, \"line-height\", this.lineHeight + \"px\");\n };\n VirtualRenderer.prototype.setSession = function (session) {\n if (this.session)\n this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0)\n session.setScrollTop(-this.scrollMargin.top);\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session)\n return;\n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode();\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n VirtualRenderer.prototype.updateLines = function (firstRow, lastRow, force) {\n if (lastRow === undefined)\n lastRow = Infinity;\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n }\n else {\n if (this.$changedLines.firstRow > firstRow)\n this.$changedLines.firstRow = firstRow;\n if (this.$changedLines.lastRow < lastRow)\n this.$changedLines.lastRow = lastRow;\n }\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force)\n this.$changedLines.lastRow = this.layerConfig.lastRow;\n else\n return;\n }\n if (this.$changedLines.firstRow > this.layerConfig.lastRow)\n return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n VirtualRenderer.prototype.onChangeNewLineMode = function () {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);\n };\n VirtualRenderer.prototype.onChangeTabSize = function () {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n VirtualRenderer.prototype.updateText = function () {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n VirtualRenderer.prototype.updateFull = function (force) {\n if (force)\n this.$renderChanges(this.CHANGE_FULL, true);\n else\n this.$loop.schedule(this.CHANGE_FULL);\n };\n VirtualRenderer.prototype.updateFontSize = function () {\n this.$textLayer.checkForSizeChanges();\n };\n VirtualRenderer.prototype.$updateSizeAsync = function () {\n if (this.$loop.pending)\n this.$size.$dirty = true;\n else\n this.onResize();\n };\n VirtualRenderer.prototype.onResize = function (force, gutterWidth, width, height) {\n if (this.resizing > 2)\n return;\n else if (this.resizing > 0)\n this.resizing++;\n else\n this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height)\n height = el.clientHeight || el.scrollHeight;\n if (!width)\n width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n if (this.$resizeTimer)\n this.$resizeTimer.cancel();\n if (!this.$size.scrollerHeight || (!width && !height))\n return this.resizing = 0;\n if (force)\n this.$gutterLayer.$padding = null;\n if (force)\n this.$renderChanges(changes | this.$changes, true);\n else\n this.$loop.schedule(changes | this.$changes);\n if (this.resizing)\n this.resizing = 0;\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n if (this.$customScrollbar) {\n this.$updateCustomScrollbar(true);\n }\n };\n VirtualRenderer.prototype.$updateCachedSize = function (force, gutterWidth, width, height) {\n height -= (this.$extraHeight || 0);\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n size.scrollerHeight = size.height;\n if (this.$horizScroll)\n size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.setHeight(size.scrollerHeight);\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n changes = changes | this.CHANGE_SCROLL;\n }\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n if (gutterWidth == null)\n gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n this.gutterWidth = gutterWidth;\n dom.setStyle(this.scrollBarH.element.style, \"left\", gutterWidth + \"px\");\n dom.setStyle(this.scroller.style, \"left\", gutterWidth + this.margin.left + \"px\");\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);\n dom.setStyle(this.$gutter.style, \"left\", this.margin.left + \"px\");\n var right = this.scrollBarV.getWidth() + \"px\";\n dom.setStyle(this.scrollBarH.element.style, \"right\", right);\n dom.setStyle(this.scroller.style, \"right\", right);\n dom.setStyle(this.scroller.style, \"bottom\", this.scrollBarH.getHeight());\n this.scrollBarH.setWidth(size.scrollerWidth);\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) {\n changes |= this.CHANGE_FULL;\n }\n }\n size.$dirty = !width || !height;\n if (changes)\n this._signal(\"resize\", oldSize);\n return changes;\n };\n VirtualRenderer.prototype.onGutterResize = function (width) {\n var gutterWidth = this.$showGutter ? width : 0;\n if (gutterWidth != this.gutterWidth)\n this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n }\n else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n }\n else {\n this.$computeLayerConfig();\n }\n };\n VirtualRenderer.prototype.adjustWrapLimit = function () {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n VirtualRenderer.prototype.setAnimatedScroll = function (shouldAnimate) {\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n VirtualRenderer.prototype.getAnimatedScroll = function () {\n return this.$animatedScroll;\n };\n VirtualRenderer.prototype.setShowInvisibles = function (showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n this.session.$bidiHandler.setShowInvisibles(showInvisibles);\n };\n VirtualRenderer.prototype.getShowInvisibles = function () {\n return this.getOption(\"showInvisibles\");\n };\n VirtualRenderer.prototype.getDisplayIndentGuides = function () {\n return this.getOption(\"displayIndentGuides\");\n };\n VirtualRenderer.prototype.setDisplayIndentGuides = function (display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n VirtualRenderer.prototype.getHighlightIndentGuides = function () {\n return this.getOption(\"highlightIndentGuides\");\n };\n VirtualRenderer.prototype.setHighlightIndentGuides = function (highlight) {\n this.setOption(\"highlightIndentGuides\", highlight);\n };\n VirtualRenderer.prototype.setShowPrintMargin = function (showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n VirtualRenderer.prototype.getShowPrintMargin = function () {\n return this.getOption(\"showPrintMargin\");\n };\n VirtualRenderer.prototype.setPrintMarginColumn = function (printMarginColumn) {\n this.setOption(\"printMarginColumn\", printMarginColumn);\n };\n VirtualRenderer.prototype.getPrintMarginColumn = function () {\n return this.getOption(\"printMarginColumn\");\n };\n VirtualRenderer.prototype.getShowGutter = function () {\n return this.getOption(\"showGutter\");\n };\n VirtualRenderer.prototype.setShowGutter = function (show) {\n return this.setOption(\"showGutter\", show);\n };\n VirtualRenderer.prototype.getFadeFoldWidgets = function () {\n return this.getOption(\"fadeFoldWidgets\");\n };\n VirtualRenderer.prototype.setFadeFoldWidgets = function (show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n VirtualRenderer.prototype.setHighlightGutterLine = function (shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n VirtualRenderer.prototype.getHighlightGutterLine = function () {\n return this.getOption(\"highlightGutterLine\");\n };\n VirtualRenderer.prototype.$updatePrintMargin = function () {\n if (!this.$showPrintMargin && !this.$printMarginEl)\n return;\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n var style = this.$printMarginEl.style;\n style.left = Math.round(this.characterWidth * this.$printMarginColumn + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n if (this.session && this.session.$wrap == -1)\n this.adjustWrapLimit();\n };\n VirtualRenderer.prototype.getContainerElement = function () {\n return this.container;\n };\n VirtualRenderer.prototype.getMouseEventTarget = function () {\n return this.scroller;\n };\n VirtualRenderer.prototype.getTextAreaContainer = function () {\n return this.container;\n };\n VirtualRenderer.prototype.$moveTextAreaToCursor = function () {\n if (this.$isMousePressed)\n return;\n var style = this.textarea.style;\n var composition = this.$composition;\n if (!this.$keepTextAreaAtCursor && !composition) {\n dom.translate(this.textarea, -100, 0);\n return;\n }\n var pixelPos = this.$cursorLayer.$pixelPos;\n if (!pixelPos)\n return;\n if (composition && composition.markerRange)\n pixelPos = this.$cursorLayer.getPixelPosition(composition.markerRange.start, true);\n var config = this.layerConfig;\n var posTop = pixelPos.top;\n var posLeft = pixelPos.left;\n posTop -= config.offset;\n var h = composition && composition.useTextareaForIME || useragent.isMobile ? this.lineHeight : 1;\n if (posTop < 0 || posTop > config.height - h) {\n dom.translate(this.textarea, 0, 0);\n return;\n }\n var w = 1;\n var maxTop = this.$size.height - h;\n if (!composition) {\n posTop += this.lineHeight;\n }\n else {\n if (composition.useTextareaForIME) {\n var val = this.textarea.value;\n w = this.characterWidth * (this.session.$getStringScreenWidth(val)[0]);\n }\n else {\n posTop += this.lineHeight + 2;\n }\n }\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w)\n posLeft = this.$size.scrollerWidth - w;\n posLeft += this.gutterWidth + this.margin.left;\n dom.setStyle(style, \"height\", h + \"px\");\n dom.setStyle(style, \"width\", w + \"px\");\n dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, maxTop));\n };\n VirtualRenderer.prototype.getFirstVisibleRow = function () {\n return this.layerConfig.firstRow;\n };\n VirtualRenderer.prototype.getFirstFullyVisibleRow = function () {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n VirtualRenderer.prototype.getLastFullyVisibleRow = function () {\n var config = this.layerConfig;\n var lastRow = config.lastRow;\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight)\n return lastRow - 1;\n return lastRow;\n };\n VirtualRenderer.prototype.getLastVisibleRow = function () {\n return this.layerConfig.lastRow;\n };\n VirtualRenderer.prototype.setPadding = function (padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n VirtualRenderer.prototype.setScrollMargin = function (top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top | 0;\n sm.bottom = bottom | 0;\n sm.right = right | 0;\n sm.left = left | 0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session)\n this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n VirtualRenderer.prototype.setMargin = function (top, bottom, left, right) {\n var sm = this.margin;\n sm.top = top | 0;\n sm.bottom = bottom | 0;\n sm.right = right | 0;\n sm.left = left | 0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);\n this.updateFull();\n };\n VirtualRenderer.prototype.getHScrollBarAlwaysVisible = function () {\n return this.$hScrollBarAlwaysVisible;\n };\n VirtualRenderer.prototype.setHScrollBarAlwaysVisible = function (alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n VirtualRenderer.prototype.getVScrollBarAlwaysVisible = function () {\n return this.$vScrollBarAlwaysVisible;\n };\n VirtualRenderer.prototype.setVScrollBarAlwaysVisible = function (alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n VirtualRenderer.prototype.$updateScrollBarV = function () {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n VirtualRenderer.prototype.$updateScrollBarH = function () {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n VirtualRenderer.prototype.freeze = function () {\n this.$frozen = true;\n };\n VirtualRenderer.prototype.unfreeze = function () {\n this.$frozen = false;\n };\n VirtualRenderer.prototype.$renderChanges = function (changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {\n this.$changes |= changes;\n return;\n }\n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n this._signal(\"beforeRender\", changes);\n if (this.session && this.session.$bidiHandler)\n this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);\n var config = this.layerConfig;\n if (changes & this.CHANGE_FULL ||\n changes & this.CHANGE_SIZE ||\n changes & this.CHANGE_TEXT ||\n changes & this.CHANGE_LINES ||\n changes & this.CHANGE_SCROLL ||\n changes & this.CHANGE_H_SCROLL) {\n changes |= this.$computeLayerConfig() | this.$loop.clear();\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - Math.max(this.layerConfig.firstRow, 0)) * this.lineHeight;\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig() | this.$loop.clear();\n }\n }\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL)\n this.$updateScrollBarH();\n dom.translate(this.content, -this.scrollLeft, -config.offset);\n var width = config.width + 2 * this.$padding + \"px\";\n var height = config.minHeight + \"px\";\n dom.setStyle(this.content.style, \"width\", width);\n dom.setStyle(this.content.style, \"height\", height);\n }\n if (changes & this.CHANGE_H_SCROLL) {\n dom.translate(this.content, -this.scrollLeft, -config.offset);\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller \" : \"ace_scroller ace_scroll-left \";\n if (this.enableKeyboardAccessibility)\n this.scroller.className += this.keyboardFocusClassName;\n }\n if (changes & this.CHANGE_FULL) {\n this.$changedLines = null;\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\", changes);\n return;\n }\n if (changes & this.CHANGE_SCROLL) {\n this.$changedLines = null;\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)\n this.$textLayer.update(config);\n else\n this.$textLayer.scrollLines(config);\n if (this.$showGutter) {\n if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES)\n this.$gutterLayer.update(config);\n else\n this.$gutterLayer.scrollLines(config);\n }\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\", changes);\n return;\n }\n if (changes & this.CHANGE_TEXT) {\n this.$changedLines = null;\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n else if (changes & this.CHANGE_CURSOR) {\n if (this.$highlightGutterLine)\n this.$gutterLayer.updateLineHighlight(config);\n if (this.$customScrollbar) {\n this.$scrollDecorator.$updateDecorators(config);\n }\n }\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n }\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n this._signal(\"afterRender\", changes);\n };\n VirtualRenderer.prototype.$autosize = function () {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight, Math.max((this.$minLines || 1) * this.lineHeight, height)) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll)\n desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)\n desiredHeight = this.$maxPixelHeight;\n var hideScrollbars = desiredHeight <= 2 * this.lineHeight;\n var vScroll = !hideScrollbars && height > maxHeight;\n if (desiredHeight != this.desiredHeight ||\n this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n this._signal(\"autosize\");\n }\n };\n VirtualRenderer.prototype.$computeLayerConfig = function () {\n var session = this.session;\n var size = this.$size;\n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n var longestLine = this.$getLongestLine();\n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||\n size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n var hScrollChanged = this.$horizScroll !== horizScroll;\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n if (this.$maxLines && this.lineHeight > 1)\n this.$autosize();\n var minHeight = size.scrollerHeight + this.lineHeight;\n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd\n ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd\n : 0;\n maxHeight += scrollPastEnd;\n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||\n size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n var offset = this.scrollTop % this.lineHeight;\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +\n firstRowHeight;\n offset = this.scrollTop - firstRowScreen * lineHeight;\n var changes = 0;\n if (this.layerConfig.width != longestLine || hScrollChanged)\n changes = this.CHANGE_H_SCROLL;\n if (hScrollChanged || vScrollChanged) {\n changes |= this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n this._signal(\"scrollbarVisibilityChanged\");\n if (vScrollChanged)\n longestLine = this.$getLongestLine();\n }\n this.layerConfig = {\n width: longestLine,\n padding: this.$padding,\n firstRow: firstRow,\n firstRowScreen: firstRowScreen,\n lastRow: lastRow,\n lineHeight: lineHeight,\n characterWidth: this.characterWidth,\n minHeight: minHeight,\n maxHeight: maxHeight,\n offset: offset,\n gutterOffset: lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height: this.$size.scrollerHeight\n };\n if (this.session.$bidiHandler)\n this.session.$bidiHandler.setContentWidth(longestLine - this.$padding);\n return changes;\n };\n VirtualRenderer.prototype.$updateLines = function () {\n if (!this.$changedLines)\n return;\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n var layerConfig = this.layerConfig;\n if (firstRow > layerConfig.lastRow + 1) {\n return;\n }\n if (lastRow < layerConfig.firstRow) {\n return;\n }\n if (lastRow === Infinity) {\n if (this.$showGutter)\n this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n VirtualRenderer.prototype.$getLongestLine = function () {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode)\n charCount += 1;\n if (this.$textLayer && charCount > this.$textLayer.MAX_LINE_LENGTH)\n charCount = this.$textLayer.MAX_LINE_LENGTH + 30;\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n VirtualRenderer.prototype.updateFrontMarkers = function () {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n VirtualRenderer.prototype.updateBackMarkers = function () {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n VirtualRenderer.prototype.addGutterDecoration = function (row, className) {\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n VirtualRenderer.prototype.removeGutterDecoration = function (row, className) {\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n VirtualRenderer.prototype.updateBreakpoints = function (rows) {\n this._rows = rows;\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n VirtualRenderer.prototype.setAnnotations = function (annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n VirtualRenderer.prototype.updateCursor = function () {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n VirtualRenderer.prototype.hideCursor = function () {\n this.$cursorLayer.hideCursor();\n };\n VirtualRenderer.prototype.showCursor = function () {\n this.$cursorLayer.showCursor();\n };\n VirtualRenderer.prototype.scrollSelectionIntoView = function (anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n VirtualRenderer.prototype.scrollCursorIntoView = function (cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0)\n return;\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var newLeft = pos.left;\n var newTop = pos.top;\n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n if (this.$scrollAnimation) {\n this.$stopAnimation = true;\n }\n var currentTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n if (currentTop + topMargin > newTop) {\n if (offset && currentTop + topMargin > newTop + this.lineHeight)\n newTop -= offset * this.$size.scrollerHeight;\n if (newTop === 0)\n newTop = -this.scrollMargin.top;\n this.session.setScrollTop(newTop);\n }\n else if (currentTop + this.$size.scrollerHeight - bottomMargin < newTop + this.lineHeight) {\n if (offset && currentTop + this.$size.scrollerHeight - bottomMargin < newTop - this.lineHeight)\n newTop += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(newTop + this.lineHeight + bottomMargin - this.$size.scrollerHeight);\n }\n var currentLeft = this.scrollLeft;\n var twoCharsWidth = 2 * this.layerConfig.characterWidth;\n if (newLeft - twoCharsWidth < currentLeft) {\n newLeft -= twoCharsWidth;\n if (newLeft < this.$padding + twoCharsWidth) {\n newLeft = -this.scrollMargin.left;\n }\n this.session.setScrollLeft(newLeft);\n }\n else {\n newLeft += twoCharsWidth;\n if (currentLeft + this.$size.scrollerWidth < newLeft + this.characterWidth) {\n this.session.setScrollLeft(Math.round(newLeft + this.characterWidth - this.$size.scrollerWidth));\n }\n else if (currentLeft <= this.$padding && newLeft - currentLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n }\n };\n VirtualRenderer.prototype.getScrollTop = function () {\n return this.session.getScrollTop();\n };\n VirtualRenderer.prototype.getScrollLeft = function () {\n return this.session.getScrollLeft();\n };\n VirtualRenderer.prototype.getScrollTopRow = function () {\n return this.scrollTop / this.lineHeight;\n };\n VirtualRenderer.prototype.getScrollBottomRow = function () {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n VirtualRenderer.prototype.scrollToRow = function (row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n VirtualRenderer.prototype.alignCursor = function (cursor, alignment) {\n if (typeof cursor == \"number\")\n cursor = { row: cursor, column: 0 };\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n this.session.setScrollTop(offset);\n return offset;\n };\n VirtualRenderer.prototype.$calcSteps = function (fromValue, toValue) {\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n var func = function (t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n for (i = 0; i < l; ++i)\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n return steps;\n };\n VirtualRenderer.prototype.scrollToLine = function (line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({ row: line, column: 0 });\n var offset = pos.top;\n if (center)\n offset -= this.$size.scrollerHeight / 2;\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false)\n this.animateScrolling(initialScroll, callback);\n };\n VirtualRenderer.prototype.animateScrolling = function (fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll)\n return;\n var _self = this;\n if (fromValue == toValue)\n return;\n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue)\n return;\n }\n }\n var steps = _self.$calcSteps(fromValue, toValue);\n this.$scrollAnimation = { from: fromValue, to: toValue, steps: steps };\n clearInterval(this.$timer);\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n function endAnimation() {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n _self.$stopAnimation = false;\n callback && callback();\n }\n this.$timer = setInterval(function () {\n if (_self.$stopAnimation) {\n endAnimation();\n return;\n }\n if (!_self.session)\n return clearInterval(_self.$timer);\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n }\n else if (toValue != null) {\n _self.session.$scrollTop = -1;\n _self.session.setScrollTop(toValue);\n toValue = null;\n }\n else {\n endAnimation();\n }\n }, 10);\n };\n VirtualRenderer.prototype.scrollToY = function (scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n VirtualRenderer.prototype.scrollToX = function (scrollLeft) {\n if (this.scrollLeft !== scrollLeft)\n this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n VirtualRenderer.prototype.scrollTo = function (x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(x);\n };\n VirtualRenderer.prototype.scrollBy = function (deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n VirtualRenderer.prototype.isScrollableBy = function (deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)\n return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight\n - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)\n return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)\n return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth\n - this.layerConfig.width < -1 + this.scrollMargin.right)\n return true;\n };\n VirtualRenderer.prototype.pixelToScreenCoordinates = function (x, y) {\n var canvasPos;\n if (this.$hasCssTransforms) {\n canvasPos = { top: 0, left: 0 };\n var p = this.$fontMetrics.transformCoordinates([x, y]);\n x = p[1] - this.gutterWidth - this.margin.left;\n y = p[0];\n }\n else {\n canvasPos = this.scroller.getBoundingClientRect();\n }\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);\n return { row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX };\n };\n VirtualRenderer.prototype.screenToTextCoordinates = function (x, y) {\n var canvasPos;\n if (this.$hasCssTransforms) {\n canvasPos = { top: 0, left: 0 };\n var p = this.$fontMetrics.transformCoordinates([x, y]);\n x = p[1] - this.gutterWidth - this.margin.left;\n y = p[0];\n }\n else {\n canvasPos = this.scroller.getBoundingClientRect();\n }\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset);\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);\n };\n VirtualRenderer.prototype.textToScreenCoordinates = function (row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : Math.round(pos.column * this.characterWidth));\n var y = pos.row * this.lineHeight;\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n VirtualRenderer.prototype.visualizeFocus = function () {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n VirtualRenderer.prototype.visualizeBlur = function () {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n VirtualRenderer.prototype.showComposition = function (composition) {\n this.$composition = composition;\n if (!composition.cssText) {\n composition.cssText = this.textarea.style.cssText;\n }\n if (composition.useTextareaForIME == undefined)\n composition.useTextareaForIME = this.$useTextareaForIME;\n if (this.$useTextareaForIME) {\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n this.$cursorLayer.element.style.display = \"none\";\n }\n else {\n composition.markerId = this.session.addMarker(composition.markerRange, \"ace_composition_marker\", \"text\");\n }\n };\n VirtualRenderer.prototype.setCompositionText = function (text) {\n var cursor = this.session.selection.cursor;\n this.addToken(text, \"composition_placeholder\", cursor.row, cursor.column);\n this.$moveTextAreaToCursor();\n };\n VirtualRenderer.prototype.hideComposition = function () {\n if (!this.$composition)\n return;\n if (this.$composition.markerId)\n this.session.removeMarker(this.$composition.markerId);\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = this.$composition.cssText;\n var cursor = this.session.selection.cursor;\n this.removeExtraToken(cursor.row, cursor.column);\n this.$composition = null;\n this.$cursorLayer.element.style.display = \"\";\n };\n VirtualRenderer.prototype.setGhostText = function (text, position) {\n var cursor = this.session.selection.cursor;\n var insertPosition = position || { row: cursor.row, column: cursor.column };\n this.removeGhostText();\n var textLines = text.split(\"\\n\");\n this.addToken(textLines[0], \"ghost_text\", insertPosition.row, insertPosition.column);\n this.$ghostText = {\n text: text,\n position: {\n row: insertPosition.row,\n column: insertPosition.column\n }\n };\n if (textLines.length > 1) {\n this.$ghostTextWidget = {\n text: textLines.slice(1).join(\"\\n\"),\n row: insertPosition.row,\n column: insertPosition.column,\n className: \"ace_ghost_text\"\n };\n this.session.widgetManager.addLineWidget(this.$ghostTextWidget);\n var pixelPosition = this.$cursorLayer.getPixelPosition(insertPosition, true);\n var el = this.container;\n var height = el.getBoundingClientRect().height;\n var ghostTextHeight = textLines.length * this.lineHeight;\n var fitsY = ghostTextHeight < height - pixelPosition.top;\n if (fitsY)\n return;\n if (ghostTextHeight < height) {\n this.scrollBy(0, (textLines.length - 1) * this.lineHeight);\n }\n else {\n this.scrollBy(0, pixelPosition.top);\n }\n }\n };\n VirtualRenderer.prototype.removeGhostText = function () {\n if (!this.$ghostText)\n return;\n var position = this.$ghostText.position;\n this.removeExtraToken(position.row, position.column);\n if (this.$ghostTextWidget) {\n this.session.widgetManager.removeLineWidget(this.$ghostTextWidget);\n this.$ghostTextWidget = null;\n }\n this.$ghostText = null;\n };\n VirtualRenderer.prototype.addToken = function (text, type, row, column) {\n var session = this.session;\n session.bgTokenizer.lines[row] = null;\n var newToken = { type: type, value: text };\n var tokens = session.getTokens(row);\n if (column == null || !tokens.length) {\n tokens.push(newToken);\n }\n else {\n var l = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n l += token.value.length;\n if (column <= l) {\n var diff = token.value.length - (l - column);\n var before = token.value.slice(0, diff);\n var after = token.value.slice(diff);\n tokens.splice(i, 1, { type: token.type, value: before }, newToken, { type: token.type, value: after });\n break;\n }\n }\n }\n this.updateLines(row, row);\n };\n VirtualRenderer.prototype.removeExtraToken = function (row, column) {\n this.session.bgTokenizer.lines[row] = null;\n this.updateLines(row, row);\n };\n VirtualRenderer.prototype.setTheme = function (theme, cb) {\n var _self = this;\n this.$themeId = theme;\n _self._dispatchEvent('themeChange', { theme: theme });\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n }\n else {\n afterLoad(theme);\n }\n function afterLoad(module) {\n if (_self.$themeId != theme)\n return cb && cb();\n if (!module || !module.cssClass)\n throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n if (module.$id)\n _self.$themeId = module.$id;\n dom.importCssString(module.cssText, module.cssClass, _self.container);\n if (_self.theme)\n dom.removeCssClass(_self.container, _self.theme.cssClass);\n var padding = \"padding\" in module ? module.padding\n : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding)\n _self.setPadding(padding);\n _self.$theme = module.cssClass;\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n if (_self.$size) {\n _self.$size.width = 0;\n _self.$updateSizeAsync();\n }\n _self._dispatchEvent('themeLoaded', { theme: module });\n cb && cb();\n }\n };\n VirtualRenderer.prototype.getTheme = function () {\n return this.$themeId;\n };\n VirtualRenderer.prototype.setStyle = function (style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n VirtualRenderer.prototype.unsetStyle = function (style) {\n dom.removeCssClass(this.container, style);\n };\n VirtualRenderer.prototype.setCursorStyle = function (style) {\n dom.setStyle(this.scroller.style, \"cursor\", style);\n };\n VirtualRenderer.prototype.setMouseCursor = function (cursorStyle) {\n dom.setStyle(this.scroller.style, \"cursor\", cursorStyle);\n };\n VirtualRenderer.prototype.attachToShadowRoot = function () {\n dom.importCssString(editorCss, \"ace_editor.css\", this.container);\n };\n VirtualRenderer.prototype.destroy = function () {\n this.freeze();\n this.$fontMetrics.destroy();\n this.$cursorLayer.destroy();\n this.removeAllListeners();\n this.container.textContent = \"\";\n this.setOption(\"useResizeObserver\", false);\n };\n VirtualRenderer.prototype.$updateCustomScrollbar = function (val) {\n var _self = this;\n this.$horizScroll = this.$vScroll = null;\n this.scrollBarV.element.remove();\n this.scrollBarH.element.remove();\n if (this.$scrollDecorator) {\n delete this.$scrollDecorator;\n }\n if (val === true) {\n this.scrollBarV = new VScrollBarCustom(this.container, this);\n this.scrollBarH = new HScrollBarCustom(this.container, this);\n this.scrollBarV.setHeight(this.$size.scrollerHeight);\n this.scrollBarH.setWidth(this.$size.scrollerWidth);\n this.scrollBarV.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n this.$scrollDecorator = new Decorator(this.scrollBarV, this);\n this.$scrollDecorator.$updateDecorators();\n }\n else {\n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function (e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n }\n };\n VirtualRenderer.prototype.$addResizeObserver = function () {\n if (!window.ResizeObserver || this.$resizeObserver)\n return;\n var self = this;\n this.$resizeTimer = lang.delayedCall(function () {\n if (!self.destroyed)\n self.onResize();\n }, 50);\n this.$resizeObserver = new window.ResizeObserver(function (e) {\n var w = e[0].contentRect.width;\n var h = e[0].contentRect.height;\n if (Math.abs(self.$size.width - w) > 1\n || Math.abs(self.$size.height - h) > 1) {\n self.$resizeTimer.delay();\n }\n else {\n self.$resizeTimer.cancel();\n }\n });\n this.$resizeObserver.observe(this.container);\n };\n return VirtualRenderer;\n}());\nVirtualRenderer.prototype.CHANGE_CURSOR = 1;\nVirtualRenderer.prototype.CHANGE_MARKER = 2;\nVirtualRenderer.prototype.CHANGE_GUTTER = 4;\nVirtualRenderer.prototype.CHANGE_SCROLL = 8;\nVirtualRenderer.prototype.CHANGE_LINES = 16;\nVirtualRenderer.prototype.CHANGE_TEXT = 32;\nVirtualRenderer.prototype.CHANGE_SIZE = 64;\nVirtualRenderer.prototype.CHANGE_MARKER_BACK = 128;\nVirtualRenderer.prototype.CHANGE_MARKER_FRONT = 256;\nVirtualRenderer.prototype.CHANGE_FULL = 512;\nVirtualRenderer.prototype.CHANGE_H_SCROLL = 1024;\nVirtualRenderer.prototype.$changes = 0;\nVirtualRenderer.prototype.$padding = null;\nVirtualRenderer.prototype.$frozen = false;\nVirtualRenderer.prototype.STEPS = 8;\noop.implement(VirtualRenderer.prototype, EventEmitter);\nconfig.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n useResizeObserver: {\n set: function (value) {\n if (!value && this.$resizeObserver) {\n this.$resizeObserver.disconnect();\n this.$resizeTimer.cancel();\n this.$resizeTimer = this.$resizeObserver = null;\n }\n else if (value && !this.$resizeObserver) {\n this.$addResizeObserver();\n }\n }\n },\n animatedScroll: { initialValue: false },\n showInvisibles: {\n set: function (value) {\n if (this.$textLayer.setShowInvisibles(value))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function () { this.$updatePrintMargin(); },\n initialValue: true\n },\n printMarginColumn: {\n set: function () { this.$updatePrintMargin(); },\n initialValue: 80\n },\n printMargin: {\n set: function (val) {\n if (typeof val == \"number\")\n this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function () {\n return this.$showPrintMargin && this.$printMarginColumn;\n }\n },\n showGutter: {\n set: function (show) {\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n useSvgGutterIcons: {\n set: function (value) {\n this.$gutterLayer.$useSvgGutterIcons = value;\n },\n initialValue: false\n },\n showFoldedAnnotations: {\n set: function (value) {\n this.$gutterLayer.$showFoldedAnnotations = value;\n },\n initialValue: false\n },\n fadeFoldWidgets: {\n set: function (show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function (show) {\n this.$gutterLayer.setShowFoldWidgets(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function (show) {\n if (this.$textLayer.setDisplayIndentGuides(show))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightIndentGuides: {\n set: function (show) {\n if (this.$textLayer.setHighlightIndentGuides(show) == true) {\n this.$textLayer.$highlightIndentGuide();\n }\n else {\n this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells);\n }\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function (shouldHighlight) {\n this.$gutterLayer.setHighlightGutterLine(shouldHighlight);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n hScrollBarAlwaysVisible: {\n set: function (val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function (val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function (size) {\n if (typeof size == \"number\")\n size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function (name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function (val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function (val) {\n if (!(this.$minLines < 0x1ffffffffffff))\n this.$minLines = 0;\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function (val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function (val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val)\n return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function (val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n customScrollbar: {\n set: function (val) {\n this.$updateCustomScrollbar(val);\n },\n initialValue: false\n },\n theme: {\n set: function (val) { this.setTheme(val); },\n get: function () { return this.$themeId || this.theme; },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n },\n hasCssTransforms: {},\n useTextareaForIME: {\n initialValue: !useragent.isMobile && !useragent.isIE\n }\n});\nexports.VirtualRenderer = VirtualRenderer;\n\n});\n\nace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/config\"], function(require, exports, module) {\n\"use strict\";\n\nvar oop = require(\"../lib/oop\");\nvar net = require(\"../lib/net\");\nvar EventEmitter = require(\"../lib/event_emitter\").EventEmitter;\nvar config = require(\"../config\");\n\nfunction $workerBlob(workerUrl) {\n var script = \"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n try {\n return new Blob([script], {\"type\": \"application/javascript\"});\n } catch (e) { // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n}\n\nfunction createWorker(workerUrl) {\n if (typeof Worker == \"undefined\")\n return { postMessage: function() {}, terminate: function() {} };\n if (config.get(\"loadWorkerFromBlob\")) {\n var blob = $workerBlob(workerUrl);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n return new Worker(blobURL);\n }\n return new Worker(workerUrl);\n}\n\nvar WorkerClient = function(worker) {\n if (!worker.postMessage)\n worker = this.$createWorkerFromOldConfig.apply(this, arguments);\n\n this.$worker = worker;\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n\n this.callbackId = 1;\n this.callbacks = {};\n\n this.$worker.onmessage = this.onMessage;\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$createWorkerFromOldConfig = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {\n if (require.nameToUrl && !require.toUrl)\n require.toUrl = require.nameToUrl;\n\n if (config.get(\"packaged\") || !require.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod, \"worker\");\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(require.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n\n var tlns = {};\n topLevelNamespaces.forEach(function(ns) {\n tlns[ns] = normalizePath(require.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n this.$worker = createWorker(workerUrl);\n if (importScripts) {\n this.send(\"importScripts\", importScripts);\n }\n this.$worker.postMessage({\n init : true,\n tlns : tlns,\n module : mod,\n classname : classname\n });\n return this.$worker;\n };\n\n this.onMessage = function(e) {\n var msg = e.data;\n switch (msg.type) {\n case \"event\":\n this._signal(msg.name, {data: msg.data});\n break;\n case \"call\":\n var callback = this.callbacks[msg.id];\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n break;\n case \"error\":\n this.reportError(msg.data);\n break;\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n \n this.reportError = function(err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function(path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function() {\n this._signal(\"terminate\", {});\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker.onerror = function(e) {\n e.preventDefault();\n };\n this.$worker = null;\n if (this.$doc)\n this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function(cmd, args) {\n this.$worker.postMessage({command: cmd, args: args});\n };\n\n this.call = function(cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n this.send(cmd, args);\n };\n\n this.emit = function(event, data) {\n try {\n if (data.data && data.data.err)\n data.data.err = {message: data.data.err.message, stack: data.data.err.stack, code: data.data.err.code};\n this.$worker && this.$worker.postMessage({event: event, data: {data: data.data}});\n }\n catch(ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function(doc) {\n if (this.$doc)\n this.terminate();\n\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener, true);\n };\n\n this.changeListener = function(delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n if (delta.action == \"insert\")\n this.deltaQueue.push(delta.start, delta.lines);\n else\n this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function() {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else\n this.emit(\"change\", {data: q});\n };\n\n}).call(WorkerClient.prototype);\n\n\nvar UIWorkerClient = function(topLevelNamespaces, mod, classname) {\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n\n var messageBuffer = [];\n var workerClient = new WorkerClient({\n messageBuffer: messageBuffer,\n terminate: function() {},\n postMessage: function(e) {\n messageBuffer.push(e);\n if (!main) return;\n if (emitSync)\n setTimeout(processNext);\n else\n processNext();\n }\n });\n\n workerClient.setEmitSync = function(val) { emitSync = val; };\n\n var processNext = function() {\n var msg = messageBuffer.shift();\n if (msg.command)\n main[msg.command].apply(main, msg.args);\n else if (msg.event)\n sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function(msg) {\n workerClient.onMessage({data: msg});\n };\n sender.callback = function(data, callbackId) {\n this.postMessage({type: \"call\", id: callbackId, data: data});\n };\n sender.emit = function(name, data) {\n this.postMessage({type: \"event\", name: name, data: data});\n };\n\n config.loadModule([\"worker\", mod], function(Main) {\n main = new Main[classname](sender);\n while (messageBuffer.length)\n processNext();\n });\n\n return workerClient;\n};\n\nexports.UIWorkerClient = UIWorkerClient;\nexports.WorkerClient = WorkerClient;\nexports.createWorker = createWorker;\n\n\n});\n\nace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"./range\").Range;\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar oop = require(\"./lib/oop\");\nvar PlaceHolder = /** @class */ (function () {\n function PlaceHolder(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate, true);\n this.$others = others;\n this.$onCursorChange = function () {\n setTimeout(function () {\n _self.onCursorChange();\n });\n };\n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager()[\"$undostack\"] || { length: -1 };\n this.$undoStackDepth = undoStack.length;\n this.setup();\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n }\n PlaceHolder.prototype.setup = function () {\n var _self = this;\n var doc = this.doc;\n var session = this.session;\n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode)\n session.selection.toSingleRange();\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function (other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n PlaceHolder.prototype.showOtherMarkers = function () {\n if (this.othersActive)\n return;\n var session = this.session;\n var _self = this;\n this.othersActive = true;\n this.others.forEach(function (anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column + _self.length), _self.othersClass, null, false);\n });\n };\n PlaceHolder.prototype.hideOtherMarkers = function () {\n if (!this.othersActive)\n return;\n this.othersActive = false;\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n PlaceHolder.prototype.onUpdate = function (delta) {\n if (this.$updating)\n return this.updateAnchors(delta);\n var range = delta;\n if (range.start.row !== range.end.row)\n return;\n if (range.start.row !== this.pos.row)\n return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n this.updateAnchors(delta);\n if (inMainRange)\n this.length += lengthDiff;\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = { row: otherPos.row, column: otherPos.column + distanceFromStart };\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n }\n else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = { row: otherPos.row, column: otherPos.column + distanceFromStart };\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n this.$updating = false;\n this.updateMarkers();\n };\n PlaceHolder.prototype.updateAnchors = function (delta) {\n this.pos.onChange(delta);\n for (var i = this.others.length; i--;)\n this.others[i].onChange(delta);\n this.updateMarkers();\n };\n PlaceHolder.prototype.updateMarkers = function () {\n if (this.$updating)\n return;\n var _self = this;\n var session = this.session;\n var updateMarker = function (pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + _self.length), className, null, false);\n };\n updateMarker(this.pos, this.mainClass);\n for (var i = this.others.length; i--;)\n updateMarker(this.others[i], this.othersClass);\n };\n PlaceHolder.prototype.onCursorChange = function (event) {\n if (this.$updating || !this.session)\n return;\n var pos = this.session.selection.getCursor();\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n this._emit(\"cursorEnter\", event);\n }\n else {\n this.hideOtherMarkers();\n this._emit(\"cursorLeave\", event);\n }\n };\n PlaceHolder.prototype.detach = function () {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.off(\"change\", this.$onUpdate);\n this.session.selection.off(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n PlaceHolder.prototype.cancel = function () {\n if (this.$undoStackDepth === -1)\n return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager[\"$undostack\"]).length - this.$undoStackDepth;\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(this.session, true);\n }\n if (this.selectionBefore)\n this.session.selection.fromJSON(this.selectionBefore);\n };\n return PlaceHolder;\n}());\noop.implement(PlaceHolder.prototype, EventEmitter);\nexports.PlaceHolder = PlaceHolder;\n\n});\n\nace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(require, exports, module){var event = require(\"../lib/event\");\nvar useragent = require(\"../lib/useragent\");\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nfunction onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n if (ctrl && useragent.isMac)\n button = ev.button;\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode)\n e.editor.exitMultiSelectMode();\n return;\n }\n if (button !== 0)\n return;\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));\n var mouseX = e.x, mouseY = e.y;\n var onMouseSelection = function (e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n var selectionMode;\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt)\n selectionMode = shift ? \"block\" : \"add\";\n else if (alt && editor.$blockSelectEnabled)\n selectionMode = \"block\";\n }\n else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift)\n return;\n }\n else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection)\n return; // dragging\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n editor.inVirtualSelectionMode = true;\n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n editor.once(\"mouseup\", function () {\n var tmpSel = selection.toOrientedRange();\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))\n selection.substractPoint(tmpSel.cursor);\n else {\n if (shift) {\n selection.substractPoint(range.cursor);\n }\n else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n selection.addRange(tmpSel);\n }\n editor.inVirtualSelectionMode = false;\n });\n }\n else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true;\n var initialRange;\n var rectSel = [];\n var blockSelect = function () {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))\n return;\n screenCursor = newCursor;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())\n rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n };\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n }\n else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n if (shift)\n screenAnchor = session.documentToScreenPosition(selection.lead);\n else\n selection.moveToPosition(pos);\n screenCursor = { row: -1, column: -1 };\n var onMouseSelectionEnd = function (e) {\n blockSelect();\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length)\n rectSel = [selection.toOrientedRange()];\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n for (var i = 0; i < rectSel.length; i++)\n selection.addRange(rectSel[i]);\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n };\n var onSelectionInterval = blockSelect;\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function () { onSelectionInterval(); }, 20);\n return e.preventDefault();\n }\n}\nexports.onMouseDown = onMouseDown;\n\n});\n\nace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"], function(require, exports, module){/**\n * commands to enter multiselect mode\n * @type {import(\"../../ace-internal\").Ace.Command[]}\n */\nexports.defaultCommands = [{\n name: \"addCursorAbove\",\n description: \"Add cursor above\",\n exec: function (editor) { editor.selectMoreLines(-1); },\n bindKey: { win: \"Ctrl-Alt-Up\", mac: \"Ctrl-Alt-Up\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorBelow\",\n description: \"Add cursor below\",\n exec: function (editor) { editor.selectMoreLines(1); },\n bindKey: { win: \"Ctrl-Alt-Down\", mac: \"Ctrl-Alt-Down\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorAboveSkipCurrent\",\n description: \"Add cursor above (skip current)\",\n exec: function (editor) { editor.selectMoreLines(-1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Up\", mac: \"Ctrl-Alt-Shift-Up\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"addCursorBelowSkipCurrent\",\n description: \"Add cursor below (skip current)\",\n exec: function (editor) { editor.selectMoreLines(1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Down\", mac: \"Ctrl-Alt-Shift-Down\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectMoreBefore\",\n description: \"Select more before\",\n exec: function (editor) { editor.selectMore(-1); },\n bindKey: { win: \"Ctrl-Alt-Left\", mac: \"Ctrl-Alt-Left\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectMoreAfter\",\n description: \"Select more after\",\n exec: function (editor) { editor.selectMore(1); },\n bindKey: { win: \"Ctrl-Alt-Right\", mac: \"Ctrl-Alt-Right\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectNextBefore\",\n description: \"Select next before\",\n exec: function (editor) { editor.selectMore(-1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Left\", mac: \"Ctrl-Alt-Shift-Left\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"selectNextAfter\",\n description: \"Select next after\",\n exec: function (editor) { editor.selectMore(1, true); },\n bindKey: { win: \"Ctrl-Alt-Shift-Right\", mac: \"Ctrl-Alt-Shift-Right\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }, {\n name: \"toggleSplitSelectionIntoLines\",\n description: \"Split selection into lines\",\n exec: function (editor) {\n if (editor.multiSelect.rangeCount > 1)\n editor.multiSelect.joinSelections();\n else\n editor.multiSelect.splitIntoLines();\n },\n bindKey: { win: \"Ctrl-Alt-L\", mac: \"Ctrl-Alt-L\" },\n readOnly: true\n }, {\n name: \"splitSelectionIntoLines\",\n description: \"Split into lines\",\n exec: function (editor) { editor.multiSelect.splitIntoLines(); },\n readOnly: true\n }, {\n name: \"alignCursors\",\n description: \"Align cursors\",\n exec: function (editor) { editor.alignCursors(); },\n bindKey: { win: \"Ctrl-Alt-A\", mac: \"Ctrl-Alt-A\" },\n scrollIntoView: \"cursor\"\n }, {\n name: \"findAll\",\n description: \"Find all\",\n exec: function (editor) { editor.findAll(); },\n bindKey: { win: \"Ctrl-Alt-K\", mac: \"Ctrl-Alt-G\" },\n scrollIntoView: \"cursor\",\n readOnly: true\n }];\nexports.multiSelectCommands = [{\n name: \"singleSelection\",\n description: \"Single selection\",\n bindKey: \"esc\",\n exec: function (editor) { editor.exitMultiSelectMode(); },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function (editor) { return editor && editor.inMultiSelectMode; }\n }];\nvar HashHandler = require(\"../keyboard/hash_handler\").HashHandler;\nexports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n\n});\n\nace.define(\"ace/multi_select\",[\"require\",\"exports\",\"module\",\"ace/range_list\",\"ace/range\",\"ace/selection\",\"ace/mouse/multi_select_handler\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/commands/multi_select_commands\",\"ace/search\",\"ace/edit_session\",\"ace/editor\",\"ace/config\"], function(require, exports, module){/**\n * @typedef {import(\"./anchor\").Anchor} Anchor\n * @typedef {import(\"../ace-internal\").Ace.Point} Point\n * @typedef {import(\"../ace-internal\").Ace.ScreenCoordinates} ScreenCoordinates\n */\nvar RangeList = require(\"./range_list\").RangeList;\nvar Range = require(\"./range\").Range;\nvar Selection = require(\"./selection\").Selection;\nvar onMouseDown = require(\"./mouse/multi_select_handler\").onMouseDown;\nvar event = require(\"./lib/event\");\nvar lang = require(\"./lib/lang\");\nvar commands = require(\"./commands/multi_select_commands\");\nexports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\nvar Search = require(\"./search\").Search;\nvar search = new Search();\nfunction find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n}\nvar EditSession = require(\"./edit_session\").EditSession;\n(function () {\n this.getSelectionMarkers = function () {\n return this.$selectionMarkers;\n };\n}).call(EditSession.prototype);\n(function () {\n this.ranges = null;\n this.rangeList = null;\n this.addRange = function (range, $blockChangeEvents) {\n if (!range)\n return;\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n if (!range.cursor)\n range.cursor = range.end;\n var removed = this.rangeList.add(range);\n this.$onAddRange(range);\n if (removed.length)\n this.$onRemoveRange(removed);\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n this.toSingleRange = function (range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length)\n this.$onRemoveRange(removed);\n range && this.fromOrientedRange(range);\n };\n this.substractPoint = function (pos) {\n var removed = this.rangeList.substractPoint(pos);\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n this.mergeOverlappingRanges = function () {\n var removed = this.rangeList.merge();\n if (removed.length)\n this.$onRemoveRange(removed);\n };\n this.$onAddRange = function (range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n this._signal(\"addRange\", { range: range });\n };\n this.$onRemoveRange = function (removed) {\n this.rangeCount = this.rangeList.ranges.length;\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n for (var i = removed.length; i--;) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n this._signal(\"removeRange\", { ranges: removed });\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n this._signal(\"singleSelect\");\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange()))\n this.fromOrientedRange(lastRange);\n };\n this.$initRangeList = function () {\n if (this.rangeList)\n return;\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n this.getAllRanges = function () {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n this.splitIntoLines = function () {\n var ranges = this.ranges.length ? this.ranges : [this.getRange()];\n var newRanges = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n var row = range.start.row;\n var endRow = range.end.row;\n if (row === endRow) {\n newRanges.push(range.clone());\n }\n else {\n newRanges.push(new Range(row, range.start.column, row, this.session.getLine(row).length));\n while (++row < endRow)\n newRanges.push(this.getLineRange(row, true));\n newRanges.push(new Range(endRow, 0, endRow, range.end.column));\n }\n if (i == 0 && !this.isBackwards())\n newRanges = newRanges.reverse();\n }\n this.toSingleRange();\n for (var i = newRanges.length; i--;)\n this.addRange(newRanges[i]);\n };\n this.joinSelections = function () {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n };\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n }\n else {\n var cursor = this.session.documentToScreenPosition(this.cursor);\n var anchor = this.session.documentToScreenPosition(this.anchor);\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n this.rectangularRangeBlock = function (screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n var xBackwards = screenCursor.column < screenAnchor.column;\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n var startOffsetX = screenCursor.offsetX;\n var endOffsetX = screenAnchor.offsetX;\n }\n else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n var startOffsetX = screenAnchor.offsetX;\n var endOffsetX = screenCursor.offsetX;\n }\n var yBackwards = screenCursor.row < screenAnchor.row;\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n }\n else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n if (startColumn < 0)\n startColumn = 0;\n if (startRow < 0)\n startRow = 0;\n if (startRow == endRow)\n includeEmptyLines = true;\n var docEnd;\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(this.session.screenToDocumentPosition(row, startColumn, startOffsetX), this.session.screenToDocumentPosition(row, endColumn, endOffsetX));\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd))\n break;\n docEnd = range.end;\n }\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n if (yBackwards)\n rectSel.reverse();\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n while (rectSel[end].isEmpty() && end > 0)\n end--;\n if (end > 0) {\n var start = 0;\n while (rectSel[start].isEmpty())\n start++;\n }\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty())\n rectSel.splice(i, 1);\n }\n }\n return rectSel;\n };\n}).call(Selection.prototype);\nvar Editor = require(\"./editor\").Editor;\n(function () {\n this.updateSelectionMarkers = function () {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.addSelectionMarker = function (orientedRange) {\n if (!orientedRange.cursor)\n orientedRange.cursor = orientedRange.end;\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n this.removeSelectionMarker = function (range) {\n if (!range.marker)\n return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1)\n this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n this.removeSelectionMarkers = function (ranges) {\n var markerList = this.session.$selectionMarkers;\n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.marker)\n continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1)\n markerList.splice(index, 1);\n }\n this.session.selectionMarkerCount = markerList.length;\n };\n this.$onAddRange = function (e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.$onRemoveRange = function (e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.$onMultiSelect = function (e) {\n if (this.inMultiSelectMode)\n return;\n this.inMultiSelectMode = true;\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.$onSingleSelect = function (e) {\n if (this.session.multiSelect.inVirtualMode)\n return;\n this.inMultiSelectMode = false;\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n this._emit(\"changeSelection\");\n };\n this.$onMultiSelectExec = function (e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect)\n return;\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n }\n else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n }\n else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n }\n else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n }\n else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n return result;\n };\n this.forEachSelection = function (cmd, args, options) {\n if (this.inVirtualSelectionMode)\n return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines;\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n if (!ranges.length)\n return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)\n i--;\n }\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined)\n result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n tmpSel.detach();\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n if (selection.ranges[0])\n selection.fromOrientedRange(selection.ranges[0]);\n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to)\n this.renderer.animateScrolling(anim.from);\n return result;\n };\n this.exitMultiSelectMode = function () {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode)\n return;\n this.multiSelect.toSingleRange();\n };\n this.getSelectedText = function () {\n var text = \"\";\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length)\n text = \"\";\n }\n else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n return text;\n };\n this.$checkMultiselectChange = function (e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)\n return;\n var pos = anchor == this.multiSelect.anchor\n ? range.cursor == range.start ? range.end : range.start\n : range.cursor;\n if (pos.row != anchor.row\n || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)\n this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());\n else\n this.multiSelect.mergeOverlappingRanges();\n }\n };\n this.findAll = function (needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n if (options.needle == undefined) {\n var range = this.selection.isEmpty()\n ? this.selection.getWordRange()\n : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n }\n this.$search.set(options);\n var ranges = this.$search.findAll(this.session);\n if (!ranges.length)\n return 0;\n var selection = this.multiSelect;\n if (!additive)\n selection.toSingleRange(ranges[0]);\n for (var i = ranges.length; i--;)\n selection.addRange(ranges[i], true);\n if (range && selection.rangeList.rangeAtPoint(range.start))\n selection.addRange(range, true);\n return ranges.length;\n };\n this.selectMoreLines = function (dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn)\n screenLead.column = this.selection.$desiredColumn;\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n }\n else {\n var anchor = lead;\n }\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n }\n else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n newRange.desiredColumn = screenLead.column;\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n }\n else {\n if (skip)\n var toRemove = range.cursor;\n }\n this.selection.addRange(newRange);\n if (toRemove)\n this.selection.substractPoint(toRemove);\n };\n this.transposeSelections = function (dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n for (var i = all.length; i--;) {\n var range = all[i];\n if (range.isEmpty()) {\n var tmp_1 = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp_1.start.row;\n range.start.column = tmp_1.start.column;\n range.end.row = tmp_1.end.row;\n range.end.column = tmp_1.end.column;\n }\n }\n sel.mergeOverlappingRanges();\n var words = [];\n for (var i = all.length; i--;) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n if (dir < 0)\n words.unshift(words.pop());\n else\n words.push(words.shift());\n for (var i = all.length; i--;) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n sel.fromOrientedRange(sel.ranges[0]);\n };\n this.selectMore = function (dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n var range = sel.toOrientedRange();\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst)\n return;\n }\n var needle = session.getTextRange(range);\n var newRange = find(session, needle, dir);\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n if (skip)\n this.multiSelect.substractPoint(range.cursor);\n };\n this.alignCursors = function () {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function (r) {\n if (r.cursor.row == row)\n return true;\n row = r.cursor.row;\n });\n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row, lr = range.end.row;\n var guessRange = fr == lr;\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n if (fr < 0)\n fr = 0;\n if (lr >= max)\n lr = max - 1;\n }\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({ row: fr, column: 0 }, lines.join(\"\\n\") + \"\\n\");\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n this.selection.setRange(range);\n }\n else {\n sameRowRanges.forEach(function (r) {\n sel.substractPoint(r.cursor);\n });\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function (r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1)\n spaceOffset = 0;\n if (p.column > maxCol)\n maxCol = p.column;\n if (spaceOffset < minSpace)\n minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function (r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d)\n session.insert(p, lang.stringRepeat(\" \", l - d));\n else\n session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n this.$reAlignText = function (lines, forceLeft) {\n var isLeftAligned = true, isRightAligned = true;\n var startW, textW, endW;\n return lines.map(function (line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m)\n return [line];\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length)\n isRightAligned = false;\n if (startW != m[1].length)\n isLeftAligned = false;\n if (startW > m[1].length)\n startW = m[1].length;\n if (textW < m[2].length)\n textW = m[2].length;\n if (endW > m[3].length)\n endW = m[3].length;\n return m;\n }).map(forceLeft ? alignLeft :\n isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(textW - m[2].length + endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n}).call(Editor.prototype);\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nexports.onSessionChange = function (e) {\n var session = e.session;\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n this.multiSelect = session && session.multiSelect;\n var oldSession = e.oldSession;\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode)\n this.$onMultiSelect();\n else\n this.$onSingleSelect();\n }\n};\nfunction MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange)\n return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n addAltCursorListeners(editor);\n}\nfunction addAltCursorListeners(editor) {\n if (!editor.textInput)\n return;\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function (e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n }\n else if (altCursor) {\n reset();\n }\n }, editor);\n event.addListener(el, \"keyup\", reset, editor);\n event.addListener(el, \"blur\", reset, editor);\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n}\nexports.MultiSelect = MultiSelect;\nrequire(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function (val) {\n MultiSelect(this);\n if (val) {\n this.on(\"mousedown\", onMouseDown);\n }\n else {\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function (val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n});\n\n});\n\nace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../../range\").Range;\nvar FoldMode = exports.FoldMode = function () { };\n(function () {\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line))\n return \"start\";\n if (foldStyle == \"markbeginend\"\n && this.foldingStopMarker\n && this.foldingStopMarker.test(line))\n return \"end\";\n return \"\";\n };\n this.getFoldWidgetRange = function (session, foldStyle, row) {\n return null;\n };\n this.indentationBlock = function (session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1)\n return;\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n if (level == -1)\n continue;\n if (level <= startLevel) {\n var token = session.getTokenAt(row, 0);\n if (!token || token.type !== \"string\")\n break;\n }\n endRow = row;\n }\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n this.openingBracketBlock = function (session, bracket, row, column, typeRe) {\n var start = { row: row, column: column + 1 };\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end)\n return;\n var fw = session.foldWidgets[end.row];\n if (fw == null)\n fw = session.getFoldWidget(end.row);\n if (fw == \"start\" && end.row > start.row) {\n end.row--;\n end.column = session.getLine(end.row).length;\n }\n return Range.fromPoints(start, end);\n };\n this.closingBracketBlock = function (session, bracket, row, column, typeRe) {\n var end = { row: row, column: column };\n var start = session.$findOpeningBracket(bracket, end);\n if (!start)\n return;\n start.column++;\n end.column--;\n return Range.fromPoints(start, end);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/ext/error_marker\",[\"require\",\"exports\",\"module\",\"ace/line_widgets\",\"ace/lib/dom\",\"ace/range\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar LineWidgets = require(\"../line_widgets\").LineWidgets;\nvar dom = require(\"../lib/dom\");\nvar Range = require(\"../range\").Range;\nvar nls = require(\"../config\").nls;\nfunction binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n while (first <= last) {\n var mid = (first + last) >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0)\n first = mid + 1;\n else if (c < 0)\n last = mid - 1;\n else\n return mid;\n }\n return -(first + 1);\n}\nfunction findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length)\n return;\n var i = binarySearch(annotations, { row: row, column: -1 }, Range.comparePoints);\n if (i < 0)\n i = -i - 1;\n if (i >= annotations.length)\n i = dir > 0 ? 0 : annotations.length - 1;\n else if (i === 0 && dir < 0)\n i = annotations.length - 1;\n var annotation = annotations[i];\n if (!annotation || !dir)\n return;\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n if (!annotation)\n return annotations.slice();\n }\n var matched = [];\n row = annotation.row;\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n return matched.length && matched;\n}\nexports.showErrorMarker = function (editor, dir) {\n var session = editor.session;\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function (w) {\n return w.type == \"errorMarker\";\n })[0];\n if (oldWidget) {\n oldWidget.destroy();\n }\n else {\n row -= dir;\n }\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\"\n ? annotation.pos.sc\n : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n }\n else if (oldWidget) {\n return;\n }\n else {\n gutterAnno = {\n text: [nls(\"Looks good!\")],\n className: \"ace_ok\"\n };\n }\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n var w = {\n row: pos.row,\n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n var left = editor.renderer.$cursorLayer\n .getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"
\");\n el.appendChild(dom.createElement(\"div\"));\n var kb = function (_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return { command: \"null\" };\n }\n };\n w.destroy = function () {\n if (editor.$mouseHandler.isMousePressed)\n return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n editor.session.widgetManager.addLineWidget(w);\n w.el.onmousedown = editor.focus.bind(editor);\n editor.renderer.scrollCursorIntoView(null, 0.5, { bottom: w.el.offsetHeight });\n};\ndom.importCssString(\"\\n .error_widget_wrapper {\\n background: inherit;\\n color: inherit;\\n border:none\\n }\\n .error_widget {\\n border-top: solid 2px;\\n border-bottom: solid 2px;\\n margin: 5px 0;\\n padding: 10px 40px;\\n white-space: pre-wrap;\\n }\\n .error_widget.ace_error, .error_widget_arrow.ace_error{\\n border-color: #ff5a5a\\n }\\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\\n border-color: #F1D817\\n }\\n .error_widget.ace_info, .error_widget_arrow.ace_info{\\n border-color: #5a5a5a\\n }\\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\\n border-color: #5aaa5a\\n }\\n .error_widget_arrow {\\n position: absolute;\\n border: solid 5px;\\n border-top-color: transparent!important;\\n border-right-color: transparent!important;\\n border-left-color: transparent!important;\\n top: -5px;\\n }\\n\", \"error_marker.css\", false);\n\n});\n\nace.define(\"ace/ace\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/range\",\"ace/editor\",\"ace/edit_session\",\"ace/undomanager\",\"ace/virtual_renderer\",\"ace/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/multi_select\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/ext/error_marker\",\"ace/config\",\"ace/loader_build\"], function(require, exports, module){/**\n * The main class required to set up an Ace instance in the browser.\n *\n * @namespace Ace\n **/\n\"use strict\";\nrequire(\"./loader_build\")(exports)\nvar dom = require(\"./lib/dom\");\nvar Range = require(\"./range\").Range;\nvar Editor = require(\"./editor\").Editor;\nvar EditSession = require(\"./edit_session\").EditSession;\nvar UndoManager = require(\"./undomanager\").UndoManager;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nrequire(\"./worker/worker_client\");\nrequire(\"./keyboard/hash_handler\");\nrequire(\"./placeholder\");\nrequire(\"./multi_select\");\nrequire(\"./mode/folding/fold_mode\");\nrequire(\"./theme/textmate\");\nrequire(\"./ext/error_marker\");\nexports.config = require(\"./config\");\nexports.edit = function (el, options) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el)\n throw new Error(\"ace.edit can't find div #\" + _id);\n }\n if (el && el.env && el.env.editor instanceof Editor)\n return el.env.editor;\n var value = \"\";\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n }\n else if (el) {\n value = el.textContent;\n el.innerHTML = \"\";\n }\n var doc = exports.createEditSession(value);\n var editor = new Editor(new Renderer(el), doc, options);\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode)\n env.textarea = oldNode;\n editor.on(\"destroy\", function () {\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n};\nexports.createEditSession = function (text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n};\nexports.Range = Range;\nexports.Editor = Editor;\nexports.EditSession = EditSession;\nexports.UndoManager = UndoManager;\nexports.VirtualRenderer = Renderer;\nexports.version = exports.config.version;\n\n}); (function() {\n ace.require([\"ace/ace\"], function(a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n var global = (function () {\n return this;\n })();\n if (!global && typeof window != \"undefined\") global = window; // can happen in strict mode\n if (!global && typeof self != \"undefined\") global = self; // can happen in webworker\n \n if (!global.ace)\n global.ace = a;\n for (var key in a) if (a.hasOwnProperty(key))\n global.ace[key] = a[key];\n global.ace[\"default\"] = global.ace;\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = global.ace;\n }\n });\n })();\n ","ace.define(\"ace/snippets\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event_emitter\",\"ace/lib/lang\",\"ace/range\",\"ace/range_list\",\"ace/keyboard/hash_handler\",\"ace/tokenizer\",\"ace/clipboard\",\"ace/editor\"], function(require, exports, module){\"use strict\";\nvar dom = require(\"./lib/dom\");\nvar oop = require(\"./lib/oop\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar lang = require(\"./lib/lang\");\nvar Range = require(\"./range\").Range;\nvar RangeList = require(\"./range_list\").RangeList;\nvar HashHandler = require(\"./keyboard/hash_handler\").HashHandler;\nvar Tokenizer = require(\"./tokenizer\").Tokenizer;\nvar clipboard = require(\"./clipboard\");\nvar VARIABLES = {\n CURRENT_WORD: function (editor) {\n return editor.session.getTextRange(editor.session.getWordRange());\n },\n SELECTION: function (editor, name, indentation) {\n var text = editor.session.getTextRange();\n if (indentation)\n return text.replace(/\\n\\r?([ \\t]*\\S)/g, \"\\n\" + indentation + \"$1\");\n return text;\n },\n CURRENT_LINE: function (editor) {\n return editor.session.getLine(editor.getCursorPosition().row);\n },\n PREV_LINE: function (editor) {\n return editor.session.getLine(editor.getCursorPosition().row - 1);\n },\n LINE_INDEX: function (editor) {\n return editor.getCursorPosition().row;\n },\n LINE_NUMBER: function (editor) {\n return editor.getCursorPosition().row + 1;\n },\n SOFT_TABS: function (editor) {\n return editor.session.getUseSoftTabs() ? \"YES\" : \"NO\";\n },\n TAB_SIZE: function (editor) {\n return editor.session.getTabSize();\n },\n CLIPBOARD: function (editor) {\n return clipboard.getText && clipboard.getText();\n },\n FILENAME: function (editor) {\n return /[^/\\\\]*$/.exec(this.FILEPATH(editor))[0];\n },\n FILENAME_BASE: function (editor) {\n return /[^/\\\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\\.[^.]*$/, \"\");\n },\n DIRECTORY: function (editor) {\n return this.FILEPATH(editor).replace(/[^/\\\\]*$/, \"\");\n },\n FILEPATH: function (editor) { return \"/not implemented.txt\"; },\n WORKSPACE_NAME: function () { return \"Unknown\"; },\n FULLNAME: function () { return \"Unknown\"; },\n BLOCK_COMMENT_START: function (editor) {\n var mode = editor.session.$mode || {};\n return mode.blockComment && mode.blockComment.start || \"\";\n },\n BLOCK_COMMENT_END: function (editor) {\n var mode = editor.session.$mode || {};\n return mode.blockComment && mode.blockComment.end || \"\";\n },\n LINE_COMMENT: function (editor) {\n var mode = editor.session.$mode || {};\n return mode.lineCommentStart || \"\";\n },\n CURRENT_YEAR: date.bind(null, { year: \"numeric\" }),\n CURRENT_YEAR_SHORT: date.bind(null, { year: \"2-digit\" }),\n CURRENT_MONTH: date.bind(null, { month: \"numeric\" }),\n CURRENT_MONTH_NAME: date.bind(null, { month: \"long\" }),\n CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: \"short\" }),\n CURRENT_DATE: date.bind(null, { day: \"2-digit\" }),\n CURRENT_DAY_NAME: date.bind(null, { weekday: \"long\" }),\n CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: \"short\" }),\n CURRENT_HOUR: date.bind(null, { hour: \"2-digit\", hour12: false }),\n CURRENT_MINUTE: date.bind(null, { minute: \"2-digit\" }),\n CURRENT_SECOND: date.bind(null, { second: \"2-digit\" })\n};\nVARIABLES.SELECTED_TEXT = VARIABLES.SELECTION;\nfunction date(dateFormat) {\n var str = new Date().toLocaleString(\"en-us\", dateFormat);\n return str.length == 1 ? \"0\" + str : str;\n}\nvar SnippetManager = /** @class */ (function () {\n function SnippetManager() {\n this.snippetMap = {};\n this.snippetNameMap = {};\n this.variables = VARIABLES;\n }\n SnippetManager.prototype.getTokenizer = function () {\n return SnippetManager[\"$tokenizer\"] || this.createTokenizer();\n };\n SnippetManager.prototype.createTokenizer = function () {\n function TabstopToken(str) {\n str = str.substr(1);\n if (/^\\d+$/.test(str))\n return [{ tabstopId: parseInt(str, 10) }];\n return [{ text: str }];\n }\n function escape(ch) {\n return \"(?:[^\\\\\\\\\" + ch + \"]|\\\\\\\\.)\";\n }\n var formatMatcher = {\n regex: \"/(\" + escape(\"/\") + \"+)/\",\n onMatch: function (val, state, stack) {\n var ts = stack[0];\n ts.fmtString = true;\n ts.guard = val.slice(1, -1);\n ts.flag = \"\";\n return \"\";\n },\n next: \"formatString\"\n };\n SnippetManager[\"$tokenizer\"] = new Tokenizer({\n start: [\n { regex: /\\\\./, onMatch: function (val, state, stack) {\n var ch = val[1];\n if (ch == \"}\" && stack.length) {\n val = ch;\n }\n else if (\"`$\\\\\".indexOf(ch) != -1) {\n val = ch;\n }\n return [val];\n } },\n { regex: /}/, onMatch: function (val, state, stack) {\n return [stack.length ? stack.shift() : val];\n } },\n { regex: /\\$(?:\\d+|\\w+)/, onMatch: TabstopToken },\n { regex: /\\$\\{[\\dA-Z_a-z]+/, onMatch: function (str, state, stack) {\n var t = TabstopToken(str.substr(1));\n stack.unshift(t[0]);\n return t;\n }, next: \"snippetVar\" },\n { regex: /\\n/, token: \"newline\", merge: false }\n ],\n snippetVar: [\n { regex: \"\\\\|\" + escape(\"\\\\|\") + \"*\\\\|\", onMatch: function (val, state, stack) {\n var choices = val.slice(1, -1).replace(/\\\\[,|\\\\]|,/g, function (operator) {\n return operator.length == 2 ? operator[1] : \"\\x00\";\n }).split(\"\\x00\").map(function (value) {\n return { value: value };\n });\n stack[0].choices = choices;\n return [choices[0]];\n }, next: \"start\" },\n formatMatcher,\n { regex: \"([^:}\\\\\\\\]|\\\\\\\\.)*:?\", token: \"\", next: \"start\" }\n ],\n formatString: [\n { regex: /:/, onMatch: function (val, state, stack) {\n if (stack.length && stack[0].expectElse) {\n stack[0].expectElse = false;\n stack[0].ifEnd = { elseEnd: stack[0] };\n return [stack[0].ifEnd];\n }\n return \":\";\n } },\n { regex: /\\\\./, onMatch: function (val, state, stack) {\n var ch = val[1];\n if (ch == \"}\" && stack.length)\n val = ch;\n else if (\"`$\\\\\".indexOf(ch) != -1)\n val = ch;\n else if (ch == \"n\")\n val = \"\\n\";\n else if (ch == \"t\")\n val = \"\\t\";\n else if (\"ulULE\".indexOf(ch) != -1)\n val = { changeCase: ch, local: ch > \"a\" };\n return [val];\n } },\n { regex: \"/\\\\w*}\", onMatch: function (val, state, stack) {\n var next = stack.shift();\n if (next)\n next.flag = val.slice(1, -1);\n this.next = next && next.tabstopId ? \"start\" : \"\";\n return [next || val];\n }, next: \"start\" },\n { regex: /\\$(?:\\d+|\\w+)/, onMatch: function (val, state, stack) {\n return [{ text: val.slice(1) }];\n } },\n { regex: /\\${\\w+/, onMatch: function (val, state, stack) {\n var token = { text: val.slice(2) };\n stack.unshift(token);\n return [token];\n }, next: \"formatStringVar\" },\n { regex: /\\n/, token: \"newline\", merge: false },\n { regex: /}/, onMatch: function (val, state, stack) {\n var next = stack.shift();\n this.next = next && next.tabstopId ? \"start\" : \"\";\n return [next || val];\n }, next: \"start\" }\n ],\n formatStringVar: [\n { regex: /:\\/\\w+}/, onMatch: function (val, state, stack) {\n var ts = stack[0];\n ts.formatFunction = val.slice(2, -1);\n return [stack.shift()];\n }, next: \"formatString\" },\n formatMatcher,\n { regex: /:[\\?\\-+]?/, onMatch: function (val, state, stack) {\n if (val[1] == \"+\")\n stack[0].ifEnd = stack[0];\n if (val[1] == \"?\")\n stack[0].expectElse = true;\n }, next: \"formatString\" },\n { regex: \"([^:}\\\\\\\\]|\\\\\\\\.)*:?\", token: \"\", next: \"formatString\" }\n ]\n });\n return SnippetManager[\"$tokenizer\"];\n };\n SnippetManager.prototype.tokenizeTmSnippet = function (str, startState) {\n return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) {\n return x.value || x;\n });\n };\n SnippetManager.prototype.getVariableValue = function (editor, name, indentation) {\n if (/^\\d+$/.test(name))\n return (this.variables.__ || {})[name] || \"\";\n if (/^[A-Z]\\d+$/.test(name))\n return (this.variables[name[0] + \"__\"] || {})[name.substr(1)] || \"\";\n name = name.replace(/^TM_/, \"\");\n if (!this.variables.hasOwnProperty(name))\n return \"\";\n var value = this.variables[name];\n if (typeof value == \"function\")\n value = this.variables[name](editor, name, indentation);\n return value == null ? \"\" : value;\n };\n SnippetManager.prototype.tmStrFormat = function (str, ch, editor) {\n if (!ch.fmt)\n return str;\n var flag = ch.flag || \"\";\n var re = ch.guard;\n re = new RegExp(re, flag.replace(/[^gim]/g, \"\"));\n var fmtTokens = typeof ch.fmt == \"string\" ? this.tokenizeTmSnippet(ch.fmt, \"formatString\") : ch.fmt;\n var _self = this;\n var formatted = str.replace(re, function () {\n var oldArgs = _self.variables.__;\n _self.variables.__ = [].slice.call(arguments);\n var fmtParts = _self.resolveVariables(fmtTokens, editor);\n var gChangeCase = \"E\";\n for (var i = 0; i < fmtParts.length; i++) {\n var ch = fmtParts[i];\n if (typeof ch == \"object\") {\n fmtParts[i] = \"\";\n if (ch.changeCase && ch.local) {\n var next = fmtParts[i + 1];\n if (next && typeof next == \"string\") {\n if (ch.changeCase == \"u\")\n fmtParts[i] = next[0].toUpperCase();\n else\n fmtParts[i] = next[0].toLowerCase();\n fmtParts[i + 1] = next.substr(1);\n }\n }\n else if (ch.changeCase) {\n gChangeCase = ch.changeCase;\n }\n }\n else if (gChangeCase == \"U\") {\n fmtParts[i] = ch.toUpperCase();\n }\n else if (gChangeCase == \"L\") {\n fmtParts[i] = ch.toLowerCase();\n }\n }\n _self.variables.__ = oldArgs;\n return fmtParts.join(\"\");\n });\n return formatted;\n };\n SnippetManager.prototype.tmFormatFunction = function (str, ch, editor) {\n if (ch.formatFunction == \"upcase\")\n return str.toUpperCase();\n if (ch.formatFunction == \"downcase\")\n return str.toLowerCase();\n return str;\n };\n SnippetManager.prototype.resolveVariables = function (snippet, editor) {\n var result = [];\n var indentation = \"\";\n var afterNewLine = true;\n for (var i = 0; i < snippet.length; i++) {\n var ch = snippet[i];\n if (typeof ch == \"string\") {\n result.push(ch);\n if (ch == \"\\n\") {\n afterNewLine = true;\n indentation = \"\";\n }\n else if (afterNewLine) {\n indentation = /^\\t*/.exec(ch)[0];\n afterNewLine = /\\S/.test(ch);\n }\n continue;\n }\n if (!ch)\n continue;\n afterNewLine = false;\n if (ch.fmtString) {\n var j = snippet.indexOf(ch, i + 1);\n if (j == -1)\n j = snippet.length;\n ch.fmt = snippet.slice(i + 1, j);\n i = j;\n }\n if (ch.text) {\n var value = this.getVariableValue(editor, ch.text, indentation) + \"\";\n if (ch.fmtString)\n value = this.tmStrFormat(value, ch, editor);\n if (ch.formatFunction)\n value = this.tmFormatFunction(value, ch, editor);\n if (value && !ch.ifEnd) {\n result.push(value);\n gotoNext(ch);\n }\n else if (!value && ch.ifEnd) {\n gotoNext(ch.ifEnd);\n }\n }\n else if (ch.elseEnd) {\n gotoNext(ch.elseEnd);\n }\n else if (ch.tabstopId != null) {\n result.push(ch);\n }\n else if (ch.changeCase != null) {\n result.push(ch);\n }\n }\n function gotoNext(ch) {\n var i1 = snippet.indexOf(ch, i + 1);\n if (i1 != -1)\n i = i1;\n }\n return result;\n };\n SnippetManager.prototype.getDisplayTextForSnippet = function (editor, snippetText) {\n var processedSnippet = processSnippetText.call(this, editor, snippetText);\n return processedSnippet.text;\n };\n SnippetManager.prototype.insertSnippetForSelection = function (editor, snippetText, options) {\n if (options === void 0) { options = {}; }\n var processedSnippet = processSnippetText.call(this, editor, snippetText, options);\n var range = editor.getSelectionRange();\n var end = editor.session.replace(range, processedSnippet.text);\n var tabstopManager = new TabstopManager(editor);\n var selectionId = editor.inVirtualSelectionMode && editor.selection.index;\n tabstopManager.addTabstops(processedSnippet.tabstops, range.start, end, selectionId);\n };\n SnippetManager.prototype.insertSnippet = function (editor, snippetText, options) {\n if (options === void 0) { options = {}; }\n var self = this;\n if (editor.inVirtualSelectionMode)\n return self.insertSnippetForSelection(editor, snippetText, options);\n editor.forEachSelection(function () {\n self.insertSnippetForSelection(editor, snippetText, options);\n }, null, { keepOrder: true });\n if (editor.tabstopManager)\n editor.tabstopManager.tabNext();\n };\n SnippetManager.prototype.$getScope = function (editor) {\n var scope = editor.session.$mode.$id || \"\";\n scope = scope.split(\"/\").pop();\n if (scope === \"html\" || scope === \"php\") {\n if (scope === \"php\" && !editor.session.$mode.inlinePhp)\n scope = \"html\";\n var c = editor.getCursorPosition();\n var state = editor.session.getState(c.row);\n if (typeof state === \"object\") {\n state = state[0];\n }\n if (state.substring) {\n if (state.substring(0, 3) == \"js-\")\n scope = \"javascript\";\n else if (state.substring(0, 4) == \"css-\")\n scope = \"css\";\n else if (state.substring(0, 4) == \"php-\")\n scope = \"php\";\n }\n }\n return scope;\n };\n SnippetManager.prototype.getActiveScopes = function (editor) {\n var scope = this.$getScope(editor);\n var scopes = [scope];\n var snippetMap = this.snippetMap;\n if (snippetMap[scope] && snippetMap[scope].includeScopes) {\n scopes.push.apply(scopes, snippetMap[scope].includeScopes);\n }\n scopes.push(\"_\");\n return scopes;\n };\n SnippetManager.prototype.expandWithTab = function (editor, options) {\n var self = this;\n var result = editor.forEachSelection(function () {\n return self.expandSnippetForSelection(editor, options);\n }, null, { keepOrder: true });\n if (result && editor.tabstopManager)\n editor.tabstopManager.tabNext();\n return result;\n };\n SnippetManager.prototype.expandSnippetForSelection = function (editor, options) {\n var cursor = editor.getCursorPosition();\n var line = editor.session.getLine(cursor.row);\n var before = line.substring(0, cursor.column);\n var after = line.substr(cursor.column);\n var snippetMap = this.snippetMap;\n var snippet;\n this.getActiveScopes(editor).some(function (scope) {\n var snippets = snippetMap[scope];\n if (snippets)\n snippet = this.findMatchingSnippet(snippets, before, after);\n return !!snippet;\n }, this);\n if (!snippet)\n return false;\n if (options && options.dryRun)\n return true;\n editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length);\n this.variables.M__ = snippet.matchBefore;\n this.variables.T__ = snippet.matchAfter;\n this.insertSnippetForSelection(editor, snippet.content);\n this.variables.M__ = this.variables.T__ = null;\n return true;\n };\n SnippetManager.prototype.findMatchingSnippet = function (snippetList, before, after) {\n for (var i = snippetList.length; i--;) {\n var s = snippetList[i];\n if (s.startRe && !s.startRe.test(before))\n continue;\n if (s.endRe && !s.endRe.test(after))\n continue;\n if (!s.startRe && !s.endRe)\n continue;\n s.matchBefore = s.startRe ? s.startRe.exec(before) : [\"\"];\n s.matchAfter = s.endRe ? s.endRe.exec(after) : [\"\"];\n s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : \"\";\n s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : \"\";\n return s;\n }\n };\n SnippetManager.prototype.register = function (snippets, scope) {\n var snippetMap = this.snippetMap;\n var snippetNameMap = this.snippetNameMap;\n var self = this;\n if (!snippets)\n snippets = [];\n function wrapRegexp(src) {\n if (src && !/^\\^?\\(.*\\)\\$?$|^\\\\b$/.test(src))\n src = \"(?:\" + src + \")\";\n return src || \"\";\n }\n function guardedRegexp(re, guard, opening) {\n re = wrapRegexp(re);\n guard = wrapRegexp(guard);\n if (opening) {\n re = guard + re;\n if (re && re[re.length - 1] != \"$\")\n re = re + \"$\";\n }\n else {\n re = re + guard;\n if (re && re[0] != \"^\")\n re = \"^\" + re;\n }\n return new RegExp(re);\n }\n function addSnippet(s) {\n if (!s.scope)\n s.scope = scope || \"_\";\n scope = s.scope;\n if (!snippetMap[scope]) {\n snippetMap[scope] = [];\n snippetNameMap[scope] = {};\n }\n var map = snippetNameMap[scope];\n if (s.name) {\n var old = map[s.name];\n if (old)\n self.unregister(old);\n map[s.name] = s;\n }\n snippetMap[scope].push(s);\n if (s.prefix)\n s.tabTrigger = s.prefix;\n if (!s.content && s.body)\n s.content = Array.isArray(s.body) ? s.body.join(\"\\n\") : s.body;\n if (s.tabTrigger && !s.trigger) {\n if (!s.guard && /^\\w/.test(s.tabTrigger))\n s.guard = \"\\\\b\";\n s.trigger = lang.escapeRegExp(s.tabTrigger);\n }\n if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard)\n return;\n s.startRe = guardedRegexp(s.trigger, s.guard, true);\n s.triggerRe = new RegExp(s.trigger);\n s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);\n s.endTriggerRe = new RegExp(s.endTrigger);\n }\n if (Array.isArray(snippets)) {\n snippets.forEach(addSnippet);\n }\n else {\n Object.keys(snippets).forEach(function (key) {\n addSnippet(snippets[key]);\n });\n }\n this._signal(\"registerSnippets\", { scope: scope });\n };\n SnippetManager.prototype.unregister = function (snippets, scope) {\n var snippetMap = this.snippetMap;\n var snippetNameMap = this.snippetNameMap;\n function removeSnippet(s) {\n var nameMap = snippetNameMap[s.scope || scope];\n if (nameMap && nameMap[s.name]) {\n delete nameMap[s.name];\n var map = snippetMap[s.scope || scope];\n var i = map && map.indexOf(s);\n if (i >= 0)\n map.splice(i, 1);\n }\n }\n if (snippets.content)\n removeSnippet(snippets);\n else if (Array.isArray(snippets))\n snippets.forEach(removeSnippet);\n };\n SnippetManager.prototype.parseSnippetFile = function (str) {\n str = str.replace(/\\r/g, \"\");\n var list = [], /**@type{Snippet}*/ snippet = {};\n var re = /^#.*|^({[\\s\\S]*})\\s*$|^(\\S+) (.*)$|^((?:\\n*\\t.*)+)/gm;\n var m;\n while (m = re.exec(str)) {\n if (m[1]) {\n try {\n snippet = JSON.parse(m[1]);\n list.push(snippet);\n }\n catch (e) { }\n }\n if (m[4]) {\n snippet.content = m[4].replace(/^\\t/gm, \"\");\n list.push(snippet);\n snippet = {};\n }\n else {\n var key = m[2], val = m[3];\n if (key == \"regex\") {\n var guardRe = /\\/((?:[^\\/\\\\]|\\\\.)*)|$/g;\n snippet.guard = guardRe.exec(val)[1];\n snippet.trigger = guardRe.exec(val)[1];\n snippet.endTrigger = guardRe.exec(val)[1];\n snippet.endGuard = guardRe.exec(val)[1];\n }\n else if (key == \"snippet\") {\n snippet.tabTrigger = val.match(/^\\S*/)[0];\n if (!snippet.name)\n snippet.name = val;\n }\n else if (key) {\n snippet[key] = val;\n }\n }\n }\n return list;\n };\n SnippetManager.prototype.getSnippetByName = function (name, editor) {\n var snippetMap = this.snippetNameMap;\n var snippet;\n this.getActiveScopes(editor).some(function (scope) {\n var snippets = snippetMap[scope];\n if (snippets)\n snippet = snippets[name];\n return !!snippet;\n }, this);\n return snippet;\n };\n return SnippetManager;\n}());\noop.implement(SnippetManager.prototype, EventEmitter);\nvar processSnippetText = function (editor, snippetText, options) {\n if (options === void 0) { options = {}; }\n var cursor = editor.getCursorPosition();\n var line = editor.session.getLine(cursor.row);\n var tabString = editor.session.getTabString();\n var indentString = line.match(/^\\s*/)[0];\n if (cursor.column < indentString.length)\n indentString = indentString.slice(0, cursor.column);\n snippetText = snippetText.replace(/\\r/g, \"\");\n var tokens = this.tokenizeTmSnippet(snippetText);\n tokens = this.resolveVariables(tokens, editor);\n tokens = tokens.map(function (x) {\n if (x == \"\\n\" && !options.excludeExtraIndent)\n return x + indentString;\n if (typeof x == \"string\")\n return x.replace(/\\t/g, tabString);\n return x;\n });\n var tabstops = [];\n tokens.forEach(function (p, i) {\n if (typeof p != \"object\")\n return;\n var id = p.tabstopId;\n var ts = tabstops[id];\n if (!ts) {\n ts = tabstops[id] = [];\n ts.index = id;\n ts.value = \"\";\n ts.parents = {};\n }\n if (ts.indexOf(p) !== -1)\n return;\n if (p.choices && !ts.choices)\n ts.choices = p.choices;\n ts.push(p);\n var i1 = tokens.indexOf(p, i + 1);\n if (i1 === -1)\n return;\n var value = tokens.slice(i + 1, i1);\n var isNested = value.some(function (t) { return typeof t === \"object\"; });\n if (isNested && !ts.value) {\n ts.value = value;\n }\n else if (value.length && (!ts.value || typeof ts.value !== \"string\")) {\n ts.value = value.join(\"\");\n }\n });\n tabstops.forEach(function (ts) { ts.length = 0; });\n var expanding = {};\n function copyValue(val) {\n var copy = [];\n for (var i = 0; i < val.length; i++) {\n var p = val[i];\n if (typeof p == \"object\") {\n if (expanding[p.tabstopId])\n continue;\n var j = val.lastIndexOf(p, i - 1);\n p = copy[j] || { tabstopId: p.tabstopId };\n }\n copy[i] = p;\n }\n return copy;\n }\n for (var i = 0; i < tokens.length; i++) {\n var p = tokens[i];\n if (typeof p != \"object\")\n continue;\n var id = p.tabstopId;\n var ts = tabstops[id];\n var i1 = tokens.indexOf(p, i + 1);\n if (expanding[id]) {\n if (expanding[id] === p) {\n delete expanding[id];\n Object.keys(expanding).forEach(function (parentId) {\n ts.parents[parentId] = true;\n });\n }\n continue;\n }\n expanding[id] = p;\n var value = ts.value;\n if (typeof value !== \"string\")\n value = copyValue(value);\n else if (p.fmt)\n value = this.tmStrFormat(value, p, editor);\n tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p));\n if (ts.indexOf(p) === -1)\n ts.push(p);\n }\n var row = 0, column = 0;\n var text = \"\";\n tokens.forEach(function (t) {\n if (typeof t === \"string\") {\n var lines = t.split(\"\\n\");\n if (lines.length > 1) {\n column = lines[lines.length - 1].length;\n row += lines.length - 1;\n }\n else\n column += t.length;\n text += t;\n }\n else if (t) {\n if (!t.start)\n t.start = { row: row, column: column };\n else\n t.end = { row: row, column: column };\n }\n });\n return {\n text: text,\n tabstops: tabstops,\n tokens: tokens\n };\n};\nvar TabstopManager = /** @class */ (function () {\n function TabstopManager(editor) {\n this.index = 0;\n this.ranges = [];\n this.tabstops = [];\n if (editor.tabstopManager)\n return editor.tabstopManager;\n editor.tabstopManager = this;\n this.$onChange = this.onChange.bind(this);\n this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;\n this.$onChangeSession = this.onChangeSession.bind(this);\n this.$onAfterExec = this.onAfterExec.bind(this);\n this.attach(editor);\n }\n TabstopManager.prototype.attach = function (editor) {\n this.$openTabstops = null;\n this.selectedTabstop = null;\n this.editor = editor;\n this.session = editor.session;\n this.editor.on(\"change\", this.$onChange);\n this.editor.on(\"changeSelection\", this.$onChangeSelection);\n this.editor.on(\"changeSession\", this.$onChangeSession);\n this.editor.commands.on(\"afterExec\", this.$onAfterExec);\n this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);\n };\n TabstopManager.prototype.detach = function () {\n this.tabstops.forEach(this.removeTabstopMarkers, this);\n this.ranges.length = 0;\n this.tabstops.length = 0;\n this.selectedTabstop = null;\n this.editor.off(\"change\", this.$onChange);\n this.editor.off(\"changeSelection\", this.$onChangeSelection);\n this.editor.off(\"changeSession\", this.$onChangeSession);\n this.editor.commands.off(\"afterExec\", this.$onAfterExec);\n this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);\n this.editor.tabstopManager = null;\n this.session = null;\n this.editor = null;\n };\n TabstopManager.prototype.onChange = function (delta) {\n var isRemove = delta.action[0] == \"r\";\n var selectedTabstop = this.selectedTabstop || {};\n var parents = selectedTabstop.parents || {};\n var tabstops = this.tabstops.slice();\n for (var i = 0; i < tabstops.length; i++) {\n var ts = tabstops[i];\n var active = ts == selectedTabstop || parents[ts.index];\n ts.rangeList.$bias = active ? 0 : 1;\n if (delta.action == \"remove\" && ts !== selectedTabstop) {\n var parentActive = ts.parents && ts.parents[selectedTabstop.index];\n var startIndex = ts.rangeList.pointIndex(delta.start, parentActive);\n startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1;\n var endIndex = ts.rangeList.pointIndex(delta.end, parentActive);\n endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1;\n var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex);\n for (var j = 0; j < toRemove.length; j++)\n this.removeRange(toRemove[j]);\n }\n ts.rangeList.$onChange(delta);\n }\n var session = this.session;\n if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue())\n this.detach();\n };\n TabstopManager.prototype.updateLinkedFields = function () {\n var ts = this.selectedTabstop;\n if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked)\n return;\n this.$inChange = true;\n var session = this.session;\n var text = session.getTextRange(ts.firstNonLinked);\n for (var i = 0; i < ts.length; i++) {\n var range = ts[i];\n if (!range.linked)\n continue;\n var original = range.original;\n var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor);\n session.replace(range, fmt);\n }\n this.$inChange = false;\n };\n TabstopManager.prototype.onAfterExec = function (e) {\n if (e.command && !e.command.readOnly)\n this.updateLinkedFields();\n };\n TabstopManager.prototype.onChangeSelection = function () {\n if (!this.editor)\n return;\n var lead = this.editor.selection.lead;\n var anchor = this.editor.selection.anchor;\n var isEmpty = this.editor.selection.isEmpty();\n for (var i = 0; i < this.ranges.length; i++) {\n if (this.ranges[i].linked)\n continue;\n var containsLead = this.ranges[i].contains(lead.row, lead.column);\n var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);\n if (containsLead && containsAnchor)\n return;\n }\n this.detach();\n };\n TabstopManager.prototype.onChangeSession = function () {\n this.detach();\n };\n TabstopManager.prototype.tabNext = function (dir) {\n var max = this.tabstops.length;\n var index = this.index + (dir || 1);\n index = Math.min(Math.max(index, 1), max);\n if (index == max)\n index = 0;\n this.selectTabstop(index);\n this.updateTabstopMarkers();\n if (index === 0) {\n this.detach();\n }\n };\n TabstopManager.prototype.selectTabstop = function (index) {\n this.$openTabstops = null;\n var ts = this.tabstops[this.index];\n if (ts)\n this.addTabstopMarkers(ts);\n this.index = index;\n ts = this.tabstops[this.index];\n if (!ts || !ts.length)\n return;\n this.selectedTabstop = ts;\n var range = ts.firstNonLinked || ts;\n if (ts.choices)\n range.cursor = range.start;\n if (!this.editor.inVirtualSelectionMode) {\n var sel = this.editor.multiSelect;\n sel.toSingleRange(range);\n for (var i = 0; i < ts.length; i++) {\n if (ts.hasLinkedRanges && ts[i].linked)\n continue;\n sel.addRange(ts[i].clone(), true);\n }\n }\n else {\n this.editor.selection.fromOrientedRange(range);\n }\n this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);\n if (this.selectedTabstop && this.selectedTabstop.choices)\n this.editor.execCommand(\"startAutocomplete\", { matches: this.selectedTabstop.choices });\n };\n TabstopManager.prototype.addTabstops = function (tabstops, start, end) {\n var useLink = this.useLink || !this.editor.getOption(\"enableMultiselect\");\n if (!this.$openTabstops)\n this.$openTabstops = [];\n if (!tabstops[0]) {\n var p = Range.fromPoints(end, end);\n moveRelative(p.start, start);\n moveRelative(p.end, start);\n tabstops[0] = [p];\n tabstops[0].index = 0;\n }\n var i = this.index;\n var arg = [i + 1, 0];\n var ranges = this.ranges;\n var snippetId = this.snippetId = (this.snippetId || 0) + 1;\n tabstops.forEach(function (ts, index) {\n var dest = this.$openTabstops[index] || ts;\n dest.snippetId = snippetId;\n for (var i = 0; i < ts.length; i++) {\n var p = ts[i];\n var range = Range.fromPoints(p.start, p.end || p.start);\n movePoint(range.start, start);\n movePoint(range.end, start);\n range.original = p;\n range.tabstop = dest;\n ranges.push(range);\n if (dest != ts)\n dest.unshift(range);\n else\n dest[i] = range;\n if (p.fmtString || (dest.firstNonLinked && useLink)) {\n range.linked = true;\n dest.hasLinkedRanges = true;\n }\n else if (!dest.firstNonLinked)\n dest.firstNonLinked = range;\n }\n if (!dest.firstNonLinked)\n dest.hasLinkedRanges = false;\n if (dest === ts) {\n arg.push(dest);\n this.$openTabstops[index] = dest;\n }\n this.addTabstopMarkers(dest);\n dest.rangeList = dest.rangeList || new RangeList();\n dest.rangeList.$bias = 0;\n dest.rangeList.addList(dest);\n }, this);\n if (arg.length > 2) {\n if (this.tabstops.length)\n arg.push(arg.splice(2, 1)[0]);\n this.tabstops.splice.apply(this.tabstops, arg);\n }\n };\n TabstopManager.prototype.addTabstopMarkers = function (ts) {\n var session = this.session;\n ts.forEach(function (range) {\n if (!range.markerId)\n range.markerId = session.addMarker(range, \"ace_snippet-marker\", \"text\");\n });\n };\n TabstopManager.prototype.removeTabstopMarkers = function (ts) {\n var session = this.session;\n ts.forEach(function (range) {\n session.removeMarker(range.markerId);\n range.markerId = null;\n });\n };\n TabstopManager.prototype.updateTabstopMarkers = function () {\n if (!this.selectedTabstop)\n return;\n var currentSnippetId = this.selectedTabstop.snippetId;\n if (this.selectedTabstop.index === 0) {\n currentSnippetId--;\n }\n this.tabstops.forEach(function (ts) {\n if (ts.snippetId === currentSnippetId)\n this.addTabstopMarkers(ts);\n else\n this.removeTabstopMarkers(ts);\n }, this);\n };\n TabstopManager.prototype.removeRange = function (range) {\n var i = range.tabstop.indexOf(range);\n if (i != -1)\n range.tabstop.splice(i, 1);\n i = this.ranges.indexOf(range);\n if (i != -1)\n this.ranges.splice(i, 1);\n i = range.tabstop.rangeList.ranges.indexOf(range);\n if (i != -1)\n range.tabstop.splice(i, 1);\n this.session.removeMarker(range.markerId);\n if (!range.tabstop.length) {\n i = this.tabstops.indexOf(range.tabstop);\n if (i != -1)\n this.tabstops.splice(i, 1);\n if (!this.tabstops.length)\n this.detach();\n }\n };\n return TabstopManager;\n}());\nTabstopManager.prototype.keyboardHandler = new HashHandler();\nTabstopManager.prototype.keyboardHandler.bindKeys({\n \"Tab\": function (editor) {\n if (exports.snippetManager && exports.snippetManager.expandWithTab(editor))\n return;\n editor.tabstopManager.tabNext(1);\n editor.renderer.scrollCursorIntoView();\n },\n \"Shift-Tab\": function (editor) {\n editor.tabstopManager.tabNext(-1);\n editor.renderer.scrollCursorIntoView();\n },\n \"Esc\": function (editor) {\n editor.tabstopManager.detach();\n }\n});\nvar movePoint = function (point, diff) {\n if (point.row == 0)\n point.column += diff.column;\n point.row += diff.row;\n};\nvar moveRelative = function (point, start) {\n if (point.row == start.row)\n point.column -= start.column;\n point.row -= start.row;\n};\ndom.importCssString(\"\\n.ace_snippet-marker {\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n background: rgba(194, 193, 208, 0.09);\\n border: 1px dotted rgba(211, 208, 235, 0.62);\\n position: absolute;\\n}\", \"snippets.css\", false);\nexports.snippetManager = new SnippetManager();\nvar Editor = require(\"./editor\").Editor;\n(function () {\n this.insertSnippet = function (content, options) {\n return exports.snippetManager.insertSnippet(this, content, options);\n };\n this.expandSnippet = function (options) {\n return exports.snippetManager.expandWithTab(this, options);\n };\n}).call(Editor.prototype);\n\n});\n\nace.define(\"ace/autocomplete/popup\",[\"require\",\"exports\",\"module\",\"ace/virtual_renderer\",\"ace/editor\",\"ace/range\",\"ace/lib/event\",\"ace/lib/lang\",\"ace/lib/dom\",\"ace/config\",\"ace/lib/useragent\"], function(require, exports, module){\"use strict\";\nvar Renderer = require(\"../virtual_renderer\").VirtualRenderer;\nvar Editor = require(\"../editor\").Editor;\nvar Range = require(\"../range\").Range;\nvar event = require(\"../lib/event\");\nvar lang = require(\"../lib/lang\");\nvar dom = require(\"../lib/dom\");\nvar nls = require(\"../config\").nls;\nvar userAgent = require(\"./../lib/useragent\");\nvar getAriaId = function (index) {\n return \"suggest-aria-id:\".concat(index);\n};\nvar popupAriaRole = userAgent.isSafari ? \"menu\" : \"listbox\";\nvar optionAriaRole = userAgent.isSafari ? \"menuitem\" : \"option\";\nvar ariaActiveState = userAgent.isSafari ? \"aria-current\" : \"aria-selected\";\nvar $singleLineEditor = function (el) {\n var renderer = new Renderer(el);\n renderer.$maxLines = 4;\n var editor = new Editor(renderer);\n editor.setHighlightActiveLine(false);\n editor.setShowPrintMargin(false);\n editor.renderer.setShowGutter(false);\n editor.renderer.setHighlightGutterLine(false);\n editor.$mouseHandler.$focusTimeout = 0;\n editor.$highlightTagPending = true;\n return editor;\n};\nvar AcePopup = /** @class */ (function () {\n function AcePopup(parentNode) {\n var el = dom.createElement(\"div\");\n var popup = $singleLineEditor(el);\n if (parentNode) {\n parentNode.appendChild(el);\n }\n el.style.display = \"none\";\n popup.renderer.content.style.cursor = \"default\";\n popup.renderer.setStyle(\"ace_autocomplete\");\n popup.renderer.$textLayer.element.setAttribute(\"role\", popupAriaRole);\n popup.renderer.$textLayer.element.setAttribute(\"aria-roledescription\", nls(\"Autocomplete suggestions\"));\n popup.renderer.$textLayer.element.setAttribute(\"aria-label\", nls(\"Autocomplete suggestions\"));\n popup.renderer.textarea.setAttribute(\"aria-hidden\", \"true\");\n popup.setOption(\"displayIndentGuides\", false);\n popup.setOption(\"dragDelay\", 150);\n var noop = function () { };\n popup.focus = noop;\n popup.$isFocused = true;\n popup.renderer.$cursorLayer.restartTimer = noop;\n popup.renderer.$cursorLayer.element.style.opacity = \"0\";\n popup.renderer.$maxLines = 8;\n popup.renderer.$keepTextAreaAtCursor = false;\n popup.setHighlightActiveLine(false);\n popup.session.highlight(\"\");\n popup.session.$searchHighlight.clazz = \"ace_highlight-marker\";\n popup.on(\"mousedown\", function (e) {\n var pos = e.getDocumentPosition();\n popup.selection.moveToPosition(pos);\n selectionMarker.start.row = selectionMarker.end.row = pos.row;\n e.stop();\n });\n var lastMouseEvent;\n var hoverMarker = new Range(-1, 0, -1, Infinity);\n var selectionMarker = new Range(-1, 0, -1, Infinity);\n selectionMarker.id = popup.session.addMarker(selectionMarker, \"ace_active-line\", \"fullLine\");\n popup.setSelectOnHover = function (val) {\n if (!val) {\n hoverMarker.id = popup.session.addMarker(hoverMarker, \"ace_line-hover\", \"fullLine\");\n }\n else if (hoverMarker.id) {\n popup.session.removeMarker(hoverMarker.id);\n hoverMarker.id = null;\n }\n };\n popup.setSelectOnHover(false);\n popup.on(\"mousemove\", function (e) {\n if (!lastMouseEvent) {\n lastMouseEvent = e;\n return;\n }\n if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {\n return;\n }\n lastMouseEvent = e;\n lastMouseEvent.scrollTop = popup.renderer.scrollTop;\n popup.isMouseOver = true;\n var row = lastMouseEvent.getDocumentPosition().row;\n if (hoverMarker.start.row != row) {\n if (!hoverMarker.id)\n popup.setRow(row);\n setHoverMarker(row);\n }\n });\n popup.renderer.on(\"beforeRender\", function () {\n if (lastMouseEvent && hoverMarker.start.row != -1) {\n lastMouseEvent.$pos = null;\n var row = lastMouseEvent.getDocumentPosition().row;\n if (!hoverMarker.id)\n popup.setRow(row);\n setHoverMarker(row, true);\n }\n });\n popup.renderer.on(\"afterRender\", function () {\n var row = popup.getRow();\n var t = popup.renderer.$textLayer;\n var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]);\n var el = document.activeElement; // Active element is textarea of main editor\n if (selected !== popup.selectedNode && popup.selectedNode) {\n dom.removeCssClass(popup.selectedNode, \"ace_selected\");\n el.removeAttribute(\"aria-activedescendant\");\n popup.selectedNode.removeAttribute(ariaActiveState);\n popup.selectedNode.removeAttribute(\"id\");\n }\n popup.selectedNode = selected;\n if (selected) {\n dom.addCssClass(selected, \"ace_selected\");\n var ariaId = getAriaId(row);\n selected.id = ariaId;\n t.element.setAttribute(\"aria-activedescendant\", ariaId);\n el.setAttribute(\"aria-activedescendant\", ariaId);\n selected.setAttribute(\"role\", optionAriaRole);\n selected.setAttribute(\"aria-roledescription\", nls(\"item\"));\n selected.setAttribute(\"aria-label\", popup.getData(row).caption || popup.getData(row).value);\n selected.setAttribute(\"aria-setsize\", popup.data.length);\n selected.setAttribute(\"aria-posinset\", row + 1);\n selected.setAttribute(\"aria-describedby\", \"doc-tooltip\");\n selected.setAttribute(ariaActiveState, \"true\");\n }\n });\n var hideHoverMarker = function () { setHoverMarker(-1); };\n var setHoverMarker = function (row, suppressRedraw) {\n if (row !== hoverMarker.start.row) {\n hoverMarker.start.row = hoverMarker.end.row = row;\n if (!suppressRedraw)\n popup.session._emit(\"changeBackMarker\");\n popup._emit(\"changeHoverMarker\");\n }\n };\n popup.getHoveredRow = function () {\n return hoverMarker.start.row;\n };\n event.addListener(popup.container, \"mouseout\", function () {\n popup.isMouseOver = false;\n hideHoverMarker();\n });\n popup.on(\"hide\", hideHoverMarker);\n popup.on(\"changeSelection\", hideHoverMarker);\n popup.session.doc.getLength = function () {\n return popup.data.length;\n };\n popup.session.doc.getLine = function (i) {\n var data = popup.data[i];\n if (typeof data == \"string\")\n return data;\n return (data && data.value) || \"\";\n };\n var bgTokenizer = popup.session.bgTokenizer;\n bgTokenizer.$tokenizeRow = function (row) {\n var data = popup.data[row];\n var tokens = [];\n if (!data)\n return tokens;\n if (typeof data == \"string\")\n data = { value: data };\n var caption = data.caption || data.value || data.name;\n function addToken(value, className) {\n value && tokens.push({\n type: (data.className || \"\") + (className || \"\"),\n value: value\n });\n }\n var lower = caption.toLowerCase();\n var filterText = (popup.filterText || \"\").toLowerCase();\n var lastIndex = 0;\n var lastI = 0;\n for (var i = 0; i <= filterText.length; i++) {\n if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) {\n var sub = filterText.slice(lastI, i);\n lastI = i;\n var index = lower.indexOf(sub, lastIndex);\n if (index == -1)\n continue;\n addToken(caption.slice(lastIndex, index), \"\");\n lastIndex = index + sub.length;\n addToken(caption.slice(index, lastIndex), \"completion-highlight\");\n }\n }\n addToken(caption.slice(lastIndex, caption.length), \"\");\n tokens.push({ type: \"completion-spacer\", value: \" \" });\n if (data.meta)\n tokens.push({ type: \"completion-meta\", value: data.meta });\n if (data.message)\n tokens.push({ type: \"completion-message\", value: data.message });\n return tokens;\n };\n bgTokenizer.$updateOnChange = noop;\n bgTokenizer.start = noop;\n popup.session.$computeWidth = function () {\n return this.screenWidth = 0;\n };\n popup.isOpen = false;\n popup.isTopdown = false;\n popup.autoSelect = true;\n popup.filterText = \"\";\n popup.isMouseOver = false;\n popup.data = [];\n popup.setData = function (list, filterText) {\n popup.filterText = filterText || \"\";\n popup.setValue(lang.stringRepeat(\"\\n\", list.length), -1);\n popup.data = list || [];\n popup.setRow(0);\n };\n popup.getData = function (row) {\n return popup.data[row];\n };\n popup.getRow = function () {\n return selectionMarker.start.row;\n };\n popup.setRow = function (line) {\n line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length - 1, line));\n if (selectionMarker.start.row != line) {\n popup.selection.clearSelection();\n selectionMarker.start.row = selectionMarker.end.row = line || 0;\n popup.session._emit(\"changeBackMarker\");\n popup.moveCursorTo(line || 0, 0);\n if (popup.isOpen)\n popup._signal(\"select\");\n }\n };\n popup.on(\"changeSelection\", function () {\n if (popup.isOpen)\n popup.setRow(popup.selection.lead.row);\n popup.renderer.scrollCursorIntoView();\n });\n popup.hide = function () {\n this.container.style.display = \"none\";\n popup.anchorPos = null;\n popup.anchor = null;\n if (popup.isOpen) {\n popup.isOpen = false;\n this._signal(\"hide\");\n }\n };\n popup.tryShow = function (pos, lineHeight, anchor, forceShow) {\n if (!forceShow && popup.isOpen && popup.anchorPos && popup.anchor &&\n popup.anchorPos.top === pos.top && popup.anchorPos.left === pos.left &&\n popup.anchor === anchor) {\n return true;\n }\n var el = this.container;\n var screenHeight = window.innerHeight;\n var screenWidth = window.innerWidth;\n var renderer = this.renderer;\n var maxH = renderer.$maxLines * lineHeight * 1.4;\n var dims = { top: 0, bottom: 0, left: 0 };\n var spaceBelow = screenHeight - pos.top - 3 * this.$borderSize - lineHeight;\n var spaceAbove = pos.top - 3 * this.$borderSize;\n if (!anchor) {\n if (spaceAbove <= spaceBelow || spaceBelow >= maxH) {\n anchor = \"bottom\";\n }\n else {\n anchor = \"top\";\n }\n }\n if (anchor === \"top\") {\n dims.bottom = pos.top - this.$borderSize;\n dims.top = dims.bottom - maxH;\n }\n else if (anchor === \"bottom\") {\n dims.top = pos.top + lineHeight + this.$borderSize;\n dims.bottom = dims.top + maxH;\n }\n var fitsX = dims.top >= 0 && dims.bottom <= screenHeight;\n if (!forceShow && !fitsX) {\n return false;\n }\n if (!fitsX) {\n if (anchor === \"top\") {\n renderer.$maxPixelHeight = spaceAbove;\n }\n else {\n renderer.$maxPixelHeight = spaceBelow;\n }\n }\n else {\n renderer.$maxPixelHeight = null;\n }\n if (anchor === \"top\") {\n el.style.top = \"\";\n el.style.bottom = (screenHeight - dims.bottom) + \"px\";\n popup.isTopdown = false;\n }\n else {\n el.style.top = dims.top + \"px\";\n el.style.bottom = \"\";\n popup.isTopdown = true;\n }\n el.style.display = \"\";\n var left = pos.left;\n if (left + el.offsetWidth > screenWidth)\n left = screenWidth - el.offsetWidth;\n el.style.left = left + \"px\";\n el.style.right = \"\";\n if (!popup.isOpen) {\n popup.isOpen = true;\n this._signal(\"show\");\n lastMouseEvent = null;\n }\n popup.anchorPos = pos;\n popup.anchor = anchor;\n return true;\n };\n popup.show = function (pos, lineHeight, topdownOnly) {\n this.tryShow(pos, lineHeight, topdownOnly ? \"bottom\" : undefined, true);\n };\n popup.goTo = function (where) {\n var row = this.getRow();\n var max = this.session.getLength() - 1;\n switch (where) {\n case \"up\":\n row = row <= 0 ? max : row - 1;\n break;\n case \"down\":\n row = row >= max ? -1 : row + 1;\n break;\n case \"start\":\n row = 0;\n break;\n case \"end\":\n row = max;\n break;\n }\n this.setRow(row);\n };\n popup.getTextLeftOffset = function () {\n return this.$borderSize + this.renderer.$padding + this.$imageSize;\n };\n popup.$imageSize = 0;\n popup.$borderSize = 1;\n return popup;\n }\n return AcePopup;\n}());\ndom.importCssString(\"\\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\\n background-color: #CAD6FA;\\n z-index: 1;\\n}\\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\\n background-color: #3a674e;\\n}\\n.ace_editor.ace_autocomplete .ace_line-hover {\\n border: 1px solid #abbffe;\\n margin-top: -1px;\\n background: rgba(233,233,253,0.4);\\n position: absolute;\\n z-index: 2;\\n}\\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\\n border: 1px solid rgba(109, 150, 13, 0.8);\\n background: rgba(58, 103, 78, 0.62);\\n}\\n.ace_completion-meta {\\n opacity: 0.5;\\n margin-left: 0.9em;\\n}\\n.ace_completion-message {\\n margin-left: 0.9em;\\n color: blue;\\n}\\n.ace_editor.ace_autocomplete .ace_completion-highlight{\\n color: #2d69c7;\\n}\\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\\n color: #93ca12;\\n}\\n.ace_editor.ace_autocomplete {\\n width: 300px;\\n z-index: 200000;\\n border: 1px lightgray solid;\\n position: fixed;\\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\\n line-height: 1.4;\\n background: #fefefe;\\n color: #111;\\n}\\n.ace_dark.ace_editor.ace_autocomplete {\\n border: 1px #484747 solid;\\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\\n line-height: 1.4;\\n background: #25282c;\\n color: #c1c1c1;\\n}\\n.ace_autocomplete .ace_text-layer {\\n width: calc(100% - 8px);\\n}\\n.ace_autocomplete .ace_line {\\n display: flex;\\n align-items: center;\\n}\\n.ace_autocomplete .ace_line > * {\\n min-width: 0;\\n flex: 0 0 auto;\\n}\\n.ace_autocomplete .ace_line .ace_ {\\n flex: 0 1 auto;\\n overflow: hidden;\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n}\\n.ace_autocomplete .ace_completion-spacer {\\n flex: 1;\\n}\\n.ace_autocomplete.ace_loading:after {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0px;\\n height: 2px;\\n width: 8%;\\n background: blue;\\n z-index: 100;\\n animation: ace_progress 3s infinite linear;\\n animation-delay: 300ms;\\n transform: translateX(-100%) scaleX(1);\\n}\\n@keyframes ace_progress {\\n 0% { transform: translateX(-100%) scaleX(1) }\\n 50% { transform: translateX(625%) scaleX(2) } \\n 100% { transform: translateX(1500%) scaleX(3) } \\n}\\n@media (prefers-reduced-motion) {\\n .ace_autocomplete.ace_loading:after {\\n transform: translateX(625%) scaleX(2);\\n animation: none;\\n }\\n}\\n\", \"autocompletion.css\", false);\nexports.AcePopup = AcePopup;\nexports.$singleLineEditor = $singleLineEditor;\nexports.getAriaId = getAriaId;\n\n});\n\nace.define(\"ace/autocomplete/inline_screenreader\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nvar AceInlineScreenReader = /** @class */ (function () {\n function AceInlineScreenReader(editor) {\n this.editor = editor;\n this.screenReaderDiv = document.createElement(\"div\");\n this.screenReaderDiv.classList.add(\"ace_screenreader-only\");\n this.editor.container.appendChild(this.screenReaderDiv);\n }\n AceInlineScreenReader.prototype.setScreenReaderContent = function (content) {\n if (!this.popup && this.editor.completer && /**@type{import(\"../autocomplete\").Autocomplete}*/ (this.editor.completer).popup) {\n this.popup = /**@type{import(\"../autocomplete\").Autocomplete}*/ (this.editor.completer).popup;\n this.popup.renderer.on(\"afterRender\", function () {\n var row = this.popup.getRow();\n var t = this.popup.renderer.$textLayer;\n var selected = t.element.childNodes[row - t.config.firstRow];\n if (selected) {\n var idString = \"doc-tooltip \";\n for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) {\n idString += \"ace-inline-screenreader-line-\".concat(lineIndex, \" \");\n }\n selected.setAttribute(\"aria-describedby\", idString);\n }\n }.bind(this));\n }\n while (this.screenReaderDiv.firstChild) {\n this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);\n }\n this._lines = content.split(/\\r\\n|\\r|\\n/);\n var codeElement = this.createCodeBlock();\n this.screenReaderDiv.appendChild(codeElement);\n };\n AceInlineScreenReader.prototype.destroy = function () {\n this.screenReaderDiv.remove();\n };\n AceInlineScreenReader.prototype.createCodeBlock = function () {\n var container = document.createElement(\"pre\");\n container.setAttribute(\"id\", \"ace-inline-screenreader\");\n for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) {\n var codeElement = document.createElement(\"code\");\n codeElement.setAttribute(\"id\", \"ace-inline-screenreader-line-\".concat(lineIndex));\n var line = document.createTextNode(this._lines[lineIndex]);\n codeElement.appendChild(line);\n container.appendChild(codeElement);\n }\n return container;\n };\n return AceInlineScreenReader;\n}());\nexports.AceInlineScreenReader = AceInlineScreenReader;\n\n});\n\nace.define(\"ace/autocomplete/inline\",[\"require\",\"exports\",\"module\",\"ace/snippets\",\"ace/autocomplete/inline_screenreader\"], function(require, exports, module){\"use strict\";\nvar snippetManager = require(\"../snippets\").snippetManager;\nvar AceInlineScreenReader = require(\"./inline_screenreader\").AceInlineScreenReader;\nvar AceInline = /** @class */ (function () {\n function AceInline() {\n this.editor = null;\n }\n AceInline.prototype.show = function (editor, completion, prefix) {\n prefix = prefix || \"\";\n if (editor && this.editor && this.editor !== editor) {\n this.hide();\n this.editor = null;\n this.inlineScreenReader = null;\n }\n if (!editor || !completion) {\n return false;\n }\n if (!this.inlineScreenReader) {\n this.inlineScreenReader = new AceInlineScreenReader(editor);\n }\n var displayText = completion.snippet ? snippetManager.getDisplayTextForSnippet(editor, completion.snippet) : completion.value;\n if (completion.hideInlinePreview || !displayText || !displayText.startsWith(prefix)) {\n return false;\n }\n this.editor = editor;\n this.inlineScreenReader.setScreenReaderContent(displayText);\n displayText = displayText.slice(prefix.length);\n if (displayText === \"\") {\n editor.removeGhostText();\n }\n else {\n editor.setGhostText(displayText);\n }\n return true;\n };\n AceInline.prototype.isOpen = function () {\n if (!this.editor) {\n return false;\n }\n return !!this.editor.renderer.$ghostText;\n };\n AceInline.prototype.hide = function () {\n if (!this.editor) {\n return false;\n }\n this.editor.removeGhostText();\n return true;\n };\n AceInline.prototype.destroy = function () {\n this.hide();\n this.editor = null;\n if (this.inlineScreenReader) {\n this.inlineScreenReader.destroy();\n this.inlineScreenReader = null;\n }\n };\n return AceInline;\n}());\nexports.AceInline = AceInline;\n\n});\n\nace.define(\"ace/autocomplete/util\",[\"require\",\"exports\",\"module\"], function(require, exports, module){\"use strict\";\nexports.parForEach = function (array, fn, callback) {\n var completed = 0;\n var arLength = array.length;\n if (arLength === 0)\n callback();\n for (var i = 0; i < arLength; i++) {\n fn(array[i], function (result, err) {\n completed++;\n if (completed === arLength)\n callback(result, err);\n });\n }\n};\nvar ID_REGEX = /[a-zA-Z_0-9\\$\\-\\u00A2-\\u2000\\u2070-\\uFFFF]/;\nexports.retrievePrecedingIdentifier = function (text, pos, regex) {\n regex = regex || ID_REGEX;\n var buf = [];\n for (var i = pos - 1; i >= 0; i--) {\n if (regex.test(text[i]))\n buf.push(text[i]);\n else\n break;\n }\n return buf.reverse().join(\"\");\n};\nexports.retrieveFollowingIdentifier = function (text, pos, regex) {\n regex = regex || ID_REGEX;\n var buf = [];\n for (var i = pos; i < text.length; i++) {\n if (regex.test(text[i]))\n buf.push(text[i]);\n else\n break;\n }\n return buf;\n};\nexports.getCompletionPrefix = function (editor) {\n var pos = editor.getCursorPosition();\n var line = editor.session.getLine(pos.row);\n var prefix;\n editor.completers.forEach(function (completer) {\n if (completer.identifierRegexps) {\n completer.identifierRegexps.forEach(function (identifierRegex) {\n if (!prefix && identifierRegex)\n prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex);\n }.bind(this));\n }\n }.bind(this));\n return prefix || this.retrievePrecedingIdentifier(line, pos.column);\n};\nexports.triggerAutocomplete = function (editor) {\n var pos = editor.getCursorPosition();\n var line = editor.session.getLine(pos.row);\n var column = (pos.column === 0) ? 0 : pos.column - 1;\n var previousChar = line[column];\n return editor.completers.some(function (el) {\n if (el.triggerCharacters && Array.isArray(el.triggerCharacters)) {\n return el.triggerCharacters.includes(previousChar);\n }\n });\n};\n\n});\n\nace.define(\"ace/autocomplete\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\",\"ace/autocomplete/popup\",\"ace/autocomplete/inline\",\"ace/autocomplete/popup\",\"ace/autocomplete/util\",\"ace/lib/lang\",\"ace/lib/dom\",\"ace/snippets\",\"ace/config\",\"ace/lib/event\",\"ace/lib/scroll\"], function(require, exports, module){\"use strict\";\nvar HashHandler = require(\"./keyboard/hash_handler\").HashHandler;\nvar AcePopup = require(\"./autocomplete/popup\").AcePopup;\nvar AceInline = require(\"./autocomplete/inline\").AceInline;\nvar getAriaId = require(\"./autocomplete/popup\").getAriaId;\nvar util = require(\"./autocomplete/util\");\nvar lang = require(\"./lib/lang\");\nvar dom = require(\"./lib/dom\");\nvar snippetManager = require(\"./snippets\").snippetManager;\nvar config = require(\"./config\");\nvar event = require(\"./lib/event\");\nvar preventParentScroll = require(\"./lib/scroll\").preventParentScroll;\nvar destroyCompleter = function (e, editor) {\n editor.completer && editor.completer.destroy();\n};\nvar Autocomplete = /** @class */ (function () {\n function Autocomplete() {\n this.autoInsert = false;\n this.autoSelect = true;\n this.autoShown = false;\n this.exactMatch = false;\n this.inlineEnabled = false;\n this.keyboardHandler = new HashHandler();\n this.keyboardHandler.bindKeys(this.commands);\n this.parentNode = null;\n this.setSelectOnHover = false;\n this.hasSeen = new Set();\n this.showLoadingState = false;\n this.stickySelectionDelay = 500;\n this.blurListener = this.blurListener.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.mousedownListener = this.mousedownListener.bind(this);\n this.mousewheelListener = this.mousewheelListener.bind(this);\n this.onLayoutChange = this.onLayoutChange.bind(this);\n this.changeTimer = lang.delayedCall(function () {\n this.updateCompletions(true);\n }.bind(this));\n this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);\n this.popupTimer = lang.delayedCall(this.$updatePopupPosition.bind(this), 50);\n this.stickySelectionTimer = lang.delayedCall(function () {\n this.stickySelection = true;\n }.bind(this), this.stickySelectionDelay);\n this.$firstOpenTimer = lang.delayedCall(/**@this{Autocomplete}*/ function () {\n var initialPosition = this.completionProvider && this.completionProvider.initialPosition;\n if (this.autoShown || (this.popup && this.popup.isOpen) || !initialPosition || this.editor.completers.length === 0)\n return;\n this.completions = new FilteredList(Autocomplete.completionsForLoading);\n this.openPopup(this.editor, initialPosition.prefix, false);\n this.popup.renderer.setStyle(\"ace_loading\", true);\n }.bind(this), this.stickySelectionDelay);\n }\n Object.defineProperty(Autocomplete, \"completionsForLoading\", {\n get: function () {\n return [{\n caption: config.nls(\"Loading...\"),\n value: \"\"\n }];\n },\n enumerable: false,\n configurable: true\n });\n Autocomplete.prototype.$init = function () {\n this.popup = new AcePopup(this.parentNode || document.body || document.documentElement);\n this.popup.on(\"click\", function (e) {\n this.insertMatch();\n e.stop();\n }.bind(this));\n this.popup.focus = this.editor.focus.bind(this.editor);\n this.popup.on(\"show\", this.$onPopupShow.bind(this));\n this.popup.on(\"hide\", this.$onHidePopup.bind(this));\n this.popup.on(\"select\", this.$onPopupChange.bind(this));\n event.addListener(this.popup.container, \"mouseout\", this.mouseOutListener.bind(this));\n this.popup.on(\"changeHoverMarker\", this.tooltipTimer.bind(null, null));\n this.popup.renderer.on(\"afterRender\", this.$onPopupRender.bind(this));\n return this.popup;\n };\n Autocomplete.prototype.$initInline = function () {\n if (!this.inlineEnabled || this.inlineRenderer)\n return;\n this.inlineRenderer = new AceInline();\n return this.inlineRenderer;\n };\n Autocomplete.prototype.getPopup = function () {\n return this.popup || this.$init();\n };\n Autocomplete.prototype.$onHidePopup = function () {\n if (this.inlineRenderer) {\n this.inlineRenderer.hide();\n }\n this.hideDocTooltip();\n this.stickySelectionTimer.cancel();\n this.popupTimer.cancel();\n this.stickySelection = false;\n };\n Autocomplete.prototype.$seen = function (completion) {\n if (!this.hasSeen.has(completion) && completion && completion.completer && completion.completer.onSeen && typeof completion.completer.onSeen === \"function\") {\n completion.completer.onSeen(this.editor, completion);\n this.hasSeen.add(completion);\n }\n };\n Autocomplete.prototype.$onPopupChange = function (hide) {\n if (this.inlineRenderer && this.inlineEnabled) {\n var completion = hide ? null : this.popup.getData(this.popup.getRow());\n this.$updateGhostText(completion);\n if (this.popup.isMouseOver && this.setSelectOnHover) {\n this.tooltipTimer.call(null, null);\n return;\n }\n this.popupTimer.schedule();\n this.tooltipTimer.schedule();\n }\n else {\n this.popupTimer.call(null, null);\n this.tooltipTimer.call(null, null);\n }\n };\n Autocomplete.prototype.$updateGhostText = function (completion) {\n var row = this.base.row;\n var column = this.base.column;\n var cursorColumn = this.editor.getCursorPosition().column;\n var prefix = this.editor.session.getLine(row).slice(column, cursorColumn);\n if (!this.inlineRenderer.show(this.editor, completion, prefix)) {\n this.inlineRenderer.hide();\n }\n else {\n this.$seen(completion);\n }\n };\n Autocomplete.prototype.$onPopupRender = function () {\n var inlineEnabled = this.inlineRenderer && this.inlineEnabled;\n if (this.completions && this.completions.filtered && this.completions.filtered.length > 0) {\n for (var i = this.popup.getFirstVisibleRow(); i <= this.popup.getLastVisibleRow(); i++) {\n var completion = this.popup.getData(i);\n if (completion && (!inlineEnabled || completion.hideInlinePreview)) {\n this.$seen(completion);\n }\n }\n }\n };\n Autocomplete.prototype.$onPopupShow = function (hide) {\n this.$onPopupChange(hide);\n this.stickySelection = false;\n if (this.stickySelectionDelay >= 0)\n this.stickySelectionTimer.schedule(this.stickySelectionDelay);\n };\n Autocomplete.prototype.observeLayoutChanges = function () {\n if (this.$elements || !this.editor)\n return;\n window.addEventListener(\"resize\", this.onLayoutChange, { passive: true });\n window.addEventListener(\"wheel\", this.mousewheelListener);\n var el = this.editor.container.parentNode;\n var elements = [];\n while (el) {\n elements.push(el);\n el.addEventListener(\"scroll\", this.onLayoutChange, { passive: true });\n el = el.parentNode;\n }\n this.$elements = elements;\n };\n Autocomplete.prototype.unObserveLayoutChanges = function () {\n var _this = this;\n window.removeEventListener(\"resize\", this.onLayoutChange, { passive: true });\n window.removeEventListener(\"wheel\", this.mousewheelListener);\n this.$elements && this.$elements.forEach(function (el) {\n el.removeEventListener(\"scroll\", _this.onLayoutChange, { passive: true });\n });\n this.$elements = null;\n };\n Autocomplete.prototype.onLayoutChange = function () {\n if (!this.popup.isOpen)\n return this.unObserveLayoutChanges();\n this.$updatePopupPosition();\n this.updateDocTooltip();\n };\n Autocomplete.prototype.$updatePopupPosition = function () {\n var editor = this.editor;\n var renderer = editor.renderer;\n var lineHeight = renderer.layerConfig.lineHeight;\n var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);\n pos.left -= this.popup.getTextLeftOffset();\n var rect = editor.container.getBoundingClientRect();\n pos.top += rect.top - renderer.layerConfig.offset;\n pos.left += rect.left - editor.renderer.scrollLeft;\n pos.left += renderer.gutterWidth;\n var posGhostText = {\n top: pos.top,\n left: pos.left\n };\n if (renderer.$ghostText && renderer.$ghostTextWidget) {\n if (this.base.row === renderer.$ghostText.position.row) {\n posGhostText.top += renderer.$ghostTextWidget.el.offsetHeight;\n }\n }\n var editorContainerBottom = editor.container.getBoundingClientRect().bottom - lineHeight;\n var lowestPosition = editorContainerBottom < posGhostText.top ?\n { top: editorContainerBottom, left: posGhostText.left } :\n posGhostText;\n if (this.popup.tryShow(lowestPosition, lineHeight, \"bottom\")) {\n return;\n }\n if (this.popup.tryShow(pos, lineHeight, \"top\")) {\n return;\n }\n this.popup.show(pos, lineHeight);\n };\n Autocomplete.prototype.openPopup = function (editor, prefix, keepPopupPosition) {\n this.$firstOpenTimer.cancel();\n if (!this.popup)\n this.$init();\n if (this.inlineEnabled && !this.inlineRenderer)\n this.$initInline();\n this.popup.autoSelect = this.autoSelect;\n this.popup.setSelectOnHover(this.setSelectOnHover);\n var oldRow = this.popup.getRow();\n var previousSelectedItem = this.popup.data[oldRow];\n this.popup.setData(this.completions.filtered, this.completions.filterText);\n if (this.editor.textInput.setAriaOptions) {\n this.editor.textInput.setAriaOptions({\n activeDescendant: getAriaId(this.popup.getRow()),\n inline: this.inlineEnabled\n });\n }\n editor.keyBinding.addKeyboardHandler(this.keyboardHandler);\n var newRow;\n if (this.stickySelection)\n newRow = this.popup.data.indexOf(previousSelectedItem);\n if (!newRow || newRow === -1)\n newRow = 0;\n this.popup.setRow(this.autoSelect ? newRow : -1);\n if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow])\n this.$onPopupChange();\n var inlineEnabled = this.inlineRenderer && this.inlineEnabled;\n if (newRow === oldRow && inlineEnabled) {\n var completion = this.popup.getData(this.popup.getRow());\n this.$updateGhostText(completion);\n }\n if (!keepPopupPosition) {\n this.popup.setTheme(editor.getTheme());\n this.popup.setFontSize(editor.getFontSize());\n this.$updatePopupPosition();\n if (this.tooltipNode) {\n this.updateDocTooltip();\n }\n }\n else if (keepPopupPosition && !prefix) {\n this.detach();\n }\n this.changeTimer.cancel();\n this.observeLayoutChanges();\n };\n Autocomplete.prototype.detach = function () {\n if (this.editor) {\n this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);\n this.editor.off(\"changeSelection\", this.changeListener);\n this.editor.off(\"blur\", this.blurListener);\n this.editor.off(\"mousedown\", this.mousedownListener);\n this.editor.off(\"mousewheel\", this.mousewheelListener);\n }\n this.$firstOpenTimer.cancel();\n this.changeTimer.cancel();\n this.hideDocTooltip();\n if (this.completionProvider) {\n this.completionProvider.detach();\n }\n if (this.popup && this.popup.isOpen)\n this.popup.hide();\n if (this.popup && this.popup.renderer) {\n this.popup.renderer.off(\"afterRender\", this.$onPopupRender);\n }\n if (this.base)\n this.base.detach();\n this.activated = false;\n this.completionProvider = this.completions = this.base = null;\n this.unObserveLayoutChanges();\n };\n Autocomplete.prototype.changeListener = function (e) {\n var cursor = this.editor.selection.lead;\n if (cursor.row != this.base.row || cursor.column < this.base.column) {\n this.detach();\n }\n if (this.activated)\n this.changeTimer.schedule();\n else\n this.detach();\n };\n Autocomplete.prototype.blurListener = function (e) {\n var el = document.activeElement;\n var text = this.editor.textInput.getElement();\n var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget);\n var container = this.popup && this.popup.container;\n if (el != text && el.parentNode != container && !fromTooltip\n && el != this.tooltipNode && e.relatedTarget != text) {\n this.detach();\n }\n };\n Autocomplete.prototype.mousedownListener = function (e) {\n this.detach();\n };\n Autocomplete.prototype.mousewheelListener = function (e) {\n if (!this.popup.isMouseOver)\n this.detach();\n };\n Autocomplete.prototype.mouseOutListener = function (e) {\n if (this.popup.isOpen)\n this.$updatePopupPosition();\n };\n Autocomplete.prototype.goTo = function (where) {\n this.popup.goTo(where);\n };\n Autocomplete.prototype.insertMatch = function (data, options) {\n if (!data)\n data = this.popup.getData(this.popup.getRow());\n if (!data)\n return false;\n if (data.value === \"\") // Explicitly given nothing to insert, e.g. \"No suggestion state\"\n return this.detach();\n var completions = this.completions;\n var result = this.getCompletionProvider().insertMatch(this.editor, data, completions.filterText, options);\n if (this.completions == completions)\n this.detach();\n return result;\n };\n Autocomplete.prototype.showPopup = function (editor, options) {\n if (this.editor)\n this.detach();\n this.activated = true;\n this.editor = editor;\n if (editor.completer != this) {\n if (editor.completer)\n editor.completer.detach();\n editor.completer = this;\n }\n editor.on(\"changeSelection\", this.changeListener);\n editor.on(\"blur\", this.blurListener);\n editor.on(\"mousedown\", this.mousedownListener);\n editor.on(\"mousewheel\", this.mousewheelListener);\n this.updateCompletions(false, options);\n };\n Autocomplete.prototype.getCompletionProvider = function (initialPosition) {\n if (!this.completionProvider)\n this.completionProvider = new CompletionProvider(initialPosition);\n return this.completionProvider;\n };\n Autocomplete.prototype.gatherCompletions = function (editor, callback) {\n return this.getCompletionProvider().gatherCompletions(editor, callback);\n };\n Autocomplete.prototype.updateCompletions = function (keepPopupPosition, options) {\n if (keepPopupPosition && this.base && this.completions) {\n var pos = this.editor.getCursorPosition();\n var prefix = this.editor.session.getTextRange({ start: this.base, end: pos });\n if (prefix == this.completions.filterText)\n return;\n this.completions.setFilter(prefix);\n if (!this.completions.filtered.length)\n return this.detach();\n if (this.completions.filtered.length == 1\n && this.completions.filtered[0].value == prefix\n && !this.completions.filtered[0].snippet)\n return this.detach();\n this.openPopup(this.editor, prefix, keepPopupPosition);\n return;\n }\n if (options && options.matches) {\n var pos = this.editor.getSelectionRange().start;\n this.base = this.editor.session.doc.createAnchor(pos.row, pos.column);\n this.base.$insertRight = true;\n this.completions = new FilteredList(options.matches);\n this.getCompletionProvider().completions = this.completions;\n return this.openPopup(this.editor, \"\", keepPopupPosition);\n }\n var session = this.editor.getSession();\n var pos = this.editor.getCursorPosition();\n var prefix = util.getCompletionPrefix(this.editor);\n this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length);\n this.base.$insertRight = true;\n var completionOptions = {\n exactMatch: this.exactMatch,\n ignoreCaption: this.ignoreCaption\n };\n this.getCompletionProvider({\n prefix: prefix,\n pos: pos\n }).provideCompletions(this.editor, completionOptions, \n function (err, completions, finished) {\n var filtered = completions.filtered;\n var prefix = util.getCompletionPrefix(this.editor);\n this.$firstOpenTimer.cancel();\n if (finished) {\n if (!filtered.length) {\n var emptyMessage = !this.autoShown && this.emptyMessage;\n if (typeof emptyMessage == \"function\")\n emptyMessage = this.emptyMessage(prefix);\n if (emptyMessage) {\n var completionsForEmpty = [{\n caption: emptyMessage,\n value: \"\"\n }\n ];\n this.completions = new FilteredList(completionsForEmpty);\n this.openPopup(this.editor, prefix, keepPopupPosition);\n this.popup.renderer.setStyle(\"ace_loading\", false);\n return;\n }\n return this.detach();\n }\n if (filtered.length == 1 && filtered[0].value == prefix\n && !filtered[0].snippet)\n return this.detach();\n if (this.autoInsert && !this.autoShown && filtered.length == 1)\n return this.insertMatch(filtered[0]);\n }\n this.completions = !finished && this.showLoadingState ?\n new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) :\n completions;\n this.openPopup(this.editor, prefix, keepPopupPosition);\n this.popup.renderer.setStyle(\"ace_loading\", !finished);\n }.bind(this));\n if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) {\n this.$firstOpenTimer.delay(this.stickySelectionDelay / 2);\n }\n };\n Autocomplete.prototype.cancelContextMenu = function () {\n this.editor.$mouseHandler.cancelContextMenu();\n };\n Autocomplete.prototype.updateDocTooltip = function () {\n var popup = this.popup;\n var all = this.completions.filtered;\n var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]);\n var doc = null;\n if (!selected || !this.editor || !this.popup.isOpen)\n return this.hideDocTooltip();\n var completersLength = this.editor.completers.length;\n for (var i = 0; i < completersLength; i++) {\n var completer = this.editor.completers[i];\n if (completer.getDocTooltip && selected.completerId === completer.id) {\n doc = completer.getDocTooltip(selected);\n break;\n }\n }\n if (!doc && typeof selected != \"string\")\n doc = selected;\n if (typeof doc == \"string\")\n doc = { docText: doc };\n if (!doc || !(doc.docHTML || doc.docText))\n return this.hideDocTooltip();\n this.showDocTooltip(doc);\n };\n Autocomplete.prototype.showDocTooltip = function (item) {\n if (!this.tooltipNode) {\n this.tooltipNode = dom.createElement(\"div\");\n this.tooltipNode.style.margin = \"0\";\n this.tooltipNode.style.pointerEvents = \"auto\";\n this.tooltipNode.style.overscrollBehavior = \"contain\";\n this.tooltipNode.tabIndex = -1;\n this.tooltipNode.onblur = this.blurListener.bind(this);\n this.tooltipNode.onclick = this.onTooltipClick.bind(this);\n this.tooltipNode.id = \"doc-tooltip\";\n this.tooltipNode.setAttribute(\"role\", \"tooltip\");\n this.tooltipNode.addEventListener(\"wheel\", preventParentScroll);\n }\n var theme = this.editor.renderer.theme;\n this.tooltipNode.className = \"ace_tooltip ace_doc-tooltip \" +\n (theme.isDark ? \"ace_dark \" : \"\") + (theme.cssClass || \"\");\n var tooltipNode = this.tooltipNode;\n if (item.docHTML) {\n tooltipNode.innerHTML = item.docHTML;\n }\n else if (item.docText) {\n tooltipNode.textContent = item.docText;\n }\n if (!tooltipNode.parentNode)\n this.popup.container.appendChild(this.tooltipNode);\n var popup = this.popup;\n var rect = popup.container.getBoundingClientRect();\n tooltipNode.style.top = popup.container.style.top;\n tooltipNode.style.bottom = popup.container.style.bottom;\n tooltipNode.style.display = \"block\";\n if (window.innerWidth - rect.right < 320) {\n if (rect.left < 320) {\n if (popup.isTopdown) {\n tooltipNode.style.top = rect.bottom + \"px\";\n tooltipNode.style.left = rect.left + \"px\";\n tooltipNode.style.right = \"\";\n tooltipNode.style.bottom = \"\";\n }\n else {\n tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + \"px\";\n tooltipNode.style.left = rect.left + \"px\";\n tooltipNode.style.right = \"\";\n tooltipNode.style.bottom = \"\";\n }\n }\n else {\n tooltipNode.style.right = window.innerWidth - rect.left + \"px\";\n tooltipNode.style.left = \"\";\n }\n }\n else {\n tooltipNode.style.left = (rect.right + 1) + \"px\";\n tooltipNode.style.right = \"\";\n }\n };\n Autocomplete.prototype.hideDocTooltip = function () {\n this.tooltipTimer.cancel();\n if (!this.tooltipNode)\n return;\n var el = this.tooltipNode;\n if (!this.editor.isFocused() && document.activeElement == el)\n this.editor.focus();\n this.tooltipNode = null;\n if (el.parentNode)\n el.parentNode.removeChild(el);\n };\n Autocomplete.prototype.onTooltipClick = function (e) {\n var a = e.target;\n while (a && a != this.tooltipNode) {\n if (a.nodeName == \"A\" && a.href) {\n a.rel = \"noreferrer\";\n a.target = \"_blank\";\n break;\n }\n a = a.parentNode;\n }\n };\n Autocomplete.prototype.destroy = function () {\n this.detach();\n if (this.popup) {\n this.popup.destroy();\n var el = this.popup.container;\n if (el && el.parentNode)\n el.parentNode.removeChild(el);\n }\n if (this.editor && this.editor.completer == this) {\n this.editor.off(\"destroy\", destroyCompleter);\n this.editor.completer = null;\n }\n this.inlineRenderer = this.popup = this.editor = null;\n };\n return Autocomplete;\n}());\nAutocomplete.prototype.commands = {\n \"Up\": function (editor) { editor.completer.goTo(\"up\"); },\n \"Down\": function (editor) { editor.completer.goTo(\"down\"); },\n \"Ctrl-Up|Ctrl-Home\": function (editor) { editor.completer.goTo(\"start\"); },\n \"Ctrl-Down|Ctrl-End\": function (editor) { editor.completer.goTo(\"end\"); },\n \"Esc\": function (editor) { editor.completer.detach(); },\n \"Return\": function (editor) { return editor.completer.insertMatch(); },\n \"Shift-Return\": function (editor) { editor.completer.insertMatch(null, { deleteSuffix: true }); },\n \"Tab\": function (editor) {\n var result = editor.completer.insertMatch();\n if (!result && !editor.tabstopManager)\n editor.completer.goTo(\"down\");\n else\n return result;\n },\n \"PageUp\": function (editor) { editor.completer.popup.gotoPageUp(); },\n \"PageDown\": function (editor) { editor.completer.popup.gotoPageDown(); }\n};\nAutocomplete.for = function (editor) {\n if (editor.completer instanceof Autocomplete) {\n return editor.completer;\n }\n if (editor.completer) {\n editor.completer.destroy();\n editor.completer = null;\n }\n if (config.get(\"sharedPopups\")) {\n if (!Autocomplete[\"$sharedInstance\"])\n Autocomplete[\"$sharedInstance\"] = new Autocomplete();\n editor.completer = Autocomplete[\"$sharedInstance\"];\n }\n else {\n editor.completer = new Autocomplete();\n editor.once(\"destroy\", destroyCompleter);\n }\n return editor.completer;\n};\nAutocomplete.startCommand = {\n name: \"startAutocomplete\",\n exec: function (editor, options) {\n var completer = Autocomplete.for(editor);\n completer.autoInsert = false;\n completer.autoSelect = true;\n completer.autoShown = false;\n completer.showPopup(editor, options);\n completer.cancelContextMenu();\n },\n bindKey: \"Ctrl-Space|Ctrl-Shift-Space|Alt-Space\"\n};\nvar CompletionProvider = /** @class */ (function () {\n function CompletionProvider(initialPosition) {\n this.initialPosition = initialPosition;\n this.active = true;\n }\n CompletionProvider.prototype.insertByIndex = function (editor, index, options) {\n if (!this.completions || !this.completions.filtered) {\n return false;\n }\n return this.insertMatch(editor, this.completions.filtered[index], options);\n };\n CompletionProvider.prototype.insertMatch = function (editor, data, options) {\n if (!data)\n return false;\n editor.startOperation({ command: { name: \"insertMatch\" } });\n if (data.completer && data.completer.insertMatch) {\n data.completer.insertMatch(editor, data);\n }\n else {\n if (!this.completions)\n return false;\n var replaceBefore = this.completions.filterText.length;\n var replaceAfter = 0;\n if (data.range && data.range.start.row === data.range.end.row) {\n replaceBefore -= this.initialPosition.prefix.length;\n replaceBefore += this.initialPosition.pos.column - data.range.start.column;\n replaceAfter += data.range.end.column - this.initialPosition.pos.column;\n }\n if (replaceBefore || replaceAfter) {\n var ranges;\n if (editor.selection.getAllRanges) {\n ranges = editor.selection.getAllRanges();\n }\n else {\n ranges = [editor.getSelectionRange()];\n }\n for (var i = 0, range; range = ranges[i]; i++) {\n range.start.column -= replaceBefore;\n range.end.column += replaceAfter;\n editor.session.remove(range);\n }\n }\n if (data.snippet) {\n snippetManager.insertSnippet(editor, data.snippet);\n }\n else {\n this.$insertString(editor, data);\n }\n if (data.completer && data.completer.onInsert && typeof data.completer.onInsert == \"function\") {\n data.completer.onInsert(editor, data);\n }\n if (data.command && data.command === \"startAutocomplete\") {\n editor.execCommand(data.command);\n }\n }\n editor.endOperation();\n return true;\n };\n CompletionProvider.prototype.$insertString = function (editor, data) {\n var text = data.value || data;\n editor.execCommand(\"insertstring\", text);\n };\n CompletionProvider.prototype.gatherCompletions = function (editor, callback) {\n var session = editor.getSession();\n var pos = editor.getCursorPosition();\n var prefix = util.getCompletionPrefix(editor);\n var matches = [];\n this.completers = editor.completers;\n var total = editor.completers.length;\n editor.completers.forEach(function (completer, i) {\n completer.getCompletions(editor, session, pos, prefix, function (err, results) {\n if (completer.hideInlinePreview)\n results = results.map(function (result) {\n return Object.assign(result, { hideInlinePreview: completer.hideInlinePreview });\n });\n if (!err && results)\n matches = matches.concat(results);\n callback(null, {\n prefix: util.getCompletionPrefix(editor),\n matches: matches,\n finished: (--total === 0)\n });\n });\n });\n return true;\n };\n CompletionProvider.prototype.provideCompletions = function (editor, options, callback) {\n var processResults = function (results) {\n var prefix = results.prefix;\n var matches = results.matches;\n this.completions = new FilteredList(matches);\n if (options.exactMatch)\n this.completions.exactMatch = true;\n if (options.ignoreCaption)\n this.completions.ignoreCaption = true;\n this.completions.setFilter(prefix);\n if (results.finished || this.completions.filtered.length)\n callback(null, this.completions, results.finished);\n }.bind(this);\n var isImmediate = true;\n var immediateResults = null;\n this.gatherCompletions(editor, function (err, results) {\n if (!this.active) {\n return;\n }\n if (err) {\n callback(err, [], true);\n this.detach();\n }\n var prefix = results.prefix;\n if (prefix.indexOf(results.prefix) !== 0)\n return;\n if (isImmediate) {\n immediateResults = results;\n return;\n }\n processResults(results);\n }.bind(this));\n isImmediate = false;\n if (immediateResults) {\n var results = immediateResults;\n immediateResults = null;\n processResults(results);\n }\n };\n CompletionProvider.prototype.detach = function () {\n this.active = false;\n this.completers && this.completers.forEach(function (completer) {\n if (typeof completer.cancel === \"function\") {\n completer.cancel();\n }\n });\n };\n return CompletionProvider;\n}());\nvar FilteredList = /** @class */ (function () {\n function FilteredList(array, filterText) {\n this.all = array;\n this.filtered = array;\n this.filterText = filterText || \"\";\n this.exactMatch = false;\n this.ignoreCaption = false;\n }\n FilteredList.prototype.setFilter = function (str) {\n if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)\n var matches = this.filtered;\n else\n var matches = this.all;\n this.filterText = str;\n matches = this.filterCompletions(matches, this.filterText);\n matches = matches.sort(function (a, b) {\n return b.exactMatch - a.exactMatch || b.$score - a.$score\n || (a.caption || a.value).localeCompare(b.caption || b.value);\n });\n var prev = null;\n matches = matches.filter(function (item) {\n var caption = item.snippet || item.caption || item.value;\n if (caption === prev)\n return false;\n prev = caption;\n return true;\n });\n this.filtered = matches;\n };\n FilteredList.prototype.filterCompletions = function (items, needle) {\n var results = [];\n var upper = needle.toUpperCase();\n var lower = needle.toLowerCase();\n loop: for (var i = 0, item; item = items[i]; i++) {\n var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet;\n if (!caption)\n continue;\n var lastIndex = -1;\n var matchMask = 0;\n var penalty = 0;\n var index, distance;\n if (this.exactMatch) {\n if (needle !== caption.substr(0, needle.length))\n continue loop;\n }\n else {\n var fullMatchIndex = caption.toLowerCase().indexOf(lower);\n if (fullMatchIndex > -1) {\n penalty = fullMatchIndex;\n }\n else {\n for (var j = 0; j < needle.length; j++) {\n var i1 = caption.indexOf(lower[j], lastIndex + 1);\n var i2 = caption.indexOf(upper[j], lastIndex + 1);\n index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;\n if (index < 0)\n continue loop;\n distance = index - lastIndex - 1;\n if (distance > 0) {\n if (lastIndex === -1)\n penalty += 10;\n penalty += distance;\n matchMask = matchMask | (1 << j);\n }\n lastIndex = index;\n }\n }\n }\n item.matchMask = matchMask;\n item.exactMatch = penalty ? 0 : 1;\n item.$score = (item.score || 0) - penalty;\n results.push(item);\n }\n return results;\n };\n return FilteredList;\n}());\nexports.Autocomplete = Autocomplete;\nexports.CompletionProvider = CompletionProvider;\nexports.FilteredList = FilteredList;\n\n});\n\nace.define(\"ace/autocomplete/text_completer\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){var Range = require(\"../range\").Range;\nvar splitRegex = /[^a-zA-Z_0-9\\$\\-\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w]+/;\nfunction getWordIndex(doc, pos) {\n var textBefore = doc.getTextRange(Range.fromPoints({\n row: 0,\n column: 0\n }, pos));\n return textBefore.split(splitRegex).length - 1;\n}\nfunction wordDistance(doc, pos) {\n var prefixPos = getWordIndex(doc, pos);\n var words = doc.getValue().split(splitRegex);\n var wordScores = Object.create(null);\n var currentWord = words[prefixPos];\n words.forEach(function (word, idx) {\n if (!word || word === currentWord)\n return;\n var distance = Math.abs(prefixPos - idx);\n var score = words.length - distance;\n if (wordScores[word]) {\n wordScores[word] = Math.max(score, wordScores[word]);\n }\n else {\n wordScores[word] = score;\n }\n });\n return wordScores;\n}\nexports.getCompletions = function (editor, session, pos, prefix, callback) {\n var wordScore = wordDistance(session, pos);\n var wordList = Object.keys(wordScore);\n callback(null, wordList.map(function (word) {\n return {\n caption: word,\n value: word,\n score: wordScore[word],\n meta: \"local\"\n };\n }));\n};\n\n});\n\nace.define(\"ace/ext/language_tools\",[\"require\",\"exports\",\"module\",\"ace/snippets\",\"ace/autocomplete\",\"ace/config\",\"ace/lib/lang\",\"ace/autocomplete/util\",\"ace/autocomplete/text_completer\",\"ace/editor\",\"ace/config\"], function(require, exports, module){\"use strict\";\nvar snippetManager = require(\"../snippets\").snippetManager;\nvar Autocomplete = require(\"../autocomplete\").Autocomplete;\nvar config = require(\"../config\");\nvar lang = require(\"../lib/lang\");\nvar util = require(\"../autocomplete/util\");\nvar textCompleter = require(\"../autocomplete/text_completer\");\nvar keyWordCompleter = {\n getCompletions: function (editor, session, pos, prefix, callback) {\n if (session.$mode.completer) {\n return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback);\n }\n var state = editor.session.getState(pos.row);\n var completions = session.$mode.getCompletions(state, session, pos, prefix);\n completions = completions.map(function (el) {\n el.completerId = keyWordCompleter.id;\n return el;\n });\n callback(null, completions);\n },\n id: \"keywordCompleter\"\n};\nvar transformSnippetTooltip = function (str) {\n var record = {};\n return str.replace(/\\${(\\d+)(:(.*?))?}/g, function (_, p1, p2, p3) {\n return (record[p1] = p3 || '');\n }).replace(/\\$(\\d+?)/g, function (_, p1) {\n return record[p1];\n });\n};\nvar snippetCompleter = {\n getCompletions: function (editor, session, pos, prefix, callback) {\n var scopes = [];\n var token = session.getTokenAt(pos.row, pos.column);\n if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\\.xml$/))\n scopes.push('html-tag');\n else\n scopes = snippetManager.getActiveScopes(editor);\n var snippetMap = snippetManager.snippetMap;\n var completions = [];\n scopes.forEach(function (scope) {\n var snippets = snippetMap[scope] || [];\n for (var i = snippets.length; i--;) {\n var s = snippets[i];\n var caption = s.name || s.tabTrigger;\n if (!caption)\n continue;\n completions.push({\n caption: caption,\n snippet: s.content,\n meta: s.tabTrigger && !s.name ? s.tabTrigger + \"\\u21E5 \" : \"snippet\",\n completerId: snippetCompleter.id\n });\n }\n }, this);\n callback(null, completions);\n },\n getDocTooltip: function (item) {\n if (item.snippet && !item.docHTML) {\n item.docHTML = [\n \"\", lang.escapeHTML(item.caption), \"\", \"
\",\n lang.escapeHTML(transformSnippetTooltip(item.snippet))\n ].join(\"\");\n }\n },\n id: \"snippetCompleter\"\n};\nvar completers = [snippetCompleter, textCompleter, keyWordCompleter];\nexports.setCompleters = function (val) {\n completers.length = 0;\n if (val)\n completers.push.apply(completers, val);\n};\nexports.addCompleter = function (completer) {\n completers.push(completer);\n};\nexports.textCompleter = textCompleter;\nexports.keyWordCompleter = keyWordCompleter;\nexports.snippetCompleter = snippetCompleter;\nvar expandSnippet = {\n name: \"expandSnippet\",\n exec: function (editor) {\n return snippetManager.expandWithTab(editor);\n },\n bindKey: \"Tab\"\n};\nvar onChangeMode = function (e, editor) {\n loadSnippetsForMode(editor.session.$mode);\n};\nvar loadSnippetsForMode = function (mode) {\n if (typeof mode == \"string\")\n mode = config.$modes[mode];\n if (!mode)\n return;\n if (!snippetManager.files)\n snippetManager.files = {};\n loadSnippetFile(mode.$id, mode.snippetFileId);\n if (mode.modes)\n mode.modes.forEach(loadSnippetsForMode);\n};\nvar loadSnippetFile = function (id, snippetFilePath) {\n if (!snippetFilePath || !id || snippetManager.files[id])\n return;\n snippetManager.files[id] = {};\n config.loadModule(snippetFilePath, function (m) {\n if (!m)\n return;\n snippetManager.files[id] = m;\n if (!m.snippets && m.snippetText)\n m.snippets = snippetManager.parseSnippetFile(m.snippetText);\n snippetManager.register(m.snippets || [], m.scope);\n if (m.includeScopes) {\n snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;\n m.includeScopes.forEach(function (x) {\n loadSnippetsForMode(\"ace/mode/\" + x);\n });\n }\n });\n};\nvar doLiveAutocomplete = function (e) {\n var editor = e.editor;\n var hasCompleter = editor.completer && editor.completer.activated;\n if (e.command.name === \"backspace\") {\n if (hasCompleter && !util.getCompletionPrefix(editor))\n editor.completer.detach();\n }\n else if (e.command.name === \"insertstring\" && !hasCompleter) {\n lastExecEvent = e;\n var delay = e.editor.$liveAutocompletionDelay;\n if (delay) {\n liveAutocompleteTimer.delay(delay);\n }\n else {\n showLiveAutocomplete(e);\n }\n }\n};\nvar lastExecEvent;\nvar liveAutocompleteTimer = lang.delayedCall(function () {\n showLiveAutocomplete(lastExecEvent);\n}, 0);\nvar showLiveAutocomplete = function (e) {\n var editor = e.editor;\n var prefix = util.getCompletionPrefix(editor);\n var triggerAutocomplete = util.triggerAutocomplete(editor);\n if (prefix && prefix.length >= editor.$liveAutocompletionThreshold || triggerAutocomplete) {\n var completer = Autocomplete.for(editor);\n completer.autoShown = true;\n completer.showPopup(editor);\n }\n};\nvar Editor = require(\"../editor\").Editor;\nrequire(\"../config\").defineOptions(Editor.prototype, \"editor\", {\n enableBasicAutocompletion: {\n set: function (val) {\n if (val) {\n if (!this.completers)\n this.completers = Array.isArray(val) ? val : completers;\n this.commands.addCommand(Autocomplete.startCommand);\n }\n else {\n this.commands.removeCommand(Autocomplete.startCommand);\n }\n },\n value: false\n },\n enableLiveAutocompletion: {\n set: function (val) {\n if (val) {\n if (!this.completers)\n this.completers = Array.isArray(val) ? val : completers;\n this.commands.on('afterExec', doLiveAutocomplete);\n }\n else {\n this.commands.off('afterExec', doLiveAutocomplete);\n }\n },\n value: false\n },\n liveAutocompletionDelay: {\n initialValue: 0\n },\n liveAutocompletionThreshold: {\n initialValue: 0\n },\n enableSnippets: {\n set: function (val) {\n if (val) {\n this.commands.addCommand(expandSnippet);\n this.on(\"changeMode\", onChangeMode);\n onChangeMode(null, this);\n }\n else {\n this.commands.removeCommand(expandSnippet);\n this.off(\"changeMode\", onChangeMode);\n }\n },\n value: false\n }\n});\n\n}); (function() {\n ace.require([\"ace/ext/language_tools\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","ace.define(\"ace/split\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/editor\",\"ace/virtual_renderer\",\"ace/edit_session\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\nvar Editor = require(\"./editor\").Editor;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nvar EditSession = require(\"./edit_session\").EditSession;\nvar Split;\nSplit = function (container, theme, splits) {\n this.BELOW = 1;\n this.BESIDE = 0;\n this.$container = container;\n this.$theme = theme;\n this.$splits = 0;\n this.$editorCSS = \"\";\n this.$editors = [];\n this.$orientation = this.BESIDE;\n this.setSplits(splits || 1);\n this.$cEditor = this.$editors[0];\n this.on(\"focus\", function (editor) {\n this.$cEditor = editor;\n }.bind(this));\n};\n(function () {\n oop.implement(this, EventEmitter);\n this.$createEditor = function () {\n var el = document.createElement(\"div\");\n el.className = this.$editorCSS;\n el.style.cssText = \"position: absolute; top:0px; bottom:0px\";\n this.$container.appendChild(el);\n var editor = new Editor(new Renderer(el, this.$theme));\n editor.on(\"focus\", function () {\n this._emit(\"focus\", editor);\n }.bind(this));\n this.$editors.push(editor);\n editor.setFontSize(this.$fontSize);\n return editor;\n };\n this.setSplits = function (splits) {\n var editor;\n if (splits < 1) {\n throw \"The number of splits have to be > 0!\";\n }\n if (splits == this.$splits) {\n return;\n }\n else if (splits > this.$splits) {\n while (this.$splits < this.$editors.length && this.$splits < splits) {\n editor = this.$editors[this.$splits];\n this.$container.appendChild(editor.container);\n editor.setFontSize(this.$fontSize);\n this.$splits++;\n }\n while (this.$splits < splits) {\n this.$createEditor();\n this.$splits++;\n }\n }\n else {\n while (this.$splits > splits) {\n editor = this.$editors[this.$splits - 1];\n this.$container.removeChild(editor.container);\n this.$splits--;\n }\n }\n this.resize();\n };\n this.getSplits = function () {\n return this.$splits;\n };\n this.getEditor = function (idx) {\n return this.$editors[idx];\n };\n this.getCurrentEditor = function () {\n return this.$cEditor;\n };\n this.focus = function () {\n this.$cEditor.focus();\n };\n this.blur = function () {\n this.$cEditor.blur();\n };\n this.setTheme = function (theme) {\n this.$editors.forEach(function (editor) {\n editor.setTheme(theme);\n });\n };\n this.setKeyboardHandler = function (keybinding) {\n this.$editors.forEach(function (editor) {\n editor.setKeyboardHandler(keybinding);\n });\n };\n this.forEach = function (callback, scope) {\n this.$editors.forEach(callback, scope);\n };\n this.$fontSize = \"\";\n this.setFontSize = function (size) {\n this.$fontSize = size;\n this.forEach(function (editor) {\n editor.setFontSize(size);\n });\n };\n this.$cloneSession = function (session) {\n var s = new EditSession(session.getDocument(), session.getMode());\n var undoManager = session.getUndoManager();\n s.setUndoManager(undoManager);\n s.setTabSize(session.getTabSize());\n s.setUseSoftTabs(session.getUseSoftTabs());\n s.setOverwrite(session.getOverwrite());\n s.setBreakpoints(session.getBreakpoints());\n s.setUseWrapMode(session.getUseWrapMode());\n s.setUseWorker(session.getUseWorker());\n s.setWrapLimitRange(session.$wrapLimitRange.min, session.$wrapLimitRange.max);\n s.$foldData = session.$cloneFoldData();\n return s;\n };\n this.setSession = function (session, idx) {\n var editor;\n if (idx == null) {\n editor = this.$cEditor;\n }\n else {\n editor = this.$editors[idx];\n }\n var isUsed = this.$editors.some(function (editor) {\n return editor.session === session;\n });\n if (isUsed) {\n session = this.$cloneSession(session);\n }\n editor.setSession(session);\n return session;\n };\n this.getOrientation = function () {\n return this.$orientation;\n };\n this.setOrientation = function (orientation) {\n if (this.$orientation == orientation) {\n return;\n }\n this.$orientation = orientation;\n this.resize();\n };\n this.resize = function () {\n var width = this.$container.clientWidth;\n var height = this.$container.clientHeight;\n var editor;\n if (this.$orientation == this.BESIDE) {\n var editorWidth = width / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = editorWidth + \"px\";\n editor.container.style.top = \"0px\";\n editor.container.style.left = i * editorWidth + \"px\";\n editor.container.style.height = height + \"px\";\n editor.resize();\n }\n }\n else {\n var editorHeight = height / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = width + \"px\";\n editor.container.style.top = i * editorHeight + \"px\";\n editor.container.style.left = \"0px\";\n editor.container.style.height = editorHeight + \"px\";\n editor.resize();\n }\n }\n };\n}).call(Split.prototype);\nexports.Split = Split;\n\n});\n\nace.define(\"ace/ext/split\",[\"require\",\"exports\",\"module\",\"ace/split\"], function(require, exports, module){\"use strict\";\nmodule.exports = require(\"../split\");\n\n}); (function() {\n ace.require([\"ace/ext/split\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","ace.define(\"ace/mode/jsdoc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar JsDocCommentHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: [\"comment.doc.tag\", \"comment.doc.text\", \"lparen.doc\"],\n regex: \"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\\\s*)({)\",\n push: [\n {\n token: \"lparen.doc\",\n regex: \"{\",\n push: [\n {\n include: \"doc-syntax\"\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }\n ]\n }, {\n token: [\"rparen.doc\", \"text.doc\", \"variable.parameter.doc\", \"lparen.doc\", \"variable.parameter.doc\", \"rparen.doc\"],\n regex: /(})(\\s*)(?:([\\w=:\\/\\.]+)|(?:(\\[)([\\w=:\\/\\.]+)(\\])))/,\n next: \"pop\"\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }, {\n include: \"doc-syntax\"\n }, {\n defaultToken: \"text.doc\"\n }\n ]\n }, {\n token: [\"comment.doc.tag\", \"text.doc\", \"lparen.doc\"],\n regex: \"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|\"\n + \"implements|external|exception|throws|enum|define|extends))(\\\\s*)({)\",\n push: [\n {\n token: \"lparen.doc\",\n regex: \"{\",\n push: [\n {\n include: \"doc-syntax\"\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }\n ]\n }, {\n token: \"rparen.doc\",\n regex: \"}|(?=$)\",\n next: \"pop\"\n }, {\n include: \"doc-syntax\"\n }, {\n defaultToken: \"text.doc\"\n }\n ]\n }, {\n token: [\"comment.doc.tag\", \"text.doc\", \"variable.parameter.doc\"],\n regex: \"(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|\"\n + \"requires|param|implements|function|extends|typedef|mixes|constructor|var|\"\n + \"memberof\\\\!|event|listens|exports|class|constructs|interface|emits|fires|\"\n + \"throws|const|callback|borrows|augments))(\\\\s+)(\\\\w[\\\\w#\\.:\\/~\\\"\\\\-]*)?\"\n }, {\n token: [\"comment.doc.tag\", \"text.doc\", \"variable.parameter.doc\"],\n regex: \"(@method)(\\\\s+)(\\\\w[\\\\w\\.\\\\(\\\\)]*)\"\n }, {\n token: \"comment.doc.tag\",\n regex: \"@access\\\\s+(?:private|public|protected)\"\n }, {\n token: \"comment.doc.tag\",\n regex: \"@kind\\\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\"\n }, {\n token: \"comment.doc.tag\",\n regex: \"@\\\\w+(?=\\\\s|$)\"\n },\n JsDocCommentHighlightRules.getTagRule(),\n {\n defaultToken: \"comment.doc\",\n caseInsensitive: true\n }\n ],\n \"doc-syntax\": [{\n token: \"operator.doc\",\n regex: /[|:]/\n }, {\n token: \"paren.doc\",\n regex: /[\\[\\]]/\n }]\n };\n this.normalizeRules();\n};\noop.inherits(JsDocCommentHighlightRules, TextHighlightRules);\nJsDocCommentHighlightRules.getTagRule = function (start) {\n return {\n token: \"comment.doc.tag.storage.type\",\n regex: \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\nJsDocCommentHighlightRules.getStartRule = function (start) {\n return {\n token: \"comment.doc\", // doc comment\n regex: \"\\\\/\\\\*(?=\\\\*)\",\n next: start\n };\n};\nJsDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token: \"comment.doc\", // closing comment\n regex: \"\\\\*\\\\/\",\n next: start\n };\n};\nexports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;\n\n});\n\nace.define(\"ace/mode/javascript_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/jsdoc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar DocCommentHighlightRules = require(\"./jsdoc_comment_highlight_rules\").JsDocCommentHighlightRules;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\nvar JavaScriptHighlightRules = function (options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\": \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\", // Pseudo\n \"keyword\": \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor\",\n \"storage.type\": \"const|let|var|function\",\n \"constant.language\": \"null|Infinity|NaN|undefined\",\n \"support.function\": \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n this.$rules = {\n \"no_regex\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token: \"string\",\n regex: \"'(?=.)\",\n next: \"qstring\"\n }, {\n token: \"string\",\n regex: '\"(?=.)',\n next: \"qqstring\"\n }, {\n token: \"constant.numeric\", // hexadecimal, octal and binary\n regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token: \"constant.numeric\", // decimal integers and floats\n regex: /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token: [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\", \"keyword.operator\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe + \")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token: [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe + \")(\\\\s*)(=)(\\\\s*)(function\\\\*?)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\s*)(=)(\\\\s*)(function\\\\*?)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe + \")(\\\\s*)(=)(\\\\s*)(function\\\\*?)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex: \"(function\\\\*?)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function\\\\*?)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex: \"(:)(\\\\s*)(function\\\\*?)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: \"keyword\",\n regex: \"from(?=\\\\s*('|\\\"))\"\n }, {\n token: \"keyword\",\n regex: \"(?:\" + kwBeforeRe + \")\\\\b\",\n next: \"start\"\n }, {\n token: \"support.constant\",\n regex: /that\\b/\n }, {\n token: [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex: /(console)(\\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\\b/\n }, {\n token: keywordMapper,\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: /[.](?![.])/,\n next: \"property\"\n }, {\n token: \"storage.type\",\n regex: /=>/,\n next: \"start\"\n }, {\n token: \"keyword.operator\",\n regex: /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next: \"start\"\n }, {\n token: \"punctuation.operator\",\n regex: /[?:,;.]/,\n next: \"start\"\n }, {\n token: \"paren.lparen\",\n regex: /[\\[({]/,\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex: \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe + \")(\\\\s*)(=)(\\\\s*)(function\\\\*?)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token: \"punctuation.operator\",\n regex: /[.](?![.])/\n }, {\n token: \"support.function\",\n regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\\b(?=\\()/\n }, {\n token: \"support.function.dom\",\n regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token: \"support.constant\",\n regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\\b/\n }, {\n token: \"identifier\",\n regex: identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token: \"text\",\n regex: \"\\\\s+|^$\",\n next: \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token: \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token: \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token: \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"default_parameter\": [\n {\n token: \"string\",\n regex: \"'(?=.)\",\n push: [\n {\n token: \"string\",\n regex: \"'|$\",\n next: \"pop\"\n }, {\n include: \"qstring\"\n }\n ]\n }, {\n token: \"string\",\n regex: '\"(?=.)',\n push: [\n {\n token: \"string\",\n regex: '\"|$',\n next: \"pop\"\n }, {\n include: \"qqstring\"\n }\n ]\n }, {\n token: \"constant.language\",\n regex: \"null|Infinity|NaN|undefined\"\n }, {\n token: \"constant.numeric\", // hexadecimal, octal and binary\n regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token: \"constant.numeric\", // decimal integers and floats\n regex: /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token: \"punctuation.operator\",\n regex: \",\",\n next: \"function_arguments\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"function_arguments\": [\n comments(\"function_arguments\"),\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \",\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\": [\n {\n token: \"constant.language.escape\",\n regex: escapedRe\n }, {\n token: \"string\",\n regex: \"\\\\\\\\$\",\n consumeLineEnd: true\n }, {\n token: \"string\",\n regex: '\"|$',\n next: \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\": [\n {\n token: \"constant.language.escape\",\n regex: escapedRe\n }, {\n token: \"string\",\n regex: \"\\\\\\\\$\",\n consumeLineEnd: true\n }, {\n token: \"string\",\n regex: \"'|$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function (val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token: \"string.quasi.start\",\n regex: /`/,\n push: [{\n token: \"constant.language.escape\",\n regex: escapedRe\n }, {\n token: \"paren.quasi.start\",\n regex: /\\${/,\n push: \"start\"\n }, {\n token: \"string.quasi.end\",\n regex: /`/,\n next: \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n }, {\n token: [\"variable.parameter\", \"text\"],\n regex: \"(\" + identifierRe + \")(\\\\s*)(?=\\\\=>)\"\n }, {\n token: \"paren.lparen\",\n regex: \"(\\\\()(?=.+\\\\s*=>)\",\n next: \"function_arguments\"\n }, {\n token: \"variable.language\",\n regex: \"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\\\b\"\n });\n this.$rules[\"function_arguments\"].unshift({\n token: \"keyword.operator\",\n regex: \"=\",\n next: \"default_parameter\"\n }, {\n token: \"keyword.operator\",\n regex: \"\\\\.{3}\"\n });\n this.$rules[\"property\"].unshift({\n token: \"support.function\",\n regex: \"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|\"\n + \"finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\\\b(?=\\\\()\"\n }, {\n token: \"constant.language\",\n regex: \"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\\\b\"\n });\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n this.embedRules(DocCommentHighlightRules, \"doc-\", [DocCommentHighlightRules.getEndRule(\"no_regex\")]);\n this.normalizeRules();\n};\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch: function (val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n }\n else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex: \"\",\n onMatch: function (value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{ type: this.token, value: value }];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token: \"entity.other.attribute-name.xml\",\n regex: tagRegex\n }, {\n token: \"keyword.operator.attribute-equals.xml\",\n regex: \"=\"\n }, {\n token: \"text.tag-whitespace.xml\",\n regex: \"\\\\s+\"\n }, {\n token: \"string.attribute-value.xml\",\n regex: \"'\",\n stateName: \"jsx_attr_q\",\n push: [\n { token: \"string.attribute-value.xml\", regex: \"'\", next: \"pop\" },\n { include: \"reference\" },\n { defaultToken: \"string.attribute-value.xml\" }\n ]\n }, {\n token: \"string.attribute-value.xml\",\n regex: '\"',\n stateName: \"jsx_attr_qq\",\n push: [\n { token: \"string.attribute-value.xml\", regex: '\"', next: \"pop\" },\n { include: \"reference\" },\n { defaultToken: \"string.attribute-value.xml\" }\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token: \"constant.language.escape.reference.xml\",\n regex: \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\nfunction comments(next) {\n return [\n {\n token: \"comment\", // multi line comment\n regex: /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n { token: \"comment\", regex: \"\\\\*\\\\/\", next: next || \"pop\" },\n { defaultToken: \"comment\", caseInsensitive: true }\n ]\n }, {\n token: \"comment\",\n regex: \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n { token: \"comment\", regex: \"$|^\", next: next || \"pop\" },\n { defaultToken: \"comment\", caseInsensitive: true }\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingBraceOutdent = function () { };\n(function () {\n this.checkOutdent = function (line, input) {\n if (!/^\\s+$/.test(line))\n return false;\n return /^\\s*\\}/.test(input);\n };\n this.autoOutdent = function (doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n if (!match)\n return 0;\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({ row: row, column: column });\n if (!openBracePos || openBracePos.row == row)\n return 0;\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column - 1), indent);\n };\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n}).call(MatchingBraceOutdent.prototype);\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Range = require(\"../../range\").Range;\nvar BaseFoldMode = require(\"./fold_mode\").FoldMode;\nvar FoldMode = exports.FoldMode = function (commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start));\n this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end));\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n(function () {\n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe = /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n return fw;\n };\n this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n }\n else if (foldStyle != \"all\")\n range = null;\n }\n return range;\n }\n if (foldStyle === \"markbegin\")\n return;\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n this.getSectionRange = function (session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n }\n else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n }\n else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function (session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m)\n continue;\n if (m[1])\n depth--;\n else\n depth++;\n if (!depth)\n break;\n }\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar JavaScriptHighlightRules = require(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = require(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = require(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = require(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = require(\"./folding/cstyle\").FoldMode;\nvar Mode = function () {\n this.HighlightRules = JavaScriptHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"//\";\n this.blockComment = { start: \"/*\", end: \"*/\" };\n this.$quotes = { '\"': '\"', \"'\": \"'\", \"`\": \"`\" };\n this.$pairQuotesAfter = {\n \"`\": /\\w/\n };\n this.getNextLineIndent = function (state, line, tab) {\n var indent = this.$getIndent(line);\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n if (tokens.length && tokens[tokens.length - 1].type == \"comment\") {\n return indent;\n }\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n return indent;\n };\n this.checkOutdent = function (state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n this.autoOutdent = function (state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n this.createWorker = function (session) {\n var worker = new WorkerClient([\"ace\"], \"ace/mode/javascript_worker\", \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n worker.on(\"annotate\", function (results) {\n session.setAnnotations(results.data);\n });\n worker.on(\"terminate\", function () {\n session.clearAnnotations();\n });\n return worker;\n };\n this.$id = \"ace/mode/javascript\";\n this.snippetFileId = \"ace/snippets/javascript\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/javascript\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","ace.define(\"ace/theme/github_dark-css\",[\"require\",\"exports\",\"module\"], function(require, exports, module){module.exports = \".ace-github-dark .ace_gutter {\\n background: #24292e;\\n color: #7388b5\\n}\\n\\n.ace-github-dark .ace_print-margin {\\n width: 1px;\\n background: #00204b\\n}\\n\\n.ace-github-dark {\\n background-color: #24292e;\\n color: #FFFFFF\\n}\\n\\n.ace-github-dark .ace_constant.ace_other,\\n.ace-github-dark .ace_cursor {\\n color: #FFFFFF\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_selection {\\n background: #003F8E\\n}\\n\\n.ace-github-dark.ace_multiselect .ace_selection.ace_start {\\n box-shadow: 0 0 3px 0px #24292e;\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_step {\\n background: rgb(127, 111, 19)\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_bracket {\\n margin: -1px 0 0 -1px;\\n border: 1px solid #404F7D\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_active-line {\\n background: #00346E\\n}\\n\\n.ace-github-dark .ace_gutter-active-line {\\n background-color: #24292e\\n}\\n\\n.ace-github-dark .ace_marker-layer .ace_selected-word {\\n border: 1px solid #003F8E\\n}\\n\\n.ace-github-dark .ace_invisible {\\n color: #404F7D\\n}\\n\\n.ace-github-dark .ace_keyword,\\n.ace-github-dark .ace_meta,\\n.ace-github-dark .ace_storage,\\n.ace-github-dark .ace_storage.ace_type,\\n.ace-github-dark .ace_support.ace_type {\\n color: #ff7b72\\n}\\n\\n.ace-github-dark .ace_keyword.ace_operator {\\n color: #79c0ff\\n}\\n\\n.ace-github-dark .ace_constant.ace_character,\\n.ace-github-dark .ace_constant.ace_language,\\n.ace-github-dark .ace_constant.ace_numeric,\\n.ace-github-dark .ace_keyword.ace_other.ace_unit,\\n.ace-github-dark .ace_support.ace_constant,\\n.ace-github-dark .ace_variable.ace_parameter {\\n color: #FFC58F\\n}\\n\\n.ace-github-dark .ace_invalid {\\n color: #FFFFFF;\\n background-color: #F99DA5\\n}\\n\\n.ace-github-dark .ace_invalid.ace_deprecated {\\n color: #FFFFFF;\\n background-color: #ff7b72\\n}\\n\\n.ace-github-dark .ace_fold {\\n background-color: #BBDAFF;\\n border-color: #FFFFFF\\n}\\n\\n.ace-github-dark .ace_entity.ace_name.ace_function,\\n.ace-github-dark .ace_support.ace_function,\\n.ace-github-dark .ace_variable {\\n color: #BBDAFF\\n}\\n\\n.ace-github-dark .ace_support.ace_class,\\n.ace-github-dark .ace_support.ace_type {\\n color: #FFEEAD\\n}\\n\\n.ace-github-dark .ace_heading,\\n.ace-github-dark .ace_markup.ace_heading,\\n.ace-github-dark .ace_string {\\n color: #9fcef6\\n}\\n\\n.ace-github-dark .ace_entity.ace_name.ace_tag,\\n.ace-github-dark .ace_entity.ace_other.ace_attribute-name,\\n.ace-github-dark .ace_meta.ace_tag,\\n.ace-github-dark .ace_string.ace_regexp,\\n.ace-github-dark .ace_variable {\\n color: #FF9DA4\\n}\\n\\n.ace-github-dark .ace_comment {\\n color: #7285B7\\n}\\n\\n.ace-github-dark .ace_indent-guide {\\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\\n}\\n\\n.ace-github-dark .ace_indent-guide-active {\\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\\n}\\n\\n.ace-github-dark .ace_constant.ace_buildin {\\n color: #0086B3;\\n}\\n\\n.ace-github-dark .ace_variable.ace_language {\\n color: #ffffff;\\n}\\n \";\n\n});\n\nace.define(\"ace/theme/github_dark\",[\"require\",\"exports\",\"module\",\"ace/theme/github_dark-css\",\"ace/lib/dom\"], function(require, exports, module){exports.isDark = true;\nexports.cssClass = \"ace-github-dark\";\nexports.cssText = require(\"./github_dark-css\");\nvar dom = require(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass, false);\n\n}); (function() {\n ace.require([\"ace/theme/github_dark\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * Class containing the diff, match and patch methods.\n * @constructor\n */\nvar diff_match_patch = function() {\n\n // Defaults.\n // Redefine these in your program to override the defaults.\n\n // Number of seconds to map a diff before giving up (0 for infinity).\n this.Diff_Timeout = 1.0;\n // Cost of an empty edit operation in terms of edit characters.\n this.Diff_EditCost = 4;\n // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n this.Match_Threshold = 0.5;\n // How far to search for a match (0 = exact location, 1000+ = broad match).\n // A match this many characters away from the expected location will add\n // 1.0 to the score (0.0 is a perfect match).\n this.Match_Distance = 1000;\n // When deleting a large block of text (over ~64 characters), how close do\n // the contents have to be to match the expected contents. (0.0 = perfection,\n // 1.0 = very loose). Note that Match_Threshold controls how closely the\n // end points of a delete need to match.\n this.Patch_DeleteThreshold = 0.5;\n // Chunk size for context length.\n this.Patch_Margin = 4;\n\n // The number of bits in an int.\n this.Match_MaxBits = 32;\n};\n\n\n// DIFF FUNCTIONS\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Class representing one diff tuple.\n * ~Attempts to look like a two-element array (which is what this used to be).~\n * Constructor returns an actual two-element array, to allow destructing @JackuB\n * See https://github.com/JackuB/diff-match-patch/issues/14 for details\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\ndiff_match_patch.Diff = function(op, text) {\n return [op, text];\n};\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} opt_checklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @param {number=} opt_deadline Optional time when the diff should be complete\n * by. Used internally for recursive calls. Users should set DiffTimeout\n * instead.\n * @return {!Array.} Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,\n opt_deadline) {\n // Set a deadline by which time the diff must be complete.\n if (typeof opt_deadline == 'undefined') {\n if (this.Diff_Timeout <= 0) {\n opt_deadline = Number.MAX_VALUE;\n } else {\n opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;\n }\n }\n var deadline = opt_deadline;\n\n // Check for null inputs.\n if (text1 == null || text2 == null) {\n throw new Error('Null input. (diff_main)');\n }\n\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [new diff_match_patch.Diff(DIFF_EQUAL, text1)];\n }\n return [];\n }\n\n if (typeof opt_checklines == 'undefined') {\n opt_checklines = true;\n }\n var checklines = opt_checklines;\n\n // Trim off common prefix (speedup).\n var commonlength = this.diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = this.diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = this.diff_compute_(text1, text2, checklines, deadline);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, commonprefix));\n }\n if (commonsuffix) {\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, commonsuffix));\n }\n this.diff_cleanupMerge(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,\n deadline) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [new diff_match_patch.Diff(DIFF_DELETE, text1)];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [new diff_match_patch.Diff(DIFF_INSERT, longtext.substring(0, i)),\n new diff_match_patch.Diff(DIFF_EQUAL, shorttext),\n new diff_match_patch.Diff(DIFF_INSERT,\n longtext.substring(i + shorttext.length))];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n // Check to see if the problem can be split in two.\n var hm = this.diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);\n var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);\n // Merge the results.\n return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],\n diffs_b);\n }\n\n if (checklines && text1.length > 100 && text2.length > 100) {\n return this.diff_lineMode_(text1, text2, deadline);\n }\n\n return this.diff_bisect_(text1, text2, deadline);\n};\n\n\n/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {\n // Scan the text on a line-by-line basis first.\n var a = this.diff_linesToChars_(text1, text2);\n text1 = a.chars1;\n text2 = a.chars2;\n var linearray = a.lineArray;\n\n var diffs = this.diff_main(text1, text2, false, deadline);\n\n // Convert the diff back to original text.\n this.diff_charsToLines_(diffs, linearray);\n // Eliminate freak matches (e.g. blank lines)\n this.diff_cleanupSemantic(diffs);\n\n // Rediff any replacement blocks, this time character-by-character.\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete >= 1 && count_insert >= 1) {\n // Delete the offending records and add the merged ones.\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert);\n pointer = pointer - count_delete - count_insert;\n var subDiff =\n this.diff_main(text_delete, text_insert, false, deadline);\n for (var j = subDiff.length - 1; j >= 0; j--) {\n diffs.splice(pointer, 0, subDiff[j]);\n }\n pointer = pointer + subDiff.length;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n pointer++;\n }\n diffs.pop(); // Remove the dummy entry at the end.\n\n return diffs;\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Bail out if deadline is reached.\n if ((new Date()).getTime() > deadline) {\n break;\n }\n\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,\n deadline) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = this.diff_main(text1a, text2a, false, deadline);\n var diffsb = this.diff_main(text1b, text2b, false, deadline);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\ndiff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {\n var lineArray = []; // e.g. lineArray[4] == 'Hello\\n'\n var lineHash = {}; // e.g. lineHash['Hello\\n'] == 4\n\n // '\\x00' is a valid character, but various debuggers don't like it.\n // So we'll insert a junk entry to avoid generating a null character.\n lineArray[0] = '';\n\n /**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n function diff_linesToCharsMunge_(text) {\n var chars = '';\n // Walk the text, pulling out a substring for each line.\n // text.split('\\n') would would temporarily double our memory footprint.\n // Modifying text would create many large strings to garbage collect.\n var lineStart = 0;\n var lineEnd = -1;\n // Keeping our own length variable is faster than looking it up.\n var lineArrayLength = lineArray.length;\n while (lineEnd < text.length - 1) {\n lineEnd = text.indexOf('\\n', lineStart);\n if (lineEnd == -1) {\n lineEnd = text.length - 1;\n }\n var line = text.substring(lineStart, lineEnd + 1);\n\n if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :\n (lineHash[line] !== undefined)) {\n chars += String.fromCharCode(lineHash[line]);\n } else {\n if (lineArrayLength == maxLines) {\n // Bail out at 65535 because\n // String.fromCharCode(65536) == String.fromCharCode(0)\n line = text.substring(lineStart);\n lineEnd = text.length;\n }\n chars += String.fromCharCode(lineArrayLength);\n lineHash[line] = lineArrayLength;\n lineArray[lineArrayLength++] = line;\n }\n lineStart = lineEnd + 1;\n }\n return chars;\n }\n // Allocate 2/3rds of the space for text1, the rest for text2.\n var maxLines = 40000;\n var chars1 = diff_linesToCharsMunge_(text1);\n maxLines = 65535;\n var chars2 = diff_linesToCharsMunge_(text2);\n return {chars1: chars1, chars2: chars2, lineArray: lineArray};\n};\n\n\n/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\ndiff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {\n for (var i = 0; i < diffs.length; i++) {\n var chars = diffs[i][1];\n var text = [];\n for (var j = 0; j < chars.length; j++) {\n text[j] = lineArray[chars.charCodeAt(j)];\n }\n diffs[i][1] = text.join('');\n }\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\ndiff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\ndiff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\ndiff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (found == 0 || text1.substring(text_length - length) ==\n text2.substring(0, length)) {\n best = length;\n length++;\n }\n }\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\ndiff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {\n if (this.Diff_Timeout <= 0) {\n // Don't risk returning a non-optimal diff if we have unlimited time.\n return null;\n }\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (lastEquality && (lastEquality.length <=\n Math.max(length_insertions1, length_deletions1)) &&\n (lastEquality.length <= Math.max(length_insertions2,\n length_deletions2))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n this.diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = this.diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n insertion.substring(0, overlap_length1)));\n diffs[pointer - 1][1] =\n deletion.substring(0, deletion.length - overlap_length1);\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n deletion.substring(0, overlap_length2)));\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] =\n insertion.substring(0, insertion.length - overlap_length2);\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] =\n deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n};\n\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(diff_match_patch.nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(diff_match_patch.nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 &&\n char1.match(diff_match_patch.whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 &&\n char2.match(diff_match_patch.whitespaceRegex_);\n var lineBreak1 = whitespace1 &&\n char1.match(diff_match_patch.linebreakRegex_);\n var lineBreak2 = whitespace2 &&\n char2.match(diff_match_patch.linebreakRegex_);\n var blankLine1 = lineBreak1 &&\n one.match(diff_match_patch.blanklineEndRegex_);\n var blankLine2 = lineBreak2 &&\n two.match(diff_match_patch.blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = this.diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n};\n\n// Define some regex patterns for matching boundaries.\ndiff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\ndiff_match_patch.whitespaceRegex_ = /\\s/;\ndiff_match_patch.linebreakRegex_ = /[\\r\\n]/;\ndiff_match_patch.blanklineEndRegex_ = /\\n\\r?\\n$/;\ndiff_match_patch.blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Is there an insertion operation before the last equality.\n var pre_ins = false;\n // Is there a deletion operation before the last equality.\n var pre_del = false;\n // Is there an insertion operation after the last equality.\n var post_ins = false;\n // Is there a deletion operation after the last equality.\n var post_del = false;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n if (diffs[pointer][1].length < this.Diff_EditCost &&\n (post_ins || post_del)) {\n // Candidate found.\n equalities[equalitiesLength++] = pointer;\n pre_ins = post_ins;\n pre_del = post_del;\n lastEquality = diffs[pointer][1];\n } else {\n // Not a candidate, and can never become one.\n equalitiesLength = 0;\n lastEquality = null;\n }\n post_ins = post_del = false;\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_DELETE) {\n post_del = true;\n } else {\n post_ins = true;\n }\n /*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n if (lastEquality && ((pre_ins && pre_del && post_ins && post_del) ||\n ((lastEquality.length < this.Diff_EditCost / 2) &&\n (pre_ins + pre_del + post_ins + post_del) == 3))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n equalitiesLength--; // Throw away the equality we just deleted;\n lastEquality = null;\n if (pre_ins && pre_del) {\n // No changes made which could affect previous entry, keep going.\n post_ins = post_del = true;\n equalitiesLength = 0;\n } else {\n equalitiesLength--; // Throw away the previous equality.\n pointer = equalitiesLength > 0 ?\n equalities[equalitiesLength - 1] : -1;\n post_ins = post_del = false;\n }\n changes = true;\n }\n }\n pointer++;\n }\n\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = this.diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n text_insert.substring(0, commonlength)));\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = this.diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n if (text_delete.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n if (text_insert.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * loc is a location in text1, compute and return the equivalent location in\n * text2.\n * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n * @param {!Array.} diffs Array of diff tuples.\n * @param {number} loc Location within text1.\n * @return {number} Location within text2.\n */\ndiff_match_patch.prototype.diff_xIndex = function(diffs, loc) {\n var chars1 = 0;\n var chars2 = 0;\n var last_chars1 = 0;\n var last_chars2 = 0;\n var x;\n for (x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.\n chars1 += diffs[x][1].length;\n }\n if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.\n chars2 += diffs[x][1].length;\n }\n if (chars1 > loc) { // Overshot the location.\n break;\n }\n last_chars1 = chars1;\n last_chars2 = chars2;\n }\n // Was the location was deleted?\n if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n return last_chars2;\n }\n // Add the remaining character length.\n return last_chars2 + (loc - last_chars1);\n};\n\n\n/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} HTML representation.\n */\ndiff_match_patch.prototype.diff_prettyHtml = function(diffs) {\n var html = [];\n var pattern_amp = /&/g;\n var pattern_lt = //g;\n var pattern_para = /\\n/g;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0]; // Operation (insert, delete, equal)\n var data = diffs[x][1]; // Text of change.\n var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')\n .replace(pattern_gt, '>').replace(pattern_para, '¶
');\n switch (op) {\n case DIFF_INSERT:\n html[x] = '' + text + '';\n break;\n case DIFF_DELETE:\n html[x] = '' + text + '';\n break;\n case DIFF_EQUAL:\n html[x] = '' + text + '';\n break;\n }\n }\n return html.join('');\n};\n\n\n/**\n * Compute and return the source text (all equalities and deletions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Source text.\n */\ndiff_match_patch.prototype.diff_text1 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute and return the destination text (all equalities and insertions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Destination text.\n */\ndiff_match_patch.prototype.diff_text2 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_DELETE) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute the Levenshtein distance; the number of inserted, deleted or\n * substituted characters.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {number} Number of changes.\n */\ndiff_match_patch.prototype.diff_levenshtein = function(diffs) {\n var levenshtein = 0;\n var insertions = 0;\n var deletions = 0;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0];\n var data = diffs[x][1];\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length;\n break;\n case DIFF_DELETE:\n deletions += data.length;\n break;\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions);\n insertions = 0;\n deletions = 0;\n break;\n }\n }\n levenshtein += Math.max(insertions, deletions);\n return levenshtein;\n};\n\n\n/**\n * Crush the diff into an encoded string which describes the operations\n * required to transform text1 into text2.\n * E.g. =3\\t-2\\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.\n * Operations are tab-separated. Inserted text is escaped using %xx notation.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Delta text.\n */\ndiff_match_patch.prototype.diff_toDelta = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n switch (diffs[x][0]) {\n case DIFF_INSERT:\n text[x] = '+' + encodeURI(diffs[x][1]);\n break;\n case DIFF_DELETE:\n text[x] = '-' + diffs[x][1].length;\n break;\n case DIFF_EQUAL:\n text[x] = '=' + diffs[x][1].length;\n break;\n }\n }\n return text.join('\\t').replace(/%20/g, ' ');\n};\n\n\n/**\n * Given the original text1, and an encoded string which describes the\n * operations required to transform text1 into text2, compute the full diff.\n * @param {string} text1 Source string for the diff.\n * @param {string} delta Delta text.\n * @return {!Array.} Array of diff tuples.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.diff_fromDelta = function(text1, delta) {\n var diffs = [];\n var diffsLength = 0; // Keeping our own length var is faster in JS.\n var pointer = 0; // Cursor in text1\n var tokens = delta.split(/\\t/g);\n for (var x = 0; x < tokens.length; x++) {\n // Each token begins with a one character parameter which specifies the\n // operation of this token (delete, insert, equality).\n var param = tokens[x].substring(1);\n switch (tokens[x].charAt(0)) {\n case '+':\n try {\n diffs[diffsLength++] =\n new diff_match_patch.Diff(DIFF_INSERT, decodeURI(param));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in diff_fromDelta: ' + param);\n }\n break;\n case '-':\n // Fall through.\n case '=':\n var n = parseInt(param, 10);\n if (isNaN(n) || n < 0) {\n throw new Error('Invalid number in diff_fromDelta: ' + param);\n }\n var text = text1.substring(pointer, pointer += n);\n if (tokens[x].charAt(0) == '=') {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_EQUAL, text);\n } else {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_DELETE, text);\n }\n break;\n default:\n // Blank tokens are ok (from a trailing \\t).\n // Anything else is an error.\n if (tokens[x]) {\n throw new Error('Invalid diff operation in diff_fromDelta: ' +\n tokens[x]);\n }\n }\n }\n if (pointer != text1.length) {\n throw new Error('Delta length (' + pointer +\n ') does not equal source text length (' + text1.length + ').');\n }\n return diffs;\n};\n\n\n// MATCH FUNCTIONS\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc'.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n */\ndiff_match_patch.prototype.match_main = function(text, pattern, loc) {\n // Check for null inputs.\n if (text == null || pattern == null || loc == null) {\n throw new Error('Null input. (match_main)');\n }\n\n loc = Math.max(0, Math.min(loc, text.length));\n if (text == pattern) {\n // Shortcut (potentially not guaranteed by the algorithm)\n return 0;\n } else if (!text.length) {\n // Nothing to match.\n return -1;\n } else if (text.substring(loc, loc + pattern.length) == pattern) {\n // Perfect match at the perfect spot! (Includes case of null pattern)\n return loc;\n } else {\n // Do a fuzzy compare.\n return this.match_bitap_(text, pattern, loc);\n }\n};\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n * Bitap algorithm.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n * @private\n */\ndiff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {\n if (pattern.length > this.Match_MaxBits) {\n throw new Error('Pattern too long for this browser.');\n }\n\n // Initialise the alphabet.\n var s = this.match_alphabet_(pattern);\n\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Compute and return the score for a match with e errors and x location.\n * Accesses loc and pattern through being a closure.\n * @param {number} e Number of errors in match.\n * @param {number} x Location of match.\n * @return {number} Overall score for match (0.0 = good, 1.0 = bad).\n * @private\n */\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length;\n var proximity = Math.abs(loc - x);\n if (!dmp.Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + (proximity / dmp.Match_Distance);\n }\n\n // Highest score beyond which we give up.\n var score_threshold = this.Match_Threshold;\n // Is there a nearby exact match? (speedup)\n var best_loc = text.indexOf(pattern, loc);\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n if (best_loc != -1) {\n score_threshold =\n Math.min(match_bitapScore_(0, best_loc), score_threshold);\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1);\n best_loc = -1;\n\n var bin_min, bin_mid;\n var bin_max = pattern.length + text.length;\n var last_rd;\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0;\n bin_mid = bin_max;\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid;\n } else {\n bin_max = bin_mid;\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid;\n var start = Math.max(1, loc - bin_mid + 1);\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n\n var rd = Array(finish + 2);\n rd[finish + 1] = (1 << d) - 1;\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)];\n if (d === 0) { // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n } else { // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |\n (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |\n last_rd[j + 1];\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1);\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score;\n best_loc = j - 1;\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc);\n } else {\n // Already passed loc, downhill from here on in.\n break;\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break;\n }\n last_rd = rd;\n }\n return best_loc;\n};\n\n\n/**\n * Initialise the alphabet for the Bitap algorithm.\n * @param {string} pattern The text to encode.\n * @return {!Object} Hash of character locations.\n * @private\n */\ndiff_match_patch.prototype.match_alphabet_ = function(pattern) {\n var s = {};\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] = 0;\n }\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);\n }\n return s;\n};\n\n\n// PATCH FUNCTIONS\n\n\n/**\n * Increase the context until it is unique,\n * but don't let the pattern expand beyond Match_MaxBits.\n * @param {!diff_match_patch.patch_obj} patch The patch to grow.\n * @param {string} text Source text.\n * @private\n */\ndiff_match_patch.prototype.patch_addContext_ = function(patch, text) {\n if (text.length == 0) {\n return;\n }\n if (patch.start2 === null) {\n throw Error('patch not initialized');\n }\n var pattern = text.substring(patch.start2, patch.start2 + patch.length1);\n var padding = 0;\n\n // Look for the first and last matches of pattern in text. If two different\n // matches are found, increase the pattern length.\n while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&\n pattern.length < this.Match_MaxBits - this.Patch_Margin -\n this.Patch_Margin) {\n padding += this.Patch_Margin;\n pattern = text.substring(patch.start2 - padding,\n patch.start2 + patch.length1 + padding);\n }\n // Add one chunk for good luck.\n padding += this.Patch_Margin;\n\n // Add the prefix.\n var prefix = text.substring(patch.start2 - padding, patch.start2);\n if (prefix) {\n patch.diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, prefix));\n }\n // Add the suffix.\n var suffix = text.substring(patch.start2 + patch.length1,\n patch.start2 + patch.length1 + padding);\n if (suffix) {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, suffix));\n }\n\n // Roll back the start points.\n patch.start1 -= prefix.length;\n patch.start2 -= prefix.length;\n // Extend the lengths.\n patch.length1 += prefix.length + suffix.length;\n patch.length2 += prefix.length + suffix.length;\n};\n\n\n/**\n * Compute a list of patches to turn text1 into text2.\n * Use diffs if provided, otherwise compute it ourselves.\n * There are four ways to call this function, depending on what data is\n * available to the caller:\n * Method 1:\n * a = text1, b = text2\n * Method 2:\n * a = diffs\n * Method 3 (optimal):\n * a = text1, b = diffs\n * Method 4 (deprecated, use method 3):\n * a = text1, b = text2, c = diffs\n *\n * @param {string|!Array.} a text1 (methods 1,3,4) or\n * Array of diff tuples for text1 to text2 (method 2).\n * @param {string|!Array.=} opt_b text2 (methods 1,4) or\n * Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).\n * @param {string|!Array.=} opt_c Array of diff tuples\n * for text1 to text2 (method 4) or undefined (methods 1,2,3).\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {\n var text1, diffs;\n if (typeof a == 'string' && typeof opt_b == 'string' &&\n typeof opt_c == 'undefined') {\n // Method 1: text1, text2\n // Compute diffs from text1 and text2.\n text1 = /** @type {string} */(a);\n diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);\n if (diffs.length > 2) {\n this.diff_cleanupSemantic(diffs);\n this.diff_cleanupEfficiency(diffs);\n }\n } else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&\n typeof opt_c == 'undefined') {\n // Method 2: diffs\n // Compute text1 from diffs.\n diffs = /** @type {!Array.} */(a);\n text1 = this.diff_text1(diffs);\n } else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&\n typeof opt_c == 'undefined') {\n // Method 3: text1, diffs\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_b);\n } else if (typeof a == 'string' && typeof opt_b == 'string' &&\n opt_c && typeof opt_c == 'object') {\n // Method 4: text1, text2, diffs\n // text2 is not used.\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_c);\n } else {\n throw new Error('Unknown call format to patch_make.');\n }\n\n if (diffs.length === 0) {\n return []; // Get rid of the null case.\n }\n var patches = [];\n var patch = new diff_match_patch.patch_obj();\n var patchDiffLength = 0; // Keeping our own length var is faster in JS.\n var char_count1 = 0; // Number of characters into the text1 string.\n var char_count2 = 0; // Number of characters into the text2 string.\n // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n // text2 (postpatch_text). We recreate the patches one by one to determine\n // context info.\n var prepatch_text = text1;\n var postpatch_text = text1;\n for (var x = 0; x < diffs.length; x++) {\n var diff_type = diffs[x][0];\n var diff_text = diffs[x][1];\n\n if (!patchDiffLength && diff_type !== DIFF_EQUAL) {\n // A new patch starts here.\n patch.start1 = char_count1;\n patch.start2 = char_count2;\n }\n\n switch (diff_type) {\n case DIFF_INSERT:\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length2 += diff_text.length;\n postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +\n postpatch_text.substring(char_count2);\n break;\n case DIFF_DELETE:\n patch.length1 += diff_text.length;\n patch.diffs[patchDiffLength++] = diffs[x];\n postpatch_text = postpatch_text.substring(0, char_count2) +\n postpatch_text.substring(char_count2 +\n diff_text.length);\n break;\n case DIFF_EQUAL:\n if (diff_text.length <= 2 * this.Patch_Margin &&\n patchDiffLength && diffs.length != x + 1) {\n // Small equality inside a patch.\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length1 += diff_text.length;\n patch.length2 += diff_text.length;\n } else if (diff_text.length >= 2 * this.Patch_Margin) {\n // Time for a new patch.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n patch = new diff_match_patch.patch_obj();\n patchDiffLength = 0;\n // Unlike Unidiff, our patch lists have a rolling context.\n // https://github.com/google/diff-match-patch/wiki/Unidiff\n // Update prepatch text & pos to reflect the application of the\n // just completed patch.\n prepatch_text = postpatch_text;\n char_count1 = char_count2;\n }\n }\n break;\n }\n\n // Update the current character count.\n if (diff_type !== DIFF_INSERT) {\n char_count1 += diff_text.length;\n }\n if (diff_type !== DIFF_DELETE) {\n char_count2 += diff_text.length;\n }\n }\n // Pick up the leftover patch if not empty.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n }\n\n return patches;\n};\n\n\n/**\n * Given an array of patches, return another array that is identical.\n * @param {!Array.} patches Array of Patch objects.\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_deepCopy = function(patches) {\n // Making deep copies is hard in JavaScript.\n var patchesCopy = [];\n for (var x = 0; x < patches.length; x++) {\n var patch = patches[x];\n var patchCopy = new diff_match_patch.patch_obj();\n patchCopy.diffs = [];\n for (var y = 0; y < patch.diffs.length; y++) {\n patchCopy.diffs[y] =\n new diff_match_patch.Diff(patch.diffs[y][0], patch.diffs[y][1]);\n }\n patchCopy.start1 = patch.start1;\n patchCopy.start2 = patch.start2;\n patchCopy.length1 = patch.length1;\n patchCopy.length2 = patch.length2;\n patchesCopy[x] = patchCopy;\n }\n return patchesCopy;\n};\n\n\n/**\n * Merge a set of patches onto the text. Return a patched text, as well\n * as a list of true/false values indicating which patches were applied.\n * @param {!Array.} patches Array of Patch objects.\n * @param {string} text Old text.\n * @return {!Array.>} Two element Array, containing the\n * new text and an array of boolean values.\n */\ndiff_match_patch.prototype.patch_apply = function(patches, text) {\n if (patches.length == 0) {\n return [text, []];\n }\n\n // Deep copy the patches so that no changes are made to originals.\n patches = this.patch_deepCopy(patches);\n\n var nullPadding = this.patch_addPadding(patches);\n text = nullPadding + text + nullPadding;\n\n this.patch_splitMax(patches);\n // delta keeps track of the offset between the expected and actual location\n // of the previous patch. If there are patches expected at positions 10 and\n // 20, but the first patch was found at 12, delta is 2 and the second patch\n // has an effective expected position of 22.\n var delta = 0;\n var results = [];\n for (var x = 0; x < patches.length; x++) {\n var expected_loc = patches[x].start2 + delta;\n var text1 = this.diff_text1(patches[x].diffs);\n var start_loc;\n var end_loc = -1;\n if (text1.length > this.Match_MaxBits) {\n // patch_splitMax will only provide an oversized pattern in the case of\n // a monster delete.\n start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),\n expected_loc);\n if (start_loc != -1) {\n end_loc = this.match_main(text,\n text1.substring(text1.length - this.Match_MaxBits),\n expected_loc + text1.length - this.Match_MaxBits);\n if (end_loc == -1 || start_loc >= end_loc) {\n // Can't find valid trailing context. Drop this patch.\n start_loc = -1;\n }\n }\n } else {\n start_loc = this.match_main(text, text1, expected_loc);\n }\n if (start_loc == -1) {\n // No match found. :(\n results[x] = false;\n // Subtract the delta for this failed patch from subsequent patches.\n delta -= patches[x].length2 - patches[x].length1;\n } else {\n // Found a match. :)\n results[x] = true;\n delta = start_loc - expected_loc;\n var text2;\n if (end_loc == -1) {\n text2 = text.substring(start_loc, start_loc + text1.length);\n } else {\n text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);\n }\n if (text1 == text2) {\n // Perfect match, just shove the replacement text in.\n text = text.substring(0, start_loc) +\n this.diff_text2(patches[x].diffs) +\n text.substring(start_loc + text1.length);\n } else {\n // Imperfect match. Run a diff to get a framework of equivalent\n // indices.\n var diffs = this.diff_main(text1, text2, false);\n if (text1.length > this.Match_MaxBits &&\n this.diff_levenshtein(diffs) / text1.length >\n this.Patch_DeleteThreshold) {\n // The end points match, but the content is unacceptably bad.\n results[x] = false;\n } else {\n this.diff_cleanupSemanticLossless(diffs);\n var index1 = 0;\n var index2;\n for (var y = 0; y < patches[x].diffs.length; y++) {\n var mod = patches[x].diffs[y];\n if (mod[0] !== DIFF_EQUAL) {\n index2 = this.diff_xIndex(diffs, index1);\n }\n if (mod[0] === DIFF_INSERT) { // Insertion\n text = text.substring(0, start_loc + index2) + mod[1] +\n text.substring(start_loc + index2);\n } else if (mod[0] === DIFF_DELETE) { // Deletion\n text = text.substring(0, start_loc + index2) +\n text.substring(start_loc + this.diff_xIndex(diffs,\n index1 + mod[1].length));\n }\n if (mod[0] !== DIFF_DELETE) {\n index1 += mod[1].length;\n }\n }\n }\n }\n }\n }\n // Strip the padding off.\n text = text.substring(nullPadding.length, text.length - nullPadding.length);\n return [text, results];\n};\n\n\n/**\n * Add some padding on text start and end so that edges can match something.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} The padding string added to each side.\n */\ndiff_match_patch.prototype.patch_addPadding = function(patches) {\n var paddingLength = this.Patch_Margin;\n var nullPadding = '';\n for (var x = 1; x <= paddingLength; x++) {\n nullPadding += String.fromCharCode(x);\n }\n\n // Bump all the patches forward.\n for (var x = 0; x < patches.length; x++) {\n patches[x].start1 += paddingLength;\n patches[x].start2 += paddingLength;\n }\n\n // Add some padding on start of first diff.\n var patch = patches[0];\n var diffs = patch.diffs;\n if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.start1 -= paddingLength; // Should be 0.\n patch.start2 -= paddingLength; // Should be 0.\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[0][1].length) {\n // Grow first equality.\n var extraLength = paddingLength - diffs[0][1].length;\n diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];\n patch.start1 -= extraLength;\n patch.start2 -= extraLength;\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n // Add some padding on end of last diff.\n patch = patches[patches.length - 1];\n diffs = patch.diffs;\n if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[diffs.length - 1][1].length) {\n // Grow last equality.\n var extraLength = paddingLength - diffs[diffs.length - 1][1].length;\n diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n return nullPadding;\n};\n\n\n/**\n * Look through the patches and break up any which are longer than the maximum\n * limit of the match algorithm.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_splitMax = function(patches) {\n var patch_size = this.Match_MaxBits;\n for (var x = 0; x < patches.length; x++) {\n if (patches[x].length1 <= patch_size) {\n continue;\n }\n var bigpatch = patches[x];\n // Remove the big old patch.\n patches.splice(x--, 1);\n var start1 = bigpatch.start1;\n var start2 = bigpatch.start2;\n var precontext = '';\n while (bigpatch.diffs.length !== 0) {\n // Create one of several smaller patches.\n var patch = new diff_match_patch.patch_obj();\n var empty = true;\n patch.start1 = start1 - precontext.length;\n patch.start2 = start2 - precontext.length;\n if (precontext !== '') {\n patch.length1 = patch.length2 = precontext.length;\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, precontext));\n }\n while (bigpatch.diffs.length !== 0 &&\n patch.length1 < patch_size - this.Patch_Margin) {\n var diff_type = bigpatch.diffs[0][0];\n var diff_text = bigpatch.diffs[0][1];\n if (diff_type === DIFF_INSERT) {\n // Insertions are harmless.\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n patch.diffs.push(bigpatch.diffs.shift());\n empty = false;\n } else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&\n patch.diffs[0][0] == DIFF_EQUAL &&\n diff_text.length > 2 * patch_size) {\n // This is a large deletion. Let it pass in one chunk.\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n empty = false;\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n bigpatch.diffs.shift();\n } else {\n // Deletion or equality. Only take as much as we can stomach.\n diff_text = diff_text.substring(0,\n patch_size - patch.length1 - this.Patch_Margin);\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n if (diff_type === DIFF_EQUAL) {\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n } else {\n empty = false;\n }\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n if (diff_text == bigpatch.diffs[0][1]) {\n bigpatch.diffs.shift();\n } else {\n bigpatch.diffs[0][1] =\n bigpatch.diffs[0][1].substring(diff_text.length);\n }\n }\n }\n // Compute the head context for the next patch.\n precontext = this.diff_text2(patch.diffs);\n precontext =\n precontext.substring(precontext.length - this.Patch_Margin);\n // Append the end context for this patch.\n var postcontext = this.diff_text1(bigpatch.diffs)\n .substring(0, this.Patch_Margin);\n if (postcontext !== '') {\n patch.length1 += postcontext.length;\n patch.length2 += postcontext.length;\n if (patch.diffs.length !== 0 &&\n patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {\n patch.diffs[patch.diffs.length - 1][1] += postcontext;\n } else {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, postcontext));\n }\n }\n if (!empty) {\n patches.splice(++x, 0, patch);\n }\n }\n }\n};\n\n\n/**\n * Take a list of patches and return a textual representation.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} Text representation of patches.\n */\ndiff_match_patch.prototype.patch_toText = function(patches) {\n var text = [];\n for (var x = 0; x < patches.length; x++) {\n text[x] = patches[x];\n }\n return text.join('');\n};\n\n\n/**\n * Parse a textual representation of patches and return a list of Patch objects.\n * @param {string} textline Text representation of patches.\n * @return {!Array.} Array of Patch objects.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.patch_fromText = function(textline) {\n var patches = [];\n if (!textline) {\n return patches;\n }\n var text = textline.split('\\n');\n var textPointer = 0;\n var patchHeader = /^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$/;\n while (textPointer < text.length) {\n var m = text[textPointer].match(patchHeader);\n if (!m) {\n throw new Error('Invalid patch string: ' + text[textPointer]);\n }\n var patch = new diff_match_patch.patch_obj();\n patches.push(patch);\n patch.start1 = parseInt(m[1], 10);\n if (m[2] === '') {\n patch.start1--;\n patch.length1 = 1;\n } else if (m[2] == '0') {\n patch.length1 = 0;\n } else {\n patch.start1--;\n patch.length1 = parseInt(m[2], 10);\n }\n\n patch.start2 = parseInt(m[3], 10);\n if (m[4] === '') {\n patch.start2--;\n patch.length2 = 1;\n } else if (m[4] == '0') {\n patch.length2 = 0;\n } else {\n patch.start2--;\n patch.length2 = parseInt(m[4], 10);\n }\n textPointer++;\n\n while (textPointer < text.length) {\n var sign = text[textPointer].charAt(0);\n try {\n var line = decodeURI(text[textPointer].substring(1));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in patch_fromText: ' + line);\n }\n if (sign == '-') {\n // Deletion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_DELETE, line));\n } else if (sign == '+') {\n // Insertion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_INSERT, line));\n } else if (sign == ' ') {\n // Minor equality.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, line));\n } else if (sign == '@') {\n // Start of next patch.\n break;\n } else if (sign === '') {\n // Blank line? Whatever.\n } else {\n // WTF?\n throw new Error('Invalid patch mode \"' + sign + '\" in: ' + line);\n }\n textPointer++;\n }\n }\n return patches;\n};\n\n\n/**\n * Class representing one patch operation.\n * @constructor\n */\ndiff_match_patch.patch_obj = function() {\n /** @type {!Array.} */\n this.diffs = [];\n /** @type {?number} */\n this.start1 = null;\n /** @type {?number} */\n this.start2 = null;\n /** @type {number} */\n this.length1 = 0;\n /** @type {number} */\n this.length2 = 0;\n};\n\n\n/**\n * Emulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indices are printed as 1-based, not 0-based.\n * @return {string} The GNU diff string.\n */\ndiff_match_patch.patch_obj.prototype.toString = function() {\n var coords1, coords2;\n if (this.length1 === 0) {\n coords1 = this.start1 + ',0';\n } else if (this.length1 == 1) {\n coords1 = this.start1 + 1;\n } else {\n coords1 = (this.start1 + 1) + ',' + this.length1;\n }\n if (this.length2 === 0) {\n coords2 = this.start2 + ',0';\n } else if (this.length2 == 1) {\n coords2 = this.start2 + 1;\n } else {\n coords2 = (this.start2 + 1) + ',' + this.length2;\n }\n var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\\n'];\n var op;\n // Escape the body of the patch with %xx notation.\n for (var x = 0; x < this.diffs.length; x++) {\n switch (this.diffs[x][0]) {\n case DIFF_INSERT:\n op = '+';\n break;\n case DIFF_DELETE:\n op = '-';\n break;\n case DIFF_EQUAL:\n op = ' ';\n break;\n }\n text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\\n';\n }\n return text.join('').replace(/%20/g, ' ');\n};\n\n\n// The following export code was added by @ForbesLindesay\nmodule.exports = diff_match_patch;\nmodule.exports['diff_match_patch'] = diff_match_patch;\nmodule.exports['DIFF_DELETE'] = DIFF_DELETE;\nmodule.exports['DIFF_INSERT'] = DIFF_INSERT;\nmodule.exports['DIFF_EQUAL'] = DIFF_EQUAL;","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import { Ace, Range } from \"ace-builds\";\nimport * as AceBuilds from \"ace-builds\";\nimport * as PropTypes from \"prop-types\";\nimport * as React from \"react\";\nconst isEqual = require(\"lodash.isequal\");\nimport {\n debounce,\n editorEvents,\n editorOptions,\n getAceInstance\n} from \"./editorOptions\";\nconst ace = getAceInstance();\n\nimport {\n IAceEditor,\n IAceOptions,\n ICommand,\n IEditorProps,\n IMarker\n} from \"./types\";\n/**\n * See https://github.com/ajaxorg/ace/wiki/Configuring-Ace\n */\n\nexport interface IAceEditorProps {\n name?: string;\n style?: React.CSSProperties;\n /** For available modes see https://github.com/thlorenz/brace/tree/master/mode */\n mode?: string | object;\n /** For available themes see https://github.com/thlorenz/brace/tree/master/theme */\n theme?: string;\n height?: string;\n width?: string;\n className?: string;\n fontSize?: number | string;\n showGutter?: boolean;\n showPrintMargin?: boolean;\n highlightActiveLine?: boolean;\n focus?: boolean;\n cursorStart?: number;\n wrapEnabled?: boolean;\n readOnly?: boolean;\n minLines?: number;\n maxLines?: number;\n navigateToFileEnd?: boolean;\n debounceChangePeriod?: number;\n enableBasicAutocompletion?: boolean | string[];\n enableLiveAutocompletion?: boolean | string[];\n tabSize?: number;\n value?: string;\n placeholder?: string;\n defaultValue?: string;\n scrollMargin?: number[];\n enableSnippets?: boolean;\n onSelectionChange?: (value: any, event?: any) => void;\n onCursorChange?: (value: any, event?: any) => void;\n onInput?: (event?: any) => void;\n onLoad?: (editor: Ace.Editor) => void;\n onValidate?: (annotations: Ace.Annotation[]) => void;\n onBeforeLoad?: (ace: typeof AceBuilds) => void;\n onChange?: (value: string, event?: any) => void;\n onSelection?: (selectedText: string, event?: any) => void;\n onCopy?: (value: string) => void;\n onPaste?: (value: string) => void;\n onFocus?: (event: any, editor?: Ace.Editor) => void;\n onBlur?: (event: any, editor?: Ace.Editor) => void;\n onScroll?: (editor: IEditorProps) => void;\n editorProps?: IEditorProps;\n setOptions?: IAceOptions;\n keyboardHandler?: string;\n commands?: ICommand[];\n annotations?: Ace.Annotation[];\n markers?: IMarker[];\n}\n\nexport default class ReactAce extends React.Component {\n public static propTypes: PropTypes.ValidationMap = {\n mode: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n focus: PropTypes.bool,\n theme: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n height: PropTypes.string,\n width: PropTypes.string,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n showGutter: PropTypes.bool,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onPaste: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onBlur: PropTypes.func,\n onScroll: PropTypes.func,\n value: PropTypes.string,\n defaultValue: PropTypes.string,\n onLoad: PropTypes.func,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n onValidate: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n debounceChangePeriod: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableSnippets: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n navigateToFileEnd: PropTypes.bool,\n commands: PropTypes.array,\n placeholder: PropTypes.string\n };\n public static defaultProps: Partial = {\n name: \"ace-editor\",\n focus: false,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n fontSize: 12,\n enableSnippets: false,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n placeholder: null,\n navigateToFileEnd: true\n };\n public editor: IAceEditor;\n public refEditor: HTMLElement;\n public debounce: (fn: any, delay: number) => (...args: any) => void;\n // [index: string]: any;\n public silent: boolean;\n constructor(props: IAceEditorProps) {\n super(props);\n editorEvents.forEach(method => {\n this[method] = this[method].bind(this);\n });\n this.debounce = debounce;\n }\n public isInShadow(node: HTMLElement): boolean {\n let parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n public componentDidMount() {\n const {\n className,\n onBeforeLoad,\n onValidate,\n mode,\n focus,\n theme,\n fontSize,\n value,\n defaultValue,\n showGutter,\n wrapEnabled,\n showPrintMargin,\n scrollMargin = [0, 0, 0, 0],\n keyboardHandler,\n onLoad,\n commands,\n annotations,\n markers,\n placeholder\n } = this.props;\n\n this.editor = ace.edit(this.refEditor);\n\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n\n const editorProps = Object.keys(this.props.editorProps);\n for (let i = 0; i < editorProps.length; i++) {\n this.editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(\n this.onChange,\n this.props.debounceChangePeriod\n );\n }\n this.editor.renderer.setScrollMargin(\n scrollMargin[0],\n scrollMargin[1],\n scrollMargin[2],\n scrollMargin[3]\n );\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor\n .getSession()\n .setMode(\n typeof mode === \"string\" ? `ace/mode/${mode}` : (mode as Ace.SyntaxMode)\n );\n if(theme && theme !== \"\")\n this.editor.setTheme(`ace/theme/${theme}`);\n this.editor.setFontSize(\n typeof fontSize === \"number\" ? `${fontSize}px` : fontSize\n );\n this.editor\n .getSession()\n .setValue(!defaultValue ? value || \"\" : defaultValue);\n\n if (this.props.navigateToFileEnd) {\n this.editor.navigateFileEnd();\n }\n this.editor.renderer.setShowGutter(showGutter);\n this.editor.getSession().setUseWrapMode(wrapEnabled);\n this.editor.setShowPrintMargin(showPrintMargin);\n this.editor.on(\"focus\", this.onFocus);\n this.editor.on(\"blur\", this.onBlur);\n this.editor.on(\"copy\", this.onCopy);\n this.editor.on(\"paste\", this.onPaste);\n this.editor.on(\"change\", this.onChange);\n this.editor.on(\"input\", this.onInput);\n if (placeholder) {\n this.updatePlaceholder();\n }\n this.editor\n .getSession()\n .selection.on(\"changeSelection\", this.onSelectionChange);\n this.editor.getSession().selection.on(\"changeCursor\", this.onCursorChange);\n if (onValidate) {\n // @ts-ignore types don't include\n this.editor.getSession().on(\"changeAnnotation\", () => {\n // tslint:disable-next-line:no-shadowed-variable\n const annotations = this.editor.getSession().getAnnotations();\n this.props.onValidate(annotations);\n });\n }\n this.editor.session.on(\"changeScrollTop\", this.onScroll);\n this.editor.getSession().setAnnotations(annotations || []);\n if (markers && markers.length > 0) {\n this.handleMarkers(markers);\n }\n\n // get a list of possible options to avoid 'misspelled option errors'\n const availableOptions = this.editor.$options;\n editorOptions.forEach(option => {\n if (availableOptions.hasOwnProperty(option)) {\n // @ts-ignore\n this.editor.setOption(option, this.props[option]);\n } else if (this.props[option]) {\n console.warn(\n `ReactAce: editor option ${option} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`\n );\n }\n });\n\n this.handleOptions(this.props);\n\n if (Array.isArray(commands)) {\n commands.forEach(command => {\n if (typeof command.exec === \"string\") {\n (this.editor.commands as any).bindKey(command.bindKey, command.exec);\n } else {\n (this.editor.commands as any).addCommand(command);\n }\n });\n }\n\n if (keyboardHandler) {\n this.editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n\n if (onLoad) {\n onLoad(this.editor);\n }\n\n this.editor.resize();\n\n if (focus) {\n this.editor.focus();\n }\n }\n\n public componentDidUpdate(prevProps: IAceEditorProps) {\n const oldProps = prevProps;\n const nextProps = this.props;\n\n for (let i = 0; i < editorOptions.length; i++) {\n const option = editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n // @ts-ignore\n this.editor.setOption(option, nextProps[option]);\n }\n }\n\n if (nextProps.className !== oldProps.className) {\n const appliedClasses = this.refEditor.className;\n const appliedClassesArray = appliedClasses.trim().split(\" \");\n const oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(oldClass => {\n const index = appliedClassesArray.indexOf(oldClass);\n appliedClassesArray.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray.join(\" \");\n }\n\n // First process editor value, as it may create a new session (see issue #300)\n const valueChanged = this.editor &&\n nextProps.value != null &&\n this.editor.getValue() !== nextProps.value;\n\n if (valueChanged) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n const pos = this.editor.session.selection.toJSON();\n this.editor.setValue(nextProps.value, nextProps.cursorStart);\n this.editor.session.selection.fromJSON(pos);\n this.silent = false;\n }\n\n if (nextProps.placeholder !== oldProps.placeholder) {\n this.updatePlaceholder();\n }\n if (nextProps.mode !== oldProps.mode) {\n this.editor\n .getSession()\n .setMode(\n typeof nextProps.mode === \"string\"\n ? `ace/mode/${nextProps.mode}`\n : (nextProps.mode as Ace.SyntaxMode)\n );\n }\n if (nextProps.theme !== oldProps.theme) {\n this.editor.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n this.editor.setKeyboardHandler(\n \"ace/keyboard/\" + nextProps.keyboardHandler\n );\n } else {\n this.editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n this.editor.setFontSize(\n typeof nextProps.fontSize === \"number\"\n ? `${nextProps.fontSize}px`\n : nextProps.fontSize\n );\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n this.editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n this.editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n this.editor.renderer.setShowGutter(nextProps.showGutter);\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps);\n }\n // if the value or annotations changed, set the annotations\n // changing the value may create create a new session which will require annotations to be re-set\n if (valueChanged || !isEqual(nextProps.annotations, oldProps.annotations)) {\n this.editor.getSession().setAnnotations(nextProps.annotations || []);\n }\n if (\n !isEqual(nextProps.markers, oldProps.markers) &&\n Array.isArray(nextProps.markers)\n ) {\n this.handleMarkers(nextProps.markers);\n }\n\n // this doesn't look like it works at all....\n if (!isEqual(nextProps.scrollMargin, oldProps.scrollMargin)) {\n this.handleScrollMargins(nextProps.scrollMargin);\n }\n\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width\n ) {\n this.editor.resize();\n }\n if (this.props.focus && !prevProps.focus) {\n this.editor.focus();\n }\n }\n\n public handleScrollMargins(margins = [0, 0, 0, 0]) {\n this.editor.renderer.setScrollMargin(\n margins[0],\n margins[1],\n margins[2],\n margins[3]\n );\n }\n\n public componentWillUnmount() {\n if (this.editor) {\n this.editor.destroy();\n this.editor = null;\n }\n }\n\n public onChange(event: any) {\n if (this.props.onChange && !this.silent) {\n const value = this.editor.getValue();\n this.props.onChange(value, event);\n }\n }\n\n public onSelectionChange(event: any) {\n if (this.props.onSelectionChange) {\n const value = this.editor.getSelection();\n this.props.onSelectionChange(value, event);\n }\n }\n public onCursorChange(event: any) {\n if (this.props.onCursorChange) {\n const value = this.editor.getSelection();\n this.props.onCursorChange(value, event);\n }\n }\n public onInput(event?: any) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n if (this.props.placeholder) {\n this.updatePlaceholder();\n }\n }\n public onFocus(event: any) {\n if (this.props.onFocus) {\n this.props.onFocus(event, this.editor);\n }\n }\n\n public onBlur(event: any) {\n if (this.props.onBlur) {\n this.props.onBlur(event, this.editor);\n }\n }\n\n public onCopy({ text }: { text: string }) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n }\n\n public onPaste({ text }: { text: string }) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n }\n\n public onScroll() {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n }\n\n public handleOptions(props: IAceEditorProps) {\n const setOptions = Object.keys(props.setOptions);\n for (let y = 0; y < setOptions.length; y++) {\n // @ts-ignore\n this.editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n }\n\n public handleMarkers(markers: IMarker[]) {\n // remove foreground markers\n let currentMarkers = this.editor.getSession().getMarkers(true);\n for (const i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers except active line marker and selected word marker\n currentMarkers = this.editor.getSession().getMarkers(false);\n for (const i in currentMarkers) {\n if (\n currentMarkers.hasOwnProperty(i) &&\n currentMarkers[i].clazz !== \"ace_active-line\" &&\n currentMarkers[i].clazz !== \"ace_selected-word\"\n ) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(\n ({\n startRow,\n startCol,\n endRow,\n endCol,\n className,\n type,\n inFront = false\n }) => {\n const range = new Range(startRow, startCol, endRow, endCol);\n this.editor.getSession().addMarker(range, className, type, inFront);\n }\n );\n }\n\n public updatePlaceholder() {\n // Adapted from https://stackoverflow.com/questions/26695708/how-can-i-add-placeholder-text-when-the-editor-is-empty\n\n const editor = this.editor;\n const { placeholder } = this.props;\n\n const showPlaceholder = !editor.session.getValue().length;\n let node = editor.renderer.placeholderNode;\n\n if (!showPlaceholder && node) {\n editor.renderer.scroller.removeChild(editor.renderer.placeholderNode);\n editor.renderer.placeholderNode = null;\n } else if (showPlaceholder && !node) {\n node = editor.renderer.placeholderNode = document.createElement(\"div\");\n node.textContent = placeholder || \"\";\n node.className = \"ace_comment ace_placeholder\";\n node.style.padding = \"0 9px\";\n node.style.position = \"absolute\";\n node.style.zIndex = \"3\";\n editor.renderer.scroller.appendChild(node);\n } else if (showPlaceholder && node) {\n node.textContent = placeholder;\n }\n }\n\n public updateRef(item: HTMLElement) {\n this.refEditor = item;\n }\n\n public render() {\n const { name, width, height, style } = this.props;\n const divStyle = { width, height, ...style };\n return
;\n }\n}\n","import * as PropTypes from \"prop-types\";\nimport * as React from \"react\";\nimport SplitEditor from \"./split\";\nconst DiffMatchPatch = require(\"diff-match-patch\");\nimport { IEditorProps } from \"./types\";\n\nexport interface IDiffEditorProps {\n cursorStart?: number;\n editorProps?: object;\n enableBasicAutocompletion?: boolean | string[];\n enableLiveAutocompletion?: boolean | string[];\n focus?: boolean;\n fontSize?: number;\n height?: string;\n highlightActiveLine?: boolean;\n maxLines?: number;\n minLines?: number;\n mode?: string;\n name?: string;\n className?: string;\n onLoad?: (editor: IEditorProps) => void;\n onChange?: (value: string[], event?: any) => void;\n onPaste?: (value: string) => void;\n onScroll?: (editor: IEditorProps) => void;\n orientation?: string;\n readOnly?: boolean;\n scrollMargin?: number[];\n setOptions?: object;\n showGutter?: boolean;\n showPrintMargin?: boolean;\n splits?: number;\n style?: object;\n tabSize?: number;\n theme?: string;\n value?: string[];\n width?: string;\n wrapEnabled?: boolean;\n}\n\nexport interface IDiffEditorState {\n value: string[];\n}\n\nexport default class DiffComponent extends React.Component<\n IDiffEditorProps,\n IDiffEditorState\n> {\n public static propTypes: PropTypes.ValidationMap = {\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n enableBasicAutocompletion: PropTypes.bool,\n enableLiveAutocompletion: PropTypes.bool,\n focus: PropTypes.bool,\n fontSize: PropTypes.number,\n height: PropTypes.string,\n highlightActiveLine: PropTypes.bool,\n maxLines: PropTypes.number,\n minLines: PropTypes.number,\n mode: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n onChange: PropTypes.func,\n orientation: PropTypes.string,\n readOnly: PropTypes.bool,\n scrollMargin: PropTypes.array,\n setOptions: PropTypes.object,\n showGutter: PropTypes.bool,\n showPrintMargin: PropTypes.bool,\n splits: PropTypes.number,\n style: PropTypes.object,\n tabSize: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.array,\n width: PropTypes.string,\n wrapEnabled: PropTypes.bool\n };\n\n public static defaultProps: Partial = {\n cursorStart: 1,\n editorProps: {},\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n focus: false,\n fontSize: 12,\n height: \"500px\",\n highlightActiveLine: true,\n maxLines: null,\n minLines: null,\n mode: \"\",\n name: \"ace-editor\",\n onLoad: null,\n onScroll: null,\n onPaste: null,\n onChange: null,\n orientation: \"beside\",\n readOnly: false,\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n showGutter: true,\n showPrintMargin: true,\n splits: 2,\n style: {},\n tabSize: 4,\n theme: \"github\",\n value: [\"\", \"\"],\n width: \"500px\",\n wrapEnabled: true\n };\n constructor(props: IDiffEditorProps) {\n super(props);\n this.state = {\n value: this.props.value\n };\n this.onChange = this.onChange.bind(this);\n this.diff = this.diff.bind(this);\n }\n\n public componentDidUpdate() {\n const { value } = this.props;\n\n if (value !== this.state.value) {\n this.setState({ value });\n }\n }\n\n public onChange(value: any) {\n this.setState({\n value\n });\n if (this.props.onChange) {\n this.props.onChange(value);\n }\n }\n\n public diff() {\n const dmp = new DiffMatchPatch();\n const lhString = this.state.value[0];\n const rhString = this.state.value[1];\n\n if (lhString.length === 0 && rhString.length === 0) {\n return [];\n }\n\n const diff = dmp.diff_main(lhString, rhString);\n dmp.diff_cleanupSemantic(diff);\n\n const diffedLines = this.generateDiffedLines(diff);\n const codeEditorSettings = this.setCodeMarkers(diffedLines);\n return codeEditorSettings;\n }\n\n public generateDiffedLines(diff: any) {\n const C = {\n DIFF_EQUAL: 0,\n DIFF_DELETE: -1,\n DIFF_INSERT: 1\n };\n\n const diffedLines = {\n left: [] as any[],\n right: [] as any[]\n };\n\n const cursor = {\n left: 1,\n right: 1\n };\n\n diff.forEach((chunk: any) => {\n const chunkType = chunk[0];\n const text = chunk[1];\n let lines = text.split(\"\\n\").length - 1;\n\n // diff-match-patch sometimes returns empty strings at random\n if (text.length === 0) {\n return;\n }\n\n const firstChar = text[0];\n const lastChar = text[text.length - 1];\n let linesToHighlight = 0;\n\n switch (chunkType) {\n case C.DIFF_EQUAL:\n cursor.left += lines;\n cursor.right += lines;\n\n break;\n case C.DIFF_DELETE:\n // If the deletion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.left++;\n lines--;\n }\n\n linesToHighlight = lines;\n\n // If the deletion does not include a newline, highlight the same line on the right\n if (linesToHighlight === 0) {\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right\n });\n }\n\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left + linesToHighlight\n });\n\n cursor.left += lines;\n break;\n case C.DIFF_INSERT:\n // If the insertion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.right++;\n lines--;\n }\n\n linesToHighlight = lines;\n\n // If the insertion does not include a newline, highlight the same line on the left\n if (linesToHighlight === 0) {\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left\n });\n }\n\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right + linesToHighlight\n });\n\n cursor.right += lines;\n break;\n default:\n throw new Error(\"Diff type was not defined.\");\n }\n });\n return diffedLines;\n }\n\n // Receives a collection of line numbers and iterates through them to highlight appropriately\n // Returns an object that tells the render() method how to display the code editors\n public setCodeMarkers(diffedLines: any = { left: [], right: [] }) {\n const codeEditorSettings = [];\n\n const newMarkerSet = {\n left: [] as any[],\n right: [] as any[]\n };\n\n for (let i = 0; i < diffedLines.left.length; i++) {\n const markerObj = {\n startRow: diffedLines.left[i].startLine - 1,\n endRow: diffedLines.left[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.left.push(markerObj);\n }\n\n for (let i = 0; i < diffedLines.right.length; i++) {\n const markerObj = {\n startRow: diffedLines.right[i].startLine - 1,\n endRow: diffedLines.right[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.right.push(markerObj);\n }\n\n codeEditorSettings[0] = newMarkerSet.left;\n codeEditorSettings[1] = newMarkerSet.right;\n\n return codeEditorSettings;\n }\n\n public render() {\n const markers = this.diff();\n return (\n \n );\n }\n}\n","import * as AceBuilds from \"ace-builds\";\n\ntype EditorOption =\n | \"minLines\"\n | \"maxLines\"\n | \"readOnly\"\n | \"highlightActiveLine\"\n | \"tabSize\"\n | \"enableBasicAutocompletion\"\n | \"enableLiveAutocompletion\"\n | \"enableSnippets\";\n\nconst editorOptions: EditorOption[] = [\n \"minLines\",\n \"maxLines\",\n \"readOnly\",\n \"highlightActiveLine\",\n \"tabSize\",\n \"enableBasicAutocompletion\",\n \"enableLiveAutocompletion\",\n \"enableSnippets\"\n];\n\ntype EditorEvent =\n | \"onChange\"\n | \"onFocus\"\n | \"onInput\"\n | \"onBlur\"\n | \"onCopy\"\n | \"onPaste\"\n | \"onSelectionChange\"\n | \"onCursorChange\"\n | \"onScroll\"\n | \"handleOptions\"\n | \"updateRef\";\n\nconst editorEvents: EditorEvent[] = [\n \"onChange\",\n \"onFocus\",\n \"onInput\",\n \"onBlur\",\n \"onCopy\",\n \"onPaste\",\n \"onSelectionChange\",\n \"onCursorChange\",\n \"onScroll\",\n \"handleOptions\",\n \"updateRef\"\n];\n\n// Typescript globals definition to allow us to create a window object during SSR.\ndeclare global {\n namespace NodeJS {\n // tslint:disable-next-line\n interface Global {\n window: any;\n }\n }\n}\nconst getAceInstance = (): typeof AceBuilds => {\n let ace;\n if (typeof window === \"undefined\") {\n // ace-builds just needs some window object to attach ace to.\n // During SSR even just an empty object will work.\n global.window = {};\n ace = require(\"ace-builds\");\n // And it can be discarded immediately afterward to avoid confusing\n // other libraries that might detect SSR the same way we did.\n delete global.window;\n } else if ((window as any).ace) {\n // Fallback for ace.require when vanilla ACE is hosted over a CDN\n ace = (window as any).ace;\n ace.acequire = (window as any).ace.require || (window as any).ace.acequire;\n } else {\n ace = require(\"ace-builds\");\n }\n return ace;\n};\n\nconst debounce = (fn: (...args: any[]) => void, delay: number) => {\n let timer: any = null;\n // tslint:disable-next-line\n return function () {\n const context = this;\n const args = arguments;\n clearTimeout(timer);\n timer = setTimeout(() => {\n fn.apply(context, args);\n }, delay);\n };\n};\nexport { editorOptions, editorEvents, debounce, getAceInstance };\n","import ace, { IAceEditorProps } from \"./ace\";\nimport diff, { IDiffEditorProps, IDiffEditorState } from \"./diff\";\nimport split, { ISplitEditorProps } from \"./split\";\nimport {\n IAceOptions,\n IAnnotation,\n ICommand,\n ICommandBindKey,\n ICommandManager,\n IEditorProps,\n IMarker\n} from \"./types\";\nexport {\n split,\n diff,\n IAceOptions,\n IAceEditorProps,\n IAnnotation,\n ICommand,\n ICommandBindKey,\n ICommandManager,\n IDiffEditorProps,\n IDiffEditorState,\n IEditorProps,\n IMarker,\n ISplitEditorProps\n};\nexport default ace;\n","import {\n debounce,\n editorEvents,\n editorOptions,\n getAceInstance\n} from \"./editorOptions\";\nconst ace = getAceInstance();\nimport { Ace, Range } from \"ace-builds\";\nimport Editor = Ace.Editor;\nimport { Split } from \"ace-builds/src-noconflict/ext-split\";\nimport * as PropTypes from \"prop-types\";\nimport * as React from \"react\";\nconst isEqual = require(\"lodash.isequal\");\nconst get = require(\"lodash.get\");\nimport {\n IAceOptions,\n IAnnotation,\n ICommand,\n IEditorProps,\n IMarker\n} from \"./types\";\n\ninterface IAceEditorClass extends Editor {\n [index: string]: any;\n $options?: any;\n}\n\nexport interface ISplitEditorProps {\n [index: string]: any;\n name?: string;\n style?: object;\n /** For available modes see https://github.com/thlorenz/brace/tree/master/mode */\n mode?: string;\n /** For available themes see https://github.com/thlorenz/brace/tree/master/theme */\n theme?: string;\n height?: string;\n width?: string;\n className?: string;\n fontSize?: number | string;\n showGutter?: boolean;\n showPrintMargin?: boolean;\n highlightActiveLine?: boolean;\n focus?: boolean;\n splits: number;\n debounceChangePeriod?: number;\n cursorStart?: number;\n wrapEnabled?: boolean;\n readOnly?: boolean;\n minLines?: number;\n maxLines?: number;\n enableBasicAutocompletion?: boolean | string[];\n enableLiveAutocompletion?: boolean | string[];\n tabSize?: number;\n value?: string[];\n defaultValue?: string[];\n scrollMargin?: number[];\n orientation?: string;\n onSelectionChange?: (value: any, event?: any) => void;\n onCursorChange?: (value: any, event?: any) => void;\n onInput?: (event?: any) => void;\n onLoad?: (editor: IEditorProps) => void;\n onBeforeLoad?: (ace: any) => void;\n onChange?: (value: string[], event?: any) => void;\n onSelection?: (selectedText: string, event?: any) => void;\n onCopy?: (value: string) => void;\n onPaste?: (value: string) => void;\n onFocus?: (value: Event) => void;\n onBlur?: (value: Event) => void;\n onScroll?: (editor: IEditorProps) => void;\n editorProps?: IEditorProps;\n setOptions?: IAceOptions;\n keyboardHandler?: string;\n commands?: ICommand[];\n annotations?: IAnnotation[][];\n markers?: IMarker[][];\n}\n\nexport default class SplitComponent extends React.Component<\n ISplitEditorProps,\n undefined\n> {\n [index: string]: any;\n\n public static propTypes: PropTypes.ValidationMap = {\n className: PropTypes.string,\n debounceChangePeriod: PropTypes.number,\n defaultValue: PropTypes.arrayOf(PropTypes.string),\n focus: PropTypes.bool,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.string,\n mode: PropTypes.string,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n orientation: PropTypes.string,\n showGutter: PropTypes.bool,\n splits: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.arrayOf(PropTypes.string),\n width: PropTypes.string,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n commands: PropTypes.array\n };\n public static defaultProps: Partial = {\n name: \"ace-editor\",\n focus: false,\n orientation: \"beside\",\n splits: 2,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n value: [],\n fontSize: 12,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false\n };\n public editor: IAceEditorClass;\n public refEditor: HTMLElement;\n public silent: boolean;\n public split: IAceEditorClass;\n public splitEditor: IAceEditorClass;\n public debounce: (fn: any, delay: number) => (...args: any) => void;\n constructor(props: ISplitEditorProps) {\n super(props);\n editorEvents.forEach(method => {\n this[method] = this[method].bind(this);\n });\n this.debounce = debounce;\n }\n public isInShadow(node: HTMLElement): boolean {\n let parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n }\n public componentDidMount() {\n const {\n className,\n onBeforeLoad,\n mode,\n focus,\n theme,\n fontSize,\n value,\n defaultValue,\n cursorStart,\n showGutter,\n wrapEnabled,\n showPrintMargin,\n scrollMargin = [0, 0, 0, 0],\n keyboardHandler,\n onLoad,\n commands,\n annotations,\n markers,\n splits\n } = this.props;\n\n this.editor = ace.edit(this.refEditor);\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor.setTheme(`ace/theme/${theme}`);\n\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n\n const editorProps = Object.keys(this.props.editorProps);\n\n const split = new Split(\n this.editor.container,\n `ace/theme/${theme}`,\n splits\n );\n this.editor.env.split = split;\n\n this.splitEditor = split.getEditor(0);\n this.split = split;\n // in a split scenario we don't want a print margin for the entire application\n this.editor.setShowPrintMargin(false);\n this.editor.renderer.setShowGutter(false);\n // get a list of possible options to avoid 'misspelled option errors'\n const availableOptions = this.splitEditor.$options;\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(\n this.onChange,\n this.props.debounceChangePeriod\n );\n }\n split.forEach((editor: IAceEditorClass, index: number) => {\n for (let i = 0; i < editorProps.length; i++) {\n editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n const defaultValueForEditor = get(defaultValue, index);\n const valueForEditor = get(value, index, \"\");\n editor.session.setUndoManager(new ace.UndoManager());\n editor.setTheme(`ace/theme/${theme}`);\n editor.renderer.setScrollMargin(\n scrollMargin[0],\n scrollMargin[1],\n scrollMargin[2],\n scrollMargin[3]\n );\n editor.getSession().setMode(`ace/mode/${mode}`);\n editor.setFontSize(fontSize as any);\n editor.renderer.setShowGutter(showGutter);\n editor.getSession().setUseWrapMode(wrapEnabled);\n editor.setShowPrintMargin(showPrintMargin);\n editor.on(\"focus\", this.onFocus);\n editor.on(\"blur\", this.onBlur);\n editor.on(\"input\" as any, this.onInput);\n editor.on(\"copy\", this.onCopy as any);\n editor.on(\"paste\", this.onPaste as any);\n editor.on(\"change\", this.onChange);\n editor\n .getSession()\n .selection.on(\"changeSelection\", this.onSelectionChange);\n editor.getSession().selection.on(\"changeCursor\", this.onCursorChange);\n editor.session.on(\"changeScrollTop\", this.onScroll);\n editor.setValue(\n defaultValueForEditor === undefined\n ? valueForEditor\n : defaultValueForEditor,\n cursorStart\n );\n const newAnnotations = get(annotations, index, []);\n const newMarkers = get(markers, index, []);\n editor.getSession().setAnnotations(newAnnotations);\n if (newMarkers && newMarkers.length > 0) {\n this.handleMarkers(newMarkers, editor);\n }\n\n for (let i = 0; i < editorOptions.length; i++) {\n const option = editorOptions[i];\n if (availableOptions.hasOwnProperty(option)) {\n editor.setOption(option as any, this.props[option]);\n } else if (this.props[option]) {\n console.warn(\n `ReaceAce: editor option ${option} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`\n );\n }\n }\n this.handleOptions(this.props, editor);\n\n if (Array.isArray(commands)) {\n commands.forEach(command => {\n if (typeof command.exec === \"string\") {\n (editor.commands as any).bindKey(command.bindKey, command.exec);\n } else {\n (editor.commands as any).addCommand(command);\n }\n });\n }\n\n if (keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n });\n\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n\n if (focus) {\n this.splitEditor.focus();\n }\n\n const sp = this.editor.env.split;\n sp.setOrientation(\n this.props.orientation === \"below\" ? sp.BELOW : sp.BESIDE\n );\n sp.resize(true);\n if (onLoad) {\n onLoad(sp);\n }\n }\n\n public componentDidUpdate(prevProps: ISplitEditorProps) {\n const oldProps = prevProps;\n const nextProps = this.props;\n\n const split = this.editor.env.split;\n\n if (nextProps.splits !== oldProps.splits) {\n split.setSplits(nextProps.splits);\n }\n\n if (nextProps.orientation !== oldProps.orientation) {\n split.setOrientation(\n nextProps.orientation === \"below\" ? split.BELOW : split.BESIDE\n );\n }\n\n split.forEach((editor: IAceEditorClass, index: number) => {\n if (nextProps.mode !== oldProps.mode) {\n editor.getSession().setMode(\"ace/mode/\" + nextProps.mode);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n editor.setKeyboardHandler(\n \"ace/keyboard/\" + nextProps.keyboardHandler\n );\n } else {\n editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n editor.setFontSize(nextProps.fontSize as any);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n editor.renderer.setShowGutter(nextProps.showGutter);\n }\n\n for (let i = 0; i < editorOptions.length; i++) {\n const option = editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n editor.setOption(option as any, nextProps[option]);\n }\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps, editor);\n }\n const nextValue = get(nextProps.value, index, \"\");\n if (editor.getValue() !== nextValue) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n const pos = (editor.session.selection as any).toJSON();\n editor.setValue(nextValue, nextProps.cursorStart);\n (editor.session.selection as any).fromJSON(pos);\n this.silent = false;\n }\n const newAnnotations = get(nextProps.annotations, index, []);\n const oldAnnotations = get(oldProps.annotations, index, []);\n if (!isEqual(newAnnotations, oldAnnotations)) {\n editor.getSession().setAnnotations(newAnnotations);\n }\n\n const newMarkers = get(nextProps.markers, index, []);\n const oldMarkers = get(oldProps.markers, index, []);\n if (!isEqual(newMarkers, oldMarkers) && Array.isArray(newMarkers)) {\n this.handleMarkers(newMarkers, editor);\n }\n });\n\n if (nextProps.className !== oldProps.className) {\n const appliedClasses = this.refEditor.className;\n const appliedClassesArray = appliedClasses.trim().split(\" \");\n const oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(oldClass => {\n const index = appliedClassesArray.indexOf(oldClass);\n appliedClassesArray.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray.join(\" \");\n }\n\n if (nextProps.theme !== oldProps.theme) {\n split.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n\n if (nextProps.focus && !oldProps.focus) {\n this.splitEditor.focus();\n }\n if (\n nextProps.height !== this.props.height ||\n nextProps.width !== this.props.width\n ) {\n this.editor.resize();\n }\n }\n\n public componentWillUnmount() {\n this.editor.destroy();\n this.editor = null;\n }\n\n public onChange(event: any) {\n if (this.props.onChange && !this.silent) {\n const value: any = [];\n this.editor.env.split.forEach((editor: IAceEditorClass) => {\n value.push(editor.getValue());\n });\n this.props.onChange(value, event);\n }\n }\n\n public onSelectionChange(event: any) {\n if (this.props.onSelectionChange) {\n const value: any = [];\n this.editor.env.split.forEach((editor: IAceEditorClass) => {\n value.push(editor.getSelection());\n });\n this.props.onSelectionChange(value, event);\n }\n }\n public onCursorChange(event: any) {\n if (this.props.onCursorChange) {\n const value: any = [];\n this.editor.env.split.forEach((editor: IAceEditorClass) => {\n value.push(editor.getSelection());\n });\n this.props.onCursorChange(value, event);\n }\n }\n public onFocus(event: any) {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }\n\n public onInput(event: any) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n }\n\n public onBlur(event: any) {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n }\n\n public onCopy(text: string) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n }\n\n public onPaste(text: string) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n }\n\n public onScroll() {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n }\n\n public handleOptions(props: ISplitEditorProps, editor: IAceEditorClass) {\n const setOptions = Object.keys(props.setOptions);\n for (let y = 0; y < setOptions.length; y++) {\n editor.setOption(setOptions[y] as any, props.setOptions[setOptions[y]]);\n }\n }\n\n public handleMarkers(markers: IMarker[], editor: IAceEditorClass) {\n // remove foreground markers\n let currentMarkers = editor.getSession().getMarkers(true);\n for (const i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers\n currentMarkers = editor.getSession().getMarkers(false);\n for (const i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(\n ({\n startRow,\n startCol,\n endRow,\n endCol,\n className,\n type,\n inFront = false\n }) => {\n const range = new Range(startRow, startCol, endRow, endCol);\n editor\n .getSession()\n .addMarker(range as any, className, type as any, inFront);\n }\n );\n }\n\n public updateRef(item: HTMLElement) {\n this.refEditor = item;\n }\n\n public render() {\n const { name, width, height, style } = this.props;\n const divStyle = { width, height, ...style };\n return
;\n }\n}\n"],"names":["global","this","window","define","module","deps","payload","arguments","length","modules","payloads","original","apply","console","error","trace","_require","parentId","callback","lookup","undefined","Object","prototype","toString","call","params","i","l","dep","require","push","packagedModule","normalizeModule","moduleName","indexOf","chunks","split","charAt","slice","join","previous","replace","exports","mod","id","uri","packaged","ns","root","exportAce","ace","defineProp","obj","name","val","defineProperty","value","enumerable","writable","configurable","String","startsWith","searchString","position","lastIndexOf","endsWith","subjectString","lastIndex","repeat","count","result","string","includes","str","assign","target","TypeError","output","index","source","keys","forEach","key","values","o","map","k","Array","find","predicate","len","thisArg","kValue","findIndex","item","fill","O","relativeStart","Math","max","min","end","relativeEnd","final","of","deepCopy","copy","isArray","last","a","stringReverse","reverse","stringRepeat","trimBeginRegexp","trimEndRegexp","stringTrimLeft","stringTrimRight","copyObject","copyArray","array","arrayToMap","arr","createMap","props","create","arrayRemove","splice","escapeRegExp","escapeHTML","getMatchOffsets","regExp","matches","offset","deferredCall","fcn","timer","deferred","timeout","cancel","setTimeout","schedule","clearTimeout","isPending","delayedCall","defaultTimeout","_self","delay","supportsLookbehind","RegExp","e","skipEmptyMatch","line","supportsUnicodeFlag","codePointAt","OS","LINUX","MAC","WINDOWS","getOS","isMac","isLinux","_navigator","navigator","os","exec","platform","toLowerCase","ua","userAgent","appName","isWin","isIE","parseFloat","match","isOldIE","isGecko","isMozilla","isOpera","opera","isWebKit","isChrome","isSafari","isEdge","isAIR","isAndroid","isChromeOS","isIOS","test","isMobile","strictCSP","useragent","buildDom","parent","refs","txt","document","createTextNode","appendChild","els","ch","el","createElement","options","childIndex","n","className","style","cssText","setAttribute","getDocumentHead","doc","head","getElementsByTagName","documentElement","tag","createElementNS","removeChildren","element","innerHTML","textContent","ownerDocument","createFragment","createDocumentFragment","hasCssClass","addCssClass","removeCssClass","classes","toggleCssClass","add","setCssClass","node","include","hasCssString","sheets","querySelectorAll","removeElementById","getElementById","remove","cssCache","insertPendingStyles","cache","importCssString","container","getRootNode","insertBefore","firstChild","useStrictCSP","importCssStylsheet","rel","href","scrollbarWidth","inner","width","minWidth","height","display","outer","left","overflow","body","noScrollbar","offsetWidth","withScrollbar","clientWidth","removeChild","computedStyle","getComputedStyle","setStyle","styles","property","HAS_CSS_ANIMATION","HAS_CSS_TRANSFORMS","HI_DPI","devicePixelRatio","div","transform","animationName","translate","tx","ty","round","top","dom","get","url","xhr","XMLHttpRequest","open","onreadystatechange","readyState","responseText","send","loadScript","path","s","src","onload","_","isAbort","qualifyURL","inherits","ctor","superCtor","super_","constructor","mixin","implement","proto","EventEmitter","stopPropagation","propagationStopped","preventDefault","defaultPrevented","_emit","_dispatchEvent","eventName","_eventRegistry","_defaultHandlers","listeners","defaultHandler","type","_signal","once","on","newCallback","off","Promise","resolve","setDefaultHandler","handlers","_disabled_","old","disabled","removeDefaultHandler","pop","addEventListener","capturing","removeListener","removeEventListener","removeAllListeners","reportError","msg","data","Error","messages","oop","optionsProvider","setOptions","optList","setOption","getOptions","optionNames","$options","filter","hidden","getOption","opt","warn","forwardTo","handlesSet","set","message","AppConfig","$defaultOptions","defineOptions","initialValue","resetOptions","setDefaultValue","opts","setDefaultValues","optionHash","setMessages","nls","translated","isDark","cssClass","$id","lang","net","workerPath","modePath","themePath","basePath","suffix","$moduleUrls","loadWorkerFromBlob","sharedPopups","hasOwnProperty","all","$modes","moduleUrl","component","parts","sep","base","re","setModuleUrl","subst","customLoader","setLoader","cb","dynamicModules","$loading","$loaded","loadModule","moduleId","onLoad","loadedModule","moduleType","load","afterLoad","loader","err","reportErrorIfPathIsNotConfigured","then","default","$require","setModuleLoader","version","config","init","scriptOptions","scriptUrl","currentScript","_currentScript","currentDocument","scripts","script","getAttribute","attributes","j","attr","m","m1","toUpperCase","Range","startRow","startColumn","endRow","endColumn","start","row","column","isEqual","range","contains","compare","compareRange","cmp","comparePoint","p","containsRange","intersects","isEnd","isStart","setStart","setEnd","inside","insideStart","insideEnd","isMultiLine","compareStart","compareEnd","compareInside","clipRows","firstRow","lastRow","fromPoints","extend","isEmpty","clone","collapseRows","toScreenRange","session","screenPosStart","documentToScreenPosition","screenPosEnd","moveBy","comparePoints","p1","p2","Keys","ret","MODIFIER_KEYS","KEY_MODS","FUNCTION_KEYS","PRINTABLE_KEYS","parseInt","enter","escape","esc","del","mods","pow","x","keyCodeToString","keyCode","keyString","fromCharCode","activeListenerOptions","pressedKeys","ts","getListenerOptions","createComment","passive","detectListenerOptionsSupport","EventListener","elem","destroy","addListener","destroyer","$toDestroy","getModifierHash","ctrlKey","altKey","shiftKey","metaKey","resetPressedKeys","stopEvent","getButton","button","capture","eventHandler","releaseCaptureHandler","onMouseUp","addMouseWheelListener","deltaX","deltaY","deltaMode","DOM_DELTA_PIXEL","wheelX","wheelY","DOM_DELTA_LINE","DOM_DELTA_PAGE","addMultiMouseDownListener","elements","timeouts","callbackName","startX","startY","clicks","eventNames","onMousedown","detail","isNewClick","abs","clientX","clientY","_clicks","getModifierString","addCommandKeyListener","lastDefaultPrevented","hashId","getModifierState","altGr","location","timeStamp","normalizeCommandKeys","postMessage","postMessageId","nextTick","win","messageName","listener","$idleBlocked","onIdle","handler","$idleBlockId","blockIdle","nextFrame","requestAnimationFrame","bind","$cancelT","lineMode","pasteCancelled","Date","now","TextInput","event","clipboard","BROKEN_SETDATA","USE_IE_MIME_TYPE","HAS_FOCUS_ARGS","MAX_LINE_LENGTH","KEYS","MODS","valueResetRegex","parentNode","host","text","opacity","copied","pasted","inComposition","sendingText","tempStyle","fontSize","commandMode","ignoreFocusEvents","lastValue","lastSelectionStart","lastSelectionEnd","lastRestoreEnd","rowStart","Number","MAX_SAFE_INTEGER","rowEnd","MIN_SAFE_INTEGER","numberOfExtraLines","isFocused","activeElement","setNumberOfExtraLines","number","setAriaOptions","activeDescendant","inline","removeAttribute","role","setLabel","selection","cursor","onBlur","hasFocus","onFocus","resetSelection","$focusScroll","focus","renderer","enableKeyboardAccessibility","preventScroll","isTransformed","getBoundingClientRect","ancestors","t","parentElement","nodeType","blur","curOp","commandName","command","isUserAction","docChanged","selectionChanged","onCompositionEnd","positionToSelection","getLine","newValue","selectionEnd","setSelectionRange","afterContextMenu","selectionStart","getRange","lines","prevLine","nextLine","inputHandler","setInputHandler","getInputHandler","sendText","fromInput","onPaste","extendLeft","extendRight","inserted","restoreStart","restoreEnd","endIndex","shouldReset","onTextInput","onInput","onCompositionUpdate","inputType","execCommand","handleClipboardData","forceIEMime","clipboardData","mime","setData","getData","doCopy","isCut","getCopyText","onCut","onCopy","select","onCommandKey","isAllSelected","selectAll","$readOnly","cancelComposition","useTextareaForIME","markerRange","context","compositionStartOffset","closeTimeout","syncComposition","onContextMenuClose","$isMousePressed","$keepTextAreaAtCursor","$moveTextAreaToCursor","onCompositionStart","getSelectionRange","msGetInputContext","getInputContext","getElement","setCommandMode","readOnly","setReadOnly","setCopyWithEmptySelection","onContextMenu","domEvent","moveToMouse","bringToFront","characterWidth","rect","borderTopWidth","borderLeftWidth","maxTop","bottom","clientHeight","move","textInput","scroller","typingResetTimeout","typing","detectArrowKeys","$mouseHandler","isMousePressed","modifier","up","home","option","down","right","shift","commands","findKeyCommand","addIosSelectionHandler","$setUserAgentForTests","_isMobile","_isIOS","DefaultHandlers","mouseHandler","$clickSelection","editor","onMouseDown","onDoubleClick","onTripleClick","onQuadClick","onMouseWheel","extendSelectionBy","ev","inSelection","pos","getDocumentPosition","mousedownEvent","moveToPosition","time","$focusTimeout","inMultiSelectMode","captureMouse","startSelect","setState","waitForClickSelection","screenToTextCoordinates","y","getShiftKey","selectToPosition","anchor","orientedRange","calcRangeOrientation","setSelectionAnchor","scrollCursorIntoView","unitName","cmpStart","cmpEnd","selectByLinesEnd","unsetStyle","focusWait","ax","ay","bx","by","distance","sqrt","getBracketRange","getWordRange","getLineRange","getAccelKey","$lastScroll","vx","vy","allowed","prevScroll","dt","direction","canScroll","isScrollableBy","speed","scrollBy","stop","selectEnd","selectAllEnd","selectByWordsEnd","preventParentScroll","currentTarget","scrollHeight","__extends","extendStatics","d","b","setPrototypeOf","__proto__","__","__values","Symbol","iterator","next","done","CLASSNAME","Tooltip","isOpen","$element","$parentNode","$init","setText","setHtml","html","setPosition","setClassName","setTheme","theme","show","hide","getHeight","offsetHeight","getWidth","popupManager","PopupManager","popups","addPopup","popup","updatePopups","removePopup","e_1","_a","e_2","_b","sort","priority","visiblepopups","_c","_d","shouldDisplay","visiblepopups_1","visiblepopups_1_1","visiblePopup","doPopupsOverlap","e_2_1","return","e_1_1","popupA","popupB","rectA","rectB","HoverTooltip","_super","_this","lastT","idleTime","lastEvent","onMouseOut","onMouseMove","waitForHover","whiteSpace","pointerEvents","tabIndex","addToEditor","getMouseEventTarget","removeFromEditor","isOutsideOfText","$gatherData","docPos","screenPos","pixelToScreenCoordinates","clippedPos","setDataProvider","showForRange","domNode","startingEvent","$registerCloseEvents","addMarker","textToScreenCoordinates","pageX","maxHeight","labelHeight","labelWidth","spaceBelow","innerHeight","pageY","lineHeight","isAbove","innerWidth","marker","$markerSession","removeMarker","$removeCloseEvents","relatedTarget","classList","GutterHandler","tooltipTimeout","mouseEvent","gutter","$gutterLayer","tooltip","GutterTooltip","hideTooltip","moveTooltip","getRegion","selectTo","srcElement","$tooltipFollowsMouse","getLength","screenRow","$pos","documentToScreenRow","showTooltip","gutterRow","getGutterRow","gutterCell","$lines","querySelector","$gutter","windowWidth","windowHeight","singular","plural","warning","info","annotation","annotationsInRow","$annotations","from","fold","getFoldLine","$showFoldedAnnotations","mostSevereAnnotationInFoldType","annotationsInFold","annotationType","summaryFoldedAnnotations","concat","annotationsToSummaryString","annotationMessages","iconClassName","$useSvgGutterIcons","annotationLabels","tooltipContent","annotations","summary","annotationTypes_1","annotationTypes_1_1","label","MouseEvent","$inSelection","documentRow","selectionRange","DragdropHandler","dragImage","dragSelectionMarker","timerId","dragCursor","dragOperation","isInternal","autoScrollStartTime","cursorMovedTime","cursorPointOnCaretMoved","mouseTarget","counter","onDragInterval","prevCursor","vMovement","hMovement","moveCursorToPosition","calcDistance","layerConfig","editorRect","offsets","nearestXOffset","nearestYOffset","scrollCursor","vScroll","hScroll","autoScroll","addDragMarker","toOrientedRange","getSelectionStyle","clearSelection","$cursorLayer","setBlinking","clearInterval","setInterval","clearDragMarker","fromOrientedRange","$resetCursorStyle","onDragStart","cancelDrag","draggable","self","dataTransfer","effectAllowed","getReadOnly","setDragImage","clearData","getTextRange","onDragEnd","dropEffect","setCursorStyle","onDragEnter","canAccept","getDropEffect","onDragOver","onMouseMoveTimer","onDragLeave","onDrop","moveText","dropData","insert","types","some","copyAllowed","copyModifierState","dragWait","getDragDelay","startDrag","dragWaitEnd","dragReadyEnd","cursorStyle","onMouseDrag","state","dragDrop","$dragEnabled","eventTarget","unselectable","addTouchListeners","touchStartT","longTouchTimer","animationTimer","pressed","contextMenu","mode","animationSteps","clickCount","vX","vY","createContextMenu","handleClick","action","selected","hasUndo","getUndoManager","replaceChild","class","updateMenu","readText","writeText","ontouchstart","ontouchend","onclick","showContextMenu","pagePos","leftOffset","scrollLeft","hideContextMenu","handleLongTap","selectWord","touches","h","w","touchObj","setRange","switchToSelectionMode","cursorPos","getPixelPosition","anchorPos","offsetTop","offsetLeft","weightedDistance","diff1","diff2","oldScrollTop","getScrollTop","DefaultGutterHandler","MouseHandler","$dragDelay","$mouseMoved","focusEditor","onMouseEvent","scrollBarV","scrollBarH","Boolean","gutterEl","character","mousemove","$scrollSpeed","mouseMoveHandler","which","releaseMouse","onCaptureEnd","onOperationEnd","onCaptureInterval","$onCaptureMouseMove","endOperation","startOperation","cancelContextMenu","scrollSpeed","dragDelay","dragEnabled","focusTimeout","tooltipFollowsMouse","FoldHandler","getFoldAt","removeFold","expandFold","getUseWrapMode","foldWidgets","onFoldWidgetClick","getParentFoldRangeData","firstRange","addFold","keyUtil","KeyBinding","$editor","$data","$handlers","kb","removeKeyboardHandler","$defaultHandler","addKeyboardHandler","setKeyboardHandler","handleKeyboard","attach","detach","getKeyboardHandler","getStatusText","$callKeyboardHandlers","toExecute","success","args","dir","hiLevel","lastArabic","hasUBAT_B","hasUBAT_S","impTab_LTR","impTab_RTL","L","R","EN","AN","ON","B","S","AL","WS","CS","ES","ET","NSM","LRE","RLE","PDF","LRO","RLO","BN","UnicodeTBL00","UnicodeTBL20","_invertLevel","lev","levels","_array","lo","hi","tmp","_getCharClass","chars","ix","wType","nType","cType","c","rtlCandidate","_getCharacterType","uc","charCodeAt","ON_R","R_H","DOT","doBidiReorder","textCharTypes","isRtl","logicalFromVisual","bidiLevels","charTypes","impTab","prevState","newClass","newLevel","newState","condPos","_computeLevels","hasBidiCharacters","getVisualFromLogicalIdx","logIdx","rowMap","bidiUtil","bidiRE","BidiHandler","bidiMap","currentRow","charWidths","EOL","showInvisibles","isRtlDir","$isRtl","wrapIndent","EOF","contentWidth","fontMetrics","rtlLineOffset","wrapOffset","isMoveLeftOperation","seenBidi","getValue","isBidiRow","docRow","splitIndex","updateRowLine","updateBidiMap","onChange","delta","getDocumentRow","rowCache","$screenRowCache","$getRowCacheIndex","$docRowCache","getSplitIndex","currentIndex","prevIndex","endOfLine","$useWrapMode","splits","$wrapData","indent","substring","size","isFullWidth","getScreenTabSize","$main","substr","markAsDirty","updateCharacterWidths","$characterSize","bidiCharWidth","$measureCharWidth","setShowInvisibles","setEolChar","eolChar","setContentWidth","isRtlLine","setRtlDirection","getCursorPosition","getSelectionAnchor","$bidiHandler","removeInLine","getPosLeft","col","leftBoundary","logicalIdx","getOverwrite","visualIdx","getSelections","startCol","endCol","level","selections","selColMin","selColMax","isSelected","isSelectedPrev","visIdx","offsetToCol","posX","charWidth","Selection","getDocument","lead","createAnchor","$silent","$cursorChanged","$isEmpty","$keepDesiredColumnOnChange","$desiredColumn","$anchorChanged","getCursor","getPosition","setAnchor","getAnchor","getSelectionLead","isBackwards","$setSelection","MAX_VALUE","anchorRow","anchorColumn","cursorRow","cursorColumn","wasEmpty","wasMultiselect","$moveSelection","mover","moveCursorTo","moveTo","selectUp","moveCursorUp","selectDown","moveCursorDown","selectRight","moveCursorRight","selectLeft","moveCursorLeft","selectLineStart","moveCursorLineStart","selectLineEnd","moveCursorLineEnd","selectFileEnd","moveCursorFileEnd","selectFileStart","moveCursorFileStart","selectWordRight","moveCursorWordRight","selectWordLeft","moveCursorWordLeft","selectAWord","getAWordRange","excludeLastChar","foldLine","selectLine","moveCursorBy","wouldMoveIntoSoftTab","tabSize","isTabStop","getTabSize","getNavigateWithinSoftTabs","firstColumnPosition","screenToDocumentPosition","leadingSpace","getDisplayLine","$useEmacsStyleLineStart","lineEnd","getDocumentLastRowColumnPosition","textEnd","search","moveCursorLongWordRight","rightOfCursor","nonTokenRe","tokenRe","moveCursorLongWordLeft","getFoldStringAt","leftOfCursor","$shortWordEndIndex","whitespaceRe","moveCursorShortWordRight","moveCursorShortWordLeft","$selectLongWords","rows","offsetX","lineWidgets","widget","rowsAbove","rowCount","keepDesiredColumn","moveCursorToScreen","desiredColumn","r","getRangeOfMovements","func","toJSON","rangeCount","ranges","r1","fromJSON","rangeList","toSingleRange","addRange","MAX_TOKEN_COUNT","Tokenizer","rules","splitRegex","states","regExps","matchMappings","ruleRegExps","matchTotal","mapping","defaultToken","flag","splitterRurles","rule","caseInsensitive","unicode","regex","adjustedregex","matchcount","token","groupCount","tokenArray","onMatch","$arrayTokens","$applyToken","digit","removeCapturingGroups","createSplitterRegexp","$setMaxTokenCount","tokens","stack","inChClass","lastCapture","parenOpen","parenClose","square","getLineTokens","startState","currentState","matchAttempts","skipped","consumeLineEnd","merge","unshift","TextHighlightRules","addRules","prefix","nextState","$rules","getRules","embedRules","HighlightRules","escapeRules","append","$embeds","getEmbeds","pushState","popState","normalizeRules","processState","toInsert","stateName","includeName","noEscape","keywordMap","createKeywordMapper","ignoreCase","splitChar","keywords","$keywordList","list","word","getKeywords","$keywords","Behaviour","$behaviours","addBehaviours","behaviours","inherit","getBehaviours","TokenIterator","initialRow","initialColumn","$session","$row","$rowTokens","getTokens","getTokenAt","$tokenIndex","stepBackward","stepForward","getCurrentToken","getCurrentTokenRow","getCurrentTokenColumn","rowTokens","tokenIndex","getCurrentTokenPosition","getCurrentTokenRange","CstyleBehaviour","SAFE_INSERT_IN_TOKENS","SAFE_INSERT_BEFORE_TOKENS","contextCache","defaultQuotes","initContext","multiSelect","autoInsertedBrackets","autoInsertedRow","autoInsertedLineEnd","maybeInsertedBrackets","maybeInsertedRow","maybeInsertedLineStart","maybeInsertedLineEnd","getWrapped","opening","closing","rowDiff","getWrapBehavioursEnabled","isSaneInsertion","braces","recordAutoInsert","recordMaybeInsert","$findOpeningBracket","isAutoInsertedClosing","popAutoInsertedClosing","isMaybeInsertedClosing","clearMaybeInsertedClosing","openBracePos","findMatchingBracket","next_indent","$getIndent","getTabString","quotes","$mode","$quotes","lineCommentStart","quote","leftChar","rightChar","rightToken","pair","stringBefore","stringAfter","wordRe","isWordBefore","isWordAfter","pairQuotesAfter","$pairQuotesAfter","charBefore","closeDocComment","$matchTokenType","iterator2","bracket","wordChars","code","Mode","$defaultBehaviour","getTokenizer","$tokenizer","$highlightRules","$highlightRuleConfig","blockComment","toggleCommentLines","ignoreBlankLines","shouldRemove","minIndent","Infinity","insertAtTabStop","regexpStart","getUseSoftTabs","uncomment","shouldInsertSpace","commentWithSpace","comment","insertInLine","testRemove","before","after","spaces","lineCommentEnd","regexpEnd","iter","fun","minEmptyLength","floor","toggleBlockComment","colDiff","initialRange","startRange","endRange","getNextLineIndent","tab","checkOutdent","input","autoOutdent","createWorker","createModeDelegates","delegations","_loop_1","scope","functionName","$delegator","this_1","method","language","transformAction","param","$behaviour","completionKeywords","ruleItr","aLength","$createKeywordList","getCompletions","score","meta","applyDelta","docLines","doNotValidate","Anchor","$onChange","$clipPositionToDocument","point","moveIfEqual","deltaIsInsert","deltaRowShift","deltaColShift","deltaStart","deltaEnd","$pointsInOrder","$getTransformedPoint","$insertRight","noClip","point1","point2","equalPointsInOrder","bColIsAfter","Document","textOrLines","insertMergedLines","setValue","getAllLines","getNewLineCharacter","$detectNewLine","$autoNewLine","$newLineMode","setNewLineMode","newLineMode","getNewLineMode","isNewLine","getLines","getLinesForRange","insertLines","insertFullLines","removeLines","removeFullLines","insertNewLine","$split","clonePos","$clipPosition","deleteFirstNewLine","deleteLastNewLine","deletedLines","removeNewLine","applyDeltas","deltas","revertDeltas","revertDelta","isInsert","$splitAndapplyLargeDelta","$safeApplyDelta","docLength","MAX","to","chunk","indexToPosition","newlineLength","positionToIndex","BackgroundTokenizer","tokenizer","running","currentLine","$worker","workerStart","endLine","startLine","processedLines","$tokenizeRow","fireUpdateEvent","setTokenizer","setDocument","first","scheduleStart","$updateOnChange","getState","cleanup","SearchHighlight","clazz","setRegexp","update","markerLayer","renderedMarkerRanges","MAX_RANGES","rangeToAddMarkerTo","rangeAsString","drawSingleLineMarker","UndoManager","$keepRedoStack","$maxRev","$fromUndo","$undoDepth","reset","addSession","allowMerge","$lastDelta","$redoStack","lastDeltas","undoStackLength","$undoStack","$rev","addSelection","rev","startNewGroup","markIgnored","ignore","getSelection","getRevision","getDeltas","getChangedRanges","getChangedLines","undo","dontSelect","deltaSet","swapped","swapGroups","rearrangeUndoStack","$redoStackBaseRev","undoSelectionRange","undoChanges","$syncRev","redo","diff","redoStack","deltaSets","moveDeltasByOne","rebaseRedoStack","redoSelectionRange","redoChanges","nextDelta","mark","canUndo","canRedo","bookmark","isAtBookmark","json","$prettyPrint","stringifyDelta","hasRedo","isClean","markClean","stringifyRange","swap","d1","d2","i1","i2","ds1","ds2","selectionBefore","selectionAfter","xform","c1","splitDelta","shiftPos","rowsBefore","otherLines","cloneDelta","xformed","FoldLine","foldData","folds","setFoldLine","shiftRow","sameRow","containsRow","walk","lastEnd","isNewRow","placeholder","getNextFoldTo","kind","addRemoveChars","log","foldBefore","newFoldLine","foldLineNext","idxToPosition","idx","lastFoldEndColumn","RangeList","$bias","pointIndex","excludeEdges","startIndex","addList","removed","substractPoint","containsPoint","rangeAtPoint","clipped","removeAll","lineDif","Fold","subFolds","subFold","collapseChildren","addSubFold","consumePoint","afterStart","firstConsumed","consumedFolds","restoreRange","restorePoint","Folding","side","getFoldsInRange","foldLines","$foldData","foundFolds","getFoldsInRangeList","getAllFolds","trim","lastFold","startFoldLine","getNextFoldLine","getFoldedRowCount","$addFoldLine","added","$clipRangeToDocument","startFold","endFold","removeFolds","$updateWrapData","$updateRowLengthCache","$modified","addFolds","$updating","cloneFolds","foldAll","expandFolds","unfold","expandInner","outermostFolds","isRowFolded","startFoldRow","getRowFoldEnd","getRowFoldStart","getFoldDisplayLine","textLine","lastColumn","$cloneFoldData","fd","toggleFold","tryToUnfold","bracketPos","getCommentFoldRange","depth","getFoldWidget","getFoldWidgetRange","foldToLevel","foldAllComments","$foldStyles","$foldStyle","setFoldStyle","$foldMode","$setFolding","foldMode","$updateFoldWidgets","$tokenizerUpdateFoldWidgets","updateFoldWidgets","tokenizerUpdateFoldWidgets","ignoreCurrent","fw","children","siblings","$toggleFoldWidget","toggleFoldWidget","toggleParent","BracketMatch","chr","charBeforeCursor","$findClosingBracket","getMatchingBracketRanges","bracketsRegExp","$brackets","typeRe","openBracket","valueIndex","closingBracket","valueLength","getMatchingTags","$findTagName","$findClosingTag","$findOpeningTag","found","backward","prevToken","currentTag","openTagStart","openTagName","foundOpenTagEnd","openTagEnd","closeTagStart","closeTagName","closeTagEnd","openTag","closeTag","stepCount","tmpToken","TextMode","EditSession","$breakpoints","$decorations","$frontMarkers","$backMarkers","$markerId","$undoSelect","$uid","bgTokenizer","onChangeFold","setMode","destroyed","resetCaches","$resetRowCache","cacheArray","low","mid","$rowLengthCache","removedFolds","$updateInternalDataOnChange","$undoManager","mergeUndoDeltas","$informUndoManager","setUndoManager","JSON","parse","undoManager","history","editSession","setAnnotations","setBreakpoints","breakpoints","setScrollLeft","setScrollTop","scrollTop","$scrollLeft","$scrollTop","$syncInformUndoManager","markUndoGroup","$defaultUndoManager","setUseSoftTabs","$useSoftTabs","$indentWithTabs","setTabSize","$tabSize","setNavigateWithinSoftTabs","navigateWithinSoftTabs","$navigateWithinSoftTabs","setOverwrite","overwrite","$overwrite","toggleOverwrite","addGutterDecoration","removeGutterDecoration","getBreakpoints","clearBreakpoints","setBreakpoint","clearBreakpoint","inFront","addDynamicMarker","markerId","getMarkers","highlight","$searchHighlight","highlightLines","getAnnotations","clearAnnotations","inToken","wordRange","setUseWorker","useWorker","getUseWorker","$useWorker","onReloadTokenizer","$onChangeMode","$modeId","$isPlaceholder","oldMode","$stopWorker","$startWorker","attachToSession","wrapMethod","$wrapMethod","foldingRules","terminate","getMode","isNaN","getScrollLeft","getScreenWidth","$computeWidth","getLineWidgetMaxWidth","screenWidth","lineWidgetsWidth","lineWidgetWidth","force","$wrapLimit","longestScreenLine","foldIndex","foldStart","$getStringScreenWidth","$getUndoSelection","setUndoSelect","enable","isUndo","fromRange","toPosition","toRange","collDiff","oldStart","newStart","indentRows","indentString","outdentRows","rowRange","deleteRange","$moveLines","$clipRowToDocument","moveLinesUp","moveLinesDown","duplicateLines","$clipColumnToRow","setUseWrapMode","useWrapMode","setWrapLimitRange","$wrapLimitRange","adjustWrapLimit","desiredLimit","$printMargin","limits","wrapLimit","$constrainWrapLimit","getWrapLimit","setWrapLimit","limit","getWrapLimitRange","foldLineBefore","wrapData","walkTokens","$getDisplayTokens","PLACEHOLDER_START","PLACEHOLDER_BODY","$computeWrapSplits","displayLength","lastSplit","lastDocSplit","isCode","$wrapAsCode","indentedSoftWrap","$indentedSoftWrap","maxIndent","addSplit","indentation","SPACE","TAB","TAB_SPACE","getWrapIndent","minSplit","PUNCTUATION","CHAR_EXT","CHAR","maxScreenColumn","screenColumn","getRowLength","getRowLineCount","getRowWrapIndent","getScreenLastRowColumn","documentToScreenColumn","getDocumentLastRowColumn","docColumn","getRowSplitData","screenToDocumentRow","screenToDocumentColumn","rowLength","doCache","maxRow","foldStartRow","wrapRow","screenRowOffset","getScreenLength","screenRows","$getWidgetScreenLength","$setFontMetrics","fm","$enableVarChar","getCharacterWidth","wrap","$wrap","firstLineNumber","useSoftTabs","foldStyle","Search","$matchIterator","sr","sc","er","ec","skipCurrent","findAll","needle","$assembleRegExp","$isMultiLine","prevRange","replacement","preserveCase","$disableFakeMultiline","caseSensitive","$supportsUnicodeFlag","wholeWord","wordBoundary","firstChar","needleArray","lastChar","addWordBoundary","$assembleMultilineRegExp","backwards","forEachInLine","MultiHashHandler","$singleCommand","commandKeyBinding","addCommands","addCommand","removeCommand","bindKey","_buildKeyHash","keepCommand","ckb","keyId","cmdGroup","keyPart","chain","binding","parseKeys","_addCommandToBinding","removeCommands","bindKeys","keyList","$keyChain","isDefault","HashHandler","CommandManager","byName","$checkCommandState","isAvailable","returnValue","toggleRecording","$inReplay","recording","macro","$addCommandToMacro","oldMacro","replay","trimMacro","mac","description","showSettingsMenu","showErrorMarker","scrollIntoView","centerSelection","gotoLine","prompt","$type","multiSelectAction","getAllRanges","findNext","findPrevious","aceCommandGroup","navigateFileStart","navigateUp","times","navigateFileEnd","navigateDown","navigateWordLeft","navigateLineStart","navigateLeft","navigateWordRight","navigateLineEnd","navigateRight","selectPageDown","scrollPageDown","gotoPageDown","selectPageUp","scrollPageUp","gotoPageUp","jumpToMatching","passEvent","$copyWithEmptySelection","$handlePaste","duplicateSelection","sortLines","modifyNumber","copyLinesUp","copyLinesDown","removeToLineStart","removeToLineEnd","removeWordLeft","removeWordRight","blockOutdent","blockIndent","splitLine","transposeLetters","transposeSelections","autoIndent","openLink","firstLineEndCol","selectedCount","insertLine","curLine","newRanges","exitMultiSelectMode","LineWidgets","widgetManager","updateOnChange","renderWidgets","measureWidgets","_changedWidgets","$onChangeEditor","updateOnFold","_inDocument","removeLineWidget","$updateRows","noWidgets","$oldWidget","$registerLineWidget","addLineWidget","zIndex","coverGutter","pixelHeight","$fold","onWidgetChanged","w1","getWidgetsAtRow","updateFull","changedWidgets","fixedWidth","ceil","coverLine","gutterWidth","fullWidth","padding","scrollBar","GutterKeyboardHandler","gutterLayer","activeRowIndex","activeLane","annotationTooltip","$onGutterKeyDown","$blurGutter","isRowVisible","scrollToLine","$rowToRowIndex","$cursorCell","nearestFoldIndex","$findNearestFoldWidget","nearestAnnotationIndex","$findNearestAnnotation","$focusAnnotation","$focusFoldWidget","$handleGutterKeyboardInteraction","GutterKeyboardEvent","lane","$switchLane","$rowIndexToRow","rowFoldingWidget","$blurFoldWidget","cells","childNodes","$moveFoldWidgetDown","$moveAnnotationDown","$moveFoldWidgetUp","$moveAnnotationUp","$blurAnnotation","$isFoldWidgetVisible","isRowFullyVisible","isIconVisible","$getFoldWidget","$isAnnotationVisible","$getAnnotation","foldWidget","keyboardFocusClassName","desinationLane","annotationIndex","foldWidgetIndex","cell","gutterKeyboardHandler","getKey","getRow","isInAnnotationLane","isInFoldLane","defaultCommands","Editor","getContainerElement","getTextAreaContainer","textarea","keyBinding","$search","$historyTracker","$initOperationListeners","_$emitInputEvent","setSession","$opResetTimer","$lastSel","commandEvent","prevOp","previousCommand","scrollSelectionIntoView","animateScrolling","sel","$mergeUndoDeltas","prev","mergeableCommands","$mergeableCommands","shouldMerge","mergeNextCommand","sequenceStartTime","keyboardHandler","$keybindingId","oldSession","$onDocumentChange","$onTokenizerUpdate","$onChangeTabSize","$onChangeWrapLimit","$onChangeWrapMode","$onChangeFold","$onChangeFrontMarker","$onChangeBackMarker","$onChangeBreakpoint","$onChangeAnnotation","$onCursorChange","$onScrollTopChange","$onScrollLeftChange","$onSelectionChange","onDocumentChange","onChangeMode","onTokenizerUpdate","onChangeTabSize","onChangeWrapLimit","onChangeWrapMode","onChangeFrontMarker","onChangeBackMarker","onChangeBreakpoint","onChangeAnnotation","onCursorChange","onScrollTopChange","onScrollLeftChange","onSelectionChange","oldEditor","getSession","resize","onResize","getTheme","getFontSize","setFontSize","$highlightBrackets","$highlightPending","$bracketHighlight","markerIds","$getDirectionForHighlight","tagNamesRanges","getMatching","markerType","getHighlightIndentGuides","$textLayer","$highlightIndentGuide","$isFocused","showCursor","visualizeFocus","hideCursor","visualizeBlur","$cursorChange","updateCursor","$updateHighlightActiveLine","updateLines","scrollToY","scrollToX","$highlightActiveLine","$selectionStyle","$selectionColorConflict","$maxLines","$minLines","$highlightLineMarker","$selectionMarker","$highlightSelectedWord","$getSelectionHighLightRegexp","wordWithBoundary","updateFrontMarkers","updateBackMarkers","updateBreakpoints","updateText","getSelectedText","nl","copyLine","inVirtualSelectionMode","isFullLine","getBehavioursEnabled","lineState","shouldOutdent","$enableAutoIndent","lineIndent","prevLineState","currIndent","composition","applyComposition","forEachSelection","setScrollSpeed","getScrollSpeed","setDragDelay","setSelectionStyle","setHighlightActiveLine","shouldHighlight","getHighlightActiveLine","setHighlightGutterLine","getHighlightGutterLine","setHighlightSelectedWord","getHighlightSelectedWord","setAnimatedScroll","shouldAnimate","getAnimatedScroll","getShowInvisibles","setDisplayIndentGuides","getDisplayIndentGuides","setHighlightIndentGuides","setShowPrintMargin","showPrintMargin","getShowPrintMargin","setPrintMarginColumn","getPrintMarginColumn","setBehavioursEnabled","enabled","setWrapBehavioursEnabled","setShowFoldWidgets","getShowFoldWidgets","setFadeFoldWidgets","fade","getFadeFoldWidgets","new_range","setGhostText","removeGhostText","originalRange","$getSelectedRows","getNumberAt","_numberRx","amount","charRange","isFinite","nr","fp","decimals","nnr","toFixed","replaceRange","toggleWord","currWordStart","wordParts","curLength","itLength","that","reg","wordPairs","$toggleWordPairs","negate","firstCondition","res","findLinkAt","columnPosition","previousPosition","currentPosition","wordParts_1","wordParts_1_1","endPoint","moved","totalDiff","rangeIndex","subRows","compositionState","showComposition","setCompositionText","hideComposition","getFirstVisibleRow","getLastVisibleRow","getFirstFullyVisibleRow","getLastFullyVisibleRow","$getVisibleRowCount","getScrollBottomRow","getScrollTopRow","$moveByPage","scrollToRow","center","animate","alignCursor","getCursorPositionScreen","expand","tokenCount","matchType","bracketType","brackets","tagsRanges","lineNumber","navigateTo","replaced","$tryReplace","replaceAll","getLastSearchOptions","newRange","revealRange","setAutoScrollEditorIntoView","shouldScroll","$scrollAnchor","scrollAnchor","onChangeSelection","onBeforeRender","onAfterRender","searchBox","$pixelPos","$cursorStyle","cursorLayer","setSmoothBlinking","isBlinking","selectionStyle","highlightActiveLine","highlightSelectedWord","copyWithEmptySelection","behavioursEnabled","wrapBehavioursEnabled","enableAutoIndent","autoScrollEditorIntoView","showLineNumbers","setShowLineNumbers","$loop","CHANGE_GUTTER","$relativeLineNumbers","relativeNumberRenderer","relativeLineNumbers","$showLineNumbers","$updatePlaceholder","hasValue","$composition","placeholderNode","$placeholder","content","blurCommand","focusOnEnterKeyup","customScrollbar","hScrollBarAlwaysVisible","vScrollBarAlwaysVisible","highlightGutterLine","animatedScroll","printMarginColumn","printMargin","fadeFoldWidgets","showFoldWidgets","displayIndentGuides","highlightIndentGuides","showGutter","fontFamily","maxLines","minLines","scrollPastEnd","fixedWidthGutter","hasCssTransforms","maxPixelHeight","useResizeObserver","useSvgGutterIcons","showFoldedAnnotations","getText","lastLineNumber","$renderer","Lines","canvasHeight","cellCache","$offsetCoefficient","moveContainer","firstRowScreen","pageChanged","oldConfig","newConfig","computeLineTop","screenTop","screenPage","computeLineHeight","$cacheCell","fragment","insertAdjacentElement","createCell","initElement","Gutter","parentEl","$showFoldWidgets","$updateAnnotations","rowInfo","annoText","annoType","gutterOffset","oldLastRow","$updateCursorRow","onCreateCell","$renderCell","$updateGutterWidth","gutterRenderer","$firstLineNumber","lastLineText","$fixedWidth","$padding","$computePadding","$highlightGutterLine","$cursorRow","updateLineHighlight","scrollLines","$renderLines","textNode","annotationNode","annotationIconNode","decorations","rowText","foldClass","isClosedFold","foldAnnotationClass","annotationInFold","foldRange","getShowLineNumbers","paddingLeft","borderRightWidth","paddingRight","Marker","setPadding","setMarkers","markers","elt","css","$getTop","drawFullLineMarker","drawScreenLineMarker","drawTextMarker","drawMultiLineMarker","childElementCount","lastChild","stringBuilder","extraStyle","curr","lineRange","range1","drawBidiSingleLineMarker","radiusClass","extraLength","textTokens","Set","isTextToken","tokenType","has","Text","$updateEolChar","EOL_CHAR","EOL_CHAR_LF","EOL_CHAR_CRLF","margin","getLineHeight","$fontMetrics","measure","$pollSizeChanges","checkForSizeChanges","$pollSizeChangesTimer","$computeTabString","showSpaces","showTabs","showEOL","$highlightIndentGuides","tabStr","$tabStrings","span","TAB_CHAR","$indentGuideRe","spaceClass","spaceContent","SPACE_CHAR","tabClass","tabContent","lineElements","lineElementsIdx","heightChanged","lineElement","$renderLine","$renderLinesFragment","lineEl","$useLineGroups","$renderToken","valueFragment","simpleSpace","controlCharacter","cjkSpace","cjk","cloneNode","renderIndentGuide","cols","$highlightIndentGuideMarker","indentLevel","initialIndent","elementIndentLevel","currentIndent","$renderHighlightIndentGuide","$clearActiveIndentGuide","$setIndentGuideActive","$createLineElement","$renderWrappedLine","splitChars","$renderOverflowMessage","$renderSimpleLine","overflowEl","$getFoldLineTokens","lastLineEl","invisibleEl","EOF_CHAR","renderTokens","addTokens","Cursor","isVisible","blinkInterval","smoothBlinking","cursors","addCursor","$updateCursors","$updateOpacity","$startCssAnimation","animationDuration","$isAnimating","$stopCssAnimation","blinking","restartTimer","setBlinkInterval","removeCursor","intervalId","timeoutId","$isSmoothBlinking","blink","onScreen","isCursorInView","pixelPos","$selectionMarkers","cursorIndex","drawCursor","$setOverwrite","MAX_SCROLL_H","Scrollbar","classSuffix","setVisible","skipEvent","onScroll","coeff","VScrollBar","$scrollbarWidth","$minWidth","setHeight","setScrollHeight","setInnerHeight","HScrollBar","setWidth","setInnerWidth","setScrollWidth","ScrollBar","ScrollBarV","ScrollBarH","VScrollWidth","HScrollHeight","eType","mousePageY","startTop","thumbTop","scrollTopFromThumbTop","thumbHeight","pageHeight","viewHeight","slideHeight","scrollWidth","mousePageX","startLeft","thumbLeft","scrollLeftFromThumbLeft","thumbWidth","pageWidth","viewWidth","slideWidth","RenderLoop","onRender","pending","changes","$recursionLimit","_flush","change","clear","CHAR_COUNT","USE_OBSERVER","ResizeObserver","FontMetrics","$setMeasureNodeStyles","$measureNode","$addObserver","isRoot","visibility","font","$measureSizes","fontWeight","boldSize","charSizes","allowBoldFonts","$observer","observe","setPolling","disconnect","$getZoom","$initTransformMeasureNodes","transformCoordinates","clientPos","elPos","mul","solve","l1","l2","det","sub","m2","ut","u","f","Decorator","canvas","pixelRatio","heightRatio","canvasWidth","minDecorationHeight","halfMinDecorationHeight","colors","dark","light","$updateDecorators","ctx","getContext","clearRect","priorities","compensateFold","compensateFoldRows","currentY","y1","y2","yCenter","fillStyle","fillRect","GutterLayer","MarkerLayer","TextLayer","CursorLayer","HScrollBarCustom","VScrollBarCustom","editorCss","VirtualRenderer","onGutterResize","$markerBack","textLayer","$markerFront","$horizScroll","$vScroll","$scrollAnimation","scrollMargin","updateCharacterSize","$size","scrollerHeight","scrollerWidth","$dirty","minHeight","v","$renderChanges","defaultView","CHANGE_FULL","$addResizeObserver","$allowBoldFonts","$updatePrintMargin","onChangeNewLineMode","$changedLines","CHANGE_LINES","CHANGE_TEXT","CHANGE_MARKER","updateFontSize","$updateSizeAsync","resizing","$updateCachedSize","$resizeTimer","$changes","$customScrollbar","$updateCustomScrollbar","$extraHeight","oldSize","CHANGE_SIZE","CHANGE_SCROLL","$showGutter","$computeLayerConfig","availableWidth","$showPrintMargin","$printMarginColumn","$animatedScroll","getShowGutter","setShowGutter","$printMarginEl","containerEl","posTop","posLeft","setScrollMargin","sm","setMargin","getHScrollBarAlwaysVisible","$hScrollBarAlwaysVisible","setHScrollBarAlwaysVisible","alwaysVisible","getVScrollBarAlwaysVisible","$vScrollBarAlwaysVisible","setVScrollBarAlwaysVisible","$updateScrollBarV","$scrollPastEnd","$updateScrollBarH","freeze","$frozen","unfreeze","CHANGE_H_SCROLL","st","$scrollDecorator","$updateLines","CHANGE_CURSOR","CHANGE_MARKER_FRONT","CHANGE_MARKER_BACK","$autosize","desiredHeight","$maxPixelHeight","$gutterWidth","hideScrollbars","longestLine","$getLongestLine","horizScroll","hScrollChanged","vScrollBefore","vScrollChanged","firstRowHeight","lineCount","charCount","_rows","$viewMargin","newLeft","newTop","topMargin","bottomMargin","$stopAnimation","currentTop","currentLeft","twoCharsWidth","alignment","$calcSteps","fromValue","toValue","x_min","STEPS","steps","initialScroll","oldSteps","$timer","endAnimation","scrollTo","canvasPos","$hasCssTransforms","$blockCursor","$useTextareaForIME","addToken","removeExtraToken","insertPosition","textLines","$ghostText","$ghostTextWidget","pixelPosition","ghostTextHeight","newToken","$themeId","$theme","setMouseCursor","attachToShadowRoot","$resizeObserver","contentRect","workerUrl","Worker","blob","Blob","blobBuilder","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","getBlob","$workerBlob","blobURL","URL","webkitURL","createObjectURL","WorkerClient","worker","$createWorkerFromOldConfig","$sendDeltaQueue","changeListener","onMessage","callbackId","callbacks","onmessage","topLevelNamespaces","classname","importScripts","nameToUrl","toUrl","normalizePath","$normalizePath","tlns","deltaQueue","onerror","$doc","cmd","emit","ex","attachToDocument","q","UIWorkerClient","main","emitSync","sender","messageBuffer","workerClient","processNext","setEmitSync","Main","PlaceHolder","others","mainClass","othersClass","$onUpdate","onUpdate","$others","undoStack","$undoStackDepth","setup","other","showOtherMarkers","othersActive","hideOtherMarkers","updateAnchors","lengthDiff","inMainRange","distanceFromStart","newPos","otherPos","updateMarkers","updateMarker","undosRequired","isSamePoint","alt","ctrl","accel","selectionMode","isMultiSelect","mouseX","mouseY","screenAnchor","screenCursor","$enableJumpToDef","$blockSelectEnabled","addSelectionMarker","oldRange","removeSelectionMarker","tmpSel","rectSel","blockSelect","newCursor","removeSelectionMarkers","rectangularRangeBlock","updateSelectionMarkers","onSelectionInterval","selectMoreLines","selectMore","joinSelections","splitIntoLines","alignCursors","multiSelectCommands","getSelectionMarkers","$blockChangeEvents","$onAddRange","$onRemoveRange","mergeOverlappingRanges","lastRange","$initRangeList","toggleBlockSelection","includeEmptyLines","xBackwards","startOffsetX","endOffsetX","docEnd","yBackwards","MultiSelect","$multiselectOnSessionChange","$onMultiSelect","$onSingleSelect","onSessionChange","$checkMultiselectChange","altCursor","altDown","addAltCursorListeners","selectionMarkerCount","markerList","$onMultiSelectExec","inVirtualMode","keepOrder","$byLines","cmdResult","anim","buf","additive","skip","screenLead","toRemove","tmp_1","words","stopAtFirst","sameRowRanges","maxCol","minSpace","spaceOffsets","spaceOffset","fr","lr","guessRange","$reAlignText","forceLeft","startW","textW","endW","isLeftAligned","isRightAligned","alignLeft","enableMultiselect","enableBlockSelect","FoldMode","foldingStartMarker","foldingStopMarker","indentationBlock","startLevel","openingBracketBlock","closingBracketBlock","oldWidget","gutterAnno","comparator","binarySearch","matched","findAnnotations","arrow","onmousedown","Renderer","edit","_id","env","tagName","oldNode","createEditSession","VARIABLES","CURRENT_WORD","SELECTION","CURRENT_LINE","PREV_LINE","LINE_INDEX","LINE_NUMBER","SOFT_TABS","TAB_SIZE","CLIPBOARD","FILENAME","FILEPATH","FILENAME_BASE","DIRECTORY","WORKSPACE_NAME","FULLNAME","BLOCK_COMMENT_START","BLOCK_COMMENT_END","LINE_COMMENT","CURRENT_YEAR","date","year","CURRENT_YEAR_SHORT","CURRENT_MONTH","month","CURRENT_MONTH_NAME","CURRENT_MONTH_NAME_SHORT","CURRENT_DATE","day","CURRENT_DAY_NAME","weekday","CURRENT_DAY_NAME_SHORT","CURRENT_HOUR","hour","hour12","CURRENT_MINUTE","minute","CURRENT_SECOND","second","dateFormat","toLocaleString","SELECTED_TEXT","SnippetManager","snippetMap","snippetNameMap","variables","createTokenizer","TabstopToken","tabstopId","formatMatcher","fmtString","guard","snippetVar","choices","operator","formatString","expectElse","ifEnd","elseEnd","changeCase","local","formatStringVar","formatFunction","tokenizeTmSnippet","getVariableValue","tmStrFormat","fmt","fmtTokens","formatted","oldArgs","fmtParts","resolveVariables","gChangeCase","tmFormatFunction","snippet","afterNewLine","gotoNext","getDisplayTextForSnippet","snippetText","processSnippetText","insertSnippetForSelection","processedSnippet","tabstopManager","TabstopManager","selectionId","addTabstops","tabstops","insertSnippet","tabNext","$getScope","inlinePhp","getActiveScopes","scopes","includeScopes","expandWithTab","expandSnippetForSelection","snippets","findMatchingSnippet","dryRun","replaceBefore","replaceAfter","M__","matchBefore","T__","matchAfter","snippetList","startRe","endRe","triggerRe","endTriggerRe","register","wrapRegexp","guardedRegexp","addSnippet","unregister","tabTrigger","trigger","endTrigger","endGuard","removeSnippet","nameMap","parseSnippetFile","guardRe","getSnippetByName","tabString","excludeExtraIndent","parents","expanding","copyValue","$onChangeSelection","$onChangeSession","onChangeSession","$onAfterExec","onAfterExec","$openTabstops","selectedTabstop","removeTabstopMarkers","isRemove","active","parentActive","removeRange","$inChange","updateLinkedFields","hasLinkedRanges","firstNonLinked","linked","snippetManager","containsLead","containsAnchor","selectTabstop","updateTabstopMarkers","addTabstopMarkers","useLink","moveRelative","arg","snippetId","dest","movePoint","tabstop","currentSnippetId","expandSnippet","getAriaId","popupAriaRole","optionAriaRole","ariaActiveState","$singleLineEditor","$highlightTagPending","AcePopup","lastMouseEvent","noop","selectionMarker","hoverMarker","setSelectOnHover","isMouseOver","setRow","setHoverMarker","selectedNode","ariaId","caption","hideHoverMarker","suppressRedraw","getHoveredRow","lower","filterText","lastI","matchMask","isTopdown","autoSelect","tryShow","forceShow","screenHeight","maxH","dims","$borderSize","spaceAbove","fitsX","topdownOnly","goTo","where","getTextLeftOffset","$imageSize","AceInlineScreenReader","screenReaderDiv","setScreenReaderContent","completer","idString","lineIndex","_lines","codeElement","createCodeBlock","AceInline","completion","inlineScreenReader","displayText","hideInlinePreview","parForEach","fn","completed","arLength","ID_REGEX","retrievePrecedingIdentifier","retrieveFollowingIdentifier","getCompletionPrefix","completers","identifierRegexps","identifierRegex","triggerAutocomplete","previousChar","triggerCharacters","util","destroyCompleter","Autocomplete","autoInsert","autoShown","exactMatch","inlineEnabled","hasSeen","showLoadingState","stickySelectionDelay","blurListener","mousedownListener","mousewheelListener","onLayoutChange","changeTimer","updateCompletions","tooltipTimer","updateDocTooltip","popupTimer","$updatePopupPosition","stickySelectionTimer","stickySelection","$firstOpenTimer","initialPosition","completionProvider","completions","FilteredList","completionsForLoading","openPopup","insertMatch","$onPopupShow","$onHidePopup","$onPopupChange","mouseOutListener","$onPopupRender","$initInline","inlineRenderer","getPopup","hideDocTooltip","$seen","onSeen","$updateGhostText","filtered","observeLayoutChanges","$elements","unObserveLayoutChanges","posGhostText","editorContainerBottom","lowestPosition","keepPopupPosition","newRow","oldRow","previousSelectedItem","tooltipNode","activated","fromTooltip","getCompletionProvider","showPopup","CompletionProvider","gatherCompletions","setFilter","completionOptions","ignoreCaption","provideCompletions","finished","emptyMessage","completionsForEmpty","completersLength","getDocTooltip","completerId","docText","docHTML","showDocTooltip","overscrollBehavior","onblur","onTooltipClick","nodeName","deleteSuffix","for","startCommand","insertByIndex","$insertString","onInsert","total","results","processResults","isImmediate","immediateResults","filterCompletions","$score","localeCompare","items","upper","loop","penalty","fullMatchIndex","wordDistance","prefixPos","getWordIndex","wordScores","currentWord","wordScore","textCompleter","keyWordCompleter","transformSnippetTooltip","record","p3","snippetCompleter","setCompleters","addCompleter","lastExecEvent","loadSnippetsForMode","files","loadSnippetFile","snippetFileId","modes","snippetFilePath","doLiveAutocomplete","hasCompleter","$liveAutocompletionDelay","liveAutocompleteTimer","showLiveAutocomplete","$liveAutocompletionThreshold","enableBasicAutocompletion","enableLiveAutocompletion","liveAutocompletionDelay","liveAutocompletionThreshold","enableSnippets","Split","$createEditor","$editorCSS","$container","$editors","$fontSize","setSplits","$splits","getSplits","getEditor","getCurrentEditor","$cEditor","keybinding","$cloneSession","isUsed","getOrientation","$orientation","setOrientation","orientation","BESIDE","editorWidth","editorHeight","BELOW","JsDocCommentHighlightRules","getTagRule","getStartRule","getEndRule","DocCommentHighlightRules","identifierRe","JavaScriptHighlightRules","keywordMapper","escapedRe","comments","noES6","no_regex","jsx","JSX","tagRegex","jsxTag","jsxJsRule","jsxAttributes","reference","MatchingBraceOutdent","BaseFoldMode","commentRegex","singleLineBlockCommentRe","tripleStarBlockCommentRe","startRegionRe","_getFoldWidgetBase","forceMultiline","getCommentRegionBlock","getSectionRange","startIndent","subRange","CStyleFoldMode","$outdent","tokenizedLine","endState","diff_match_patch","Diff_Timeout","Diff_EditCost","Match_Threshold","Match_Distance","Patch_DeleteThreshold","Patch_Margin","Match_MaxBits","DIFF_DELETE","Diff","op","diff_main","text1","text2","opt_checklines","opt_deadline","getTime","deadline","checklines","commonlength","diff_commonPrefix","commonprefix","diff_commonSuffix","commonsuffix","diffs","diff_compute_","diff_cleanupMerge","longtext","shorttext","hm","diff_halfMatch_","text1_a","text1_b","text2_a","text2_b","mid_common","diffs_a","diffs_b","diff_lineMode_","diff_bisect_","diff_linesToChars_","chars1","chars2","linearray","lineArray","diff_charsToLines_","diff_cleanupSemantic","pointer","count_delete","count_insert","text_delete","text_insert","subDiff","text1_length","text2_length","max_d","v_offset","v_length","v1","v2","front","k1start","k1end","k2start","k2end","k1","k1_offset","x1","k2_offset","x2","diff_bisectSplit_","k2","text1a","text2a","text1b","text2b","diffsb","lineHash","diff_linesToCharsMunge_","lineStart","lineArrayLength","pointermin","pointermax","pointermid","pointerstart","pointerend","diff_commonOverlap_","text_length","best","pattern","dmp","diff_halfMatchI_","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","seed","best_common","prefixLength","suffixLength","hm1","hm2","equalities","equalitiesLength","lastEquality","length_insertions1","length_deletions1","length_insertions2","length_deletions2","diff_cleanupSemanticLossless","deletion","insertion","overlap_length1","overlap_length2","diff_cleanupSemanticScore_","one","two","char1","char2","nonAlphaNumeric1","nonAlphaNumericRegex_","nonAlphaNumeric2","whitespace1","whitespaceRegex_","whitespace2","lineBreak1","linebreakRegex_","lineBreak2","blankLine1","blanklineEndRegex_","blankLine2","blanklineStartRegex_","equality1","equality2","commonOffset","commonString","bestEquality1","bestEdit","bestEquality2","bestScore","diff_cleanupEfficiency","pre_ins","pre_del","post_ins","post_del","diff_xIndex","loc","last_chars1","last_chars2","diff_prettyHtml","pattern_amp","pattern_lt","pattern_gt","pattern_para","diff_text1","diff_text2","diff_levenshtein","levenshtein","insertions","deletions","diff_toDelta","encodeURI","diff_fromDelta","diffsLength","decodeURI","match_main","match_bitap_","match_alphabet_","match_bitapScore_","accuracy","proximity","score_threshold","best_loc","bin_min","bin_mid","matchmask","last_rd","bin_max","finish","rd","charMatch","patch_addContext_","patch","start2","length1","start1","length2","patch_make","opt_b","opt_c","patches","patch_obj","patchDiffLength","char_count1","char_count2","prepatch_text","postpatch_text","diff_type","diff_text","patch_deepCopy","patchesCopy","patchCopy","patch_apply","nullPadding","patch_addPadding","patch_splitMax","start_loc","expected_loc","end_loc","index2","index1","paddingLength","patch_size","bigpatch","precontext","empty","postcontext","patch_toText","patch_fromText","textline","textPointer","patchHeader","sign","HASH_UNDEFINED","INFINITY","funcTag","genTag","symbolTag","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reEscapeChar","reIsHostCtor","freeGlobal","freeSelf","Function","arrayProto","funcProto","objectProto","coreJsData","maskSrcKey","uid","IE_PROTO","funcToString","objectToString","reIsNative","Map","getNative","nativeCreate","symbolProto","symbolToString","Hash","entries","entry","ListCache","MapCache","assocIndexOf","baseGet","object","isSymbol","isKey","stringToPath","toKey","baseIsNative","isObject","isFunction","isHostObject","toSource","getMapData","__data__","isKeyable","memoize","baseToString","resolver","memoized","Cache","isObjectLike","defaultValue","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","reIsUint","typedArrayTags","freeExports","freeModule","moduleExports","freeProcess","process","nodeUtil","nodeIsTypedArray","isTypedArray","arraySome","mapToArray","setToArray","nativeObjectToString","Buffer","Uint8Array","propertyIsEnumerable","symToStringTag","toStringTag","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","isBuffer","nativeKeys","DataView","WeakMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolValueOf","valueOf","SetCache","Stack","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","iteratee","baseTimes","isIndex","eq","baseGetTag","isOwn","unmasked","getRawTag","baseIsArguments","baseIsEqual","bitmask","customizer","equalFunc","objIsArr","othIsArr","objTag","getTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","byteLength","byteOffset","buffer","convert","isPartial","stacked","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","getAllKeys","objLength","othProps","othLength","skipCtor","objValue","othValue","compared","objCtor","othCtor","equalObjects","baseIsEqualDeep","isMasked","baseKeys","Ctor","isPrototype","arrLength","seen","arrValue","othIndex","keysFunc","symbolsFunc","arrayPush","baseGetAllKeys","getSymbols","pairs","LARGE_ARRAY_SIZE","resIndex","arrayFilter","symbol","ArrayBuffer","ctorString","isLength","baseUnary","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","bigint","bool","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","ace_builds_1","React","editorOptions_1","getAceInstance","ReactAce","editorEvents","debounce","isInShadow","componentDidMount","onBeforeLoad","onValidate","wrapEnabled","refEditor","editorProps","debounceChangePeriod","navigateToFileEnd","updatePlaceholder","handleMarkers","availableOptions","editorOptions","handleOptions","componentDidUpdate","prevProps","oldProps","nextProps","appliedClassesArray_1","oldClass","valueChanged","silent","cursorStart","handleScrollMargins","margins","componentWillUnmount","currentMarkers","showPlaceholder","updateRef","render","divStyle","__assign","ref","propTypes","defaultProps","Component","split_1","DiffMatchPatch","DiffComponent","lhString","rhString","diffedLines","generateDiffedLines","setCodeMarkers","C","chunkType","linesToHighlight","codeEditorSettings","newMarkerSet","markerObj","acequire","ace_1","ext_split_1","SplitComponent","splitEditor","defaultValueForEditor","valueForEditor","newAnnotations","newMarkers","sp","nextValue","oldAnnotations","oldMarkers","value_1","value_2","value_3"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/780.c1ef71a3.chunk.js b/static/js/780.2d7a4384.chunk.js similarity index 79% rename from static/js/780.c1ef71a3.chunk.js rename to static/js/780.2d7a4384.chunk.js index 689c0f2..10dc8ff 100644 --- a/static/js/780.c1ef71a3.chunk.js +++ b/static/js/780.2d7a4384.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[780],{780:(n,e,s)=>{s.r(e),s.d(e,{default:()=>t});var a=s(5117),i=s(5043),r=s(5369),c=s(579);const d=()=>(0,c.jsxs)(a.es,{children:[(0,c.jsx)(a.b7,{name:"App",children:(0,c.jsx)(a.uA,{name:"Loader",children:(0,c.jsx)(a.KT,{children:(0,c.jsx)(l,{})})})}),(0,c.jsx)(r.A,{})]});function l(){return(0,c.jsx)(i.Fragment,{children:"Loading..."})}const t=()=>(0,c.jsx)(a.m8,{palette:(0,c.jsx)(d,{})})}}]); -//# sourceMappingURL=780.c1ef71a3.chunk.js.map \ No newline at end of file +"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[780],{780:(n,e,s)=>{s.r(e),s.d(e,{default:()=>t});var a=s(5117),i=s(5043),r=s(2802),c=s(579);const d=()=>(0,c.jsxs)(a.es,{children:[(0,c.jsx)(a.b7,{name:"App",children:(0,c.jsx)(a.uA,{name:"Loader",children:(0,c.jsx)(a.KT,{children:(0,c.jsx)(l,{})})})}),(0,c.jsx)(r.A,{})]});function l(){return(0,c.jsx)(i.Fragment,{children:"Loading..."})}const t=()=>(0,c.jsx)(a.m8,{palette:(0,c.jsx)(d,{})})}}]); +//# sourceMappingURL=780.2d7a4384.chunk.js.map \ No newline at end of file diff --git a/static/js/780.c1ef71a3.chunk.js.map b/static/js/780.2d7a4384.chunk.js.map similarity index 96% rename from static/js/780.c1ef71a3.chunk.js.map rename to static/js/780.2d7a4384.chunk.js.map index 2fa69a0..6b39002 100644 --- a/static/js/780.c1ef71a3.chunk.js.map +++ b/static/js/780.2d7a4384.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/780.c1ef71a3.chunk.js","mappings":"+LAIO,MAAMA,EAAcA,KACvBC,EAAAA,EAAAA,MAACC,EAAAA,GAAO,CAAAC,SAAA,EACJC,EAAAA,EAAAA,KAACC,EAAAA,GAAQ,CAACC,KAAK,MAAKH,UAChBC,EAAAA,EAAAA,KAACG,EAAAA,GAAS,CAACD,KAAK,SAAQH,UACpBC,EAAAA,EAAAA,KAACI,EAAAA,GAAO,CAAAL,UACJC,EAAAA,EAAAA,KAACK,EAAsB,WAInCL,EAAAA,EAAAA,KAACM,EAAAA,EAAU,OAIZ,SAASD,IACZ,OACIL,EAAAA,EAAAA,KAACO,EAAAA,SAAQ,CAAAR,SAAC,cAElB,CClBA,MAOA,EAP0BS,KAElBR,EAAAA,EAAAA,KAACS,EAAAA,GAAQ,CAACC,SAASV,EAAAA,EAAAA,KAACJ,EAAW,K","sources":["dev/palette.tsx","dev/previews.tsx"],"sourcesContent":["import {Fragment} from \"react\";\r\nimport {Category, Component, Palette, Variant,} from \"@react-buddy/ide-toolbox\";\r\nimport MUIPalette from \"@react-buddy/palette-mui\";\r\n\r\nexport const PaletteTree = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport function ExampleLoaderComponent() {\r\n return (\r\n Loading...\r\n );\r\n}","import {Previews} from \"@react-buddy/ide-toolbox\";\r\nimport {PaletteTree} from \"./palette\";\r\n\r\nconst ComponentPreviews = () => {\r\n return (\r\n }>\r\n \r\n );\r\n};\r\n\r\nexport default ComponentPreviews;"],"names":["PaletteTree","_jsxs","Palette","children","_jsx","Category","name","Component","Variant","ExampleLoaderComponent","MUIPalette","Fragment","ComponentPreviews","Previews","palette"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/780.2d7a4384.chunk.js","mappings":"+LAIO,MAAMA,EAAcA,KACvBC,EAAAA,EAAAA,MAACC,EAAAA,GAAO,CAAAC,SAAA,EACJC,EAAAA,EAAAA,KAACC,EAAAA,GAAQ,CAACC,KAAK,MAAKH,UAChBC,EAAAA,EAAAA,KAACG,EAAAA,GAAS,CAACD,KAAK,SAAQH,UACpBC,EAAAA,EAAAA,KAACI,EAAAA,GAAO,CAAAL,UACJC,EAAAA,EAAAA,KAACK,EAAsB,WAInCL,EAAAA,EAAAA,KAACM,EAAAA,EAAU,OAIZ,SAASD,IACZ,OACIL,EAAAA,EAAAA,KAACO,EAAAA,SAAQ,CAAAR,SAAC,cAElB,CClBA,MAOA,EAP0BS,KAElBR,EAAAA,EAAAA,KAACS,EAAAA,GAAQ,CAACC,SAASV,EAAAA,EAAAA,KAACJ,EAAW,K","sources":["dev/palette.tsx","dev/previews.tsx"],"sourcesContent":["import {Fragment} from \"react\";\r\nimport {Category, Component, Palette, Variant,} from \"@react-buddy/ide-toolbox\";\r\nimport MUIPalette from \"@react-buddy/palette-mui\";\r\n\r\nexport const PaletteTree = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport function ExampleLoaderComponent() {\r\n return (\r\n Loading...\r\n );\r\n}","import {Previews} from \"@react-buddy/ide-toolbox\";\r\nimport {PaletteTree} from \"./palette\";\r\n\r\nconst ComponentPreviews = () => {\r\n return (\r\n }>\r\n \r\n );\r\n};\r\n\r\nexport default ComponentPreviews;"],"names":["PaletteTree","_jsxs","Palette","children","_jsx","Category","name","Component","Variant","ExampleLoaderComponent","MUIPalette","Fragment","ComponentPreviews","Previews","palette"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/802.7276d5f7.chunk.js b/static/js/802.7276d5f7.chunk.js new file mode 100644 index 0000000..fe2b5f9 --- /dev/null +++ b/static/js/802.7276d5f7.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 802.7276d5f7.chunk.js.LICENSE.txt */ +"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[802],{5881:(e,t)=>{var o,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case a:case l:case i:case p:case m:return e;default:switch(e=e&&e.$$typeof){case d:case c:case u:case v:case h:case s:return e;default:return t}}case r:return t}}}o=Symbol.for("react.module.reference")},805:(e,t,o)=>{o(5881)},2802:(e,t,o)=>{o.d(t,{A:()=>$v});var n=o(5043),r=o(5117),a=o(8168),i=o(8587),l=o(8387),s=o(3174),c=o(8812),d=o(8698),u=o(5527),p=o(579);const m=["className","component"];var h=o(5430),v=o(7344),f=o(3375),g=o(7056);const b=(0,g.A)("MuiBox",["root"]),A=(0,v.A)(),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:o,defaultClassName:r="MuiBox-root",generateClassName:h}=e,v=(0,s.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(c.A);return n.forwardRef((function(e,n){const s=(0,u.A)(o),c=(0,d.A)(e),{className:f,component:g="div"}=c,b=(0,i.A)(c,m);return(0,p.jsx)(v,(0,a.A)({as:g,ref:n,className:(0,l.A)(f,h?h(r):r),theme:t&&s[t]||s},b))}))}({themeId:f.A,defaultTheme:A,defaultClassName:b.root,generateClassName:h.A.generate}),x=y;var w=o(2400),S=o(8606),C=o(410),k=o(2919),R=o(835),E=o(8280);const M=["ownerState"],L=["variants"],I=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function T(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const z=(0,E.A)(),P=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function N(e){let{defaultTheme:t,theme:o,themeId:n}=e;return r=o,0===Object.keys(r).length?t:o[n]||o;var r}function O(e){return e?(t,o)=>o[e]:null}function B(e,t){let{ownerState:o}=t,n=(0,i.A)(t,M);const r="function"===typeof e?e((0,a.A)({ownerState:o},n)):e;if(Array.isArray(r))return r.flatMap((e=>B(e,(0,a.A)({ownerState:o},n))));if(r&&"object"===typeof r&&Array.isArray(r.variants)){const{variants:e=[]}=r;let t=(0,i.A)(r,L);return e.forEach((e=>{let r=!0;"function"===typeof e.props?r=e.props((0,a.A)({ownerState:o},n,o)):Object.keys(e.props).forEach((t=>{(null==o?void 0:o[t])!==e.props[t]&&n[t]!==e.props[t]&&(r=!1)})),r&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,a.A)({ownerState:o},n,o)):e.style))})),t}return r}const j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:o=z,rootShouldForwardProp:n=T,slotShouldForwardProp:r=T}=e,l=e=>(0,c.A)((0,a.A)({},e,{theme:N((0,a.A)({},e,{defaultTheme:o,themeId:t}))}));return l.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:u,skipVariantsResolver:p,skipSx:m,overridesResolver:h=O(P(u))}=c,v=(0,i.A)(c,I),f=void 0!==p?p:u&&"Root"!==u&&"root"!==u||!1,g=m||!1;let b=T;"Root"===u||"root"===u?b=n:u?b=r:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(b=void 0);const A=(0,s.default)(e,(0,a.A)({shouldForwardProp:b,label:undefined},v)),y=e=>"function"===typeof e&&e.__emotion_real!==e||(0,R.Q)(e)?n=>B(e,(0,a.A)({},n,{theme:N({theme:n.theme,defaultTheme:o,themeId:t})})):e,x=function(n){let r=y(n);for(var i=arguments.length,s=new Array(i>1?i-1:0),c=1;c{const n=N((0,a.A)({},e,{defaultTheme:o,themeId:t}));if(!n.components||!n.components[d]||!n.components[d].styleOverrides)return null;const r=n.components[d].styleOverrides,i={};return Object.entries(r).forEach((t=>{let[o,r]=t;i[o]=B(r,(0,a.A)({},e,{theme:n}))})),h(e,i)})),d&&!f&&u.push((e=>{var n;const r=N((0,a.A)({},e,{defaultTheme:o,themeId:t}));return B({variants:null==r||null==(n=r.components)||null==(n=n[d])?void 0:n.variants},(0,a.A)({},e,{theme:r}))})),g||u.push(l);const p=u.length-s.length;if(Array.isArray(n)&&p>0){const e=new Array(p).fill("");r=[...n,...e],r.raw=[...n.raw,...e]}const m=A(r,...u);return e.muiName&&(m.muiName=e.muiName),m};return A.withConfig&&(x.withConfig=A.withConfig),x}}(),F=j,W=["className","component","disableGutters","fixed","maxWidth","classes"],D=(0,E.A)(),H=F("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["maxWidth".concat((0,C.A)(String(o.maxWidth)))],o.fixed&&t.fixed,o.disableGutters&&t.disableGutters]}}),V=e=>(0,k.A)({props:e,name:"MuiContainer",defaultTheme:D});var K=o(6803),G=o(4535),q=o(2876);const U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=H,useThemeProps:o=V,componentName:r="MuiContainer"}=e,s=t((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!o.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})}),(e=>{let{theme:t,ownerState:o}=e;return o.fixed&&Object.keys(t.breakpoints.values).reduce(((e,o)=>{const n=o,r=t.breakpoints.values[n];return 0!==r&&(e[t.breakpoints.up(n)]={maxWidth:"".concat(r).concat(t.breakpoints.unit)}),e}),{})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},"xs"===o.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},o.maxWidth&&"xs"!==o.maxWidth&&{[t.breakpoints.up(o.maxWidth)]:{maxWidth:"".concat(t.breakpoints.values[o.maxWidth]).concat(t.breakpoints.unit)}})})),c=n.forwardRef((function(e,t){const n=o(e),{className:c,component:d="div",disableGutters:u=!1,fixed:m=!1,maxWidth:h="lg"}=n,v=(0,i.A)(n,W),f=(0,a.A)({},n,{component:d,disableGutters:u,fixed:m,maxWidth:h}),g=((e,t)=>{const{classes:o,fixed:n,disableGutters:r,maxWidth:a}=e,i={root:["root",a&&"maxWidth".concat((0,C.A)(String(a))),n&&"fixed",r&&"disableGutters"]};return(0,S.A)(i,(e=>(0,w.Ay)(t,e)),o)})(f,r);return(0,p.jsx)(s,(0,a.A)({as:d,ownerState:f,className:(0,l.A)(g.root,c),ref:t},v))}));return c}({createStyledComponent:(0,G.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["maxWidth".concat((0,K.A)(String(o.maxWidth)))],o.fixed&&t.fixed,o.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,q.A)({props:e,name:"MuiContainer"})}),X=U;var Y=o(9751),Q=o(8604);const _=["component","direction","spacing","divider","children","className","useFlexGap"],$=(0,E.A)(),Z=F("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function J(e){return(0,k.A)({props:e,name:"MuiStack",defaultTheme:$})}function ee(e,t){const o=n.Children.toArray(e).filter(Boolean);return o.reduce(((e,r,a)=>(e.push(r),a{let{ownerState:t,theme:o}=e,n=(0,a.A)({display:"flex",flexDirection:"column"},(0,Y.NI)({theme:o},(0,Y.kW)({values:t.direction,breakpoints:o.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,Q.LX)(o),r=Object.keys(o.breakpoints.values).reduce(((e,o)=>(("object"===typeof t.spacing&&null!=t.spacing[o]||"object"===typeof t.direction&&null!=t.direction[o])&&(e[o]=!0),e)),{}),a=(0,Y.kW)({values:t.direction,base:r}),i=(0,Y.kW)({values:t.spacing,base:r});"object"===typeof a&&Object.keys(a).forEach(((e,t,o)=>{if(!a[e]){const n=t>0?a[o[t-1]]:"column";a[e]=n}}));const l=(o,n)=>{return t.useFlexGap?{gap:(0,Q._W)(e,o)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((r=n?a[n]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[r]))]:(0,Q._W)(e,o)}};var r};n=(0,R.A)(n,(0,Y.NI)({theme:o},i,l))}return n=(0,Y.iZ)(o.breakpoints,n),n};const oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=Z,useThemeProps:o=J,componentName:r="MuiStack"}=e,s=t(te),c=n.forwardRef((function(e,t){const n=o(e),c=(0,d.A)(n),{component:u="div",direction:m="column",spacing:h=0,divider:v,children:f,className:g,useFlexGap:b=!1}=c,A=(0,i.A)(c,_),y={direction:m,spacing:h,useFlexGap:b},x=(0,S.A)({root:["root"]},(e=>(0,w.Ay)(r,e)),{});return(0,p.jsx)(s,(0,a.A)({as:u,ownerState:y,ref:t,className:(0,l.A)(x.root,g)},A,{children:v?ee(f,v):f}))}));return c}({createStyledComponent:(0,G.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,q.A)({props:e,name:"MuiStack"})}),ne=oe;var re=o(7266);function ae(e){return(0,w.Ay)("MuiDivider",e)}const ie=(0,g.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),le=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],se=(0,G.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.absolute&&t.absolute,t[o.variant],o.light&&t.light,"vertical"===o.orientation&&t.vertical,o.flexItem&&t.flexItem,o.children&&t.withChildren,o.children&&"vertical"===o.orientation&&t.withChildrenVertical,"right"===o.textAlign&&"vertical"!==o.orientation&&t.textAlignRight,"left"===o.textAlign&&"vertical"!==o.orientation&&t.textAlignLeft]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},o.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},o.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,re.X4)(t.palette.divider,.08)},"inset"===o.variant&&{marginLeft:72},"middle"===o.variant&&"horizontal"===o.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===o.variant&&"vertical"===o.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===o.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},o.flexItem&&{alignSelf:"stretch",height:"auto"})}),(e=>{let{ownerState:t}=e;return(0,a.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},o.children&&"vertical"!==o.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider)}})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},o.children&&"vertical"===o.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider)}})}),(e=>{let{ownerState:t}=e;return(0,a.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})})),ce=(0,G.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.wrapper,"vertical"===o.orientation&&t.wrapperVertical]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===o.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})})),de=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDivider"}),{absolute:n=!1,children:r,className:s,component:c=(r?"div":"hr"),flexItem:d=!1,light:u=!1,orientation:m="horizontal",role:h=("hr"!==c?"separator":void 0),textAlign:v="center",variant:f="fullWidth"}=o,g=(0,i.A)(o,le),b=(0,a.A)({},o,{absolute:n,component:c,flexItem:d,light:u,orientation:m,role:h,textAlign:v,variant:f}),A=(e=>{const{absolute:t,children:o,classes:n,flexItem:r,light:a,orientation:i,textAlign:l,variant:s}=e,c={root:["root",t&&"absolute",s,a&&"light","vertical"===i&&"vertical",r&&"flexItem",o&&"withChildren",o&&"vertical"===i&&"withChildrenVertical","right"===l&&"vertical"!==i&&"textAlignRight","left"===l&&"vertical"!==i&&"textAlignLeft"],wrapper:["wrapper","vertical"===i&&"wrapperVertical"]};return(0,S.A)(c,ae,n)})(b);return(0,p.jsx)(se,(0,a.A)({as:c,className:(0,l.A)(A.root,s),role:h,ref:t,ownerState:b},g,{children:r?(0,p.jsx)(ce,{className:A.wrapper,ownerState:b,children:r}):null}))}));de.muiSkipListHighlight=!0;const ue=de;var pe=o(6240);const me=n.createContext();function he(e){return(0,w.Ay)("MuiGrid",e)}const ve=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],fe=(0,g.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>"spacing-xs-".concat(e))),...["column-reverse","column","row-reverse","row"].map((e=>"direction-xs-".concat(e))),...["nowrap","wrap-reverse","wrap"].map((e=>"wrap-xs-".concat(e))),...ve.map((e=>"grid-xs-".concat(e))),...ve.map((e=>"grid-sm-".concat(e))),...ve.map((e=>"grid-md-".concat(e))),...ve.map((e=>"grid-lg-".concat(e))),...ve.map((e=>"grid-xl-".concat(e)))]),ge=fe,be=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Ae(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function ye(e){let{breakpoints:t,values:o}=e,n="";Object.keys(o).forEach((e=>{""===n&&0!==o[e]&&(n=e)}));const r=Object.keys(t).sort(((e,o)=>t[e]-t[o]));return r.slice(0,r.indexOf(n))}const xe=(0,G.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e,{container:n,direction:r,item:a,spacing:i,wrap:l,zeroMinWidth:s,breakpoints:c}=o;let d=[];n&&(d=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[o["spacing-xs-".concat(String(e))]];const n=[];return t.forEach((t=>{const r=e[t];Number(r)>0&&n.push(o["spacing-".concat(t,"-").concat(String(r))])})),n}(i,c,t));const u=[];return c.forEach((e=>{const n=o[e];n&&u.push(t["grid-".concat(e,"-").concat(String(n))])})),[t.root,n&&t.container,a&&t.item,s&&t.zeroMinWidth,...d,"row"!==r&&t["direction-xs-".concat(String(r))],"wrap"!==l&&t["wrap-xs-".concat(String(l))],...u]}})((e=>{let{ownerState:t}=e;return(0,a.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){let{theme:t,ownerState:o}=e;const n=(0,Y.kW)({values:o.direction,breakpoints:t.breakpoints.values});return(0,Y.NI)({theme:t},n,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(ge.item)]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:o}=e;const{container:n,rowSpacing:r}=o;let a={};if(n&&0!==r){const e=(0,Y.kW)({values:r,breakpoints:t.breakpoints.values});let o;"object"===typeof e&&(o=ye({breakpoints:t.breakpoints.values,values:e})),a=(0,Y.NI)({theme:t},e,((e,n)=>{var r;const a=t.spacing(e);return"0px"!==a?{marginTop:"-".concat(Ae(a)),["& > .".concat(ge.item)]:{paddingTop:Ae(a)}}:null!=(r=o)&&r.includes(n)?{}:{marginTop:0,["& > .".concat(ge.item)]:{paddingTop:0}}}))}return a}),(function(e){let{theme:t,ownerState:o}=e;const{container:n,columnSpacing:r}=o;let a={};if(n&&0!==r){const e=(0,Y.kW)({values:r,breakpoints:t.breakpoints.values});let o;"object"===typeof e&&(o=ye({breakpoints:t.breakpoints.values,values:e})),a=(0,Y.NI)({theme:t},e,((e,n)=>{var r;const a=t.spacing(e);return"0px"!==a?{width:"calc(100% + ".concat(Ae(a),")"),marginLeft:"-".concat(Ae(a)),["& > .".concat(ge.item)]:{paddingLeft:Ae(a)}}:null!=(r=o)&&r.includes(n)?{}:{width:"100%",marginLeft:0,["& > .".concat(ge.item)]:{paddingLeft:0}}}))}return a}),(function(e){let t,{theme:o,ownerState:n}=e;return o.breakpoints.keys.reduce(((e,r)=>{let i={};if(n[r]&&(t=n[r]),!t)return e;if(!0===t)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const l=(0,Y.kW)({values:n.columns,breakpoints:o.breakpoints.values}),s="object"===typeof l?l[r]:l;if(void 0===s||null===s)return e;const c="".concat(Math.round(t/s*1e8)/1e6,"%");let d={};if(n.container&&n.item&&0!==n.columnSpacing){const e=o.spacing(n.columnSpacing);if("0px"!==e){const t="calc(".concat(c," + ").concat(Ae(e),")");d={flexBasis:t,maxWidth:t}}}i=(0,a.A)({flexBasis:c,flexGrow:0,maxWidth:c},d)}return 0===o.breakpoints.values[r]?Object.assign(e,i):e[o.breakpoints.up(r)]=i,e}),{})}));const we=e=>{const{classes:t,container:o,direction:n,item:r,spacing:a,wrap:i,zeroMinWidth:l,breakpoints:s}=e;let c=[];o&&(c=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return["spacing-xs-".concat(String(e))];const o=[];return t.forEach((t=>{const n=e[t];if(Number(n)>0){const e="spacing-".concat(t,"-").concat(String(n));o.push(e)}})),o}(a,s));const d=[];s.forEach((t=>{const o=e[t];o&&d.push("grid-".concat(t,"-").concat(String(o)))}));const u={root:["root",o&&"container",r&&"item",l&&"zeroMinWidth",...c,"row"!==n&&"direction-xs-".concat(String(n)),"wrap"!==i&&"wrap-xs-".concat(String(i)),...d]};return(0,S.A)(u,he,t)},Se=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiGrid"}),{breakpoints:r}=(0,pe.A)(),s=(0,d.A)(o),{className:c,columns:u,columnSpacing:m,component:h="div",container:v=!1,direction:f="row",item:g=!1,rowSpacing:b,spacing:A=0,wrap:y="wrap",zeroMinWidth:x=!1}=s,w=(0,i.A)(s,be),S=b||A,C=m||A,k=n.useContext(me),R=v?u||12:k,E={},M=(0,a.A)({},w);r.keys.forEach((e=>{null!=w[e]&&(E[e]=w[e],delete M[e])}));const L=(0,a.A)({},s,{columns:R,container:v,direction:f,item:g,rowSpacing:S,columnSpacing:C,wrap:y,zeroMinWidth:x,spacing:A},E,{breakpoints:r.keys}),I=we(L);return(0,p.jsx)(me.Provider,{value:R,children:(0,p.jsx)(xe,(0,a.A)({ownerState:L,className:(0,l.A)(I.root,c),as:h,ref:t},M))})}));const Ce=Se,ke=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Re(e){return(0,w.Ay)("MuiPaper",e)}(0,g.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Ee=["className","component","elevation","square","variant"],Me=(0,G.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],!o.square&&t.rounded,"elevation"===o.variant&&t["elevation".concat(o.elevation)]]}})((e=>{let{theme:t,ownerState:o}=e;var n;return(0,a.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!o.square&&{borderRadius:t.shape.borderRadius},"outlined"===o.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===o.variant&&(0,a.A)({boxShadow:(t.vars||t).shadows[o.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,re.X4)("#fff",ke(o.elevation)),", ").concat((0,re.X4)("#fff",ke(o.elevation)),")")},t.vars&&{backgroundImage:null==(n=t.vars.overlays)?void 0:n[o.elevation]}))})),Le=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiPaper"}),{className:n,component:r="div",elevation:s=1,square:c=!1,variant:d="elevation"}=o,u=(0,i.A)(o,Ee),m=(0,a.A)({},o,{component:r,elevation:s,square:c,variant:d}),h=(e=>{const{square:t,elevation:o,variant:n,classes:r}=e,a={root:["root",n,!t&&"rounded","elevation"===n&&"elevation".concat(o)]};return(0,S.A)(a,Re,r)})(m);return(0,p.jsx)(Me,(0,a.A)({as:r,ownerState:m,className:(0,l.A)(h.root,n),ref:t},u))}));function Ie(e){return(0,w.Ay)("MuiImageList",e)}(0,g.A)("MuiImageList",["root","masonry","quilted","standard","woven"]);const Te=n.createContext({}),ze=["children","className","cols","component","rowHeight","gap","style","variant"],Pe=(0,G.Ay)("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant]]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===t.variant&&{display:"block"})})),Ne=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiImageList"}),{children:r,className:s,cols:c=2,component:d="ul",rowHeight:u="auto",gap:m=4,style:h,variant:v="standard"}=o,f=(0,i.A)(o,ze),g=n.useMemo((()=>({rowHeight:u,gap:m,variant:v})),[u,m,v]);n.useEffect((()=>{0}),[]);const b="masonry"===v?(0,a.A)({columnCount:c,columnGap:m},h):(0,a.A)({gridTemplateColumns:"repeat(".concat(c,", 1fr)"),gap:m},h),A=(0,a.A)({},o,{component:d,gap:m,rowHeight:u,variant:v}),y=(e=>{const{classes:t,variant:o}=e,n={root:["root",o]};return(0,S.A)(n,Ie,t)})(A);return(0,p.jsx)(Pe,(0,a.A)({as:d,className:(0,l.A)(y.root,y[v],s),ref:t,style:b,ownerState:A},f,{children:(0,p.jsx)(Te.Provider,{value:g,children:r})}))})),Oe=Ne;o(805);const Be=function(e,t){var o,r;return n.isValidElement(e)&&-1!==t.indexOf(null!=(o=e.type.muiName)?o:null==(r=e.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)};function je(e){return(0,w.Ay)("MuiImageListItem",e)}const Fe=(0,g.A)("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),We=["children","className","cols","component","rows","style"],De=(0,G.Ay)("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(Fe.img)]:t.img},t.root,t[o.variant]]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"block",position:"relative"},"standard"===t.variant&&{display:"flex",flexDirection:"column"},"woven"===t.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{["& .".concat(Fe.img)]:(0,a.A)({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===t.variant&&{height:"auto",flexGrow:1})})})),He=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiImageListItem"}),{children:r,className:s,cols:c=1,component:d="li",rows:u=1,style:m}=o,h=(0,i.A)(o,We),{rowHeight:v="auto",gap:f,variant:g}=n.useContext(Te);let b="auto";"woven"===g?b=void 0:"auto"!==v&&(b=v*u+f*(u-1));const A=(0,a.A)({},o,{cols:c,component:d,gap:f,rowHeight:v,rows:u,variant:g}),y=(e=>{const{classes:t,variant:o}=e,n={root:["root",o],img:["img"]};return(0,S.A)(n,je,t)})(A);return(0,p.jsx)(De,(0,a.A)({as:d,className:(0,l.A)(y.root,y[g],s),ref:t,style:(0,a.A)({height:b,gridColumnEnd:"masonry"!==g?"span ".concat(c):void 0,gridRowEnd:"masonry"!==g?"span ".concat(u):void 0,marginBottom:"masonry"===g?f:void 0,breakInside:"masonry"===g?"avoid":void 0},m),ownerState:A},h,{children:n.Children.map(r,(e=>n.isValidElement(e)?"img"===e.type||Be(e,["Image"])?n.cloneElement(e,{className:(0,l.A)(y.img,e.props.className)}):e:null))}))})),Ve=He;function Ke(e){return q.A}var Ge=o(9998),qe=o(1140),Ue=o(4318),Xe=o(653),Ye=o(5849);function Qe(e){return(0,w.Ay)("MuiCollapse",e)}(0,g.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const _e=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],$e=(0,G.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],"entered"===o.state&&t.entered,"exited"===o.state&&!o.in&&"0px"===o.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===o.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===o.state&&(0,a.A)({height:"auto",overflow:"visible"},"horizontal"===o.orientation&&{width:"auto"}),"exited"===o.state&&!o.in&&"0px"===o.collapsedSize&&{visibility:"hidden"})})),Ze=(0,G.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),Je=(0,G.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,a.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),et=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiCollapse"}),{addEndListener:r,children:s,className:c,collapsedSize:d="0px",component:u,easing:m,in:h,onEnter:v,onEntered:f,onEntering:g,onExit:b,onExited:A,onExiting:y,orientation:x="vertical",style:w,timeout:C=Ue.p0.standard,TransitionComponent:k=Ge.Ay}=o,R=(0,i.A)(o,_e),E=(0,a.A)({},o,{orientation:x,collapsedSize:d}),M=(e=>{const{orientation:t,classes:o}=e,n={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,S.A)(n,Qe,o)})(E),L=(0,pe.A)(),I=(0,qe.A)(),T=n.useRef(null),z=n.useRef(),P="number"===typeof d?"".concat(d,"px"):d,N="horizontal"===x,O=N?"width":"height",B=n.useRef(null),j=(0,Ye.A)(t,B),F=e=>t=>{if(e){const o=B.current;void 0===t?e(o):e(o,t)}},W=()=>T.current?T.current[N?"clientWidth":"clientHeight"]:0,D=F(((e,t)=>{T.current&&N&&(T.current.style.position="absolute"),e.style[O]=P,v&&v(e,t)})),H=F(((e,t)=>{const o=W();T.current&&N&&(T.current.style.position="");const{duration:n,easing:r}=(0,Xe.c)({style:w,timeout:C,easing:m},{mode:"enter"});if("auto"===C){const t=L.transitions.getAutoHeightDuration(o);e.style.transitionDuration="".concat(t,"ms"),z.current=t}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[O]="".concat(o,"px"),e.style.transitionTimingFunction=r,g&&g(e,t)})),V=F(((e,t)=>{e.style[O]="auto",f&&f(e,t)})),K=F((e=>{e.style[O]="".concat(W(),"px"),b&&b(e)})),G=F(A),U=F((e=>{const t=W(),{duration:o,easing:n}=(0,Xe.c)({style:w,timeout:C,easing:m},{mode:"exit"});if("auto"===C){const o=L.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(o,"ms"),z.current=o}else e.style.transitionDuration="string"===typeof o?o:"".concat(o,"ms");e.style[O]=P,e.style.transitionTimingFunction=n,y&&y(e)}));return(0,p.jsx)(k,(0,a.A)({in:h,onEnter:D,onEntered:V,onEntering:H,onExit:K,onExited:G,onExiting:U,addEndListener:e=>{"auto"===C&&I.start(z.current||0,e),r&&r(B.current,e)},nodeRef:B,timeout:"auto"===C?null:C},R,{children:(e,t)=>(0,p.jsx)($e,(0,a.A)({as:u,className:(0,l.A)(M.root,c,{entered:M.entered,exited:!h&&"0px"===P&&M.hidden}[e]),style:(0,a.A)({[N?"minWidth":"minHeight"]:P},w),ref:j},t,{ownerState:(0,a.A)({},E,{state:e}),children:(0,p.jsx)(Ze,{ownerState:(0,a.A)({},E,{state:e}),className:M.wrapper,ref:T,children:(0,p.jsx)(Je,{ownerState:(0,a.A)({},E,{state:e}),className:M.wrapperInner,children:s})})}))}))}));et.muiSupportAuto=!0;const tt=et;const ot=n.createContext({});var nt=o(4516),rt=o(7042),at=o(4430),it=o(8413),lt=o(2205);const st=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],ct=["component","slots","slotProps"],dt=["component"];function ut(e,t){const{className:o,elementType:n,ownerState:r,externalForwardedProps:l,getSlotOwnerState:s,internalForwardedProps:c}=t,d=(0,i.A)(t,st),{component:u,slots:p={[e]:void 0},slotProps:m={[e]:void 0}}=l,h=(0,i.A)(l,ct),v=p[e]||n,f=(0,at.Y)(m[e],r),g=(0,it.p)((0,a.A)({className:o},d,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:b},internalRef:A}=g,y=(0,i.A)(g.props,dt),x=(0,rt.A)(A,null==f?void 0:f.ref,t.ref),w=s?s(y):{},S=(0,a.A)({},r,w),C="root"===e?b||u:b,k=(0,lt.X)(v,(0,a.A)({},"root"===e&&!u&&!p[e]&&c,"root"!==e&&!p[e]&&c,y,C&&{as:C},{ref:x}),S);return Object.keys(w).forEach((e=>{delete k[e]})),[v,k]}function pt(e){return(0,w.Ay)("MuiAccordion",e)}const mt=(0,g.A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),ht=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],vt=Ke(),ft=(0,G.Ay)(Le,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(mt.region)]:t.region},t.root,!o.square&&t.rounded,!o.disableGutters&&t.gutters]}})((e=>{let{theme:t}=e;const o={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],o),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],o)},"&:first-of-type":{"&::before":{display:"none"}},["&.".concat(mt.expanded)]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},["&.".concat(mt.disabled)]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),(e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{["&.".concat(mt.expanded)]:{margin:"16px 0"}}}]}})),gt=n.forwardRef((function(e,t){const o=vt({props:e,name:"MuiAccordion"}),{children:r,className:s,defaultExpanded:c=!1,disabled:d=!1,disableGutters:u=!1,expanded:m,onChange:h,square:v=!1,slots:f={},slotProps:g={},TransitionComponent:b,TransitionProps:A}=o,y=(0,i.A)(o,ht),[x,w]=(0,nt.A)({controlled:m,default:c,name:"Accordion",state:"expanded"}),C=n.useCallback((e=>{w(!x),h&&h(e,!x)}),[x,h,w]),[k,...R]=n.Children.toArray(r),E=n.useMemo((()=>({expanded:x,disabled:d,disableGutters:u,toggle:C})),[x,d,u,C]),M=(0,a.A)({},o,{square:v,disabled:d,disableGutters:u,expanded:x}),L=(e=>{const{classes:t,square:o,expanded:n,disabled:r,disableGutters:a}=e,i={root:["root",!o&&"rounded",n&&"expanded",r&&"disabled",!a&&"gutters"],region:["region"]};return(0,S.A)(i,pt,t)})(M),I=(0,a.A)({transition:b},f),T=(0,a.A)({transition:A},g),[z,P]=ut("transition",{elementType:tt,externalForwardedProps:{slots:I,slotProps:T},ownerState:M});return(0,p.jsxs)(ft,(0,a.A)({className:(0,l.A)(L.root,s),ref:t,ownerState:M,square:v},y,{children:[(0,p.jsx)(ot.Provider,{value:E,children:k}),(0,p.jsx)(z,(0,a.A)({in:x,timeout:"auto"},P,{children:(0,p.jsx)("div",{"aria-labelledby":k.props.id,id:k.props["aria-controls"],role:"region",className:L.region,children:R})}))]}))}));var bt=o(2949);function At(e){return(0,w.Ay)("MuiAccordionSummary",e)}const yt=(0,g.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),xt=["children","className","expandIcon","focusVisibleClassName","onClick"],wt=Ke(),St=(0,G.Ay)(bt.A,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const o={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],o),["&.".concat(yt.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(yt.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["&:hover:not(.".concat(yt.disabled,")")]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{["&.".concat(yt.expanded)]:{minHeight:64}}}]}})),Ct=(0,G.Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{theme:t}=e;return{display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(yt.expanded)]:{margin:"20px 0"}}}]}})),kt=(0,G.Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(yt.expanded)]:{transform:"rotate(180deg)"}}})),Rt=n.forwardRef((function(e,t){const o=wt({props:e,name:"MuiAccordionSummary"}),{children:r,className:s,expandIcon:c,focusVisibleClassName:d,onClick:u}=o,m=(0,i.A)(o,xt),{disabled:h=!1,disableGutters:v,expanded:f,toggle:g}=n.useContext(ot),b=(0,a.A)({},o,{expanded:f,disabled:h,disableGutters:v}),A=(e=>{const{classes:t,expanded:o,disabled:n,disableGutters:r}=e,a={root:["root",o&&"expanded",n&&"disabled",!r&&"gutters"],focusVisible:["focusVisible"],content:["content",o&&"expanded",!r&&"contentGutters"],expandIconWrapper:["expandIconWrapper",o&&"expanded"]};return(0,S.A)(a,At,t)})(b);return(0,p.jsxs)(St,(0,a.A)({focusRipple:!1,disableRipple:!0,disabled:h,component:"div","aria-expanded":f,className:(0,l.A)(A.root,s),focusVisibleClassName:(0,l.A)(A.focusVisible,d),onClick:e=>{g&&g(e),u&&u(e)},ref:t,ownerState:b},m,{children:[(0,p.jsx)(Ct,{className:A.content,ownerState:b,children:r}),c&&(0,p.jsx)(kt,{className:A.expandIconWrapper,ownerState:b,children:c})]}))}));function Et(e){return(0,w.Ay)("MuiTypography",e)}(0,g.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Mt=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Lt=(0,G.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.variant&&t[o.variant],"inherit"!==o.align&&t["align".concat((0,K.A)(o.align))],o.noWrap&&t.noWrap,o.gutterBottom&&t.gutterBottom,o.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({margin:0},"inherit"===o.variant&&{font:"inherit"},"inherit"!==o.variant&&t.typography[o.variant],"inherit"!==o.align&&{textAlign:o.align},o.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},o.gutterBottom&&{marginBottom:"0.35em"},o.paragraph&&{marginBottom:16})})),It={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Tt={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},zt=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTypography"}),n=(e=>Tt[e]||e)(o.color),r=(0,d.A)((0,a.A)({},o,{color:n})),{align:s="inherit",className:c,component:u,gutterBottom:m=!1,noWrap:h=!1,paragraph:v=!1,variant:f="body1",variantMapping:g=It}=r,b=(0,i.A)(r,Mt),A=(0,a.A)({},r,{align:s,color:n,className:c,component:u,gutterBottom:m,noWrap:h,paragraph:v,variant:f,variantMapping:g}),y=u||(v?"p":g[f]||It[f])||"span",x=(e=>{const{align:t,gutterBottom:o,noWrap:n,paragraph:r,variant:a,classes:i}=e,l={root:["root",a,"inherit"!==e.align&&"align".concat((0,K.A)(t)),o&&"gutterBottom",n&&"noWrap",r&&"paragraph"]};return(0,S.A)(l,Et,i)})(A);return(0,p.jsx)(Lt,(0,a.A)({as:y,ref:t,ownerState:A,className:(0,l.A)(x.root,c)},b))}));function Pt(e){return(0,w.Ay)("MuiAccordionDetails",e)}(0,g.A)("MuiAccordionDetails",["root"]);const Nt=["className"],Ot=Ke(),Bt=(0,G.Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}})),jt=n.forwardRef((function(e,t){const o=Ot({props:e,name:"MuiAccordionDetails"}),{className:n}=o,r=(0,i.A)(o,Nt),s=o,c=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},Pt,t)})(s);return(0,p.jsx)(Bt,(0,a.A)({className:(0,l.A)(c.root,n),ref:t,ownerState:s},r))}));function Ft(e){return(0,w.Ay)("MuiAppBar",e)}(0,g.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Wt=["className","color","enableColorOnDark","position"],Dt=(e,t)=>e?"".concat(null==e?void 0:e.replace(")",""),", ").concat(t,")"):t,Ht=(0,G.Ay)(Le,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["position".concat((0,K.A)(o.position))],t["color".concat((0,K.A)(o.color))]]}})((e=>{let{theme:t,ownerState:o}=e;const n="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,a.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===o.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===o.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===o.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===o.position&&{position:"static"},"relative"===o.position&&{position:"relative"},!t.vars&&(0,a.A)({},"default"===o.color&&{backgroundColor:n,color:t.palette.getContrastText(n)},o.color&&"default"!==o.color&&"inherit"!==o.color&&"transparent"!==o.color&&{backgroundColor:t.palette[o.color].main,color:t.palette[o.color].contrastText},"inherit"===o.color&&{color:"inherit"},"dark"===t.palette.mode&&!o.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===o.color&&(0,a.A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,a.A)({},"default"===o.color&&{"--AppBar-background":o.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Dt(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":o.enableColorOnDark?t.vars.palette.text.primary:Dt(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},o.color&&!o.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":o.enableColorOnDark?t.vars.palette[o.color].main:Dt(t.vars.palette.AppBar.darkBg,t.vars.palette[o.color].main),"--AppBar-color":o.enableColorOnDark?t.vars.palette[o.color].contrastText:Dt(t.vars.palette.AppBar.darkColor,t.vars.palette[o.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===o.color?"inherit":"var(--AppBar-color)"},"transparent"===o.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),Vt=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiAppBar"}),{className:n,color:r="primary",enableColorOnDark:s=!1,position:c="fixed"}=o,d=(0,i.A)(o,Wt),u=(0,a.A)({},o,{color:r,position:c,enableColorOnDark:s}),m=(e=>{const{color:t,position:o,classes:n}=e,r={root:["root","color".concat((0,K.A)(t)),"position".concat((0,K.A)(o))]};return(0,S.A)(r,Ft,n)})(u);return(0,p.jsx)(Ht,(0,a.A)({square:!0,component:"header",ownerState:u,elevation:4,className:(0,l.A)(m.root,n,"fixed"===c&&"mui-fixed"),ref:t},d))}));function Kt(e){return(0,w.Ay)("MuiToolbar",e)}(0,g.A)("MuiToolbar",["root","gutters","regular","dense"]);const Gt=["className","component","disableGutters","variant"],qt=(0,G.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.disableGutters&&t.gutters,t[o.variant]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({position:"relative",display:"flex",alignItems:"center"},!o.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===o.variant&&{minHeight:48})}),(e=>{let{theme:t,ownerState:o}=e;return"regular"===o.variant&&t.mixins.toolbar})),Ut=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiToolbar"}),{className:n,component:r="div",disableGutters:s=!1,variant:c="regular"}=o,d=(0,i.A)(o,Gt),u=(0,a.A)({},o,{component:r,disableGutters:s,variant:c}),m=(e=>{const{classes:t,disableGutters:o,variant:n}=e,r={root:["root",!o&&"gutters",n]};return(0,S.A)(r,Kt,t)})(u);return(0,p.jsx)(qt,(0,a.A)({as:r,className:(0,l.A)(m.root,n),ref:t,ownerState:u},d))}));function Xt(e){return(0,w.Ay)("MuiIconButton",e)}const Yt=(0,g.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Qt=["edge","children","className","color","disabled","disableFocusRipple","size"],_t=(0,G.Ay)(bt.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"default"!==o.color&&t["color".concat((0,K.A)(o.color))],o.edge&&t["edge".concat((0,K.A)(o.edge))],t["size".concat((0,K.A)(o.size))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===o.edge&&{marginLeft:"small"===o.size?-3:-12},"end"===o.edge&&{marginRight:"small"===o.size?-3:-12})}),(e=>{let{theme:t,ownerState:o}=e;var n;const r=null==(n=(t.vars||t).palette)?void 0:n[o.color];return(0,a.A)({},"inherit"===o.color&&{color:"inherit"},"inherit"!==o.color&&"default"!==o.color&&(0,a.A)({color:null==r?void 0:r.main},!o.disableRipple&&{"&:hover":(0,a.A)({},r&&{backgroundColor:t.vars?"rgba(".concat(r.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===o.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===o.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(Yt.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),$t=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiIconButton"}),{edge:n=!1,children:r,className:s,color:c="default",disabled:d=!1,disableFocusRipple:u=!1,size:m="medium"}=o,h=(0,i.A)(o,Qt),v=(0,a.A)({},o,{edge:n,color:c,disabled:d,disableFocusRipple:u,size:m}),f=(e=>{const{classes:t,disabled:o,color:n,edge:r,size:a}=e,i={root:["root",o&&"disabled","default"!==n&&"color".concat((0,K.A)(n)),r&&"edge".concat((0,K.A)(r)),"size".concat((0,K.A)(a))]};return(0,S.A)(i,Xt,t)})(v);return(0,p.jsx)(_t,(0,a.A)({className:(0,l.A)(f.root,s),centerRipple:!0,focusRipple:!u,disabled:d,ref:t},h,{ownerState:v,children:r}))}));var Zt=o(2518);function Jt(e){return(0,w.Ay)("MuiCardContent",e)}(0,g.A)("MuiCardContent",["root"]);const eo=["className","component"],to=(0,G.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),oo=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiCardContent"}),{className:n,component:r="div"}=o,s=(0,i.A)(o,eo),c=(0,a.A)({},o,{component:r}),d=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},Jt,t)})(c);return(0,p.jsx)(to,(0,a.A)({as:r,className:(0,l.A)(d.root,n),ownerState:c,ref:t},s))}));function no(e){return(0,w.Ay)("MuiCardActions",e)}(0,g.A)("MuiCardActions",["root","spacing"]);const ro=["disableSpacing","className"],ao=(0,G.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),io=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiCardActions"}),{disableSpacing:n=!1,className:r}=o,s=(0,i.A)(o,ro),c=(0,a.A)({},o,{disableSpacing:n}),d=(e=>{const{classes:t,disableSpacing:o}=e,n={root:["root",!o&&"spacing"]};return(0,S.A)(n,no,t)})(c);return(0,p.jsx)(ao,(0,a.A)({className:(0,l.A)(d.root,r),ownerState:c,ref:t},s))}));function lo(e){return(0,w.Ay)("MuiCard",e)}(0,g.A)("MuiCard",["root"]);const so=["className","raised"],co=(0,G.Ay)(Le,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),uo=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiCard"}),{className:n,raised:r=!1}=o,s=(0,i.A)(o,so),c=(0,a.A)({},o,{raised:r}),d=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},lo,t)})(c);return(0,p.jsx)(co,(0,a.A)({className:(0,l.A)(d.root,n),elevation:r?8:void 0,ref:t,ownerState:c},s))}));var po=o(992),mo=o(1944);const ho=e=>{const t=n.useRef({});return n.useEffect((()=>{t.current=e})),t.current};var vo=o(4626),fo=o(9184);function go(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function bo(e,t){for(let o=0;o0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:o=!0,limit:n,matchFrom:r="any",stringify:a,trim:i=!1}=e;return(e,l)=>{let{inputValue:s,getOptionLabel:c}=l,d=i?s.trim():s;o&&(d=d.toLowerCase()),t&&(d=go(d));const u=d?e.filter((e=>{let n=(a||c)(e);return o&&(n=n.toLowerCase()),t&&(n=go(n)),"start"===r?0===n.indexOf(d):n.indexOf(d)>-1})):e;return"number"===typeof n?u.slice(0,n):u}}(),yo=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function xo(e){const{unstable_isActiveElementInListbox:t=yo,unstable_classNamePrefix:o="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:l=!1,blurOnSelect:s=!1,clearOnBlur:c=!e.freeSolo,clearOnEscape:d=!1,componentName:u="useAutocomplete",defaultValue:p=(e.multiple?[]:null),disableClearable:m=!1,disableCloseOnSelect:h=!1,disabled:v,disabledItemsFocusable:f=!1,disableListWrap:g=!1,filterOptions:b=Ao,filterSelectedOptions:A=!1,freeSolo:y=!1,getOptionDisabled:x,getOptionKey:w,getOptionLabel:S=(e=>{var t;return null!=(t=e.label)?t:e}),groupBy:C,handleHomeEndKeys:k=!e.freeSolo,id:R,includeInputInList:E=!1,inputValue:M,isOptionEqualToValue:L=((e,t)=>e===t),multiple:I=!1,onChange:T,onClose:z,onHighlightChange:P,onInputChange:N,onOpen:O,open:B,openOnFocus:j=!1,options:F,readOnly:W=!1,selectOnFocus:D=!e.freeSolo,value:H}=e,V=(0,po.A)(R);let K=S;K=e=>{const t=S(e);return"string"!==typeof t?String(t):t};const G=n.useRef(!1),q=n.useRef(!0),U=n.useRef(null),X=n.useRef(null),[Y,Q]=n.useState(null),[_,$]=n.useState(-1),Z=i?0:-1,J=n.useRef(Z),[ee,te]=(0,mo.A)({controlled:H,default:p,name:u}),[oe,ne]=(0,mo.A)({controlled:M,default:"",name:u,state:"inputValue"}),[re,ae]=n.useState(!1),ie=n.useCallback(((e,t)=>{if(!(I?ee.length!A||!(I?ee:[ee]).some((t=>null!==t&&L(e,t))))),{inputValue:ue&&ce?"":oe,getOptionLabel:K}):[],he=ho({filteredOptions:me,value:ee,inputValue:oe});n.useEffect((()=>{const e=ee!==he.value;re&&!e||y&&!e||ie(null,ee)}),[ee,ie,re,he.value,y]);const ve=le&&me.length>0&&!W;const fe=(0,vo.A)((e=>{-1===e?U.current.focus():Y.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));n.useEffect((()=>{I&&_>ee.length-1&&($(-1),fe(-1))}),[ee,I,_,fe]);const ge=(0,vo.A)((e=>{let{event:t,index:n,reason:r="auto"}=e;if(J.current=n,-1===n?U.current.removeAttribute("aria-activedescendant"):U.current.setAttribute("aria-activedescendant","".concat(V,"-option-").concat(n)),P&&P(t,-1===n?null:me[n],r),!X.current)return;const a=X.current.querySelector('[role="option"].'.concat(o,"-focused"));a&&(a.classList.remove("".concat(o,"-focused")),a.classList.remove("".concat(o,"-focusVisible")));let i=X.current;if("listbox"!==X.current.getAttribute("role")&&(i=X.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===n)return void(i.scrollTop=0);const l=X.current.querySelector('[data-option-index="'.concat(n,'"]'));if(l&&(l.classList.add("".concat(o,"-focused")),"keyboard"===r&&l.classList.add("".concat(o,"-focusVisible")),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=l,t=i.clientHeight+i.scrollTop,o=e.offsetTop+e.offsetHeight;o>t?i.scrollTop=o-i.clientHeight:e.offsetTop-e.offsetHeight*(C?1.3:0){let{event:t,diff:o,direction:n="next",reason:a="auto"}=e;if(!pe)return;const i=function(e,t){if(!X.current||e<0||e>=me.length)return-1;let o=e;for(;;){const n=X.current.querySelector('[data-option-index="'.concat(o,'"]')),r=!f&&(!n||n.disabled||"true"===n.getAttribute("aria-disabled"));if(n&&n.hasAttribute("tabindex")&&!r)return o;if(o="next"===t?(o+1)%me.length:(o-1+me.length)%me.length,o===e)return-1}}((()=>{const e=me.length-1;if("reset"===o)return Z;if("start"===o)return 0;if("end"===o)return e;const t=J.current+o;return t<0?-1===t&&E?-1:g&&-1!==J.current||Math.abs(o)>1?0:e:t>e?t===e+1&&E?-1:g||Math.abs(o)>1?e:0:t})(),n);if(ge({index:i,reason:a,event:t}),r&&"reset"!==o)if(-1===i)U.current.value=oe;else{const e=K(me[i]);U.current.value=e;0===e.toLowerCase().indexOf(oe.toLowerCase())&&oe.length>0&&U.current.setSelectionRange(oe.length,e.length)}})),Ae=n.useCallback((()=>{if(!pe)return;const e=(()=>{if(-1!==J.current&&he.filteredOptions&&he.filteredOptions.length!==me.length&&he.inputValue===oe&&(I?ee.length===he.value.length&&he.value.every(((e,t)=>K(ee[t])===K(e))):(e=he.value,t=ee,(e?K(e):"")===(t?K(t):"")))){const e=he.filteredOptions[J.current];if(e)return bo(me,(t=>K(t)===K(e)))}var e,t;return-1})();if(-1!==e)return void(J.current=e);const t=I?ee[0]:ee;if(0!==me.length&&null!=t){if(X.current)if(null==t)J.current>=me.length-1?ge({index:me.length-1}):ge({index:J.current});else{const e=me[J.current];if(I&&e&&-1!==bo(ee,(t=>L(e,t))))return;const o=bo(me,(e=>L(e,t)));-1===o?be({diff:"reset"}):ge({index:o})}}else be({diff:"reset"})}),[me.length,!I&&ee,A,be,ge,pe,oe,I]),ye=(0,vo.A)((e=>{(0,fo.A)(X,e),e&&Ae()}));n.useEffect((()=>{Ae()}),[Ae]);const xe=e=>{le||(se(!0),de(!0),O&&O(e))},we=(e,t)=>{le&&(se(!1),z&&z(e,t))},Se=(e,t,o,n)=>{if(I){if(ee.length===t.length&&ee.every(((e,o)=>e===t[o])))return}else if(ee===t)return;T&&T(e,t,o,n),te(t)},Ce=n.useRef(!1),ke=function(e,t){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",r=t;if(I){r=Array.isArray(ee)?ee.slice():[];const e=bo(r,(e=>L(t,e)));-1===e?r.push(t):"freeSolo"!==o&&(r.splice(e,1),n="removeOption")}ie(e,r),Se(e,r,n,{option:t}),h||e&&(e.ctrlKey||e.metaKey)||we(e,n),(!0===s||"touch"===s&&Ce.current||"mouse"===s&&!Ce.current)&&U.current.blur()};const Re=(e,t)=>{if(!I)return;""===oe&&we(e,"toggleInput");let o=_;-1===_?""===oe&&"previous"===t&&(o=ee.length-1):(o+="next"===t?1:-1,o<0&&(o=0),o===ee.length&&(o=-1)),o=function(e,t){if(-1===e)return-1;let o=e;for(;;){if("next"===t&&o===ee.length||"previous"===t&&-1===o)return-1;const e=Y.querySelector('[data-tag-index="'.concat(o,'"]'));if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return o;o+="next"===t?1:-1}}(o,t),$(o),fe(o)},Ee=e=>{G.current=!0,ne(""),N&&N(e,"","clear"),Se(e,I?[]:null,"clear")},Me=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==_&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&($(-1),fe(-1)),229!==t.which))switch(t.key){case"Home":pe&&k&&(t.preventDefault(),be({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":pe&&k&&(t.preventDefault(),be({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),be({diff:-5,direction:"previous",reason:"keyboard",event:t}),xe(t);break;case"PageDown":t.preventDefault(),be({diff:5,direction:"next",reason:"keyboard",event:t}),xe(t);break;case"ArrowDown":t.preventDefault(),be({diff:1,direction:"next",reason:"keyboard",event:t}),xe(t);break;case"ArrowUp":t.preventDefault(),be({diff:-1,direction:"previous",reason:"keyboard",event:t}),xe(t);break;case"ArrowLeft":Re(t,"previous");break;case"ArrowRight":Re(t,"next");break;case"Enter":if(-1!==J.current&&pe){const e=me[J.current],o=!!x&&x(e);if(t.preventDefault(),o)return;ke(t,e,"selectOption"),r&&U.current.setSelectionRange(U.current.value.length,U.current.value.length)}else y&&""!==oe&&!1===ue&&(I&&t.preventDefault(),ke(t,oe,"createOption","freeSolo"));break;case"Escape":pe?(t.preventDefault(),t.stopPropagation(),we(t,"escape")):d&&(""!==oe||I&&ee.length>0)&&(t.preventDefault(),t.stopPropagation(),Ee(t));break;case"Backspace":if(I&&!W&&""===oe&&ee.length>0){const e=-1===_?ee.length-1:_,o=ee.slice();o.splice(e,1),Se(t,o,"removeOption",{option:ee[e]})}break;case"Delete":if(I&&!W&&""===oe&&ee.length>0&&-1!==_){const e=_,o=ee.slice();o.splice(e,1),Se(t,o,"removeOption",{option:ee[e]})}}},Le=e=>{ae(!0),j&&!G.current&&xe(e)},Ie=e=>{t(X)?U.current.focus():(ae(!1),q.current=!0,G.current=!1,l&&-1!==J.current&&pe?ke(e,me[J.current],"blur"):l&&y&&""!==oe?ke(e,oe,"blur","freeSolo"):c&&ie(e,ee),we(e,"blur"))},Te=e=>{const t=e.target.value;oe!==t&&(ne(t),de(!1),N&&N(e,t,"input")),""===t?m||I||Se(e,null,"clear"):xe(e)},ze=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));J.current!==t&&ge({event:e,index:t,reason:"mouse"})},Pe=e=>{ge({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Ce.current=!0},Ne=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));ke(e,me[t],"selectOption"),Ce.current=!1},Oe=e=>t=>{const o=ee.slice();o.splice(e,1),Se(t,o,"removeOption",{option:ee[e]})},Be=e=>{le?we(e,"toggleInput"):xe(e)},je=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==V&&e.preventDefault()},Fe=e=>{e.currentTarget.contains(e.target)&&(U.current.focus(),D&&q.current&&U.current.selectionEnd-U.current.selectionStart===0&&U.current.select(),q.current=!1)},We=e=>{v||""!==oe&&le||Be(e)};let De=y&&oe.length>0;De=De||(I?ee.length>0:null!==ee);let He=me;if(C){new Map;He=me.reduce(((e,t,o)=>{const n=C(t);return e.length>0&&e[e.length-1].group===n?e[e.length-1].options.push(t):e.push({key:o,index:o,group:n,options:[t]}),e}),[])}return v&&re&&Ie(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.A)({"aria-owns":ve?"".concat(V,"-listbox"):null},e,{onKeyDown:Me(e),onMouseDown:je,onClick:Fe})},getInputLabelProps:()=>({id:"".concat(V,"-label"),htmlFor:V}),getInputProps:()=>({id:V,value:oe,onBlur:Ie,onFocus:Le,onChange:Te,onMouseDown:We,"aria-activedescendant":pe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":ve?"".concat(V,"-listbox"):void 0,"aria-expanded":ve,autoComplete:"off",ref:U,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ee}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Be}),getTagProps:e=>{let{index:t}=e;return(0,a.A)({key:t,"data-tag-index":t,tabIndex:-1},!W&&{onDelete:Oe(t)})},getListboxProps:()=>({role:"listbox",id:"".concat(V,"-listbox"),"aria-labelledby":"".concat(V,"-label"),ref:ye,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:o}=e;var n;const r=(I?ee:[ee]).some((e=>null!=e&&L(o,e))),a=!!x&&x(o);return{key:null!=(n=null==w?void 0:w(o))?n:K(o),tabIndex:-1,role:"option",id:"".concat(V,"-option-").concat(t),onMouseMove:ze,onClick:Ne,onTouchStart:Pe,"data-option-index":t,"aria-disabled":a,"aria-selected":r}},id:V,inputValue:oe,value:ee,dirty:De,expanded:pe&&Y,popupOpen:pe,focused:re||-1!==_,anchorEl:Y,setAnchorEl:Q,focusedTag:_,groupedOptions:He}}var wo=o(5622);function So(e){return(0,w.Ay)("MuiListSubheader",e)}(0,g.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Co=["className","color","component","disableGutters","disableSticky","inset"],ko=(0,G.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"default"!==o.color&&t["color".concat((0,K.A)(o.color))],!o.disableGutters&&t.gutters,o.inset&&t.inset,!o.disableSticky&&t.sticky]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===o.color&&{color:(t.vars||t).palette.primary.main},"inherit"===o.color&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})})),Ro=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiListSubheader"}),{className:n,color:r="default",component:s="li",disableGutters:c=!1,disableSticky:d=!1,inset:u=!1}=o,m=(0,i.A)(o,Co),h=(0,a.A)({},o,{color:r,component:s,disableGutters:c,disableSticky:d,inset:u}),v=(e=>{const{classes:t,color:o,disableGutters:n,inset:r,disableSticky:a}=e,i={root:["root","default"!==o&&"color".concat((0,K.A)(o)),!n&&"gutters",r&&"inset",!a&&"sticky"]};return(0,S.A)(i,So,t)})(h);return(0,p.jsx)(ko,(0,a.A)({as:s,className:(0,l.A)(v.root,n),ref:t,ownerState:h},m))}));Ro.muiSkipListHighlight=!0;const Eo=Ro;function Mo(e){return(0,w.Ay)("MuiSvgIcon",e)}(0,g.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Lo=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Io=(0,G.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"inherit"!==o.color&&t["color".concat((0,K.A)(o.color))],t["fontSize".concat((0,K.A)(o.fontSize))]]}})((e=>{let{theme:t,ownerState:o}=e;var n,r,a,i,l,s,c,d,u,p,m,h,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:o.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(a=t.transitions)||null==(a=a.duration)?void 0:a.shorter}),fontSize:{inherit:"inherit",small:(null==(i=t.typography)||null==(l=i.pxToRem)?void 0:l.call(i,20))||"1.25rem",medium:(null==(s=t.typography)||null==(c=s.pxToRem)?void 0:c.call(s,24))||"1.5rem",large:(null==(d=t.typography)||null==(u=d.pxToRem)?void 0:u.call(d,35))||"2.1875rem"}[o.fontSize],color:null!=(p=null==(m=(t.vars||t).palette)||null==(m=m[o.color])?void 0:m.main)?p:{action:null==(h=(t.vars||t).palette)||null==(h=h.action)?void 0:h.active,disabled:null==(v=(t.vars||t).palette)||null==(v=v.action)?void 0:v.disabled,inherit:void 0}[o.color]}})),To=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSvgIcon"}),{children:r,className:s,color:c="inherit",component:d="svg",fontSize:u="medium",htmlColor:m,inheritViewBox:h=!1,titleAccess:v,viewBox:f="0 0 24 24"}=o,g=(0,i.A)(o,Lo),b=n.isValidElement(r)&&"svg"===r.type,A=(0,a.A)({},o,{color:c,component:d,fontSize:u,instanceFontSize:e.fontSize,inheritViewBox:h,viewBox:f,hasSvgAsChild:b}),y={};h||(y.viewBox=f);const x=(e=>{const{color:t,fontSize:o,classes:n}=e,r={root:["root","inherit"!==t&&"color".concat((0,K.A)(t)),"fontSize".concat((0,K.A)(o))]};return(0,S.A)(r,Mo,n)})(A);return(0,p.jsxs)(Io,(0,a.A)({as:d,className:(0,l.A)(x.root,s),focusable:"false",color:m,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},y,g,b&&r.props,{ownerState:A,children:[b?r.props.children:r,v?(0,p.jsx)("title",{children:v}):null]}))}));To.muiName="SvgIcon";const zo=To;function Po(e,t){function o(o,n){return(0,p.jsx)(zo,(0,a.A)({"data-testid":"".concat(t,"Icon"),ref:n},o,{children:e}))}return o.muiName=zo.muiName,n.memo(n.forwardRef(o))}const No=Po((0,p.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function Oo(e){return(0,w.Ay)("MuiChip",e)}const Bo=(0,g.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),jo=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],Fo=(0,G.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e,{color:n,iconColor:r,clickable:a,onDelete:i,size:l,variant:s}=o;return[{["& .".concat(Bo.avatar)]:t.avatar},{["& .".concat(Bo.avatar)]:t["avatar".concat((0,K.A)(l))]},{["& .".concat(Bo.avatar)]:t["avatarColor".concat((0,K.A)(n))]},{["& .".concat(Bo.icon)]:t.icon},{["& .".concat(Bo.icon)]:t["icon".concat((0,K.A)(l))]},{["& .".concat(Bo.icon)]:t["iconColor".concat((0,K.A)(r))]},{["& .".concat(Bo.deleteIcon)]:t.deleteIcon},{["& .".concat(Bo.deleteIcon)]:t["deleteIcon".concat((0,K.A)(l))]},{["& .".concat(Bo.deleteIcon)]:t["deleteIconColor".concat((0,K.A)(n))]},{["& .".concat(Bo.deleteIcon)]:t["deleteIcon".concat((0,K.A)(s),"Color").concat((0,K.A)(n))]},t.root,t["size".concat((0,K.A)(l))],t["color".concat((0,K.A)(n))],a&&t.clickable,a&&"default"!==n&&t["clickableColor".concat((0,K.A)(n),")")],i&&t.deletable,i&&"default"!==n&&t["deletableColor".concat((0,K.A)(n))],t[s],t["".concat(s).concat((0,K.A)(n))]]}})((e=>{let{theme:t,ownerState:o}=e;const n="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,a.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(Bo.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(Bo.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},["& .".concat(Bo.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(Bo.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(Bo.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(Bo.icon)]:(0,a.A)({marginLeft:5,marginRight:-6},"small"===o.size&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&(0,a.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:n},"default"!==o.color&&{color:"inherit"})),["& .".concat(Bo.deleteIcon)]:(0,a.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,re.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,re.X4)(t.palette.text.primary,.4)}},"small"===o.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==o.color&&{color:t.vars?"rgba(".concat(t.vars.palette[o.color].contrastTextChannel," / 0.7)"):(0,re.X4)(t.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[o.color].contrastText}})},"small"===o.size&&{height:24},"default"!==o.color&&{backgroundColor:(t.vars||t).palette[o.color].main,color:(t.vars||t).palette[o.color].contrastText},o.onDelete&&{["&.".concat(Bo.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},o.onDelete&&"default"!==o.color&&{["&.".concat(Bo.focusVisible)]:{backgroundColor:(t.vars||t).palette[o.color].dark}})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(Bo.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},o.clickable&&"default"!==o.color&&{["&:hover, &.".concat(Bo.focusVisible)]:{backgroundColor:(t.vars||t).palette[o.color].dark}})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},"outlined"===o.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(Bo.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(Bo.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(Bo.avatar)]:{marginLeft:4},["& .".concat(Bo.avatarSmall)]:{marginLeft:2},["& .".concat(Bo.icon)]:{marginLeft:4},["& .".concat(Bo.iconSmall)]:{marginLeft:2},["& .".concat(Bo.deleteIcon)]:{marginRight:5},["& .".concat(Bo.deleteIconSmall)]:{marginRight:3}},"outlined"===o.variant&&"default"!==o.color&&{color:(t.vars||t).palette[o.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / 0.7)"):(0,re.X4)(t.palette[o.color].main,.7)),["&.".concat(Bo.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)(t.palette[o.color].main,t.palette.action.hoverOpacity)},["&.".concat(Bo.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,re.X4)(t.palette[o.color].main,t.palette.action.focusOpacity)},["& .".concat(Bo.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / 0.7)"):(0,re.X4)(t.palette[o.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[o.color].main}}})})),Wo=(0,G.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:o}=e,{size:n}=o;return[t.label,t["label".concat((0,K.A)(n))]]}})((e=>{let{ownerState:t}=e;return(0,a.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})}));function Do(e){return"Backspace"===e.key||"Delete"===e.key}const Ho=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiChip"}),{avatar:r,className:s,clickable:c,color:d="default",component:u,deleteIcon:m,disabled:h=!1,icon:v,label:f,onClick:g,onDelete:b,onKeyDown:A,onKeyUp:y,size:x="medium",variant:w="filled",tabIndex:C,skipFocusWhenDisabled:k=!1}=o,R=(0,i.A)(o,jo),E=n.useRef(null),M=(0,Ye.A)(E,t),L=e=>{e.stopPropagation(),b&&b(e)},I=!(!1===c||!g)||c,T=I||b?bt.A:u||"div",z=(0,a.A)({},o,{component:T,disabled:h,size:x,color:d,iconColor:n.isValidElement(v)&&v.props.color||d,onDelete:!!b,clickable:I,variant:w}),P=(e=>{const{classes:t,disabled:o,size:n,color:r,iconColor:a,onDelete:i,clickable:l,variant:s}=e,c={root:["root",s,o&&"disabled","size".concat((0,K.A)(n)),"color".concat((0,K.A)(r)),l&&"clickable",l&&"clickableColor".concat((0,K.A)(r)),i&&"deletable",i&&"deletableColor".concat((0,K.A)(r)),"".concat(s).concat((0,K.A)(r))],label:["label","label".concat((0,K.A)(n))],avatar:["avatar","avatar".concat((0,K.A)(n)),"avatarColor".concat((0,K.A)(r))],icon:["icon","icon".concat((0,K.A)(n)),"iconColor".concat((0,K.A)(a))],deleteIcon:["deleteIcon","deleteIcon".concat((0,K.A)(n)),"deleteIconColor".concat((0,K.A)(r)),"deleteIcon".concat((0,K.A)(s),"Color").concat((0,K.A)(r))]};return(0,S.A)(c,Oo,t)})(z),N=T===bt.A?(0,a.A)({component:u||"div",focusVisibleClassName:P.focusVisible},b&&{disableRipple:!0}):{};let O=null;b&&(O=m&&n.isValidElement(m)?n.cloneElement(m,{className:(0,l.A)(m.props.className,P.deleteIcon),onClick:L}):(0,p.jsx)(No,{className:(0,l.A)(P.deleteIcon),onClick:L}));let B=null;r&&n.isValidElement(r)&&(B=n.cloneElement(r,{className:(0,l.A)(P.avatar,r.props.className)}));let j=null;return v&&n.isValidElement(v)&&(j=n.cloneElement(v,{className:(0,l.A)(P.icon,v.props.className)})),(0,p.jsxs)(Fo,(0,a.A)({as:T,className:(0,l.A)(P.root,s),disabled:!(!I||!h)||void 0,onClick:g,onKeyDown:e=>{e.currentTarget===e.target&&Do(e)&&e.preventDefault(),A&&A(e)},onKeyUp:e=>{e.currentTarget===e.target&&(b&&Do(e)?b(e):"Escape"===e.key&&E.current&&E.current.blur()),y&&y(e)},ref:M,tabIndex:k&&h?-1:C,ownerState:z},N,R,{children:[B||j,(0,p.jsx)(Wo,{className:(0,l.A)(P.label),ownerState:z,children:f}),O]}))}));function Vo(e){return(0,w.Ay)("MuiInputBase",e)}const Ko=(0,g.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);function Go(e){return(0,w.Ay)("MuiInput",e)}const qo=(0,a.A)({},Ko,(0,g.A)("MuiInput",["root","underline","input"]));function Uo(e){return(0,w.Ay)("MuiOutlinedInput",e)}const Xo=(0,a.A)({},Ko,(0,g.A)("MuiOutlinedInput",["root","notchedOutline","input"]));function Yo(e){return(0,w.Ay)("MuiFilledInput",e)}const Qo=(0,a.A)({},Ko,(0,g.A)("MuiFilledInput",["root","underline","input"])),_o=Po((0,p.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),$o=Po((0,p.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Zo(e){return(0,w.Ay)("MuiAutocomplete",e)}const Jo=(0,g.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var en,tn;const on=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],nn=["ref"],rn=Ke(),an=(0,G.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e,{fullWidth:n,hasClearIcon:r,hasPopupIcon:a,inputFocused:i,size:l}=o;return[{["& .".concat(Jo.tag)]:t.tag},{["& .".concat(Jo.tag)]:t["tagSize".concat((0,K.A)(l))]},{["& .".concat(Jo.inputRoot)]:t.inputRoot},{["& .".concat(Jo.input)]:t.input},{["& .".concat(Jo.input)]:i&&t.inputFocused},t.root,n&&t.fullWidth,a&&t.hasPopupIcon,r&&t.hasClearIcon]}})({["&.".concat(Jo.focused," .").concat(Jo.clearIndicator)]:{visibility:"visible"},"@media (pointer: fine)":{["&:hover .".concat(Jo.clearIndicator)]:{visibility:"visible"}},["& .".concat(Jo.tag)]:{margin:3,maxWidth:"calc(100% - 6px)"},["& .".concat(Jo.inputRoot)]:{flexWrap:"wrap",[".".concat(Jo.hasPopupIcon,"&, .").concat(Jo.hasClearIcon,"&")]:{paddingRight:30},[".".concat(Jo.hasPopupIcon,".").concat(Jo.hasClearIcon,"&")]:{paddingRight:56},["& .".concat(Jo.input)]:{width:0,minWidth:30}},["& .".concat(qo.root)]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},["& .".concat(qo.root,".").concat(Ko.sizeSmall)]:{["& .".concat(qo.input)]:{padding:"2px 4px 3px 0"}},["& .".concat(Xo.root)]:{padding:9,[".".concat(Jo.hasPopupIcon,"&, .").concat(Jo.hasClearIcon,"&")]:{paddingRight:39},[".".concat(Jo.hasPopupIcon,".").concat(Jo.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(Jo.input)]:{padding:"7.5px 4px 7.5px 5px"},["& .".concat(Jo.endAdornment)]:{right:9}},["& .".concat(Xo.root,".").concat(Ko.sizeSmall)]:{paddingTop:6,paddingBottom:6,paddingLeft:6,["& .".concat(Jo.input)]:{padding:"2.5px 4px 2.5px 8px"}},["& .".concat(Qo.root)]:{paddingTop:19,paddingLeft:8,[".".concat(Jo.hasPopupIcon,"&, .").concat(Jo.hasClearIcon,"&")]:{paddingRight:39},[".".concat(Jo.hasPopupIcon,".").concat(Jo.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(Qo.input)]:{padding:"7px 4px"},["& .".concat(Jo.endAdornment)]:{right:9}},["& .".concat(Qo.root,".").concat(Ko.sizeSmall)]:{paddingBottom:1,["& .".concat(Qo.input)]:{padding:"2.5px 4px"}},["& .".concat(Ko.hiddenLabel)]:{paddingTop:8},["& .".concat(Qo.root,".").concat(Ko.hiddenLabel)]:{paddingTop:0,paddingBottom:0,["& .".concat(Jo.input)]:{paddingTop:16,paddingBottom:17}},["& .".concat(Qo.root,".").concat(Ko.hiddenLabel,".").concat(Ko.sizeSmall)]:{["& .".concat(Jo.input)]:{paddingTop:8,paddingBottom:9}},["& .".concat(Jo.input)]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{["& .".concat(Jo.tag)]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{["& .".concat(Jo.input)]:{opacity:1}}}]}),ln=(0,G.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),sn=(0,G.Ay)($t,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),cn=(0,G.Ay)($t,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:o}=e;return(0,a.A)({},t.popupIndicator,o.popupOpen&&t.popupIndicatorOpen)}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),dn=(0,G.Ay)(wo.A,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(Jo.option)]:t.option},t.popper,o.disablePortal&&t.popperDisablePortal]}})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}})),un=(0,G.Ay)(Le,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return(0,a.A)({},t.typography.body1,{overflow:"auto"})})),pn=(0,G.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),mn=(0,G.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}})),hn=(0,G.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",["& .".concat(Jo.option)]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},["&.".concat(Jo.focused)]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(Jo.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Jo.focused)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(Jo.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}})),vn=(0,G.Ay)(Eo,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}})),fn=(0,G.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,["& .".concat(Jo.option)]:{paddingLeft:24}}),gn=n.forwardRef((function(e,t){var o,r,s,c;const d=rn({props:e,name:"MuiAutocomplete"}),{autoComplete:u=!1,autoHighlight:m=!1,autoSelect:h=!1,blurOnSelect:v=!1,ChipProps:f,className:g,clearIcon:b=en||(en=(0,p.jsx)(_o,{fontSize:"small"})),clearOnBlur:A=!d.freeSolo,clearOnEscape:y=!1,clearText:x="Clear",closeText:w="Close",componentsProps:C={},defaultValue:k=(d.multiple?[]:null),disableClearable:R=!1,disableCloseOnSelect:E=!1,disabled:M=!1,disabledItemsFocusable:L=!1,disableListWrap:I=!1,disablePortal:T=!1,filterSelectedOptions:z=!1,forcePopupIcon:P="auto",freeSolo:N=!1,fullWidth:O=!1,getLimitTagsText:B=(e=>"+".concat(e)),getOptionLabel:j,groupBy:F,handleHomeEndKeys:W=!d.freeSolo,includeInputInList:D=!1,limitTags:H=-1,ListboxComponent:V="ul",ListboxProps:G,loading:q=!1,loadingText:U="Loading\u2026",multiple:X=!1,noOptionsText:Y="No options",openOnFocus:Q=!1,openText:_="Open",PaperComponent:$=Le,PopperComponent:Z=wo.A,popupIcon:J=tn||(tn=(0,p.jsx)($o,{})),readOnly:ee=!1,renderGroup:te,renderInput:oe,renderOption:ne,renderTags:re,selectOnFocus:ae=!d.freeSolo,size:ie="medium",slotProps:le={}}=d,se=(0,i.A)(d,on),{getRootProps:ce,getInputProps:de,getInputLabelProps:ue,getPopupIndicatorProps:pe,getClearProps:me,getTagProps:he,getListboxProps:ve,getOptionProps:fe,value:ge,dirty:be,expanded:Ae,id:ye,popupOpen:xe,focused:we,focusedTag:Se,anchorEl:Ce,setAnchorEl:ke,inputValue:Re,groupedOptions:Ee}=xo((0,a.A)({},d,{componentName:"Autocomplete"})),Me=!R&&!M&&be&&!ee,Ie=(!N||!0===P)&&!1!==P,{onMouseDown:Te}=de(),{ref:ze}=null!=G?G:{},Pe=ve(),{ref:Ne}=Pe,Oe=(0,i.A)(Pe,nn),Be=(0,Ye.A)(Ne,ze),je=j||(e=>{var t;return null!=(t=e.label)?t:e}),Fe=(0,a.A)({},d,{disablePortal:T,expanded:Ae,focused:we,fullWidth:O,getOptionLabel:je,hasClearIcon:Me,hasPopupIcon:Ie,inputFocused:-1===Se,popupOpen:xe,size:ie}),We=(e=>{const{classes:t,disablePortal:o,expanded:n,focused:r,fullWidth:a,hasClearIcon:i,hasPopupIcon:l,inputFocused:s,popupOpen:c,size:d}=e,u={root:["root",n&&"expanded",r&&"focused",a&&"fullWidth",i&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",s&&"inputFocused"],tag:["tag","tagSize".concat((0,K.A)(d))],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",o&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,S.A)(u,Zo,t)})(Fe);let De;if(X&&ge.length>0){const e=e=>(0,a.A)({className:We.tag,disabled:M},he(e));De=re?re(ge,e,Fe):ge.map(((t,o)=>(0,p.jsx)(Ho,(0,a.A)({label:je(t),size:ie},e({index:o}),f))))}if(H>-1&&Array.isArray(De)){const e=De.length-H;!we&&e>0&&(De=De.splice(0,H),De.push((0,p.jsx)("span",{className:We.tag,children:B(e)},De.length)))}const He=te||(e=>(0,p.jsxs)("li",{children:[(0,p.jsx)(vn,{className:We.groupLabel,ownerState:Fe,component:"div",children:e.group}),(0,p.jsx)(fn,{className:We.groupUl,ownerState:Fe,children:e.children})]},e.key)),Ve=ne||((e,t)=>(0,n.createElement)("li",(0,a.A)({},e,{key:e.key}),je(t))),Ke=(e,t)=>{const o=fe({option:e,index:t});return Ve((0,a.A)({},o,{className:We.option}),e,{selected:o["aria-selected"],index:t,inputValue:Re},Fe)},Ge=null!=(o=le.clearIndicator)?o:C.clearIndicator,qe=null!=(r=le.paper)?r:C.paper,Ue=null!=(s=le.popper)?s:C.popper,Xe=null!=(c=le.popupIndicator)?c:C.popupIndicator,Qe=e=>(0,p.jsx)(dn,(0,a.A)({as:Z,disablePortal:T,style:{width:Ce?Ce.clientWidth:null},ownerState:Fe,role:"presentation",anchorEl:Ce,open:xe},Ue,{className:(0,l.A)(We.popper,null==Ue?void 0:Ue.className),children:(0,p.jsx)(un,(0,a.A)({ownerState:Fe,as:$},qe,{className:(0,l.A)(We.paper,null==qe?void 0:qe.className),children:e}))}));let _e=null;return!q&&Ee.length>0?_e=Qe((0,p.jsx)(hn,(0,a.A)({as:V,className:We.listbox,ownerState:Fe},Oe,G,{ref:Be,children:Ee.map(((e,t)=>F?He({key:e.key,group:e.group,children:e.options.map(((t,o)=>Ke(t,e.index+o)))}):Ke(e,t)))}))):q&&0===Ee.length?_e=Qe((0,p.jsx)(pn,{className:We.loading,ownerState:Fe,children:U})):0!==Ee.length||N||q||(_e=Qe((0,p.jsx)(mn,{className:We.noOptions,ownerState:Fe,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:Y}))),(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)(an,(0,a.A)({ref:t,className:(0,l.A)(We.root,g),ownerState:Fe},ce(se),{children:oe({id:ye,disabled:M,fullWidth:!0,size:"small"===ie?"small":void 0,InputLabelProps:ue(),InputProps:(0,a.A)({ref:ke,className:We.inputRoot,startAdornment:De,onClick:e=>{e.target===e.currentTarget&&Te(e)}},(Me||Ie)&&{endAdornment:(0,p.jsxs)(ln,{className:We.endAdornment,ownerState:Fe,children:[Me?(0,p.jsx)(sn,(0,a.A)({},me(),{"aria-label":x,title:x,ownerState:Fe},Ge,{className:(0,l.A)(We.clearIndicator,null==Ge?void 0:Ge.className),children:b})):null,Ie?(0,p.jsx)(cn,(0,a.A)({},pe(),{disabled:M,"aria-label":xe?w:_,title:xe?w:_,ownerState:Fe},Xe,{className:(0,l.A)(We.popupIndicator,null==Xe?void 0:Xe.className),children:J})):null]})}),inputProps:(0,a.A)({className:We.input,disabled:M,readOnly:ee},de())})})),Ce?_e:null]})}));var bn=o(6632),An=o(2144);function yn(e){return(0,An.A)(e).defaultView||window}var xn=o(3844);function wn(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,r=new Array(n),a=0;a{e.apply(this,r)}),o)}return n.clear=()=>{clearTimeout(t)},n}const Sn=["onChange","maxRows","minRows","style","value"];function Cn(e){return parseInt(e,10)||0}const kn={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const Rn=n.forwardRef((function(e,t){const{onChange:o,maxRows:r,minRows:l=1,style:s,value:c}=e,d=(0,i.A)(e,Sn),{current:u}=n.useRef(null!=c),m=n.useRef(null),h=(0,rt.A)(t,m),v=n.useRef(null),f=n.useCallback((()=>{const t=m.current,o=yn(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};const n=v.current;n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,i=Cn(o.paddingBottom)+Cn(o.paddingTop),s=Cn(o.borderBottomWidth)+Cn(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let u=c;l&&(u=Math.max(Number(l)*d,u)),r&&(u=Math.min(Number(r)*d,u)),u=Math.max(u,d);return{outerHeightStyle:u+("border-box"===a?i+s:0),overflowing:Math.abs(u-c)<=1}}),[r,l,e.placeholder]),g=n.useCallback((()=>{const e=f();if(void 0===(t=e)||null===t||0===Object.keys(t).length||0===t.outerHeightStyle&&!t.overflowing)return;var t;const o=m.current;o.style.height="".concat(e.outerHeightStyle,"px"),o.style.overflow=e.overflowing?"hidden":""}),[f]);(0,xn.A)((()=>{const e=()=>{g()};let t;const o=wn(e),n=m.current,r=yn(n);let a;return r.addEventListener("resize",o),"undefined"!==typeof ResizeObserver&&(a=new ResizeObserver(e),a.observe(n)),()=>{o.clear(),cancelAnimationFrame(t),r.removeEventListener("resize",o),a&&a.disconnect()}}),[f,g]),(0,xn.A)((()=>{g()}));return(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)("textarea",(0,a.A)({value:c,onChange:e=>{u||g(),o&&o(e)},ref:h,rows:l,style:s},d)),(0,p.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:v,tabIndex:-1,style:(0,a.A)({},kn,s,{paddingTop:0,paddingBottom:0})})]})}));var En=o(540);function Mn(e){let{props:t,states:o,muiFormControl:n}=e;return o.reduce(((e,o)=>(e[o]=t[o],n&&"undefined"===typeof t[o]&&(e[o]=n[o]),e)),{})}const Ln=n.createContext(void 0);function In(){return n.useContext(Ln)}const Tn=xn.A;var zn=o(869);const Pn=function(e){let{styles:t,themeId:o,defaultTheme:n={}}=e;const r=(0,u.A)(n),a="function"===typeof t?t(o&&r[o]||r):t;return(0,p.jsx)(zn.A,{styles:a})};var Nn=o(5170);const On=function(e){return(0,p.jsx)(Pn,(0,a.A)({},e,{defaultTheme:Nn.A,themeId:f.A}))};function Bn(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function jn(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Bn(e.value)&&""!==e.value||t&&Bn(e.defaultValue)&&""!==e.defaultValue)}const Fn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Wn=(e,t)=>{const{ownerState:o}=e;return[t.root,o.formControl&&t.formControl,o.startAdornment&&t.adornedStart,o.endAdornment&&t.adornedEnd,o.error&&t.error,"small"===o.size&&t.sizeSmall,o.multiline&&t.multiline,o.color&&t["color".concat((0,K.A)(o.color))],o.fullWidth&&t.fullWidth,o.hiddenLabel&&t.hiddenLabel]},Dn=(e,t)=>{const{ownerState:o}=e;return[t.input,"small"===o.size&&t.inputSizeSmall,o.multiline&&t.inputMultiline,"search"===o.type&&t.inputTypeSearch,o.startAdornment&&t.inputAdornedStart,o.endAdornment&&t.inputAdornedEnd,o.hiddenLabel&&t.inputHiddenLabel]},Hn=(0,G.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Wn})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(Ko.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},o.multiline&&(0,a.A)({padding:"4px 0 5px"},"small"===o.size&&{paddingTop:1}),o.fullWidth&&{width:"100%"})})),Vn=(0,G.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Dn})((e=>{let{theme:t,ownerState:o}=e;const n="light"===t.palette.mode,r=(0,a.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},l=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return(0,a.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(Ko.formControl," &")]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":l,"&:focus::-moz-placeholder":l,"&:focus:-ms-input-placeholder":l,"&:focus::-ms-input-placeholder":l},["&.".concat(Ko.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===o.size&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===o.type&&{MozAppearance:"textfield"})})),Kn=(0,p.jsx)(On,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Gn=n.forwardRef((function(e,t){var o;const r=(0,q.A)({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:c,autoFocus:d,className:u,components:m={},componentsProps:h={},defaultValue:v,disabled:f,disableInjectingGlobalStyles:g,endAdornment:b,fullWidth:A=!1,id:y,inputComponent:x="input",inputProps:w={},inputRef:C,maxRows:k,minRows:R,multiline:E=!1,name:M,onBlur:L,onChange:I,onClick:T,onFocus:z,onKeyDown:P,onKeyUp:N,placeholder:O,readOnly:B,renderSuffix:j,rows:F,slotProps:W={},slots:D={},startAdornment:H,type:V="text",value:G}=r,U=(0,i.A)(r,Fn),X=null!=w.value?w.value:G,{current:Y}=n.useRef(null!=X),Q=n.useRef(),_=n.useCallback((e=>{0}),[]),$=(0,Ye.A)(Q,C,w.ref,_),[Z,J]=n.useState(!1),ee=In();const te=Mn({props:r,muiFormControl:ee,states:["color","disabled","error","hiddenLabel","size","required","filled"]});te.focused=ee?ee.focused:Z,n.useEffect((()=>{!ee&&f&&Z&&(J(!1),L&&L())}),[ee,f,Z,L]);const oe=ee&&ee.onFilled,ne=ee&&ee.onEmpty,re=n.useCallback((e=>{jn(e)?oe&&oe():ne&&ne()}),[oe,ne]);Tn((()=>{Y&&re({value:X})}),[X,re,Y]);n.useEffect((()=>{re(Q.current)}),[]);let ae=x,ie=w;E&&"input"===ae&&(ie=F?(0,a.A)({type:void 0,minRows:F,maxRows:F},ie):(0,a.A)({type:void 0,maxRows:k,minRows:R},ie),ae=Rn);n.useEffect((()=>{ee&&ee.setAdornedStart(Boolean(H))}),[ee,H]);const le=(0,a.A)({},r,{color:te.color||"primary",disabled:te.disabled,endAdornment:b,error:te.error,focused:te.focused,formControl:ee,fullWidth:A,hiddenLabel:te.hiddenLabel,multiline:E,size:te.size,startAdornment:H,type:V}),se=(e=>{const{classes:t,color:o,disabled:n,error:r,endAdornment:a,focused:i,formControl:l,fullWidth:s,hiddenLabel:c,multiline:d,readOnly:u,size:p,startAdornment:m,type:h}=e,v={root:["root","color".concat((0,K.A)(o)),n&&"disabled",r&&"error",s&&"fullWidth",i&&"focused",l&&"formControl",p&&"medium"!==p&&"size".concat((0,K.A)(p)),d&&"multiline",m&&"adornedStart",a&&"adornedEnd",c&&"hiddenLabel",u&&"readOnly"],input:["input",n&&"disabled","search"===h&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",a&&"inputAdornedEnd",u&&"readOnly"]};return(0,S.A)(v,Vo,t)})(le),ce=D.root||m.Root||Hn,de=W.root||h.root||{},ue=D.input||m.Input||Vn;return ie=(0,a.A)({},ie,null!=(o=W.input)?o:h.input),(0,p.jsxs)(n.Fragment,{children:[!g&&Kn,(0,p.jsxs)(ce,(0,a.A)({},de,!(0,En.g)(ce)&&{ownerState:(0,a.A)({},le,de.ownerState)},{ref:t,onClick:e=>{Q.current&&e.currentTarget===e.target&&Q.current.focus(),T&&T(e)}},U,{className:(0,l.A)(se.root,de.className,u,B&&"MuiInputBase-readOnly"),children:[H,(0,p.jsx)(Ln.Provider,{value:null,children:(0,p.jsx)(ue,(0,a.A)({ownerState:le,"aria-invalid":te.error,"aria-describedby":s,autoComplete:c,autoFocus:d,defaultValue:v,disabled:te.disabled,id:y,onAnimationStart:e=>{re("mui-auto-fill-cancel"===e.animationName?Q.current:{value:"x"})},name:M,placeholder:O,readOnly:B,required:te.required,rows:F,value:X,onKeyDown:P,onKeyUp:N,type:V},ie,!(0,En.g)(ue)&&{as:ae,ownerState:(0,a.A)({},le,ie.ownerState)},{ref:$,className:(0,l.A)(se.input,ie.className,B&&"MuiInputBase-readOnly"),onBlur:e=>{L&&L(e),w.onBlur&&w.onBlur(e),ee&&ee.onBlur?ee.onBlur(e):J(!1)},onChange:function(e){if(!Y){const t=e.target||Q.current;if(null==t)throw new Error((0,bn.A)(1));re({value:t.value})}for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n{te.disabled?e.stopPropagation():(z&&z(e),w.onFocus&&w.onFocus(e),ee&&ee.onFocus?ee.onFocus(e):J(!0))}}))}),b,j?j((0,a.A)({},te,{startAdornment:H})):null]}))]})})),qn=Gn;var Un=o(1475);const Xn=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Yn=(0,G.Ay)(Hn,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[...Wn(e,t),!o.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:o}=e;let n="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,a.A)({position:"relative"},o.formControl&&{"label + &":{marginTop:16}},!o.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[o.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(qo.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(qo.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(qo.disabled,", .").concat(qo.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(n)}},["&.".concat(qo.disabled,":before")]:{borderBottomStyle:"dotted"}})})),Qn=(0,G.Ay)(Vn,{name:"MuiInput",slot:"Input",overridesResolver:Dn})({}),_n=n.forwardRef((function(e,t){var o,n,r,l;const s=(0,q.A)({props:e,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:u,fullWidth:m=!1,inputComponent:h="input",multiline:v=!1,slotProps:f,slots:g={},type:b="text"}=s,A=(0,i.A)(s,Xn),y=(e=>{const{classes:t,disableUnderline:o}=e,n={root:["root",!o&&"underline"],input:["input"]},r=(0,S.A)(n,Go,t);return(0,a.A)({},t,r)})(s),x={root:{ownerState:{disableUnderline:c}}},w=(null!=f?f:u)?(0,R.A)(null!=f?f:u,x):x,C=null!=(o=null!=(n=g.root)?n:d.Root)?o:Yn,k=null!=(r=null!=(l=g.input)?l:d.Input)?r:Qn;return(0,p.jsx)(qn,(0,a.A)({slots:{root:C,input:k},slotProps:w,fullWidth:m,inputComponent:h,multiline:v,ref:t,type:b},A,{classes:y}))}));_n.muiName="Input";const $n=_n,Zn=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Jn=(0,G.Ay)(Hn,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[...Wn(e,t),!o.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:o}=e;var n;const r="light"===t.palette.mode,i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",l=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",c=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,a.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:l,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:l}},["&.".concat(Qo.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:l},["&.".concat(Qo.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:c}},!o.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(n=(t.vars||t).palette[o.color||"primary"])?void 0:n.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Qo.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Qo.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Qo.disabled,", .").concat(Qo.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(Qo.disabled,":before")]:{borderBottomStyle:"dotted"}},o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&(0,a.A)({padding:"25px 12px 8px"},"small"===o.size&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.hiddenLabel&&"small"===o.size&&{paddingTop:8,paddingBottom:9}))})),er=(0,G.Ay)(Vn,{name:"MuiFilledInput",slot:"Input",overridesResolver:Dn})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===o.size&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0},o.hiddenLabel&&"small"===o.size&&{paddingTop:8,paddingBottom:9},o.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})})),tr=n.forwardRef((function(e,t){var o,n,r,l;const s=(0,q.A)({props:e,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:u=!1,inputComponent:m="input",multiline:h=!1,slotProps:v,slots:f={},type:g="text"}=s,b=(0,i.A)(s,Zn),A=(0,a.A)({},s,{fullWidth:u,inputComponent:m,multiline:h,type:g}),y=(e=>{const{classes:t,disableUnderline:o}=e,n={root:["root",!o&&"underline"],input:["input"]},r=(0,S.A)(n,Yo,t);return(0,a.A)({},t,r)})(s),x={root:{ownerState:A},input:{ownerState:A}},w=(null!=v?v:d)?(0,R.A)(x,null!=v?v:d):x,C=null!=(o=null!=(n=f.root)?n:c.Root)?o:Jn,k=null!=(r=null!=(l=f.input)?l:c.Input)?r:er;return(0,p.jsx)(qn,(0,a.A)({slots:{root:C,input:k},componentsProps:w,fullWidth:u,inputComponent:m,multiline:h,ref:t,type:g},b,{classes:y}))}));tr.muiName="Input";const or=tr;var nr;const rr=["children","classes","className","label","notched"],ar=(0,G.Ay)("fieldset",{shouldForwardProp:Un.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),ir=(0,G.Ay)("legend",{shouldForwardProp:Un.A})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:o.transitions.create("width",{duration:150,easing:o.transitions.easing.easeOut})},t.withLabel&&(0,a.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:o.transitions.create("max-width",{duration:50,easing:o.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:o.transitions.create("max-width",{duration:100,easing:o.transitions.easing.easeOut,delay:50})}))}));const lr=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],sr=(0,G.Ay)(Hn,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Wn})((e=>{let{theme:t,ownerState:o}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,a.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(Xo.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(Xo.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}},["&.".concat(Xo.focused," .").concat(Xo.notchedOutline)]:{borderColor:(t.vars||t).palette[o.color].main,borderWidth:2},["&.".concat(Xo.error," .").concat(Xo.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(Xo.disabled," .").concat(Xo.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},o.startAdornment&&{paddingLeft:14},o.endAdornment&&{paddingRight:14},o.multiline&&(0,a.A)({padding:"16.5px 14px"},"small"===o.size&&{padding:"8.5px 14px"}))})),cr=(0,G.Ay)((function(e){const{className:t,label:o,notched:n}=e,r=(0,i.A)(e,rr),l=null!=o&&""!==o,s=(0,a.A)({},e,{notched:n,withLabel:l});return(0,p.jsx)(ar,(0,a.A)({"aria-hidden":!0,className:t,ownerState:s},r,{children:(0,p.jsx)(ir,{ownerState:s,children:l?(0,p.jsx)("span",{children:o}):nr||(nr=(0,p.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((e=>{let{theme:t}=e;const o="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):o}})),dr=(0,G.Ay)(Vn,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Dn})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===o.size&&{padding:"8.5px 14px"},o.multiline&&{padding:0},o.startAdornment&&{paddingLeft:0},o.endAdornment&&{paddingRight:0})})),ur=n.forwardRef((function(e,t){var o,r,l,s,c;const d=(0,q.A)({props:e,name:"MuiOutlinedInput"}),{components:u={},fullWidth:m=!1,inputComponent:h="input",label:v,multiline:f=!1,notched:g,slots:b={},type:A="text"}=d,y=(0,i.A)(d,lr),x=(e=>{const{classes:t}=e,o=(0,S.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Uo,t);return(0,a.A)({},t,o)})(d),w=In(),C=Mn({props:d,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),k=(0,a.A)({},d,{color:C.color||"primary",disabled:C.disabled,error:C.error,focused:C.focused,formControl:w,fullWidth:m,hiddenLabel:C.hiddenLabel,multiline:f,size:C.size,type:A}),R=null!=(o=null!=(r=b.root)?r:u.Root)?o:sr,E=null!=(l=null!=(s=b.input)?s:u.Input)?l:dr;return(0,p.jsx)(qn,(0,a.A)({slots:{root:R,input:E},renderSuffix:e=>(0,p.jsx)(cr,{ownerState:k,className:x.notchedOutline,label:null!=v&&""!==v&&C.required?c||(c=(0,p.jsxs)(n.Fragment,{children:[v,"\u2009","*"]})):v,notched:"undefined"!==typeof g?g:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:m,inputComponent:h,multiline:f,ref:t,type:A},y,{classes:(0,a.A)({},x,{notchedOutline:null})}))}));ur.muiName="Input";const pr=ur;function mr(e){return(0,w.Ay)("MuiFormLabel",e)}const hr=(0,g.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),vr=["children","className","color","component","disabled","error","filled","focused","required"],fr=(0,G.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return(0,a.A)({},t.root,"secondary"===o.color&&t.colorSecondary,o.filled&&t.filled)}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(hr.focused)]:{color:(t.vars||t).palette[o.color].main},["&.".concat(hr.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(hr.error)]:{color:(t.vars||t).palette.error.main}})})),gr=(0,G.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(hr.error)]:{color:(t.vars||t).palette.error.main}}})),br=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiFormLabel"}),{children:n,className:r,component:s="label"}=o,c=(0,i.A)(o,vr),d=Mn({props:o,muiFormControl:In(),states:["color","required","focused","disabled","error","filled"]}),u=(0,a.A)({},o,{color:d.color||"primary",component:s,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),m=(e=>{const{classes:t,color:o,focused:n,disabled:r,error:a,filled:i,required:l}=e,s={root:["root","color".concat((0,K.A)(o)),r&&"disabled",a&&"error",i&&"filled",n&&"focused",l&&"required"],asterisk:["asterisk",a&&"error"]};return(0,S.A)(s,mr,t)})(u);return(0,p.jsxs)(fr,(0,a.A)({as:s,ownerState:u,className:(0,l.A)(m.root,r),ref:t},c,{children:[n,d.required&&(0,p.jsxs)(gr,{ownerState:u,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]}))}));function Ar(e){return(0,w.Ay)("MuiInputLabel",e)}(0,g.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const yr=["disableAnimation","margin","shrink","variant","className"],xr=(0,G.Ay)(br,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(hr.asterisk)]:t.asterisk},t.root,o.formControl&&t.formControl,"small"===o.size&&t.sizeSmall,o.shrink&&t.shrink,!o.disableAnimation&&t.animated,o.focused&&t.focused,t[o.variant]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===o.size&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===o.variant&&(0,a.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===o.size&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&(0,a.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===o.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===o.variant&&(0,a.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===o.size&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),wr=n.forwardRef((function(e,t){const o=(0,q.A)({name:"MuiInputLabel",props:e}),{disableAnimation:n=!1,shrink:r,className:s}=o,c=(0,i.A)(o,yr),d=In();let u=r;"undefined"===typeof u&&d&&(u=d.filled||d.focused||d.adornedStart);const m=Mn({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),h=(0,a.A)({},o,{disableAnimation:n,formControl:d,shrink:u,size:m.size,variant:m.variant,required:m.required,focused:m.focused}),v=(e=>{const{classes:t,formControl:o,size:n,shrink:r,disableAnimation:i,variant:l,required:s}=e,c={root:["root",o&&"formControl",!i&&"animated",r&&"shrink",n&&"normal"!==n&&"size".concat((0,K.A)(n)),l],asterisk:[s&&"asterisk"]},d=(0,S.A)(c,Ar,t);return(0,a.A)({},t,d)})(h);return(0,p.jsx)(xr,(0,a.A)({"data-shrink":u,ownerState:h,ref:t,className:(0,l.A)(v.root,s)},c,{classes:v}))}));function Sr(e){return(0,w.Ay)("MuiFormControl",e)}(0,g.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Cr=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],kr=(0,G.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return(0,a.A)({},t.root,t["margin".concat((0,K.A)(o.margin))],o.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),Rr=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiFormControl"}),{children:r,className:s,color:c="primary",component:d="div",disabled:u=!1,error:m=!1,focused:h,fullWidth:v=!1,hiddenLabel:f=!1,margin:g="none",required:b=!1,size:A="medium",variant:y="outlined"}=o,x=(0,i.A)(o,Cr),w=(0,a.A)({},o,{color:c,component:d,disabled:u,error:m,fullWidth:v,hiddenLabel:f,margin:g,required:b,size:A,variant:y}),C=(e=>{const{classes:t,margin:o,fullWidth:n}=e,r={root:["root","none"!==o&&"margin".concat((0,K.A)(o)),n&&"fullWidth"]};return(0,S.A)(r,Sr,t)})(w),[k,R]=n.useState((()=>{let e=!1;return r&&n.Children.forEach(r,(t=>{if(!Be(t,["Input","Select"]))return;const o=Be(t,["Select"])?t.props.input:t;o&&o.props.startAdornment&&(e=!0)})),e})),[E,M]=n.useState((()=>{let e=!1;return r&&n.Children.forEach(r,(t=>{Be(t,["Input","Select"])&&(jn(t.props,!0)||jn(t.props.inputProps,!0))&&(e=!0)})),e})),[L,I]=n.useState(!1);u&&L&&I(!1);const T=void 0===h||u?L:h;let z;const P=n.useMemo((()=>({adornedStart:k,setAdornedStart:R,color:c,disabled:u,error:m,filled:E,focused:T,fullWidth:v,hiddenLabel:f,size:A,onBlur:()=>{I(!1)},onEmpty:()=>{M(!1)},onFilled:()=>{M(!0)},onFocus:()=>{I(!0)},registerEffect:z,required:b,variant:y})),[k,c,u,m,E,T,v,f,z,b,A,y]);return(0,p.jsx)(Ln.Provider,{value:P,children:(0,p.jsx)(kr,(0,a.A)({as:d,ownerState:w,className:(0,l.A)(C.root,s),ref:t},x,{children:r}))})}));function Er(e){return(0,w.Ay)("MuiFormHelperText",e)}const Mr=(0,g.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Lr;const Ir=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Tr=(0,G.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.size&&t["size".concat((0,K.A)(o.size))],o.contained&&t.contained,o.filled&&t.filled]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(Mr.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Mr.error)]:{color:(t.vars||t).palette.error.main}},"small"===o.size&&{marginTop:4},o.contained&&{marginLeft:14,marginRight:14})})),zr=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiFormHelperText"}),{children:n,className:r,component:s="p"}=o,c=(0,i.A)(o,Ir),d=Mn({props:o,muiFormControl:In(),states:["variant","size","disabled","error","filled","focused","required"]}),u=(0,a.A)({},o,{component:s,contained:"filled"===d.variant||"outlined"===d.variant,variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),m=(e=>{const{classes:t,contained:o,size:n,disabled:r,error:a,filled:i,focused:l,required:s}=e,c={root:["root",r&&"disabled",a&&"error",n&&"size".concat((0,K.A)(n)),o&&"contained",l&&"focused",i&&"filled",s&&"required"]};return(0,S.A)(c,Er,t)})(u);return(0,p.jsx)(Tr,(0,a.A)({as:s,ownerState:u,className:(0,l.A)(m.root,r),ref:t},c,{children:" "===n?Lr||(Lr=(0,p.jsx)("span",{className:"notranslate",children:"\u200b"})):n}))})),Pr=An.A;var Nr=o(3662),Or=o(875);const Br=n.createContext({});function jr(e){return(0,w.Ay)("MuiList",e)}(0,g.A)("MuiList",["root","padding","dense","subheader"]);const Fr=["children","className","component","dense","disablePadding","subheader"],Wr=(0,G.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.disablePadding&&t.padding,o.dense&&t.dense,o.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,a.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),Dr=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiList"}),{children:r,className:s,component:c="ul",dense:d=!1,disablePadding:u=!1,subheader:m}=o,h=(0,i.A)(o,Fr),v=n.useMemo((()=>({dense:d})),[d]),f=(0,a.A)({},o,{component:c,dense:d,disablePadding:u}),g=(e=>{const{classes:t,disablePadding:o,dense:n,subheader:r}=e,a={root:["root",!o&&"padding",n&&"dense",r&&"subheader"]};return(0,S.A)(a,jr,t)})(f);return(0,p.jsx)(Br.Provider,{value:v,children:(0,p.jsxs)(Wr,(0,a.A)({as:c,className:(0,l.A)(g.root,s),ref:t,ownerState:f},h,{children:[m,r]}))})}));function Hr(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const Vr=Hr,Kr=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Gr(e,t,o){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:o?null:e.firstChild}function qr(e,t,o){return e===t?o?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:o?null:e.lastChild}function Ur(e,t){if(void 0===t)return!0;let o=e.innerText;return void 0===o&&(o=e.textContent),o=o.trim().toLowerCase(),0!==o.length&&(t.repeating?o[0]===t.keys[0]:0===o.indexOf(t.keys.join("")))}function Xr(e,t,o,n,r,a){let i=!1,l=r(e,t,!!t&&o);for(;l;){if(l===e.firstChild){if(i)return!1;i=!0}const t=!n&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&Ur(l,a)&&!t)return l.focus(),!0;l=r(e,l,o)}return!1}const Yr=n.forwardRef((function(e,t){const{actions:o,autoFocus:r=!1,autoFocusItem:l=!1,children:s,className:c,disabledItemsFocusable:d=!1,disableListWrap:u=!1,onKeyDown:m,variant:h="selectedMenu"}=e,v=(0,i.A)(e,Kr),f=n.useRef(null),g=n.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Tn((()=>{r&&f.current.focus()}),[r]),n.useImperativeHandle(o,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:o}=t;const n=!f.current.style.width;if(e.clientHeight{n.isValidElement(e)?(e.props.disabled||("selectedMenu"===h&&e.props.selected||-1===A)&&(A=t),A===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(A+=1,A>=s.length&&(A=-1))):A===t&&(A+=1,A>=s.length&&(A=-1))}));const y=n.Children.map(s,((e,t)=>{if(t===A){const t={};return l&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===h&&(t.tabIndex=0),n.cloneElement(e,t)}return e}));return(0,p.jsx)(Dr,(0,a.A)({role:"menu",ref:b,className:c,onKeyDown:e=>{const t=f.current,o=e.key,n=Pr(t).activeElement;if("ArrowDown"===o)e.preventDefault(),Xr(t,n,u,d,Gr);else if("ArrowUp"===o)e.preventDefault(),Xr(t,n,u,d,qr);else if("Home"===o)e.preventDefault(),Xr(t,null,u,d,Gr);else if("End"===o)e.preventDefault(),Xr(t,null,u,d,qr);else if(1===o.length){const r=g.current,a=o.toLowerCase(),i=performance.now();r.keys.length>0&&(i-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&a!==r.keys[0]&&(r.repeating=!1)),r.lastTime=i,r.keys.push(a);const l=n&&!r.repeating&&Ur(n,r);r.previousKeyMatched&&(l||Xr(t,n,!1,d,Gr,r))?e.preventDefault():r.previousKeyMatched=!1}m&&m(e)},tabIndex:r?0:-1},v,{children:y}))})),Qr=wn,_r=yn;var $r=o(6328);function Zr(){for(var e=arguments.length,t=new Array(e),o=0;onull==t?e:function(){for(var o=arguments.length,n=new Array(o),r=0;r{}))}var Jr=o(9279);function ea(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ta(e){return parseInt(yn(e).getComputedStyle(e).paddingRight,10)||0}function oa(e,t,o,n,r){const a=[t,o,...n];[].forEach.call(e.children,(e=>{const t=-1===a.indexOf(e),o=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),o="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||o}(e);t&&o&&ea(e,r)}))}function na(e,t){let o=-1;return e.some(((e,n)=>!!t(e)&&(o=n,!0))),o}function ra(e,t){const o=[],n=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,An.A)(e);return t.body===e?yn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){const e=Hr((0,An.A)(n));o.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight="".concat(ta(n)+e,"px");const t=(0,An.A)(n).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{o.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(ta(t)+e,"px")}))}let e;if(n.parentNode instanceof DocumentFragment)e=(0,An.A)(n).body;else{const t=n.parentElement,o=yn(n);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===o.getComputedStyle(t).overflowY?t:n}o.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{o.forEach((e=>{let{value:t,el:o,property:n}=e;t?o.style.setProperty(n,t):o.style.removeProperty(n)}))}}const aa=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let o=this.modals.indexOf(e);if(-1!==o)return o;o=this.modals.length,this.modals.push(e),e.modalRef&&ea(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);oa(t,e.mount,e.modalRef,n,!0);const r=na(this.containers,(e=>e.container===t));return-1!==r?(this.containers[r].modals.push(e),o):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),o)}mount(e,t){const o=na(this.containers,(t=>-1!==t.modals.indexOf(e))),n=this.containers[o];n.restore||(n.restore=ra(n,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=this.modals.indexOf(e);if(-1===o)return o;const n=na(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(o,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&ea(e.modalRef,t),oa(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=r.modals[r.modals.length-1];e.modalRef&&ea(e.modalRef,!1)}return o}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function ia(e){const{container:t,disableEscapeKeyDown:o=!1,disableScrollLock:r=!1,manager:i=aa,closeAfterTransition:l=!1,onTransitionEnter:s,onTransitionExited:c,children:d,onClose:u,open:p,rootRef:m}=e,h=n.useRef({}),v=n.useRef(null),f=n.useRef(null),g=(0,rt.A)(f,m),[b,A]=n.useState(!p),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(d);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const w=()=>(h.current.modalRef=f.current,h.current.mount=v.current,h.current),S=()=>{i.mount(w(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},C=(0,vo.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,An.A)(v.current).body;i.add(w(),e),f.current&&S()})),k=n.useCallback((()=>i.isTopModal(w())),[i]),R=(0,vo.A)((e=>{v.current=e,e&&(p&&k()?S():f.current&&ea(f.current,x))})),E=n.useCallback((()=>{i.remove(w(),x)}),[x,i]);n.useEffect((()=>()=>{E()}),[E]),n.useEffect((()=>{p?C():y&&l||E()}),[p,E,y,l,C]);const M=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&k()&&(o||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},L=e=>t=>{var o;null==(o=e.onClick)||o.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(0,Jr.h)(e);delete o.onTransitionEnter,delete o.onTransitionExited;const n=(0,a.A)({},o,t);return(0,a.A)({role:"presentation"},n,{onKeyDown:M(n),ref:g})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.A)({"aria-hidden":!0},e,{onClick:L(e),open:p})},getTransitionProps:()=>({onEnter:Zr((()=>{A(!1),s&&s()}),null==d?void 0:d.props.onEnter),onExited:Zr((()=>{A(!0),c&&c(),l&&E()}),null==d?void 0:d.props.onExited)}),rootRef:g,portalRef:R,isTopModal:k,exited:b,hasTransition:y}}const la=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function sa(e){const t=[],o=[];return Array.from(e.querySelectorAll(la)).forEach(((e,n)=>{const r=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==r&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let o=t('[name="'.concat(e.name,'"]:checked'));return o||(o=t('[name="'.concat(e.name,'"]'))),o!==e}(e))}(e)&&(0===r?t.push(e):o.push({documentOrder:n,tabIndex:r,node:e}))})),o.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function ca(){return!0}function da(e){const{children:t,disableAutoFocus:o=!1,disableEnforceFocus:r=!1,disableRestoreFocus:a=!1,getTabbable:i=sa,isEnabled:l=ca,open:s}=e,c=n.useRef(!1),d=n.useRef(null),u=n.useRef(null),m=n.useRef(null),h=n.useRef(null),v=n.useRef(!1),f=n.useRef(null),g=(0,rt.A)(t.ref,f),b=n.useRef(null);n.useEffect((()=>{s&&f.current&&(v.current=!o)}),[o,s]),n.useEffect((()=>{if(!s||!f.current)return;const e=(0,An.A)(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),v.current&&f.current.focus()),()=>{a||(m.current&&m.current.focus&&(c.current=!0,m.current.focus()),m.current=null)}}),[s]),n.useEffect((()=>{if(!s||!f.current)return;const e=(0,An.A)(f.current),t=t=>{b.current=t,!r&&l()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},o=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!l()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==d.current&&e.activeElement!==u.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!v.current)return;let o=[];if(e.activeElement!==d.current&&e.activeElement!==u.current||(o=i(f.current)),o.length>0){var n,a;const e=Boolean((null==(n=b.current)?void 0:n.shiftKey)&&"Tab"===(null==(a=b.current)?void 0:a.key)),t=o[0],r=o[o.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",o),e.addEventListener("keydown",t,!0);const n=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&o()}),50);return()=>{clearInterval(n),e.removeEventListener("focusin",o),e.removeEventListener("keydown",t,!0)}}),[o,r,a,l,s,i]);const A=e=>{null===m.current&&(m.current=e.relatedTarget),v.current=!0};return(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)("div",{tabIndex:s?0:-1,onFocus:A,ref:d,"data-testid":"sentinelStart"}),n.cloneElement(t,{ref:g,onFocus:e=>{null===m.current&&(m.current=e.relatedTarget),v.current=!0,h.current=e.target;const o=t.props.onFocus;o&&o(e)}}),(0,p.jsx)("div",{tabIndex:s?0:-1,onFocus:A,ref:u,"data-testid":"sentinelEnd"})]})}var ua=o(5990);const pa=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ma={entering:{opacity:1},entered:{opacity:1}},ha=n.forwardRef((function(e,t){const o=(0,pe.A)(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:l,appear:s=!0,children:c,easing:d,in:u,onEnter:m,onEntered:h,onEntering:v,onExit:f,onExited:g,onExiting:b,style:A,timeout:y=r,TransitionComponent:x=Ge.Ay}=e,w=(0,i.A)(e,pa),S=n.useRef(null),C=(0,Ye.A)(S,c.ref,t),k=e=>t=>{if(e){const o=S.current;void 0===t?e(o):e(o,t)}},R=k(v),E=k(((e,t)=>{(0,Xe.q)(e);const n=(0,Xe.c)({style:A,timeout:y,easing:d},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),m&&m(e,t)})),M=k(h),L=k(b),I=k((e=>{const t=(0,Xe.c)({style:A,timeout:y,easing:d},{mode:"exit"});e.style.webkitTransition=o.transitions.create("opacity",t),e.style.transition=o.transitions.create("opacity",t),f&&f(e)})),T=k(g);return(0,p.jsx)(x,(0,a.A)({appear:s,in:u,nodeRef:S,onEnter:E,onEntered:M,onEntering:R,onExit:I,onExited:T,onExiting:L,addEndListener:e=>{l&&l(S.current,e)},timeout:y},w,{children:(e,t)=>n.cloneElement(c,(0,a.A)({style:(0,a.A)({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},ma[e],A,c.props.style),ref:C},t))}))})),va=ha;function fa(e){return(0,w.Ay)("MuiBackdrop",e)}(0,g.A)("MuiBackdrop",["root","invisible"]);const ga=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ba=(0,G.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,a.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),Aa=n.forwardRef((function(e,t){var o,n,r;const s=(0,q.A)({props:e,name:"MuiBackdrop"}),{children:c,className:d,component:u="div",components:m={},componentsProps:h={},invisible:v=!1,open:f,slotProps:g={},slots:b={},TransitionComponent:A=va,transitionDuration:y}=s,x=(0,i.A)(s,ga),w=(0,a.A)({},s,{component:u,invisible:v}),C=(e=>{const{classes:t,invisible:o}=e,n={root:["root",o&&"invisible"]};return(0,S.A)(n,fa,t)})(w),k=null!=(o=g.root)?o:h.root;return(0,p.jsx)(A,(0,a.A)({in:f,timeout:y},x,{children:(0,p.jsx)(ba,(0,a.A)({"aria-hidden":!0},k,{as:null!=(n=null!=(r=b.root)?r:m.Root)?n:u,className:(0,l.A)(C.root,d,null==k?void 0:k.className),ownerState:(0,a.A)({},w,null==k?void 0:k.ownerState),classes:C,ref:t,children:c}))}))}));function ya(e){return(0,w.Ay)("MuiModal",e)}(0,g.A)("MuiModal",["root","hidden","backdrop"]);const xa=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],wa=(0,G.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.open&&o.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!o.open&&o.exited&&{visibility:"hidden"})})),Sa=(0,G.Ay)(Aa,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ca=n.forwardRef((function(e,t){var o,r,s,c,d,u;const m=(0,q.A)({name:"MuiModal",props:e}),{BackdropComponent:h=Sa,BackdropProps:v,className:f,closeAfterTransition:g=!1,children:b,container:A,component:y,components:x={},componentsProps:w={},disableAutoFocus:C=!1,disableEnforceFocus:k=!1,disableEscapeKeyDown:R=!1,disablePortal:E=!1,disableRestoreFocus:M=!1,disableScrollLock:L=!1,hideBackdrop:I=!1,keepMounted:T=!1,onBackdropClick:z,open:P,slotProps:N,slots:O}=m,B=(0,i.A)(m,xa),j=(0,a.A)({},m,{closeAfterTransition:g,disableAutoFocus:C,disableEnforceFocus:k,disableEscapeKeyDown:R,disablePortal:E,disableRestoreFocus:M,disableScrollLock:L,hideBackdrop:I,keepMounted:T}),{getRootProps:F,getBackdropProps:W,getTransitionProps:D,portalRef:H,isTopModal:V,exited:K,hasTransition:G}=ia((0,a.A)({},j,{rootRef:t})),U=(0,a.A)({},j,{exited:K}),X=(e=>{const{open:t,exited:o,classes:n}=e,r={root:["root",!t&&o&&"hidden"],backdrop:["backdrop"]};return(0,S.A)(r,ya,n)})(U),Y={};if(void 0===b.props.tabIndex&&(Y.tabIndex="-1"),G){const{onEnter:e,onExited:t}=D();Y.onEnter=e,Y.onExited=t}const Q=null!=(o=null!=(r=null==O?void 0:O.root)?r:x.Root)?o:wa,_=null!=(s=null!=(c=null==O?void 0:O.backdrop)?c:x.Backdrop)?s:h,$=null!=(d=null==N?void 0:N.root)?d:w.root,Z=null!=(u=null==N?void 0:N.backdrop)?u:w.backdrop,J=(0,Nr.Q)({elementType:Q,externalSlotProps:$,externalForwardedProps:B,getSlotProps:F,additionalProps:{ref:t,as:y},ownerState:U,className:(0,l.A)(f,null==$?void 0:$.className,null==X?void 0:X.root,!U.open&&U.exited&&(null==X?void 0:X.hidden))}),ee=(0,Nr.Q)({elementType:_,externalSlotProps:Z,additionalProps:v,getSlotProps:e=>W((0,a.A)({},e,{onClick:t=>{z&&z(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,l.A)(null==Z?void 0:Z.className,null==v?void 0:v.className,null==X?void 0:X.backdrop),ownerState:U});return T||P||G&&!K?(0,p.jsx)(ua.Z,{ref:H,container:A,disablePortal:E,children:(0,p.jsxs)(Q,(0,a.A)({},J,{children:[!I&&h?(0,p.jsx)(_,(0,a.A)({},ee)):null,(0,p.jsx)(da,{disableEnforceFocus:k,disableAutoFocus:C,disableRestoreFocus:M,isEnabled:V,open:P,children:n.cloneElement(b,Y)})]}))}):null}));function ka(e){return(0,w.Ay)("MuiPopover",e)}(0,g.A)("MuiPopover",["root","paper"]);const Ra=["onEntering"],Ea=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Ma=["slotProps"];function La(e,t){let o=0;return"number"===typeof t?o=t:"center"===t?o=e.height/2:"bottom"===t&&(o=e.height),o}function Ia(e,t){let o=0;return"number"===typeof t?o=t:"center"===t?o=e.width/2:"right"===t&&(o=e.width),o}function Ta(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?"".concat(e,"px"):e)).join(" ")}function za(e){return"function"===typeof e?e():e}const Pa=(0,G.Ay)(Ca,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Na=(0,G.Ay)(Le,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Oa=n.forwardRef((function(e,t){var o,r,s;const c=(0,q.A)({props:e,name:"MuiPopover"}),{action:d,anchorEl:u,anchorOrigin:m={vertical:"top",horizontal:"left"},anchorPosition:h,anchorReference:v="anchorEl",children:f,className:g,container:b,elevation:A=8,marginThreshold:y=16,open:x,PaperProps:w={},slots:C,slotProps:k,transformOrigin:R={vertical:"top",horizontal:"left"},TransitionComponent:E=$r.A,transitionDuration:M="auto",TransitionProps:{onEntering:L}={},disableScrollLock:I=!1}=c,T=(0,i.A)(c.TransitionProps,Ra),z=(0,i.A)(c,Ea),P=null!=(o=null==k?void 0:k.paper)?o:w,N=n.useRef(),O=(0,Ye.A)(N,P.ref),B=(0,a.A)({},c,{anchorOrigin:m,anchorReference:v,elevation:A,marginThreshold:y,externalPaperSlotProps:P,transformOrigin:R,TransitionComponent:E,transitionDuration:M,TransitionProps:T}),j=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"],paper:["paper"]},ka,t)})(B),F=n.useCallback((()=>{if("anchorPosition"===v)return h;const e=za(u),t=(e&&1===e.nodeType?e:Pr(N.current).body).getBoundingClientRect();return{top:t.top+La(t,m.vertical),left:t.left+Ia(t,m.horizontal)}}),[u,m.horizontal,m.vertical,h,v]),W=n.useCallback((e=>({vertical:La(e,R.vertical),horizontal:Ia(e,R.horizontal)})),[R.horizontal,R.vertical]),D=n.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},o=W(t);if("none"===v)return{top:null,left:null,transformOrigin:Ta(o)};const n=F();let r=n.top-o.vertical,a=n.left-o.horizontal;const i=r+t.height,l=a+t.width,s=_r(za(u)),c=s.innerHeight-y,d=s.innerWidth-y;if(null!==y&&rc){const e=i-c;r-=e,o.vertical+=e}if(null!==y&&ad){const e=l-d;a-=e,o.horizontal+=e}return{top:"".concat(Math.round(r),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:Ta(o)}}),[u,v,F,W,y]),[H,V]=n.useState(x),K=n.useCallback((()=>{const e=N.current;if(!e)return;const t=D(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,V(!0)}),[D]);n.useEffect((()=>(I&&window.addEventListener("scroll",K),()=>window.removeEventListener("scroll",K))),[u,I,K]);n.useEffect((()=>{x&&K()})),n.useImperativeHandle(d,(()=>x?{updatePosition:()=>{K()}}:null),[x,K]),n.useEffect((()=>{if(!x)return;const e=Qr((()=>{K()})),t=_r(u);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[u,x,K]);let G=M;"auto"!==M||E.muiSupportAuto||(G=void 0);const U=b||(u?Pr(za(u)).body:void 0),X=null!=(r=null==C?void 0:C.root)?r:Pa,Y=null!=(s=null==C?void 0:C.paper)?s:Na,Q=(0,Nr.Q)({elementType:Y,externalSlotProps:(0,a.A)({},P,{style:H?P.style:(0,a.A)({},P.style,{opacity:0})}),additionalProps:{elevation:A,ref:O},ownerState:B,className:(0,l.A)(j.paper,null==P?void 0:P.className)}),_=(0,Nr.Q)({elementType:X,externalSlotProps:(null==k?void 0:k.root)||{},externalForwardedProps:z,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:U,open:x},ownerState:B,className:(0,l.A)(j.root,g)}),{slotProps:$}=_,Z=(0,i.A)(_,Ma);return(0,p.jsx)(X,(0,a.A)({},Z,!(0,En.g)(X)&&{slotProps:$,disableScrollLock:I},{children:(0,p.jsx)(E,(0,a.A)({appear:!0,in:x,onEntering:(e,t)=>{L&&L(e,t),K()},onExited:()=>{V(!1)},timeout:G},T,{children:(0,p.jsx)(Y,(0,a.A)({},Q,{children:f}))}))}))}));function Ba(e){return(0,w.Ay)("MuiMenu",e)}(0,g.A)("MuiMenu",["root","paper","list"]);const ja=["onEntering"],Fa=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Wa={vertical:"top",horizontal:"right"},Da={vertical:"top",horizontal:"left"},Ha=(0,G.Ay)(Oa,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Va=(0,G.Ay)(Na,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ka=(0,G.Ay)(Yr,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Ga=n.forwardRef((function(e,t){var o,r;const s=(0,q.A)({props:e,name:"MuiMenu"}),{autoFocus:c=!0,children:d,className:u,disableAutoFocusItem:m=!1,MenuListProps:h={},onClose:v,open:f,PaperProps:g={},PopoverClasses:b,transitionDuration:A="auto",TransitionProps:{onEntering:y}={},variant:x="selectedMenu",slots:w={},slotProps:C={}}=s,k=(0,i.A)(s.TransitionProps,ja),R=(0,i.A)(s,Fa),E=(0,Or.I)(),M=(0,a.A)({},s,{autoFocus:c,disableAutoFocusItem:m,MenuListProps:h,onEntering:y,PaperProps:g,transitionDuration:A,TransitionProps:k,variant:x}),L=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"],paper:["paper"],list:["list"]},Ba,t)})(M),I=c&&!m&&f,T=n.useRef(null);let z=-1;n.Children.map(d,((e,t)=>{n.isValidElement(e)&&(e.props.disabled||("selectedMenu"===x&&e.props.selected||-1===z)&&(z=t))}));const P=null!=(o=w.paper)?o:Va,N=null!=(r=C.paper)?r:g,O=(0,Nr.Q)({elementType:w.root,externalSlotProps:C.root,ownerState:M,className:[L.root,u]}),B=(0,Nr.Q)({elementType:P,externalSlotProps:N,ownerState:M,className:L.paper});return(0,p.jsx)(Ha,(0,a.A)({onClose:v,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?Wa:Da,slots:{paper:P,root:w.root},slotProps:{root:O,paper:B},open:f,ref:t,transitionDuration:A,TransitionProps:(0,a.A)({onEntering:(e,t)=>{T.current&&T.current.adjustStyleForScrollbar(e,{direction:E?"rtl":"ltr"}),y&&y(e,t)}},k),ownerState:M},R,{classes:b,children:(0,p.jsx)(Ka,(0,a.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),v&&v(e,"tabKeyDown"))},actions:T,autoFocus:c&&(-1===z||m),autoFocusItem:I,variant:x},h,{className:(0,l.A)(L.list,h.className),children:d}))}))}));function qa(e){return(0,w.Ay)("MuiNativeSelect",e)}const Ua=(0,g.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Xa=["className","disabled","error","IconComponent","inputRef","variant"],Ya=e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,a.A)({},o.vars?{backgroundColor:"rgba(".concat(o.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===o.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(Ua.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(o.vars||o).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(o.vars||o).shape.borderRadius,"&:focus":{borderRadius:(o.vars||o).shape.borderRadius},"&&&":{paddingRight:32}})},Qa=(0,G.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Un.A,overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.select,t[o.variant],o.error&&t.error,{["&.".concat(Ua.multiple)]:t.multiple}]}})(Ya),_a=e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(o.vars||o).palette.action.active,["&.".concat(Ua.disabled)]:{color:(o.vars||o).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},$a=(0,G.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.icon,o.variant&&t["icon".concat((0,K.A)(o.variant))],o.open&&t.iconOpen]}})(_a),Za=n.forwardRef((function(e,t){const{className:o,disabled:r,error:s,IconComponent:c,inputRef:d,variant:u="standard"}=e,m=(0,i.A)(e,Xa),h=(0,a.A)({},e,{disabled:r,variant:u,error:s}),v=(e=>{const{classes:t,variant:o,disabled:n,multiple:r,open:a,error:i}=e,l={select:["select",o,n&&"disabled",r&&"multiple",i&&"error"],icon:["icon","icon".concat((0,K.A)(o)),a&&"iconOpen",n&&"disabled"]};return(0,S.A)(l,qa,t)})(h);return(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)(Qa,(0,a.A)({ownerState:h,className:(0,l.A)(v.select,o),disabled:r,ref:d||t},m)),e.multiple?null:(0,p.jsx)($a,{as:c,ownerState:h,className:v.icon})]})}));var Ja=o(7123);function ei(e){return(0,w.Ay)("MuiSelect",e)}const ti=(0,g.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var oi;const ni=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],ri=(0,G.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["&.".concat(ti.select)]:t.select},{["&.".concat(ti.select)]:t[o.variant]},{["&.".concat(ti.error)]:t.error},{["&.".concat(ti.multiple)]:t.multiple}]}})(Ya,{["&.".concat(ti.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),ai=(0,G.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.icon,o.variant&&t["icon".concat((0,K.A)(o.variant))],o.open&&t.iconOpen]}})(_a),ii=(0,G.Ay)("input",{shouldForwardProp:e=>(0,Ja.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function li(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function si(e){return null==e||"string"===typeof e&&!e.trim()}const ci=n.forwardRef((function(e,t){var o;const{"aria-describedby":r,"aria-label":s,autoFocus:c,autoWidth:d,children:u,className:m,defaultOpen:h,defaultValue:v,disabled:f,displayEmpty:g,error:b=!1,IconComponent:A,inputRef:y,labelId:x,MenuProps:w={},multiple:C,name:k,onBlur:R,onChange:E,onClose:M,onFocus:L,onOpen:I,open:T,readOnly:z,renderValue:P,SelectDisplayProps:N={},tabIndex:O,value:B,variant:j="standard"}=e,F=(0,i.A)(e,ni),[W,D]=(0,nt.A)({controlled:B,default:v,name:"Select"}),[H,V]=(0,nt.A)({controlled:T,default:h,name:"Select"}),G=n.useRef(null),q=n.useRef(null),[U,X]=n.useState(null),{current:Y}=n.useRef(null!=T),[Q,_]=n.useState(),$=(0,Ye.A)(t,y),Z=n.useCallback((e=>{q.current=e,e&&X(e)}),[]),J=null==U?void 0:U.parentNode;n.useImperativeHandle($,(()=>({focus:()=>{q.current.focus()},node:G.current,value:W})),[W]),n.useEffect((()=>{h&&H&&U&&!Y&&(_(d?null:J.clientWidth),q.current.focus())}),[U,d]),n.useEffect((()=>{c&&q.current.focus()}),[c]),n.useEffect((()=>{if(!x)return;const e=Pr(q.current).getElementById(x);if(e){const t=()=>{getSelection().isCollapsed&&q.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[x]);const ee=(e,t)=>{e?I&&I(t):M&&M(t),Y||(_(d?null:J.clientWidth),V(e))},te=n.Children.toArray(u),oe=e=>t=>{let o;if(t.currentTarget.hasAttribute("tabindex")){if(C){o=Array.isArray(W)?W.slice():[];const t=W.indexOf(e.props.value);-1===t?o.push(e.props.value):o.splice(t,1)}else o=e.props.value;if(e.props.onClick&&e.props.onClick(t),W!==o&&(D(o),E)){const n=t.nativeEvent||t,r=new n.constructor(n.type,n);Object.defineProperty(r,"target",{writable:!0,value:{value:o,name:k}}),E(r,e)}C||ee(!1,t)}},ne=null!==U&&H;let re,ae;delete F["aria-invalid"];const ie=[];let le=!1,se=!1;(jn({value:W})||g)&&(P?re=P(W):le=!0);const ce=te.map((e=>{if(!n.isValidElement(e))return null;let t;if(C){if(!Array.isArray(W))throw new Error((0,bn.A)(2));t=W.some((t=>li(t,e.props.value))),t&&le&&ie.push(e.props.children)}else t=li(W,e.props.value),t&&le&&(ae=e.props.children);return t&&(se=!0),n.cloneElement(e,{"aria-selected":t?"true":"false",onClick:oe(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));le&&(re=C?0===ie.length?null:ie.reduce(((e,t,o)=>(e.push(t),o{const{classes:t,variant:o,disabled:n,multiple:r,open:a,error:i}=e,l={select:["select",o,n&&"disabled",r&&"multiple",i&&"error"],icon:["icon","icon".concat((0,K.A)(o)),a&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return(0,S.A)(l,ei,t)})(me),ve=(0,a.A)({},w.PaperProps,null==(o=w.slotProps)?void 0:o.paper),fe=(0,po.A)();return(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)(ri,(0,a.A)({ref:Z,tabIndex:de,role:"combobox","aria-controls":fe,"aria-disabled":f?"true":void 0,"aria-expanded":ne?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[x,pe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!z){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),ee(!0,e))}},onMouseDown:f||z?null:e=>{0===e.button&&(e.preventDefault(),q.current.focus(),ee(!0,e))},onBlur:e=>{!ne&&R&&(Object.defineProperty(e,"target",{writable:!0,value:{value:W,name:k}}),R(e))},onFocus:L},N,{ownerState:me,className:(0,l.A)(N.className,he.select,m),id:pe,children:si(re)?oi||(oi=(0,p.jsx)("span",{className:"notranslate",children:"\u200b"})):re})),(0,p.jsx)(ii,(0,a.A)({"aria-invalid":b,value:Array.isArray(W)?W.join(","):W,name:k,ref:G,"aria-hidden":!0,onChange:e=>{const t=te.find((t=>t.props.value===e.target.value));void 0!==t&&(D(t.props.value),E&&E(e,t))},tabIndex:-1,disabled:f,className:he.nativeInput,autoFocus:c,ownerState:me},F)),(0,p.jsx)(ai,{as:A,className:he.icon,ownerState:me}),(0,p.jsx)(Ga,(0,a.A)({id:"menu-".concat(k||""),anchorEl:J,open:ne,onClose:e=>{ee(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},w,{MenuListProps:(0,a.A)({"aria-labelledby":x,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:fe},w.MenuListProps),slotProps:(0,a.A)({},w.slotProps,{paper:(0,a.A)({},ve,{style:(0,a.A)({minWidth:ue},null!=ve?ve.style:null)})}),children:ce}))]})})),di=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],ui=["root"],pi={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,Un.A)(e)&&"variant"!==e,slot:"Root"},mi=(0,G.Ay)($n,pi)(""),hi=(0,G.Ay)(pr,pi)(""),vi=(0,G.Ay)(or,pi)(""),fi=n.forwardRef((function(e,t){const o=(0,q.A)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:s,classes:c={},className:d,defaultOpen:u=!1,displayEmpty:m=!1,IconComponent:h=$o,id:v,input:f,inputProps:g,label:b,labelId:A,MenuProps:y,multiple:x=!1,native:w=!1,onClose:S,onOpen:C,open:k,renderValue:E,SelectDisplayProps:M,variant:L="outlined"}=o,I=(0,i.A)(o,di),T=w?Za:ci,z=Mn({props:o,muiFormControl:In(),states:["variant","error"]}),P=z.variant||L,N=(0,a.A)({},o,{variant:P,classes:c}),O=(e=>{const{classes:t}=e;return t})(N),B=(0,i.A)(O,ui),j=f||{standard:(0,p.jsx)(mi,{ownerState:N}),outlined:(0,p.jsx)(hi,{label:b,ownerState:N}),filled:(0,p.jsx)(vi,{ownerState:N})}[P],F=(0,Ye.A)(t,j.ref);return(0,p.jsx)(n.Fragment,{children:n.cloneElement(j,(0,a.A)({inputComponent:T,inputProps:(0,a.A)({children:s,error:z.error,IconComponent:h,variant:P,type:void 0,multiple:x},w?{id:v}:{autoWidth:r,defaultOpen:u,displayEmpty:m,labelId:A,MenuProps:y,onClose:S,onOpen:C,open:k,renderValue:E,SelectDisplayProps:(0,a.A)({id:v},M)},g,{classes:g?(0,R.A)(B,g.classes):B},f?f.props.inputProps:{})},(x&&w||m)&&"outlined"===P?{notched:!0}:{},{ref:F,className:(0,l.A)(j.props.className,d,O.root)},!f&&{variant:P},I))})}));fi.muiName="Select";const gi=fi;function bi(e){return(0,w.Ay)("MuiTextField",e)}(0,g.A)("MuiTextField",["root"]);const Ai=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],yi={standard:$n,filled:or,outlined:pr},xi=(0,G.Ay)(Rr,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),wi=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTextField"}),{autoComplete:n,autoFocus:r=!1,children:s,className:c,color:d="primary",defaultValue:u,disabled:m=!1,error:h=!1,FormHelperTextProps:v,fullWidth:f=!1,helperText:g,id:b,InputLabelProps:A,inputProps:y,InputProps:x,inputRef:w,label:C,maxRows:k,minRows:R,multiline:E=!1,name:M,onBlur:L,onChange:I,onFocus:T,placeholder:z,required:P=!1,rows:N,select:O=!1,SelectProps:B,type:j,value:F,variant:W="outlined"}=o,D=(0,i.A)(o,Ai),H=(0,a.A)({},o,{autoFocus:r,color:d,disabled:m,error:h,fullWidth:f,multiline:E,required:P,select:O,variant:W}),V=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},bi,t)})(H);const K={};"outlined"===W&&(A&&"undefined"!==typeof A.shrink&&(K.notched=A.shrink),K.label=C),O&&(B&&B.native||(K.id=void 0),K["aria-describedby"]=void 0);const G=(0,po.A)(b),U=g&&G?"".concat(G,"-helper-text"):void 0,X=C&&G?"".concat(G,"-label"):void 0,Y=yi[W],Q=(0,p.jsx)(Y,(0,a.A)({"aria-describedby":U,autoComplete:n,autoFocus:r,defaultValue:u,fullWidth:f,multiline:E,name:M,rows:N,maxRows:k,minRows:R,type:j,value:F,id:G,inputRef:w,onBlur:L,onChange:I,onFocus:T,placeholder:z,inputProps:y},K,x));return(0,p.jsxs)(xi,(0,a.A)({className:(0,l.A)(V.root,c),disabled:m,error:h,fullWidth:f,ref:t,required:P,color:d,variant:W,ownerState:H},D,{children:[null!=C&&""!==C&&(0,p.jsx)(wr,(0,a.A)({htmlFor:G,id:X},A,{children:C})),O?(0,p.jsx)(gi,(0,a.A)({"aria-describedby":U,id:G,labelId:X,value:F,input:Q},B,{children:s})):Q,g&&(0,p.jsx)(zr,(0,a.A)({id:U},v,{children:g}))]}))}));function Si(e){return n.Children.toArray(e).filter((e=>n.isValidElement(e)))}function Ci(e){return(0,w.Ay)("MuiButtonGroup",e)}const ki=(0,g.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var Ri=o(4221),Ei=o(3053);const Mi=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],Li=(0,G.Ay)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(ki.grouped)]:t.grouped},{["& .".concat(ki.grouped)]:t["grouped".concat((0,K.A)(o.orientation))]},{["& .".concat(ki.grouped)]:t["grouped".concat((0,K.A)(o.variant))]},{["& .".concat(ki.grouped)]:t["grouped".concat((0,K.A)(o.variant)).concat((0,K.A)(o.orientation))]},{["& .".concat(ki.grouped)]:t["grouped".concat((0,K.A)(o.variant)).concat((0,K.A)(o.color))]},{["& .".concat(ki.firstButton)]:t.firstButton},{["& .".concat(ki.lastButton)]:t.lastButton},{["& .".concat(ki.middleButton)]:t.middleButton},t.root,t[o.variant],!0===o.disableElevation&&t.disableElevation,o.fullWidth&&t.fullWidth,"vertical"===o.orientation&&t.vertical]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===o.variant&&{boxShadow:(t.vars||t).shadows[2]},o.disableElevation&&{boxShadow:"none"},o.fullWidth&&{width:"100%"},"vertical"===o.orientation&&{flexDirection:"column"},{["& .".concat(ki.grouped)]:(0,a.A)({minWidth:40,"&:hover":(0,a.A)({},"contained"===o.variant&&{boxShadow:"none"})},"contained"===o.variant&&{boxShadow:"none"}),["& .".concat(ki.firstButton,",& .").concat(ki.middleButton)]:(0,a.A)({},"horizontal"===o.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===o.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===o.variant&&"horizontal"===o.orientation&&{borderRight:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(ki.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===o.variant&&"vertical"===o.orientation&&{borderBottom:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(ki.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===o.variant&&"inherit"!==o.color&&{borderColor:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / 0.5)"):(0,re.X4)(t.palette[o.color].main,.5)},"outlined"===o.variant&&"horizontal"===o.orientation&&{borderRightColor:"transparent"},"outlined"===o.variant&&"vertical"===o.orientation&&{borderBottomColor:"transparent"},"contained"===o.variant&&"horizontal"===o.orientation&&{borderRight:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(ki.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===o.variant&&"vertical"===o.orientation&&{borderBottom:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(ki.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===o.variant&&"inherit"!==o.color&&{borderColor:(t.vars||t).palette[o.color].dark},{"&:hover":(0,a.A)({},"outlined"===o.variant&&"horizontal"===o.orientation&&{borderRightColor:"currentColor"},"outlined"===o.variant&&"vertical"===o.orientation&&{borderBottomColor:"currentColor"})}),["& .".concat(ki.lastButton,",& .").concat(ki.middleButton)]:(0,a.A)({},"horizontal"===o.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===o.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===o.variant&&"horizontal"===o.orientation&&{marginLeft:-1},"outlined"===o.variant&&"vertical"===o.orientation&&{marginTop:-1})})})),Ii=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiButtonGroup"}),{children:r,className:s,color:c="primary",component:d="div",disabled:u=!1,disableElevation:m=!1,disableFocusRipple:h=!1,disableRipple:v=!1,fullWidth:f=!1,orientation:g="horizontal",size:b="medium",variant:A="outlined"}=o,y=(0,i.A)(o,Mi),x=(0,a.A)({},o,{color:c,component:d,disabled:u,disableElevation:m,disableFocusRipple:h,disableRipple:v,fullWidth:f,orientation:g,size:b,variant:A}),w=(e=>{const{classes:t,color:o,disabled:n,disableElevation:r,fullWidth:a,orientation:i,variant:l}=e,s={root:["root",l,"vertical"===i&&"vertical",a&&"fullWidth",r&&"disableElevation"],grouped:["grouped","grouped".concat((0,K.A)(i)),"grouped".concat((0,K.A)(l)),"grouped".concat((0,K.A)(l)).concat((0,K.A)(i)),"grouped".concat((0,K.A)(l)).concat((0,K.A)(o)),n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,S.A)(s,Ci,t)})(x),C=n.useMemo((()=>({className:w.grouped,color:c,disabled:u,disableElevation:m,disableFocusRipple:h,disableRipple:v,fullWidth:f,size:b,variant:A})),[c,u,m,h,v,f,b,A,w.grouped]),k=Si(r),R=k.length,E=e=>{const t=0===e,o=e===R-1;return t&&o?"":t?w.firstButton:o?w.lastButton:w.middleButton};return(0,p.jsx)(Li,(0,a.A)({as:d,role:"group",className:(0,l.A)(w.root,s),ref:t,ownerState:x},y,{children:(0,p.jsx)(Ri.A.Provider,{value:C,children:k.map(((e,t)=>(0,p.jsx)(Ei.A.Provider,{value:E(t),children:e},t)))})}))}));function Ti(e){return(0,w.Ay)("MuiFormGroup",e)}(0,g.A)("MuiFormGroup",["root","row","error"]);const zi=["className","row"],Pi=(0,G.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.row&&t.row]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})})),Ni=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiFormGroup"}),{className:n,row:r=!1}=o,s=(0,i.A)(o,zi),c=Mn({props:o,muiFormControl:In(),states:["error"]}),d=(0,a.A)({},o,{row:r,error:c.error}),u=(e=>{const{classes:t,row:o,error:n}=e,r={root:["root",o&&"row",n&&"error"]};return(0,S.A)(r,Ti,t)})(d);return(0,p.jsx)(Pi,(0,a.A)({className:(0,l.A)(u.root,n),ownerState:d,ref:t},s))}));function Oi(e){return(0,w.Ay)("MuiFormControlLabel",e)}const Bi=(0,g.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ji=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Fi=(0,G.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(Bi.label)]:t.label},t.root,t["labelPlacement".concat((0,K.A)(o.labelPlacement))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(Bi.disabled)]:{cursor:"default"}},"start"===o.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===o.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===o.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(Bi.label)]:{["&.".concat(Bi.disabled)]:{color:(t.vars||t).palette.text.disabled}}})})),Wi=(0,G.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Bi.error)]:{color:(t.vars||t).palette.error.main}}})),Di=n.forwardRef((function(e,t){var o,r;const s=(0,q.A)({props:e,name:"MuiFormControlLabel"}),{className:c,componentsProps:d={},control:u,disabled:m,disableTypography:h,label:v,labelPlacement:f="end",required:g,slotProps:b={}}=s,A=(0,i.A)(s,ji),y=In(),x=null!=(o=null!=m?m:u.props.disabled)?o:null==y?void 0:y.disabled,w=null!=g?g:u.props.required,C={disabled:x,required:w};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof u.props[e]&&"undefined"!==typeof s[e]&&(C[e]=s[e])}));const k=Mn({props:s,muiFormControl:y,states:["error"]}),R=(0,a.A)({},s,{disabled:x,labelPlacement:f,required:w,error:k.error}),E=(e=>{const{classes:t,disabled:o,labelPlacement:n,error:r,required:a}=e,i={root:["root",o&&"disabled","labelPlacement".concat((0,K.A)(n)),r&&"error",a&&"required"],label:["label",o&&"disabled"],asterisk:["asterisk",r&&"error"]};return(0,S.A)(i,Oi,t)})(R),M=null!=(r=b.typography)?r:d.typography;let L=v;return null==L||L.type===zt||h||(L=(0,p.jsx)(zt,(0,a.A)({component:"span"},M,{className:(0,l.A)(E.label,null==M?void 0:M.className),children:L}))),(0,p.jsxs)(Fi,(0,a.A)({className:(0,l.A)(E.root,c),ownerState:R,ref:t},A,{children:[n.cloneElement(u,C),w?(0,p.jsxs)(ne,{display:"block",children:[L,(0,p.jsxs)(Wi,{ownerState:R,"aria-hidden":!0,className:E.asterisk,children:["\u2009","*"]})]}):L]}))}));function Hi(e){return(0,w.Ay)("PrivateSwitchBase",e)}(0,g.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Vi=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Ki=(0,G.Ay)(bt.A)((e=>{let{ownerState:t}=e;return(0,a.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),Gi=(0,G.Ay)("input",{shouldForwardProp:Un.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),qi=n.forwardRef((function(e,t){const{autoFocus:o,checked:n,checkedIcon:r,className:s,defaultChecked:c,disabled:d,disableFocusRipple:u=!1,edge:m=!1,icon:h,id:v,inputProps:f,inputRef:g,name:b,onBlur:A,onChange:y,onFocus:x,readOnly:w,required:C=!1,tabIndex:k,type:R,value:E}=e,M=(0,i.A)(e,Vi),[L,I]=(0,nt.A)({controlled:n,default:Boolean(c),name:"SwitchBase",state:"checked"}),T=In();let z=d;T&&"undefined"===typeof z&&(z=T.disabled);const P="checkbox"===R||"radio"===R,N=(0,a.A)({},e,{checked:L,disabled:z,disableFocusRipple:u,edge:m}),O=(e=>{const{classes:t,checked:o,disabled:n,edge:r}=e,a={root:["root",o&&"checked",n&&"disabled",r&&"edge".concat((0,K.A)(r))],input:["input"]};return(0,S.A)(a,Hi,t)})(N);return(0,p.jsxs)(Ki,(0,a.A)({component:"span",className:(0,l.A)(O.root,s),centerRipple:!0,focusRipple:!u,disabled:z,tabIndex:null,role:void 0,onFocus:e=>{x&&x(e),T&&T.onFocus&&T.onFocus(e)},onBlur:e=>{A&&A(e),T&&T.onBlur&&T.onBlur(e)},ownerState:N,ref:t},M,{children:[(0,p.jsx)(Gi,(0,a.A)({autoFocus:o,checked:n,defaultChecked:c,className:O.input,disabled:z,id:P?v:void 0,name:b,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;I(t),y&&y(e,t)},readOnly:w,ref:g,required:C,ownerState:N,tabIndex:k,type:R},"checkbox"===R&&void 0===E?{}:{value:E},f)),L?r:h]}))})),Ui=Po((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Xi=Po((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Yi=Po((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Qi(e){return(0,w.Ay)("MuiCheckbox",e)}const _i=(0,g.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),$i=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Zi=(0,G.Ay)(qi,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.indeterminate&&t.indeterminate,t["size".concat((0,K.A)(o.size))],"default"!==o.color&&t["color".concat((0,K.A)(o.color))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({color:(t.vars||t).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===o.color?t.vars.palette.action.activeChannel:t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)("default"===o.color?t.palette.action.active:t.palette[o.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&{["&.".concat(_i.checked,", &.").concat(_i.indeterminate)]:{color:(t.vars||t).palette[o.color].main},["&.".concat(_i.disabled)]:{color:(t.vars||t).palette.action.disabled}})})),Ji=(0,p.jsx)(Xi,{}),el=(0,p.jsx)(Ui,{}),tl=(0,p.jsx)(Yi,{}),ol=n.forwardRef((function(e,t){var o,r;const s=(0,q.A)({props:e,name:"MuiCheckbox"}),{checkedIcon:c=Ji,color:d="primary",icon:u=el,indeterminate:m=!1,indeterminateIcon:h=tl,inputProps:v,size:f="medium",className:g}=s,b=(0,i.A)(s,$i),A=m?h:u,y=m?h:c,x=(0,a.A)({},s,{color:d,indeterminate:m,size:f}),w=(e=>{const{classes:t,indeterminate:o,color:n,size:r}=e,i={root:["root",o&&"indeterminate","color".concat((0,K.A)(n)),"size".concat((0,K.A)(r))]},l=(0,S.A)(i,Qi,t);return(0,a.A)({},t,l)})(x);return(0,p.jsx)(Zi,(0,a.A)({type:"checkbox",inputProps:(0,a.A)({"data-indeterminate":m},v),icon:n.cloneElement(A,{fontSize:null!=(o=A.props.fontSize)?o:f}),checkedIcon:n.cloneElement(y,{fontSize:null!=(r=y.props.fontSize)?r:f}),ownerState:x,ref:t,className:(0,l.A)(w.root,g)},b,{classes:w}))}));function nl(e){return(0,w.Ay)("MuiFab",e)}const rl=(0,g.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),al=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],il=(0,G.Ay)(bt.A,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t["size".concat((0,K.A)(o.size))],"inherit"===o.color&&t.colorInherit,t[(0,K.A)(o.size)],t[o.color]]}})((e=>{let{theme:t,ownerState:o}=e;var n,r;return(0,a.A)({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:null==(n=(r=t.palette).getContrastText)?void 0:n.call(r,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},["&.".concat(rl.focusVisible)]:{boxShadow:(t.vars||t).shadows[6]}},"small"===o.size&&{width:40,height:40},"medium"===o.size&&{width:48,height:48},"extended"===o.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===o.variant&&"small"===o.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===o.variant&&"medium"===o.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===o.color&&{color:"inherit"})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},"inherit"!==o.color&&"default"!==o.color&&null!=(t.vars||t).palette[o.color]&&{color:(t.vars||t).palette[o.color].contrastText,backgroundColor:(t.vars||t).palette[o.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[o.color].main}}})}),(e=>{let{theme:t}=e;return{["&.".concat(rl.disabled)]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}})),ll=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiFab"}),{children:n,className:r,color:s="default",component:c="button",disabled:d=!1,disableFocusRipple:u=!1,focusVisibleClassName:m,size:h="large",variant:v="circular"}=o,f=(0,i.A)(o,al),g=(0,a.A)({},o,{color:s,component:c,disabled:d,disableFocusRipple:u,size:h,variant:v}),b=(e=>{const{color:t,variant:o,classes:n,size:r}=e,i={root:["root",o,"size".concat((0,K.A)(r)),"inherit"===t?"colorInherit":t]},l=(0,S.A)(i,nl,n);return(0,a.A)({},n,l)})(g);return(0,p.jsx)(il,(0,a.A)({className:(0,l.A)(b.root,r),component:c,disabled:d,focusRipple:!u,focusVisibleClassName:(0,l.A)(b.focusVisible,m),ownerState:g,ref:t},f,{classes:b,children:n}))}));const sl=n.createContext(void 0);var cl=o(5879);const dl=["actions","children","defaultValue","name","onChange","value"],ul=n.forwardRef((function(e,t){const{actions:o,children:r,defaultValue:l,name:s,onChange:c,value:d}=e,u=(0,i.A)(e,dl),m=n.useRef(null),[h,v]=(0,nt.A)({controlled:d,default:l,name:"RadioGroup"});n.useImperativeHandle(o,(()=>({focus:()=>{let e=m.current.querySelector("input:not(:disabled):checked");e||(e=m.current.querySelector("input:not(:disabled)")),e&&e.focus()}})),[]);const f=(0,Ye.A)(t,m),g=(0,cl.A)(s),b=n.useMemo((()=>({name:g,onChange(e){v(e.target.value),c&&c(e,e.target.value)},value:h})),[g,c,v,h]);return(0,p.jsx)(sl.Provider,{value:b,children:(0,p.jsx)(Ni,(0,a.A)({role:"radiogroup",ref:f},u,{children:r}))})})),pl=Po((0,p.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),ml=Po((0,p.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),hl=(0,G.Ay)("span",{shouldForwardProp:Un.A})({position:"relative",display:"flex"}),vl=(0,G.Ay)(pl)({transform:"scale(1)"}),fl=(0,G.Ay)(ml)((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},o.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})}));const gl=function(e){const{checked:t=!1,classes:o={},fontSize:n}=e,r=(0,a.A)({},e,{checked:t});return(0,p.jsxs)(hl,{className:o.root,ownerState:r,children:[(0,p.jsx)(vl,{fontSize:n,className:o.background,ownerState:r}),(0,p.jsx)(fl,{fontSize:n,className:o.dot,ownerState:r})]})},bl=Zr;function Al(e){return(0,w.Ay)("MuiRadio",e)}const yl=(0,g.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),xl=["checked","checkedIcon","color","icon","name","onChange","size","className"],wl=(0,G.Ay)(qi,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"medium"!==o.size&&t["size".concat((0,K.A)(o.size))],t["color".concat((0,K.A)(o.color))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({color:(t.vars||t).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===o.color?t.vars.palette.action.activeChannel:t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)("default"===o.color?t.palette.action.active:t.palette[o.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&{["&.".concat(yl.checked)]:{color:(t.vars||t).palette[o.color].main}},{["&.".concat(yl.disabled)]:{color:(t.vars||t).palette.action.disabled}})}));const Sl=(0,p.jsx)(gl,{checked:!0}),Cl=(0,p.jsx)(gl,{}),kl=n.forwardRef((function(e,t){var o,r;const s=(0,q.A)({props:e,name:"MuiRadio"}),{checked:c,checkedIcon:d=Sl,color:u="primary",icon:m=Cl,name:h,onChange:v,size:f="medium",className:g}=s,b=(0,i.A)(s,xl),A=(0,a.A)({},s,{color:u,size:f}),y=(e=>{const{classes:t,color:o,size:n}=e,r={root:["root","color".concat((0,K.A)(o)),"medium"!==n&&"size".concat((0,K.A)(n))]};return(0,a.A)({},t,(0,S.A)(r,Al,t))})(A),x=n.useContext(sl);let w=c;const C=bl(v,x&&x.onChange);let k=h;var R,E;return x&&("undefined"===typeof w&&(R=x.value,w="object"===typeof(E=s.value)&&null!==E?R===E:String(R)===String(E)),"undefined"===typeof k&&(k=x.name)),(0,p.jsx)(wl,(0,a.A)({type:"radio",icon:n.cloneElement(m,{fontSize:null!=(o=Cl.props.fontSize)?o:f}),checkedIcon:n.cloneElement(d,{fontSize:null!=(r=Sl.props.fontSize)?r:f}),ownerState:A,classes:y,name:k,checked:w,onChange:C,ref:t,className:(0,l.A)(y.root,g)},b))}));var Rl=o(7040);const El={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var Ml=o(7844);const Ll=Po((0,p.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),Il=Po((0,p.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function Tl(e){return(0,w.Ay)("MuiRating",e)}const zl=(0,g.A)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),Pl=["value"],Nl=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function Ol(e,t){if(null==e)return e;const o=Math.round(e/t)*t;return Number(o.toFixed(function(e){const t=e.toString().split(".")[1];return t?t.length:0}(t)))}const Bl=(0,G.Ay)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(zl.visuallyHidden)]:t.visuallyHidden},t.root,t["size".concat((0,K.A)(o.size))],o.readOnly&&t.readOnly]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"inline-flex",position:"relative",fontSize:t.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",["&.".concat(zl.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(zl.focusVisible," .").concat(zl.iconActive)]:{outline:"1px solid #999"},["& .".concat(zl.visuallyHidden)]:El},"small"===o.size&&{fontSize:t.typography.pxToRem(18)},"large"===o.size&&{fontSize:t.typography.pxToRem(30)},o.readOnly&&{pointerEvents:"none"})})),jl=(0,G.Ay)("label",{name:"MuiRating",slot:"Label",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.label,o.emptyValueFocused&&t.labelEmptyValueActive]}})((e=>{let{ownerState:t}=e;return(0,a.A)({cursor:"inherit"},t.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})})),Fl=(0,G.Ay)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.icon,o.iconEmpty&&t.iconEmpty,o.iconFilled&&t.iconFilled,o.iconHover&&t.iconHover,o.iconFocus&&t.iconFocus,o.iconActive&&t.iconActive]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"flex",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),pointerEvents:"none"},o.iconActive&&{transform:"scale(1.2)"},o.iconEmpty&&{color:(t.vars||t).palette.action.disabled})})),Wl=(0,G.Ay)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>(0,Ja.A)(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{const{iconActive:o}=e;return[t.decimal,o&&t.iconActive]}})((e=>{let{iconActive:t}=e;return(0,a.A)({position:"relative"},t&&{transform:"scale(1.2)"})}));function Dl(e){const t=(0,i.A)(e,Pl);return(0,p.jsx)("span",(0,a.A)({},t))}function Hl(e){const{classes:t,disabled:o,emptyIcon:r,focus:i,getLabelText:s,highlightSelectedOnly:c,hover:d,icon:u,IconContainerComponent:m,isActive:h,itemValue:v,labelProps:f,name:g,onBlur:b,onChange:A,onClick:y,onFocus:x,readOnly:w,ownerState:S,ratingValue:C,ratingValueRounded:k}=e,R=c?v===C:v<=C,E=v<=d,M=v<=i,L=v===k,I=(0,cl.A)(),T=(0,p.jsx)(Fl,{as:m,value:v,className:(0,l.A)(t.icon,R?t.iconFilled:t.iconEmpty,E&&t.iconHover,M&&t.iconFocus,h&&t.iconActive),ownerState:(0,a.A)({},S,{iconEmpty:!R,iconFilled:R,iconHover:E,iconFocus:M,iconActive:h}),children:r&&!R?r:u});return w?(0,p.jsx)("span",(0,a.A)({},f,{children:T})):(0,p.jsxs)(n.Fragment,{children:[(0,p.jsxs)(jl,(0,a.A)({ownerState:(0,a.A)({},S,{emptyValueFocused:void 0}),htmlFor:I},f,{children:[T,(0,p.jsx)("span",{className:t.visuallyHidden,children:s(v)})]})),(0,p.jsx)("input",{className:t.visuallyHidden,onFocus:x,onBlur:b,onChange:A,onClick:y,disabled:o,value:v,id:I,type:"radio",name:g,checked:L})]})}const Vl=(0,p.jsx)(Ll,{fontSize:"inherit"}),Kl=(0,p.jsx)(Il,{fontSize:"inherit"});function Gl(e){return"".concat(e," Star").concat(1!==e?"s":"")}const ql=n.forwardRef((function(e,t){const o=(0,q.A)({name:"MuiRating",props:e}),{className:r,defaultValue:s=null,disabled:c=!1,emptyIcon:d=Kl,emptyLabelText:u="Empty",getLabelText:m=Gl,highlightSelectedOnly:h=!1,icon:v=Vl,IconContainerComponent:f=Dl,max:g=5,name:b,onChange:A,onChangeActive:y,onMouseLeave:x,onMouseMove:w,precision:C=1,readOnly:k=!1,size:R="medium",value:E}=o,M=(0,i.A)(o,Nl),L=(0,cl.A)(b),[I,T]=(0,nt.A)({controlled:E,default:s,name:"Rating"}),z=Ol(I,C),P=(0,Or.I)(),[{hover:N,focus:O},B]=n.useState({hover:-1,focus:-1});let j=z;-1!==N&&(j=N),-1!==O&&(j=O);const{isFocusVisibleRef:F,onBlur:W,onFocus:D,ref:H}=(0,Ml.A)(),[V,G]=n.useState(!1),U=n.useRef(),X=(0,Ye.A)(H,U,t),Y=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==N&&(t=N),T(t),A&&A(e,t)},Q=e=>{0===e.clientX&&0===e.clientY||(B({hover:-1,focus:-1}),T(null),A&&parseFloat(e.target.value)===z&&A(e,null))},_=e=>{D(e),!0===F.current&&G(!0);const t=parseFloat(e.target.value);B((e=>({hover:e.hover,focus:t})))},$=e=>{if(-1!==N)return;W(e),!1===F.current&&G(!1);B((e=>({hover:e.hover,focus:-1})))},[Z,J]=n.useState(!1),ee=(0,a.A)({},o,{defaultValue:s,disabled:c,emptyIcon:d,emptyLabelText:u,emptyValueFocused:Z,focusVisible:V,getLabelText:m,icon:v,IconContainerComponent:f,max:g,precision:C,readOnly:k,size:R}),te=(e=>{const{classes:t,size:o,readOnly:n,disabled:r,emptyValueFocused:a,focusVisible:i}=e,l={root:["root","size".concat((0,K.A)(o)),r&&"disabled",i&&"focusVisible",n&&"readOnly"],label:["label","pristine"],labelEmptyValue:[a&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return(0,S.A)(l,Tl,t)})(ee);return(0,p.jsxs)(Bl,(0,a.A)({ref:X,onMouseMove:e=>{w&&w(e);const t=U.current,{right:o,left:n,width:r}=t.getBoundingClientRect();let a;a=P?(o-e.clientX)/r:(e.clientX-n)/r;let i=Ol(g*a+C/2,C);i=(0,Rl.A)(i,C,g),B((e=>e.hover===i&&e.focus===i?e:{hover:i,focus:i})),G(!1),y&&N!==i&&y(e,i)},onMouseLeave:e=>{x&&x(e);B({hover:-1,focus:-1}),y&&-1!==N&&y(e,-1)},className:(0,l.A)(te.root,r,k&&"MuiRating-readOnly"),ownerState:ee,role:k?"img":null,"aria-label":k?m(j):null},M,{children:[Array.from(new Array(g)).map(((e,t)=>{const o=t+1,n={classes:te,disabled:c,emptyIcon:d,focus:O,getLabelText:m,highlightSelectedOnly:h,hover:N,icon:v,IconContainerComponent:f,name:L,onBlur:$,onChange:Y,onClick:Q,onFocus:_,ratingValue:j,ratingValueRounded:z,readOnly:k,ownerState:ee},r=o===Math.ceil(j)&&(-1!==N||-1!==O);if(C<1){const e=Array.from(new Array(1/C));return(0,p.jsx)(Wl,{className:(0,l.A)(te.decimal,r&&te.iconActive),ownerState:ee,iconActive:r,children:e.map(((t,r)=>{const i=Ol(o-1+(r+1)*C,C);return(0,p.jsx)(Hl,(0,a.A)({},n,{isActive:!1,itemValue:i,labelProps:{style:e.length-1===r?{}:{width:i===j?"".concat((r+1)*C*100,"%"):"0%",overflow:"hidden",position:"absolute"}}}),i)}))},o)}return(0,p.jsx)(Hl,(0,a.A)({},n,{isActive:r,itemValue:o}),o)})),!k&&!c&&(0,p.jsxs)(jl,{className:(0,l.A)(te.label,te.labelEmptyValue),ownerState:ee,children:[(0,p.jsx)("input",{className:te.visuallyHidden,value:"",id:"".concat(L,"-empty"),type:"radio",name:L,checked:null==z,onFocus:()=>J(!0),onBlur:()=>J(!1),onChange:Y}),(0,p.jsx)("span",{className:te.visuallyHidden,children:u})]})]}))}));function Ul(e){return(0,w.Ay)("MuiListItemIcon",e)}const Xl=(0,g.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);function Yl(e){return(0,w.Ay)("MuiListItemText",e)}const Ql=(0,g.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function _l(e){return(0,w.Ay)("MuiMenuItem",e)}const $l=(0,g.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Zl=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Jl=(0,G.Ay)(bt.A,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.dense&&t.dense,o.divider&&t.divider,!o.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat($l.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat($l.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat($l.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat($l.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat($l.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(ie.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(ie.inset)]:{marginLeft:52},["& .".concat(Ql.root)]:{marginTop:0,marginBottom:0},["& .".concat(Ql.inset)]:{paddingLeft:36},["& .".concat(Xl.root)]:{minWidth:36}},!o.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},o.dense&&(0,a.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(Xl.root," svg")]:{fontSize:"1.25rem"}}))})),es=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:c=!1,divider:d=!1,disableGutters:u=!1,focusVisibleClassName:m,role:h="menuitem",tabIndex:v,className:f}=o,g=(0,i.A)(o,Zl),b=n.useContext(Br),A=n.useMemo((()=>({dense:c||b.dense||!1,disableGutters:u})),[b.dense,c,u]),y=n.useRef(null);Tn((()=>{r&&y.current&&y.current.focus()}),[r]);const x=(0,a.A)({},o,{dense:A.dense,divider:d,disableGutters:u}),w=(e=>{const{disabled:t,dense:o,divider:n,disableGutters:r,selected:i,classes:l}=e,s={root:["root",o&&"dense",t&&"disabled",!r&&"gutters",n&&"divider",i&&"selected"]},c=(0,S.A)(s,_l,l);return(0,a.A)({},l,c)})(o),C=(0,Ye.A)(y,t);let k;return o.disabled||(k=void 0!==v?v:-1),(0,p.jsx)(Br.Provider,{value:A,children:(0,p.jsx)(Jl,(0,a.A)({ref:C,role:h,tabIndex:k,component:s,focusVisibleClassName:(0,l.A)(w.focusVisible,m),className:(0,l.A)(w.root,f)},g,{ownerState:x,classes:w}))})}));var ts=o(932);function os(e,t){return e-t}function ns(e,t){var o;const{index:n}=null!=(o=e.reduce(((e,o,n)=>{const r=Math.abs(t-o);return null===e||r2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;return e.length===t.length&&e.every(((e,n)=>o(e,t[n])))}(e,t)}const ds={horizontal:{offset:e=>({left:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},"horizontal-reverse":{offset:e=>({right:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},vertical:{offset:e=>({bottom:"".concat(e,"%")}),leap:e=>({height:"".concat(e,"%")})}},us=e=>e;let ps;function ms(){return void 0===ps&&(ps="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),ps}function hs(e){const{"aria-labelledby":t,defaultValue:o,disabled:r=!1,disableSwap:i=!1,isRtl:l=!1,marks:s=!1,max:c=100,min:d=0,name:u,onChange:p,onChangeCommitted:m,orientation:h="horizontal",rootRef:v,scale:f=us,step:g=1,shiftStep:b=10,tabIndex:A,value:y}=e,x=n.useRef(),[w,S]=n.useState(-1),[C,k]=n.useState(-1),[R,E]=n.useState(!1),M=n.useRef(0),[L,I]=(0,mo.A)({controlled:y,default:null!=o?o:d,name:"Slider"}),T=p&&((e,t,o)=>{const n=e.nativeEvent||e,r=new n.constructor(n.type,n);Object.defineProperty(r,"target",{writable:!0,value:{value:t,name:u}}),p(r,t,o)}),z=Array.isArray(L);let P=z?L.slice().sort(os):[L];P=P.map((e=>null==e?d:(0,Rl.A)(e,d,c)));const N=!0===s&&null!==g?[...Array(Math.floor((c-d)/g)+1)].map(((e,t)=>({value:d+g*t}))):s||[],O=N.map((e=>e.value)),{isFocusVisibleRef:B,onBlur:j,onFocus:F,ref:W}=(0,ts.A)(),[D,H]=n.useState(-1),V=n.useRef(),K=(0,rt.A)(W,V),G=(0,rt.A)(v,K),q=e=>t=>{var o;const n=Number(t.currentTarget.getAttribute("data-index"));F(t),!0===B.current&&H(n),k(n),null==e||null==(o=e.onFocus)||o.call(e,t)},U=e=>t=>{var o;j(t),!1===B.current&&H(-1),k(-1),null==e||null==(o=e.onBlur)||o.call(e,t)},X=(e,t)=>{const o=Number(e.currentTarget.getAttribute("data-index")),n=P[o],r=O.indexOf(n);let a=t;if(N&&null==g){const e=O[O.length-1];a=a>e?e:at=>{var o;if(null!==g){const e=Number(t.currentTarget.getAttribute("data-index")),o=P[e];let n=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?n=Math.max(o-b,d):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(n=Math.min(o+b,c)),null!==n&&(X(t,n),t.preventDefault())}null==e||null==(o=e.onKeyDown)||o.call(e,t)};(0,xn.A)((()=>{var e;r&&V.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[r]),r&&-1!==w&&S(-1),r&&-1!==D&&H(-1);const Q=n.useRef();let _=h;l&&"horizontal"===h&&(_+="-reverse");const $=e=>{let{finger:t,move:o=!1}=e;const{current:n}=V,{width:r,height:a,bottom:l,left:s}=n.getBoundingClientRect();let u,p;if(u=0===_.indexOf("vertical")?(l-t.y)/a:(t.x-s)/r,-1!==_.indexOf("-reverse")&&(u=1-u),p=function(e,t,o){return(o-t)*e+t}(u,d,c),g)p=is(p,g,d);else{const e=ns(O,p);p=O[e]}p=(0,Rl.A)(p,d,c);let m=0;if(z){m=o?Q.current:ns(P,p),i&&(p=(0,Rl.A)(p,P[m-1]||-1/0,P[m+1]||1/0));const e=p;p=ls({values:P,newValue:p,index:m}),i&&o||(m=p.indexOf(e),Q.current=m)}return{newValue:p,activeIndex:m}},Z=(0,vo.A)((e=>{const t=rs(e,x);if(!t)return;if(M.current+=1,"mousemove"===e.type&&0===e.buttons)return void J(e);const{newValue:o,activeIndex:n}=$({finger:t,move:!0});ss({sliderRef:V,activeIndex:n,setActive:S}),I(o),!R&&M.current>2&&E(!0),T&&!cs(o,L)&&T(e,o,n)})),J=(0,vo.A)((e=>{const t=rs(e,x);if(E(!1),!t)return;const{newValue:o}=$({finger:t,move:!0});S(-1),"touchend"===e.type&&k(-1),m&&m(e,o),x.current=void 0,te()})),ee=(0,vo.A)((e=>{if(r)return;ms()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const o=rs(e,x);if(!1!==o){const{newValue:t,activeIndex:n}=$({finger:o});ss({sliderRef:V,activeIndex:n,setActive:S}),I(t),T&&!cs(t,L)&&T(e,t,n)}M.current=0;const n=(0,An.A)(V.current);n.addEventListener("touchmove",Z,{passive:!0}),n.addEventListener("touchend",J,{passive:!0})})),te=n.useCallback((()=>{const e=(0,An.A)(V.current);e.removeEventListener("mousemove",Z),e.removeEventListener("mouseup",J),e.removeEventListener("touchmove",Z),e.removeEventListener("touchend",J)}),[J,Z]);n.useEffect((()=>{const{current:e}=V;return e.addEventListener("touchstart",ee,{passive:ms()}),()=>{e.removeEventListener("touchstart",ee),te()}}),[te,ee]),n.useEffect((()=>{r&&te()}),[r,te]);const oe=as(z?P[0]:d,d,c),ne=as(P[P.length-1],d,c)-oe,re=e=>t=>{var o;null==(o=e.onMouseLeave)||o.call(e,t),k(-1)};return{active:w,axis:_,axisProps:ds,dragging:R,focusedThumbIndex:D,getHiddenInputProps:function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var n;const i=(0,Jr.h)(o),s={onChange:(p=i||{},e=>{var t;null==(t=p.onChange)||t.call(p,e),X(e,e.target.valueAsNumber)}),onFocus:q(i||{}),onBlur:U(i||{}),onKeyDown:Y(i||{})};var p;const m=(0,a.A)({},i,s);return(0,a.A)({tabIndex:A,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(c),"aria-valuemin":f(d),name:u,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(n=e.step)?n:void 0,disabled:r},o,m,{style:(0,a.A)({},El,{direction:l?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,Jr.h)(e),o={onMouseDown:(n=t||{},e=>{var t;if(null==(t=n.onMouseDown)||t.call(n,e),r)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const o=rs(e,x);if(!1!==o){const{newValue:t,activeIndex:n}=$({finger:o});ss({sliderRef:V,activeIndex:n,setActive:S}),I(t),T&&!cs(t,L)&&T(e,t,n)}M.current=0;const a=(0,An.A)(V.current);a.addEventListener("mousemove",Z,{passive:!0}),a.addEventListener("mouseup",J)})};var n;const i=(0,a.A)({},t,o);return(0,a.A)({},e,{ref:G},i)},getThumbProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,Jr.h)(e),o={onMouseOver:(n=t||{},e=>{var t;null==(t=n.onMouseOver)||t.call(n,e);const o=Number(e.currentTarget.getAttribute("data-index"));k(o)}),onMouseLeave:re(t||{})};var n;return(0,a.A)({},e,t,o)},marks:N,open:C,range:z,rootRef:G,trackLeap:ne,trackOffset:oe,values:P,getThumbStyle:e=>({pointerEvents:-1!==w&&w!==e?"none":void 0})}}const vs=e=>!e||!(0,En.g)(e);function fs(e){return(0,w.Ay)("MuiSlider",e)}const gs=(0,g.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);const bs=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],As=Ke();function ys(e){return e}const xs=(0,G.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["color".concat((0,K.A)(o.color))],"medium"!==o.size&&t["size".concat((0,K.A)(o.size))],o.marked&&t.marked,"vertical"===o.orientation&&t.vertical,"inverted"===o.track&&t.trackInverted,!1===o.track&&t.trackFalse]}})((e=>{let{theme:t}=e;var o;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},["&.".concat(gs.disabled)]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},["&.".concat(gs.dragging)]:{["& .".concat(gs.thumb,", & .").concat(gs.track)]:{transition:"none"}},variants:[...Object.keys((null!=(o=t.vars)?o:t).palette).filter((e=>{var o;return(null!=(o=t.vars)?o:t).palette[e].main})).map((e=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}})),ws=(0,G.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Ss=(0,G.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;var o;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(o=t.vars)?o:t).palette).filter((e=>{var o;return(null!=(o=t.vars)?o:t).palette[e].main})).map((e=>({props:{color:e,track:"inverted"},style:(0,a.A)({},t.vars?{backgroundColor:t.vars.palette.Slider["".concat(e,"Track")],borderColor:t.vars.palette.Slider["".concat(e,"Track")]}:(0,a.A)({backgroundColor:(0,re.a)(t.palette[e].main,.62),borderColor:(0,re.a)(t.palette[e].main,.62)},t.applyStyles("dark",{backgroundColor:(0,re.e$)(t.palette[e].main,.5)}),t.applyStyles("dark",{borderColor:(0,re.e$)(t.palette[e].main,.5)})))})))]}})),Cs=(0,G.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.thumb,t["thumbColor".concat((0,K.A)(o.color))],"medium"!==o.size&&t["thumbSize".concat((0,K.A)(o.size))]]}})((e=>{let{theme:t}=e;var o;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},["&.".concat(gs.disabled)]:{"&:hover":{boxShadow:"none"}},variants:[...Object.keys((null!=(o=t.vars)?o:t).palette).filter((e=>{var o;return(null!=(o=t.vars)?o:t).palette[e].main})).map((e=>({props:{color:e},style:{["&:hover, &.".concat(gs.focusVisible)]:(0,a.A)({},t.vars?{boxShadow:"0px 0px 0px 8px rgba(".concat(t.vars.palette[e].mainChannel," / 0.16)")}:{boxShadow:"0px 0px 0px 8px ".concat((0,re.X4)(t.palette[e].main,.16))},{"@media (hover: none)":{boxShadow:"none"}}),["&.".concat(gs.active)]:(0,a.A)({},t.vars?{boxShadow:"0px 0px 0px 14px rgba(".concat(t.vars.palette[e].mainChannel," / 0.16)}")}:{boxShadow:"0px 0px 0px 14px ".concat((0,re.X4)(t.palette[e].main,.16))})}}))),{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}}]}})),ks=(0,G.Ay)((function(e){const{children:t,className:o,value:r}=e,a=(e=>{const{open:t}=e;return{offset:(0,l.A)(t&&gs.valueLabelOpen),circle:gs.valueLabelCircle,label:gs.valueLabelLabel}})(e);return t?n.cloneElement(t,{className:(0,l.A)(t.props.className)},(0,p.jsxs)(n.Fragment,{children:[t.props.children,(0,p.jsx)("span",{className:(0,l.A)(a.offset,o),"aria-hidden":!0,children:(0,p.jsx)("span",{className:a.circle,children:(0,p.jsx)("span",{className:a.label,children:r})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((e=>{let{theme:t}=e;return(0,a.A)({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},["&.".concat(gs.valueLabelOpen)]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},["&.".concat(gs.valueLabelOpen)]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})})),Rs=(0,G.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,Ja.A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:o}=e;return[t.mark,o&&t.markActive]}})((e=>{let{theme:t}=e;return{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}})),Es=(0,G.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,Ja.A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((e=>{let{theme:t}=e;return(0,a.A)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})})),Ms=e=>{let{children:t}=e;return t},Ls=n.forwardRef((function(e,t){var o,r,s,c,d,u,m,h,v,f,g,b,A,y,x,w,C,k,R,E,M,L,I,T;const z=As({props:e,name:"MuiSlider"}),P=(0,Or.I)(),{"aria-label":N,"aria-valuetext":O,"aria-labelledby":B,component:j="span",components:F={},componentsProps:W={},color:D="primary",classes:H,className:V,disableSwap:G=!1,disabled:q=!1,getAriaLabel:U,getAriaValueText:X,marks:Y=!1,max:Q=100,min:_=0,orientation:$="horizontal",shiftStep:Z=10,size:J="medium",step:ee=1,scale:te=ys,slotProps:oe,slots:ne,track:re="normal",valueLabelDisplay:ae="off",valueLabelFormat:ie=ys}=z,le=(0,i.A)(z,bs),se=(0,a.A)({},z,{isRtl:P,max:Q,min:_,classes:H,disabled:q,disableSwap:G,orientation:$,marks:Y,color:D,size:J,step:ee,shiftStep:Z,scale:te,track:re,valueLabelDisplay:ae,valueLabelFormat:ie}),{axisProps:ce,getRootProps:de,getHiddenInputProps:ue,getThumbProps:pe,open:me,active:he,axis:ve,focusedThumbIndex:fe,range:ge,dragging:be,marks:Ae,values:ye,trackOffset:xe,trackLeap:we,getThumbStyle:Se}=hs((0,a.A)({},se,{rootRef:t}));se.marked=Ae.length>0&&Ae.some((e=>e.label)),se.dragging=be,se.focusedThumbIndex=fe;const Ce=(e=>{const{disabled:t,dragging:o,marked:n,orientation:r,track:a,classes:i,color:l,size:s}=e,c={root:["root",t&&"disabled",o&&"dragging",n&&"marked","vertical"===r&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",l&&"color".concat((0,K.A)(l)),s&&"size".concat((0,K.A)(s))],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",s&&"thumbSize".concat((0,K.A)(s)),l&&"thumbColor".concat((0,K.A)(l))],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,S.A)(c,fs,i)})(se),ke=null!=(o=null!=(r=null==ne?void 0:ne.root)?r:F.Root)?o:xs,Re=null!=(s=null!=(c=null==ne?void 0:ne.rail)?c:F.Rail)?s:ws,Ee=null!=(d=null!=(u=null==ne?void 0:ne.track)?u:F.Track)?d:Ss,Me=null!=(m=null!=(h=null==ne?void 0:ne.thumb)?h:F.Thumb)?m:Cs,Le=null!=(v=null!=(f=null==ne?void 0:ne.valueLabel)?f:F.ValueLabel)?v:ks,Ie=null!=(g=null!=(b=null==ne?void 0:ne.mark)?b:F.Mark)?g:Rs,Te=null!=(A=null!=(y=null==ne?void 0:ne.markLabel)?y:F.MarkLabel)?A:Es,ze=null!=(x=null!=(w=null==ne?void 0:ne.input)?w:F.Input)?x:"input",Pe=null!=(C=null==oe?void 0:oe.root)?C:W.root,Ne=null!=(k=null==oe?void 0:oe.rail)?k:W.rail,Oe=null!=(R=null==oe?void 0:oe.track)?R:W.track,Be=null!=(E=null==oe?void 0:oe.thumb)?E:W.thumb,je=null!=(M=null==oe?void 0:oe.valueLabel)?M:W.valueLabel,Fe=null!=(L=null==oe?void 0:oe.mark)?L:W.mark,We=null!=(I=null==oe?void 0:oe.markLabel)?I:W.markLabel,De=null!=(T=null==oe?void 0:oe.input)?T:W.input,He=(0,Nr.Q)({elementType:ke,getSlotProps:de,externalSlotProps:Pe,externalForwardedProps:le,additionalProps:(0,a.A)({},vs(ke)&&{as:j}),ownerState:(0,a.A)({},se,null==Pe?void 0:Pe.ownerState),className:[Ce.root,V]}),Ve=(0,Nr.Q)({elementType:Re,externalSlotProps:Ne,ownerState:se,className:Ce.rail}),Ke=(0,Nr.Q)({elementType:Ee,externalSlotProps:Oe,additionalProps:{style:(0,a.A)({},ce[ve].offset(xe),ce[ve].leap(we))},ownerState:(0,a.A)({},se,null==Oe?void 0:Oe.ownerState),className:Ce.track}),Ge=(0,Nr.Q)({elementType:Me,getSlotProps:pe,externalSlotProps:Be,ownerState:(0,a.A)({},se,null==Be?void 0:Be.ownerState),className:Ce.thumb}),qe=(0,Nr.Q)({elementType:Le,externalSlotProps:je,ownerState:(0,a.A)({},se,null==je?void 0:je.ownerState),className:Ce.valueLabel}),Ue=(0,Nr.Q)({elementType:Ie,externalSlotProps:Fe,ownerState:se,className:Ce.mark}),Xe=(0,Nr.Q)({elementType:Te,externalSlotProps:We,ownerState:se,className:Ce.markLabel}),Ye=(0,Nr.Q)({elementType:ze,getSlotProps:ue,externalSlotProps:De,ownerState:se});return(0,p.jsxs)(ke,(0,a.A)({},He,{children:[(0,p.jsx)(Re,(0,a.A)({},Ve)),(0,p.jsx)(Ee,(0,a.A)({},Ke)),Ae.filter((e=>e.value>=_&&e.value<=Q)).map(((e,t)=>{const o=as(e.value,_,Q),r=ce[ve].offset(o);let i;return i=!1===re?-1!==ye.indexOf(e.value):"normal"===re&&(ge?e.value>=ye[0]&&e.value<=ye[ye.length-1]:e.value<=ye[0])||"inverted"===re&&(ge?e.value<=ye[0]||e.value>=ye[ye.length-1]:e.value>=ye[0]),(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)(Ie,(0,a.A)({"data-index":t},Ue,!(0,En.g)(Ie)&&{markActive:i},{style:(0,a.A)({},r,Ue.style),className:(0,l.A)(Ue.className,i&&Ce.markActive)})),null!=e.label?(0,p.jsx)(Te,(0,a.A)({"aria-hidden":!0,"data-index":t},Xe,!(0,En.g)(Te)&&{markLabelActive:i},{style:(0,a.A)({},r,Xe.style),className:(0,l.A)(Ce.markLabel,Xe.className,i&&Ce.markLabelActive),children:e.label})):null]},t)})),ye.map(((e,t)=>{const o=as(e,_,Q),n=ce[ve].offset(o),r="off"===ae?Ms:Le;return(0,p.jsx)(r,(0,a.A)({},!(0,En.g)(r)&&{valueLabelFormat:ie,valueLabelDisplay:ae,value:"function"===typeof ie?ie(te(e),t):ie,index:t,open:me===t||he===t||"on"===ae,disabled:q},qe,{children:(0,p.jsx)(Me,(0,a.A)({"data-index":t},Ge,{className:(0,l.A)(Ce.thumb,Ge.className,he===t&&Ce.active,fe===t&&Ce.focusVisible),style:(0,a.A)({},n,Se(t),Ge.style),children:(0,p.jsx)(ze,(0,a.A)({"data-index":t,"aria-label":U?U(t):N,"aria-valuenow":te(e),"aria-labelledby":B,"aria-valuetext":X?X(te(e),t):O,value:ye[t]},Ye))}))}),t)}))]}))})),Is=Ls;function Ts(e){return(0,w.Ay)("MuiSwitch",e)}const zs=(0,g.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Ps=["className","color","edge","size","sx"],Ns=Ke(),Os=(0,G.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.edge&&t["edge".concat((0,K.A)(o.edge))],t["size".concat((0,K.A)(o.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(zs.thumb)]:{width:16,height:16},["& .".concat(zs.switchBase)]:{padding:4,["&.".concat(zs.checked)]:{transform:"translateX(16px)"}}}}]}),Bs=(0,G.Ay)(qi,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.switchBase,{["& .".concat(zs.input)]:t.input},"default"!==o.color&&t["color".concat((0,K.A)(o.color))]]}})((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(zs.checked)]:{transform:"translateX(20px)"},["&.".concat(zs.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(zs.checked," + .").concat(zs.track)]:{opacity:.5},["&.".concat(zs.disabled," + .").concat(zs.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(zs.input)]:{left:"-100%",width:"300%"}}}),(e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[o]=e;return{props:{color:o},style:{["&.".concat(zs.checked)]:{color:(t.vars||t).palette[o].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,re.X4)(t.palette[o].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(zs.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(o,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,re.a)(t.palette[o].main,.62):(0,re.e$)(t.palette[o].main,.55))}},["&.".concat(zs.checked," + .").concat(zs.track)]:{backgroundColor:(t.vars||t).palette[o].main}}}}))]}})),js=(0,G.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}})),Fs=(0,G.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),Ws=n.forwardRef((function(e,t){const o=Ns({props:e,name:"MuiSwitch"}),{className:n,color:r="primary",edge:s=!1,size:c="medium",sx:d}=o,u=(0,i.A)(o,Ps),m=(0,a.A)({},o,{color:r,edge:s,size:c}),h=(e=>{const{classes:t,edge:o,size:n,color:r,checked:i,disabled:l}=e,s={root:["root",o&&"edge".concat((0,K.A)(o)),"size".concat((0,K.A)(n))],switchBase:["switchBase","color".concat((0,K.A)(r)),i&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,S.A)(s,Ts,t);return(0,a.A)({},t,c)})(m),v=(0,p.jsx)(Fs,{className:h.thumb,ownerState:m});return(0,p.jsxs)(Os,{className:(0,l.A)(h.root,n),sx:d,ownerState:m,children:[(0,p.jsx)(Bs,(0,a.A)({type:"checkbox",icon:v,checkedIcon:v,ref:t,ownerState:m},u,{classes:(0,a.A)({},h,{root:h.switchBase})})),(0,p.jsx)(js,{className:h.track,ownerState:m})]})}));function Ds(e){return(0,w.Ay)("MuiToggleButtonGroup",e)}const Hs=(0,g.A)("MuiToggleButtonGroup",["root","selected","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);const Vs=n.createContext({});const Ks=n.createContext(void 0);function Gs(e){return(0,w.Ay)("MuiToggleButton",e)}const qs=(0,g.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Us=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],Xs=(0,G.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(Hs.grouped)]:t.grouped},{["& .".concat(Hs.grouped)]:t["grouped".concat((0,K.A)(o.orientation))]},{["& .".concat(Hs.firstButton)]:t.firstButton},{["& .".concat(Hs.lastButton)]:t.lastButton},{["& .".concat(Hs.middleButton)]:t.middleButton},t.root,"vertical"===o.orientation&&t.vertical,o.fullWidth&&t.fullWidth]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({display:"inline-flex",borderRadius:(o.vars||o).shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{["& .".concat(Hs.grouped)]:(0,a.A)({},"horizontal"===t.orientation?{["&.".concat(Hs.selected," + .").concat(Hs.grouped,".").concat(Hs.selected)]:{borderLeft:0,marginLeft:0}}:{["&.".concat(Hs.selected," + .").concat(Hs.grouped,".").concat(Hs.selected)]:{borderTop:0,marginTop:0}})},"horizontal"===t.orientation?{["& .".concat(Hs.firstButton,",& .").concat(Hs.middleButton)]:{borderTopRightRadius:0,borderBottomRightRadius:0},["& .".concat(Hs.lastButton,",& .").concat(Hs.middleButton)]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{["& .".concat(Hs.firstButton,",& .").concat(Hs.middleButton)]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},["& .".concat(Hs.lastButton,",& .").concat(Hs.middleButton)]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===t.orientation?{["& .".concat(Hs.lastButton,".").concat(qs.disabled,",& .").concat(Hs.middleButton,".").concat(qs.disabled)]:{borderLeft:"1px solid transparent"}}:{["& .".concat(Hs.lastButton,".").concat(qs.disabled,",& .").concat(Hs.middleButton,".").concat(qs.disabled)]:{borderTop:"1px solid transparent"}})})),Ys=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:s,color:c="standard",disabled:d=!1,exclusive:u=!1,fullWidth:m=!1,onChange:h,orientation:v="horizontal",size:f="medium",value:g}=o,b=(0,i.A)(o,Us),A=(0,a.A)({},o,{disabled:d,fullWidth:m,orientation:v,size:f}),y=(e=>{const{classes:t,orientation:o,fullWidth:n,disabled:r}=e,a={root:["root","vertical"===o&&"vertical",n&&"fullWidth"],grouped:["grouped","grouped".concat((0,K.A)(o)),r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,S.A)(a,Ds,t)})(A),x=n.useCallback(((e,t)=>{if(!h)return;const o=g&&g.indexOf(t);let n;g&&o>=0?(n=g.slice(),n.splice(o,1)):n=g?g.concat(t):[t],h(e,n)}),[h,g]),w=n.useCallback(((e,t)=>{h&&h(e,g===t?null:t)}),[h,g]),C=n.useMemo((()=>({className:y.grouped,onChange:u?w:x,value:g,size:f,fullWidth:m,color:c,disabled:d})),[y.grouped,u,w,x,g,f,m,c,d]),k=Si(r),R=k.length,E=e=>{const t=0===e,o=e===R-1;return t&&o?"":t?y.firstButton:o?y.lastButton:y.middleButton};return(0,p.jsx)(Xs,(0,a.A)({role:"group",className:(0,l.A)(y.root,s),ref:t,ownerState:A},b,{children:(0,p.jsx)(Vs.Provider,{value:C,children:k.map(((e,t)=>(0,p.jsx)(Ks.Provider,{value:E(t),children:e},t)))})}))}));var Qs=o(2018);function _s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,Rl.A)(e,t,o)}function $s(e){if(e.type)return e;if("#"===e.charAt(0))return $s(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let o=e.match(t);return o&&1===o[0].length&&(o=o.map((e=>e+e))),o?"rgb".concat(4===o.length?"a":"","(").concat(o.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}(e));const t=e.indexOf("("),o=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(o))throw new Error((0,bn.A)(9,e));let n,r=e.substring(t+1,e.length-1);if("color"===o){if(r=r.split(" "),n=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error((0,bn.A)(10,n))}else r=r.split(",");return r=r.map((e=>parseFloat(e))),{type:o,values:r,colorSpace:n}}function Zs(e){const{type:t,colorSpace:o}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),n=-1!==t.indexOf("color")?"".concat(o," ").concat(n.join(" ")):"".concat(n.join(", ")),"".concat(t,"(").concat(n,")")}function Js(e,t){return e=$s(e),t=_s(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,Zs(e)}function ec(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}const tc=["value"],oc=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],nc=(0,G.Ay)(bt.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["size".concat((0,K.A)(o.size))]]}})((e=>{let t,{theme:o,ownerState:n}=e,r="standard"===n.color?o.palette.text.primary:o.palette[n.color].main;return o.vars&&(r="standard"===n.color?o.vars.palette.text.primary:o.vars.palette[n.color].main,t="standard"===n.color?o.vars.palette.text.primaryChannel:o.vars.palette[n.color].mainChannel),(0,a.A)({},o.typography.button,{borderRadius:(o.vars||o).shape.borderRadius,padding:11,border:"1px solid ".concat((o.vars||o).palette.divider),color:(o.vars||o).palette.action.active},n.fullWidth&&{width:"100%"},{["&.".concat(qs.disabled)]:{color:(o.vars||o).palette.action.disabled,border:"1px solid ".concat((o.vars||o).palette.action.disabledBackground)},"&:hover":{textDecoration:"none",backgroundColor:o.vars?"rgba(".concat(o.vars.palette.text.primaryChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):Js(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(qs.selected)]:{color:r,backgroundColor:o.vars?"rgba(".concat(t," / ").concat(o.vars.palette.action.selectedOpacity,")"):Js(r,o.palette.action.selectedOpacity),"&:hover":{backgroundColor:o.vars?"rgba(".concat(t," / calc(").concat(o.vars.palette.action.selectedOpacity," + ").concat(o.vars.palette.action.hoverOpacity,"))"):Js(r,o.palette.action.selectedOpacity+o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:o.vars?"rgba(".concat(t," / ").concat(o.vars.palette.action.selectedOpacity,")"):Js(r,o.palette.action.selectedOpacity)}}}},"small"===n.size&&{padding:7,fontSize:o.typography.pxToRem(13)},"large"===n.size&&{padding:15,fontSize:o.typography.pxToRem(15)})})),rc=n.forwardRef((function(e,t){const o=n.useContext(Vs),{value:r}=o,s=(0,i.A)(o,tc),c=n.useContext(Ks),d=(0,Qs.A)((0,a.A)({},s,{selected:ec(e.value,r)}),e),u=(0,q.A)({props:d,name:"MuiToggleButton"}),{children:m,className:h,color:v="standard",disabled:f=!1,disableFocusRipple:g=!1,fullWidth:b=!1,onChange:A,onClick:y,selected:x,size:w="medium",value:C}=u,k=(0,i.A)(u,oc),R=(0,a.A)({},u,{color:v,disabled:f,disableFocusRipple:g,fullWidth:b,size:w}),E=(e=>{const{classes:t,fullWidth:o,selected:n,disabled:r,size:a,color:i}=e,l={root:["root",n&&"selected",r&&"disabled",o&&"fullWidth","size".concat((0,K.A)(a)),i]};return(0,S.A)(l,Gs,t)})(R),M=c||"";return(0,p.jsx)(nc,(0,a.A)({className:(0,l.A)(s.className,E.root,h,M),disabled:f,focusRipple:!g,ref:t,onClick:e=>{y&&(y(e,C),e.defaultPrevented)||A&&A(e,C)},onChange:A,value:C,ownerState:R,"aria-pressed":x},k,{children:m}))}));function ac(e){return(0,w.Ay)("MuiBottomNavigation",e)}(0,g.A)("MuiBottomNavigation",["root"]);const ic=["children","className","component","onChange","showLabels","value"],lc=(0,G.Ay)("div",{name:"MuiBottomNavigation",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",height:56,backgroundColor:(t.vars||t).palette.background.paper}})),sc=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiBottomNavigation"}),{children:r,className:s,component:c="div",onChange:d,showLabels:u=!1,value:m}=o,h=(0,i.A)(o,ic),v=(0,a.A)({},o,{component:c,showLabels:u}),f=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},ac,t)})(v);return(0,p.jsx)(lc,(0,a.A)({as:c,className:(0,l.A)(f.root,s),ref:t,ownerState:v},h,{children:n.Children.map(r,((e,t)=>{if(!n.isValidElement(e))return null;const o=void 0===e.props.value?t:e.props.value;return n.cloneElement(e,{selected:o===m,showLabel:void 0!==e.props.showLabel?e.props.showLabel:u,value:o,onChange:d})}))}))}));function cc(e){return(0,w.Ay)("MuiBottomNavigationAction",e)}const dc=(0,g.A)("MuiBottomNavigationAction",["root","iconOnly","selected","label"]),uc=["className","icon","label","onChange","onClick","selected","showLabel","value"],pc=(0,G.Ay)(bt.A,{name:"MuiBottomNavigationAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.showLabel&&!o.selected&&t.iconOnly]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({transition:t.transitions.create(["color","padding-top"],{duration:t.transitions.duration.short}),padding:"0px 12px",minWidth:80,maxWidth:168,color:(t.vars||t).palette.text.secondary,flexDirection:"column",flex:"1"},!o.showLabel&&!o.selected&&{paddingTop:14},!o.showLabel&&!o.selected&&!o.label&&{paddingTop:0},{["&.".concat(dc.selected)]:{color:(t.vars||t).palette.primary.main}})})),mc=(0,G.Ay)("span",{name:"MuiBottomNavigationAction",slot:"Label",overridesResolver:(e,t)=>t.label})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s"},!o.showLabel&&!o.selected&&{opacity:0,transitionDelay:"0s"},{["&.".concat(dc.selected)]:{fontSize:t.typography.pxToRem(14)}})})),hc=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiBottomNavigationAction"}),{className:n,icon:r,label:s,onChange:c,onClick:d,value:u}=o,m=(0,i.A)(o,uc),h=o,v=(e=>{const{classes:t,showLabel:o,selected:n}=e,r={root:["root",!o&&!n&&"iconOnly",n&&"selected"],label:["label",!o&&!n&&"iconOnly",n&&"selected"]};return(0,S.A)(r,cc,t)})(h);return(0,p.jsxs)(pc,(0,a.A)({ref:t,className:(0,l.A)(v.root,n),focusRipple:!0,onClick:e=>{c&&c(e,u),d&&d(e)},ownerState:h},m,{children:[r,(0,p.jsx)(mc,{className:v.label,ownerState:h,children:s})]}))})),vc=Po((0,p.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),fc=["slots","slotProps"],gc=(0,G.Ay)(bt.A)((e=>{let{theme:t}=e;return(0,a.A)({display:"flex",marginLeft:"calc(".concat(t.spacing(1)," * 0.5)"),marginRight:"calc(".concat(t.spacing(1)," * 0.5)")},"light"===t.palette.mode?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,a.A)({},"light"===t.palette.mode?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}),"&:active":(0,a.A)({boxShadow:t.shadows[0]},"light"===t.palette.mode?{backgroundColor:(0,re.tL)(t.palette.grey[200],.12)}:{backgroundColor:(0,re.tL)(t.palette.grey[600],.12)})})})),bc=(0,G.Ay)(vc)({width:24,height:16});const Ac=function(e){const{slots:t={},slotProps:o={}}=e,n=(0,i.A)(e,fc),r=e;return(0,p.jsx)("li",{children:(0,p.jsx)(gc,(0,a.A)({focusRipple:!0},n,{ownerState:r,children:(0,p.jsx)(bc,(0,a.A)({as:t.CollapsedIcon,ownerState:r},o.collapsedIcon))}))})};function yc(e){return(0,w.Ay)("MuiBreadcrumbs",e)}const xc=(0,g.A)("MuiBreadcrumbs",["root","ol","li","separator"]),wc=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Sc=(0,G.Ay)(zt,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{["& .".concat(xc.li)]:t.li},t.root]})({}),Cc=(0,G.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),kc=(0,G.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Rc(e,t,o,n){return e.reduce(((r,a,i)=>(i{const{classes:t}=e;return(0,S.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},yc,t)})(x),C=(0,Nr.Q)({elementType:d.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:x}),k=n.useRef(null),R=n.Children.toArray(r).filter((e=>n.isValidElement(e))).map(((e,t)=>(0,p.jsx)("li",{className:w.li,children:e},"child-".concat(t))));return(0,p.jsx)(Sc,(0,a.A)({ref:t,component:c,color:"text.secondary",className:(0,l.A)(w.root,s),ownerState:x},b,{children:(0,p.jsx)(Cc,{className:w.ol,ref:k,ownerState:x,children:Rc(A||f&&R.length<=f?R:(e=>v+h>=e.length?e:[...e.slice(0,v),(0,p.jsx)(Ac,{"aria-label":m,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:C},onClick:()=>{y(!0);const e=k.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-h,e.length)])(R),w.separator,g,x)})}))}));function Mc(e){return(0,w.Ay)("MuiLink",e)}const Lc=(0,g.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var Ic=o(7162);const Tc={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},zc=e=>{let{theme:t,ownerState:o}=e;const n=(e=>Tc[e]||e)(o.color),r=(0,Ic.Yn)(t,"palette.".concat(n),!1)||o.color,a=(0,Ic.Yn)(t,"palette.".concat(n,"Channel"));return"vars"in t&&a?"rgba(".concat(a," / 0.4)"):(0,re.X4)(r,.4)},Pc=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Nc=(0,G.Ay)(zt,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["underline".concat((0,K.A)(o.underline))],"button"===o.component&&t.button]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},"none"===o.underline&&{textDecoration:"none"},"hover"===o.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===o.underline&&(0,a.A)({textDecoration:"underline"},"inherit"!==o.color&&{textDecorationColor:zc({theme:t,ownerState:o})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===o.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(Lc.focusVisible)]:{outline:"auto"}})})),Oc=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiLink"}),{className:r,color:s="primary",component:c="a",onBlur:d,onFocus:u,TypographyClasses:m,underline:h="always",variant:v="inherit",sx:f}=o,g=(0,i.A)(o,Pc),{isFocusVisibleRef:b,onBlur:A,onFocus:y,ref:x}=(0,Ml.A)(),[w,C]=n.useState(!1),k=(0,Ye.A)(t,x),R=(0,a.A)({},o,{color:s,component:c,focusVisible:w,underline:h,variant:v}),E=(e=>{const{classes:t,component:o,focusVisible:n,underline:r}=e,a={root:["root","underline".concat((0,K.A)(r)),"button"===o&&"button",n&&"focusVisible"]};return(0,S.A)(a,Mc,t)})(R);return(0,p.jsx)(Nc,(0,a.A)({color:s,className:(0,l.A)(E.root,r),classes:m,component:c,onBlur:e=>{A(e),!1===b.current&&C(!1),d&&d(e)},onFocus:e=>{y(e),!0===b.current&&C(!0),u&&u(e)},ref:k,ownerState:R,variant:v,sx:[...Object.keys(Tc).includes(s)?[]:[{color:s}],...Array.isArray(f)?f:[f]]},g))})),Bc=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function jc(e,t,o){var n;const r=function(e,t,o){const n=t.getBoundingClientRect(),r=o&&o.getBoundingClientRect(),a=_r(t);let i;if(t.fakeTransform)i=t.fakeTransform;else{const e=a.getComputedStyle(t);i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let l=0,s=0;if(i&&"none"!==i&&"string"===typeof i){const e=i.split("(")[1].split(")")[0].split(",");l=parseInt(e[4],10),s=parseInt(e[5],10)}return"left"===e?"translateX(".concat(r?r.right+l-n.left:a.innerWidth+l-n.left,"px)"):"right"===e?"translateX(-".concat(r?n.right-r.left-l:n.left+n.width-l,"px)"):"up"===e?"translateY(".concat(r?r.bottom+s-n.top:a.innerHeight+s-n.top,"px)"):"translateY(-".concat(r?n.top-r.top+n.height-s:n.top+n.height-s,"px)")}(e,t,"function"===typeof(n=o)?n():n);r&&(t.style.webkitTransform=r,t.style.transform=r)}const Fc=n.forwardRef((function(e,t){const o=(0,pe.A)(),r={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},l={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:s,appear:c=!0,children:d,container:u,direction:m="down",easing:h=r,in:v,onEnter:f,onEntered:g,onEntering:b,onExit:A,onExited:y,onExiting:x,style:w,timeout:S=l,TransitionComponent:C=Ge.Ay}=e,k=(0,i.A)(e,Bc),R=n.useRef(null),E=(0,Ye.A)(d.ref,R,t),M=e=>t=>{e&&(void 0===t?e(R.current):e(R.current,t))},L=M(((e,t)=>{jc(m,e,u),(0,Xe.q)(e),f&&f(e,t)})),I=M(((e,t)=>{const n=(0,Xe.c)({timeout:S,style:w,easing:h},{mode:"enter"});e.style.webkitTransition=o.transitions.create("-webkit-transform",(0,a.A)({},n)),e.style.transition=o.transitions.create("transform",(0,a.A)({},n)),e.style.webkitTransform="none",e.style.transform="none",b&&b(e,t)})),T=M(g),z=M(x),P=M((e=>{const t=(0,Xe.c)({timeout:S,style:w,easing:h},{mode:"exit"});e.style.webkitTransition=o.transitions.create("-webkit-transform",t),e.style.transition=o.transitions.create("transform",t),jc(m,e,u),A&&A(e)})),N=M((e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)})),O=n.useCallback((()=>{R.current&&jc(m,R.current,u)}),[m,u]);return n.useEffect((()=>{if(v||"down"===m||"right"===m)return;const e=Qr((()=>{R.current&&jc(m,R.current,u)})),t=_r(R.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[m,v,u]),n.useEffect((()=>{v||O()}),[v,O]),(0,p.jsx)(C,(0,a.A)({nodeRef:R,onEnter:L,onEntered:T,onEntering:I,onExit:P,onExited:N,onExiting:z,addEndListener:e=>{s&&s(R.current,e)},appear:c,in:v,timeout:S},k,{children:(e,t)=>n.cloneElement(d,(0,a.A)({ref:E,style:(0,a.A)({visibility:"exited"!==e||v?void 0:"hidden"},w,d.props.style)},t))}))})),Wc=Fc;function Dc(e){return(0,w.Ay)("MuiDrawer",e)}(0,g.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Hc=["BackdropProps"],Vc=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Kc=(e,t)=>{const{ownerState:o}=e;return[t.root,("permanent"===o.variant||"persistent"===o.variant)&&t.docked,t.modal]},Gc=(0,G.Ay)(Ca,{name:"MuiDrawer",slot:"Root",overridesResolver:Kc})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}})),qc=(0,G.Ay)("div",{shouldForwardProp:Un.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Kc})({flex:"0 0 auto"}),Uc=(0,G.Ay)(Le,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.paper,t["paperAnchor".concat((0,K.A)(o.anchor))],"temporary"!==o.variant&&t["paperAnchorDocked".concat((0,K.A)(o.anchor))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===o.anchor&&{left:0},"top"===o.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===o.anchor&&{right:0},"bottom"===o.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===o.anchor&&"temporary"!==o.variant&&{borderRight:"1px solid ".concat((t.vars||t).palette.divider)},"top"===o.anchor&&"temporary"!==o.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===o.anchor&&"temporary"!==o.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===o.anchor&&"temporary"!==o.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})})),Xc={left:"right",right:"left",top:"down",bottom:"up"};const Yc=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDrawer"}),r=(0,pe.A)(),s=(0,Or.I)(),c={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:u,children:m,className:h,elevation:v=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:g}={},onClose:b,open:A=!1,PaperProps:y={},SlideProps:x,TransitionComponent:w=Wc,transitionDuration:C=c,variant:k="temporary"}=o,R=(0,i.A)(o.ModalProps,Hc),E=(0,i.A)(o,Vc),M=n.useRef(!1);n.useEffect((()=>{M.current=!0}),[]);const L=function(e,t){let{direction:o}=e;return"rtl"===o&&function(e){return-1!==["left","right"].indexOf(e)}(t)?Xc[t]:t}({direction:s?"rtl":"ltr"},d),I=d,T=(0,a.A)({},o,{anchor:I,elevation:v,open:A,variant:k},E),z=(e=>{const{classes:t,anchor:o,variant:n}=e,r={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,K.A)(o)),"temporary"!==n&&"paperAnchorDocked".concat((0,K.A)(o))]};return(0,S.A)(r,Dc,t)})(T),P=(0,p.jsx)(Uc,(0,a.A)({elevation:"temporary"===k?v:0,square:!0},y,{className:(0,l.A)(z.paper,y.className),ownerState:T,children:m}));if("permanent"===k)return(0,p.jsx)(qc,(0,a.A)({className:(0,l.A)(z.root,z.docked,h),ownerState:T,ref:t},E,{children:P}));const N=(0,p.jsx)(w,(0,a.A)({in:A,direction:Xc[L],timeout:C,appear:M.current},x,{children:P}));return"persistent"===k?(0,p.jsx)(qc,(0,a.A)({className:(0,l.A)(z.root,z.docked,h),ownerState:T,ref:t},E,{children:N})):(0,p.jsx)(Gc,(0,a.A)({BackdropProps:(0,a.A)({},u,g,{transitionDuration:C}),className:(0,l.A)(z.root,z.modal,h),open:A,ownerState:T,onClose:b,hideBackdrop:f,ref:t},E,R,{children:N}))}));function Qc(e){return(0,w.Ay)("MuiListItem",e)}const _c=(0,g.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function $c(e){return(0,w.Ay)("MuiListItemButton",e)}const Zc=(0,g.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Jc(e){return(0,w.Ay)("MuiListItemSecondaryAction",e)}(0,g.A)("MuiListItemSecondaryAction",["root","disableGutters"]);const ed=["className"],td=(0,G.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.disableGutters&&t.disableGutters]}})((e=>{let{ownerState:t}=e;return(0,a.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})})),od=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=o,s=(0,i.A)(o,ed),c=n.useContext(Br),d=(0,a.A)({},o,{disableGutters:c.disableGutters}),u=(e=>{const{disableGutters:t,classes:o}=e,n={root:["root",t&&"disableGutters"]};return(0,S.A)(n,Jc,o)})(d);return(0,p.jsx)(td,(0,a.A)({className:(0,l.A)(u.root,r),ownerState:d,ref:t},s))}));od.muiName="ListItemSecondaryAction";const nd=od,rd=["className"],ad=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],id=(0,G.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.dense&&t.dense,"flex-start"===o.alignItems&&t.alignItemsFlexStart,o.divider&&t.divider,!o.disableGutters&&t.gutters,!o.disablePadding&&t.padding,o.button&&t.button,o.hasSecondaryAction&&t.secondaryAction]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!o.disablePadding&&(0,a.A)({paddingTop:8,paddingBottom:8},o.dense&&{paddingTop:4,paddingBottom:4},!o.disableGutters&&{paddingLeft:16,paddingRight:16},!!o.secondaryAction&&{paddingRight:48}),!!o.secondaryAction&&{["& > .".concat(Zc.root)]:{paddingRight:48}},{["&.".concat(_c.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(_c.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(_c.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(_c.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===o.alignItems&&{alignItems:"flex-start"},o.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},o.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(_c.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},o.hasSecondaryAction&&{paddingRight:48})})),ld=(0,G.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),sd=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:s=!1,button:c=!1,children:d,className:u,component:m,components:h={},componentsProps:v={},ContainerComponent:f="li",ContainerProps:{className:g}={},dense:b=!1,disabled:A=!1,disableGutters:y=!1,disablePadding:x=!1,divider:w=!1,focusVisibleClassName:C,secondaryAction:k,selected:R=!1,slotProps:E={},slots:M={}}=o,L=(0,i.A)(o.ContainerProps,rd),I=(0,i.A)(o,ad),T=n.useContext(Br),z=n.useMemo((()=>({dense:b||T.dense||!1,alignItems:r,disableGutters:y})),[r,T.dense,b,y]),P=n.useRef(null);Tn((()=>{s&&P.current&&P.current.focus()}),[s]);const N=n.Children.toArray(d),O=N.length&&Be(N[N.length-1],["ListItemSecondaryAction"]),B=(0,a.A)({},o,{alignItems:r,autoFocus:s,button:c,dense:z.dense,disabled:A,disableGutters:y,disablePadding:x,divider:w,hasSecondaryAction:O,selected:R}),j=(e=>{const{alignItems:t,button:o,classes:n,dense:r,disabled:a,disableGutters:i,disablePadding:l,divider:s,hasSecondaryAction:c,selected:d}=e,u={root:["root",r&&"dense",!i&&"gutters",!l&&"padding",s&&"divider",a&&"disabled",o&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]};return(0,S.A)(u,Qc,n)})(B),F=(0,Ye.A)(P,t),W=M.root||h.Root||id,D=E.root||v.root||{},H=(0,a.A)({className:(0,l.A)(j.root,D.className,u),disabled:A},I);let V=m||"li";return c&&(H.component=m||"div",H.focusVisibleClassName=(0,l.A)(_c.focusVisible,C),V=bt.A),O?(V=H.component||m?V:"div","li"===f&&("li"===V?V="div":"li"===H.component&&(H.component="div")),(0,p.jsx)(Br.Provider,{value:z,children:(0,p.jsxs)(ld,(0,a.A)({as:f,className:(0,l.A)(j.container,g),ref:F,ownerState:B},L,{children:[(0,p.jsx)(W,(0,a.A)({},D,!(0,En.g)(W)&&{as:V,ownerState:(0,a.A)({},B,D.ownerState)},H,{children:N})),N.pop()]}))})):(0,p.jsx)(Br.Provider,{value:z,children:(0,p.jsxs)(W,(0,a.A)({},D,{as:V,ref:F},!(0,En.g)(W)&&{ownerState:(0,a.A)({},B,D.ownerState)},H,{children:[N,k&&(0,p.jsx)(nd,{children:k})]}))})})),cd=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],dd=(0,G.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(Ql.primary)]:t.primary},{["& .".concat(Ql.secondary)]:t.secondary},t.root,o.inset&&t.inset,o.primary&&o.secondary&&t.multiline,o.dense&&t.dense]}})((e=>{let{ownerState:t}=e;return(0,a.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),ud=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiListItemText"}),{children:r,className:s,disableTypography:c=!1,inset:d=!1,primary:u,primaryTypographyProps:m,secondary:h,secondaryTypographyProps:v}=o,f=(0,i.A)(o,cd),{dense:g}=n.useContext(Br);let b=null!=u?u:r,A=h;const y=(0,a.A)({},o,{disableTypography:c,inset:d,primary:!!b,secondary:!!A,dense:g}),x=(e=>{const{classes:t,inset:o,primary:n,secondary:r,dense:a}=e,i={root:["root",o&&"inset",a&&"dense",n&&r&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,S.A)(i,Yl,t)})(y);return null==b||b.type===zt||c||(b=(0,p.jsx)(zt,(0,a.A)({variant:g?"body2":"body1",className:x.primary,component:null!=m&&m.variant?void 0:"span",display:"block"},m,{children:b}))),null==A||A.type===zt||c||(A=(0,p.jsx)(zt,(0,a.A)({variant:"body2",className:x.secondary,color:"text.secondary",display:"block"},v,{children:A}))),(0,p.jsxs)(dd,(0,a.A)({className:(0,l.A)(x.root,s),ownerState:y,ref:t},f,{children:[b,A]}))})),pd=["className"],md=(0,G.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"flex-start"===o.alignItems&&t.alignItemsFlexStart]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===o.alignItems&&{marginTop:8})})),hd=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiListItemIcon"}),{className:r}=o,s=(0,i.A)(o,pd),c=n.useContext(Br),d=(0,a.A)({},o,{alignItems:c.alignItems}),u=(e=>{const{alignItems:t,classes:o}=e,n={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,S.A)(n,Ul,o)})(d);return(0,p.jsx)(md,(0,a.A)({className:(0,l.A)(u.root,r),ownerState:d,ref:t},s))}));function vd(e){return(0,w.Ay)("MuiPagination",e)}(0,g.A)("MuiPagination",["root","ul","outlined","text"]);const fd=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function gd(e){return(0,w.Ay)("MuiPaginationItem",e)}const bd=(0,g.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),Ad=Po((0,p.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),yd=Po((0,p.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),xd=Po((0,p.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),wd=Po((0,p.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Sd=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],Cd=(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t["size".concat((0,K.A)(o.size))],"text"===o.variant&&t["text".concat((0,K.A)(o.color))],"outlined"===o.variant&&t["outlined".concat((0,K.A)(o.color))],"rounded"===o.shape&&t.rounded,"page"===o.type&&t.page,("start-ellipsis"===o.type||"end-ellipsis"===o.type)&&t.ellipsis,("previous"===o.type||"next"===o.type)&&t.previousNext,("first"===o.type||"last"===o.type)&&t.firstLast]},kd=(0,G.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:Cd})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",["&.".concat(bd.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===o.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===o.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})})),Rd=(0,G.Ay)(bt.A,{name:"MuiPaginationItem",slot:"Root",overridesResolver:Cd})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,["&.".concat(bd.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(bd.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(bd.selected)]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(bd.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},["&.".concat(bd.disabled)]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===o.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===o.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===o.shape&&{borderRadius:(t.vars||t).shape.borderRadius})}),(e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},"text"===o.variant&&{["&.".concat(bd.selected)]:(0,a.A)({},"standard"!==o.color&&{color:(t.vars||t).palette[o.color].contrastText,backgroundColor:(t.vars||t).palette[o.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[o.color].main}},["&.".concat(bd.focusVisible)]:{backgroundColor:(t.vars||t).palette[o.color].dark}},{["&.".concat(bd.disabled)]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===o.variant&&{border:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(bd.selected)]:(0,a.A)({},"standard"!==o.color&&{color:(t.vars||t).palette[o.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / 0.5)"):(0,re.X4)(t.palette[o.color].main,.5)),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.activatedOpacity,")"):(0,re.X4)(t.palette[o.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette[o.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(bd.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette[o.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{["&.".concat(bd.disabled)]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})})),Ed=(0,G.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===o.size&&{fontSize:t.typography.pxToRem(18)},"large"===o.size&&{fontSize:t.typography.pxToRem(22)})})),Md=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiPaginationItem"}),{className:n,color:r="standard",component:s,components:c={},disabled:d=!1,page:u,selected:m=!1,shape:h="circular",size:v="medium",slots:f={},type:g="page",variant:b="text"}=o,A=(0,i.A)(o,Sd),y=(0,a.A)({},o,{color:r,disabled:d,selected:m,shape:h,size:v,type:g,variant:b}),x=(0,Or.I)(),w=(e=>{const{classes:t,color:o,disabled:n,selected:r,size:a,shape:i,type:l,variant:s}=e,c={root:["root","size".concat((0,K.A)(a)),s,i,"standard"!==o&&"color".concat((0,K.A)(o)),"standard"!==o&&"".concat(s).concat((0,K.A)(o)),n&&"disabled",r&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[l]],icon:["icon"]};return(0,S.A)(c,gd,t)})(y),C=(x?{previous:f.next||c.next||wd,next:f.previous||c.previous||xd,last:f.first||c.first||Ad,first:f.last||c.last||yd}:{previous:f.previous||c.previous||xd,next:f.next||c.next||wd,first:f.first||c.first||Ad,last:f.last||c.last||yd})[g];return"start-ellipsis"===g||"end-ellipsis"===g?(0,p.jsx)(kd,{ref:t,ownerState:y,className:(0,l.A)(w.root,n),children:"\u2026"}):(0,p.jsxs)(Rd,(0,a.A)({ref:t,ownerState:y,component:s,disabled:d,className:(0,l.A)(w.root,n)},A,{children:["page"===g&&u,C?(0,p.jsx)(Ed,{as:C,ownerState:y,className:w.icon}):null]}))})),Ld=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],Id=(0,G.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant]]}})({}),Td=(0,G.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function zd(e,t,o){return"page"===e?"".concat(o?"":"Go to ","page ").concat(t):"Go to ".concat(e," page")}const Pd=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiPagination"}),{boundaryCount:n=1,className:r,color:s="standard",count:c=1,defaultPage:d=1,disabled:u=!1,getItemAriaLabel:m=zd,hideNextButton:h=!1,hidePrevButton:v=!1,renderItem:f=(e=>(0,p.jsx)(Md,(0,a.A)({},e))),shape:g="circular",showFirstButton:b=!1,showLastButton:A=!1,siblingCount:y=1,size:x="medium",variant:w="text"}=o,C=(0,i.A)(o,Ld),{items:k}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:o="usePagination",count:n=1,defaultPage:r=1,disabled:l=!1,hideNextButton:s=!1,hidePrevButton:c=!1,onChange:d,page:u,showFirstButton:p=!1,showLastButton:m=!1,siblingCount:h=1}=e,v=(0,i.A)(e,fd),[f,g]=(0,mo.A)({controlled:u,default:r,name:o,state:"page"}),b=(e,t)=>{u||g(t),d&&d(e,t)},A=(e,t)=>{const o=t-e+1;return Array.from({length:o},((t,o)=>e+o))},y=A(1,Math.min(t,n)),x=A(Math.max(n-t+1,t+1),n),w=Math.max(Math.min(f-h,n-t-2*h-1),t+2),S=Math.min(Math.max(f+h,t+2*h+2),x.length>0?x[0]-2:n-1),C=[...p?["first"]:[],...c?[]:["previous"],...y,...w>t+2?["start-ellipsis"]:t+1t?[n-t]:[],...x,...s?[]:["next"],...m?["last"]:[]],k=e=>{switch(e){case"first":return 1;case"previous":return f-1;case"next":return f+1;case"last":return n;default:return null}},R=C.map((e=>"number"===typeof e?{onClick:t=>{b(t,e)},type:"page",page:e,selected:e===f,disabled:l,"aria-current":e===f?"true":void 0}:{onClick:t=>{b(t,k(e))},type:e,page:k(e),selected:!1,disabled:l||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?f>=n:f<=1)}));return(0,a.A)({items:R},v)}((0,a.A)({},o,{componentName:"Pagination"})),R=(0,a.A)({},o,{boundaryCount:n,color:s,count:c,defaultPage:d,disabled:u,getItemAriaLabel:m,hideNextButton:h,hidePrevButton:v,renderItem:f,shape:g,showFirstButton:b,showLastButton:A,siblingCount:y,size:x,variant:w}),E=(e=>{const{classes:t,variant:o}=e,n={root:["root",o],ul:["ul"]};return(0,S.A)(n,vd,t)})(R);return(0,p.jsx)(Id,(0,a.A)({"aria-label":"pagination navigation",className:(0,l.A)(E.root,r),ownerState:R,ref:t},C,{children:(0,p.jsx)(Td,{className:E.ul,ownerState:R,children:k.map(((e,t)=>(0,p.jsx)("li",{children:f((0,a.A)({},e,{color:s,"aria-label":m(e.type,e.page,e.selected),shape:g,size:x,variant:w}))},t)))})}))})),Nd=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Od={entering:{transform:"none"},entered:{transform:"none"}},Bd=n.forwardRef((function(e,t){const o=(0,pe.A)(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:l,appear:s=!0,children:c,easing:d,in:u,onEnter:m,onEntered:h,onEntering:v,onExit:f,onExited:g,onExiting:b,style:A,timeout:y=r,TransitionComponent:x=Ge.Ay}=e,w=(0,i.A)(e,Nd),S=n.useRef(null),C=(0,Ye.A)(S,c.ref,t),k=e=>t=>{if(e){const o=S.current;void 0===t?e(o):e(o,t)}},R=k(v),E=k(((e,t)=>{(0,Xe.q)(e);const n=(0,Xe.c)({style:A,timeout:y,easing:d},{mode:"enter"});e.style.webkitTransition=o.transitions.create("transform",n),e.style.transition=o.transitions.create("transform",n),m&&m(e,t)})),M=k(h),L=k(b),I=k((e=>{const t=(0,Xe.c)({style:A,timeout:y,easing:d},{mode:"exit"});e.style.webkitTransition=o.transitions.create("transform",t),e.style.transition=o.transitions.create("transform",t),f&&f(e)})),T=k(g);return(0,p.jsx)(x,(0,a.A)({appear:s,in:u,nodeRef:S,onEnter:E,onEntered:M,onEntering:R,onExit:I,onExited:T,onExiting:L,addEndListener:e=>{l&&l(S.current,e)},timeout:y},w,{children:(e,t)=>n.cloneElement(c,(0,a.A)({style:(0,a.A)({transform:"scale(0)",visibility:"exited"!==e||u?void 0:"hidden"},Od[e],A,c.props.style),ref:C},t))}))})),jd=Bd;function Fd(e){return(0,w.Ay)("MuiSpeedDial",e)}const Wd=(0,g.A)("MuiSpeedDial",["root","fab","directionUp","directionDown","directionLeft","directionRight","actions","actionsClosed"]),Dd=["ref"],Hd=["ariaLabel","FabProps","children","className","direction","hidden","icon","onBlur","onClose","onFocus","onKeyDown","onMouseEnter","onMouseLeave","onOpen","open","openIcon","TransitionComponent","transitionDuration","TransitionProps"],Vd=["ref"];function Kd(e){return"up"===e||"down"===e?"vertical":"right"===e||"left"===e?"horizontal":void 0}const Gd=(0,G.Ay)("div",{name:"MuiSpeedDial",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["direction".concat((0,K.A)(o.direction))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({zIndex:(t.vars||t).zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none"},"up"===o.direction&&{flexDirection:"column-reverse",["& .".concat(Wd.actions)]:{flexDirection:"column-reverse",marginBottom:-32,paddingBottom:48}},"down"===o.direction&&{flexDirection:"column",["& .".concat(Wd.actions)]:{flexDirection:"column",marginTop:-32,paddingTop:48}},"left"===o.direction&&{flexDirection:"row-reverse",["& .".concat(Wd.actions)]:{flexDirection:"row-reverse",marginRight:-32,paddingRight:48}},"right"===o.direction&&{flexDirection:"row",["& .".concat(Wd.actions)]:{flexDirection:"row",marginLeft:-32,paddingLeft:48}})})),qd=(0,G.Ay)(ll,{name:"MuiSpeedDial",slot:"Fab",overridesResolver:(e,t)=>t.fab})((()=>({pointerEvents:"auto"}))),Ud=(0,G.Ay)("div",{name:"MuiSpeedDial",slot:"Actions",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.actions,!o.open&&t.actionsClosed]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",pointerEvents:"auto"},!t.open&&{transition:"top 0s linear 0.2s",pointerEvents:"none"})})),Xd=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSpeedDial"}),r=(0,pe.A)(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{ariaLabel:c,FabProps:{ref:d}={},children:u,className:m,direction:h="up",hidden:v=!1,icon:f,onBlur:g,onClose:b,onFocus:A,onKeyDown:y,onMouseEnter:x,onMouseLeave:w,onOpen:C,open:k,TransitionComponent:R=jd,transitionDuration:E=s,TransitionProps:M}=o,L=(0,i.A)(o.FabProps,Dd),I=(0,i.A)(o,Hd),[T,z]=(0,nt.A)({controlled:k,default:!1,name:"SpeedDial",state:"open"}),P=(0,a.A)({},o,{open:T,direction:h}),N=(e=>{const{classes:t,open:o,direction:n}=e,r={root:["root","direction".concat((0,K.A)(n))],fab:["fab"],actions:["actions",!o&&"actionsClosed"]};return(0,S.A)(r,Fd,t)})(P),O=(0,qe.A)(),B=n.useRef(0),j=n.useRef(),F=n.useRef([]);F.current=[F.current[0]];const W=n.useCallback((e=>{F.current[0]=e}),[]),D=(0,Ye.A)(d,W),H=(e,t)=>o=>{F.current[e+1]=o,t&&t(o)};n.useEffect((()=>{T||(B.current=0,j.current=void 0)}),[T]);const V=e=>{"mouseleave"===e.type&&w&&w(e),"blur"===e.type&&g&&g(e),O.clear(),"blur"===e.type?O.start(0,(()=>{z(!1),b&&b(e,"blur")})):(z(!1),b&&b(e,"mouseLeave"))},G=e=>{"mouseenter"===e.type&&x&&x(e),"focus"===e.type&&A&&A(e),O.clear(),T||O.start(0,(()=>{if(z(!0),C){C(e,{focus:"focus",mouseenter:"mouseEnter"}[e.type])}}))},U=c.replace(/^[^a-z]+|[^\w:.-]+/gi,""),X=n.Children.toArray(u).filter((e=>n.isValidElement(e))),Y=X.map(((e,t)=>{const o=e.props,{FabProps:{ref:r}={},tooltipPlacement:l}=o,s=(0,i.A)(o.FabProps,Vd),c=l||("vertical"===Kd(h)?"left":"top");return n.cloneElement(e,{FabProps:(0,a.A)({},s,{ref:H(t,r)}),delay:30*(T?t:X.length-t),open:T,tooltipPlacement:c,id:"".concat(U,"-action-").concat(t)})}));return(0,p.jsxs)(Gd,(0,a.A)({className:(0,l.A)(N.root,m),ref:t,role:"presentation",onKeyDown:e=>{y&&y(e);const t=e.key.replace("Arrow","").toLowerCase(),{current:o=t}=j;if("Escape"===e.key)return z(!1),F.current[0].focus(),void(b&&b(e,"escapeKeyDown"));if(Kd(t)===Kd(o)&&void 0!==Kd(t)){e.preventDefault();const n=t===o?1:-1,r=(0,Rl.A)(B.current+n,0,F.current.length-1);F.current[r].focus(),B.current=r,j.current=o}},onBlur:V,onFocus:G,onMouseEnter:G,onMouseLeave:V,ownerState:P},I,{children:[(0,p.jsx)(R,(0,a.A)({in:!v,timeout:E,unmountOnExit:!0},M,{children:(0,p.jsx)(qd,(0,a.A)({color:"primary","aria-label":c,"aria-haspopup":"true","aria-expanded":T,"aria-controls":"".concat(U,"-actions")},L,{onClick:e=>{L.onClick&&L.onClick(e),O.clear(),T?(z(!1),b&&b(e,"toggle")):(z(!0),C&&C(e,"toggle"))},className:(0,l.A)(N.fab,L.className),ref:D,ownerState:P,children:n.isValidElement(f)&&Be(f,["SpeedDialIcon"])?n.cloneElement(f,{open:T}):f}))})),(0,p.jsx)(Ud,{id:"".concat(U,"-actions"),role:"menu","aria-orientation":Kd(h),className:(0,l.A)(N.actions,!T&&N.actionsClosed),ownerState:P,children:Y})]}))})),Yd=Po((0,p.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");function Qd(e){return(0,w.Ay)("MuiSpeedDialIcon",e)}const _d=(0,g.A)("MuiSpeedDialIcon",["root","icon","iconOpen","iconWithOpenIconOpen","openIcon","openIconOpen"]),$d=["className","icon","open","openIcon"],Zd=(0,G.Ay)("span",{name:"MuiSpeedDialIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(_d.icon)]:t.icon},{["& .".concat(_d.icon)]:o.open&&t.iconOpen},{["& .".concat(_d.icon)]:o.open&&o.openIcon&&t.iconWithOpenIconOpen},{["& .".concat(_d.openIcon)]:t.openIcon},{["& .".concat(_d.openIcon)]:o.open&&t.openIconOpen},t.root]}})((e=>{let{theme:t,ownerState:o}=e;return{height:24,["& .".concat(_d.icon)]:(0,a.A)({transition:t.transitions.create(["transform","opacity"],{duration:t.transitions.duration.short})},o.open&&(0,a.A)({transform:"rotate(45deg)"},o.openIcon&&{opacity:0})),["& .".concat(_d.openIcon)]:(0,a.A)({position:"absolute",transition:t.transitions.create(["transform","opacity"],{duration:t.transitions.duration.short}),opacity:0,transform:"rotate(-45deg)"},o.open&&{transform:"rotate(0deg)",opacity:1})}})),Jd=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSpeedDialIcon"}),{className:r,icon:s,openIcon:c}=o,d=(0,i.A)(o,$d),u=o,m=(e=>{const{classes:t,open:o,openIcon:n}=e,r={root:["root"],icon:["icon",o&&"iconOpen",n&&o&&"iconWithOpenIconOpen"],openIcon:["openIcon",o&&"openIconOpen"]};return(0,S.A)(r,Qd,t)})(u);function h(e,t){return n.isValidElement(e)?n.cloneElement(e,{className:t}):e}return(0,p.jsxs)(Zd,(0,a.A)({className:(0,l.A)(m.root,r),ref:t,ownerState:u},d,{children:[c?h(c,m.openIcon):null,s?h(s,m.icon):(0,p.jsx)(Yd,{className:m.icon})]}))}));Jd.muiName="SpeedDialIcon";const eu=Jd;var tu=o(7739);function ou(e){return(0,w.Ay)("MuiSpeedDialAction",e)}const nu=(0,g.A)("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]),ru=["className","delay","FabProps","icon","id","open","TooltipClasses","tooltipOpen","tooltipPlacement","tooltipTitle"],au=(0,G.Ay)(ll,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.fab,!o.open&&t.fabClosed]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({margin:8,color:(t.vars||t).palette.text.secondary,backgroundColor:(t.vars||t).palette.background.paper,"&:hover":{backgroundColor:t.vars?t.vars.palette.SpeedDialAction.fabHoverBg:(0,re.tL)(t.palette.background.paper,.15)},transition:"".concat(t.transitions.create("transform",{duration:t.transitions.duration.shorter}),", opacity 0.8s"),opacity:1},!o.open&&{opacity:0,transform:"scale(0)"})})),iu=(0,G.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.staticTooltip,!o.open&&t.staticTooltipClosed,t["tooltipPlacement".concat((0,K.A)(o.tooltipPlacement))]]}})((e=>{let{theme:t,ownerState:o}=e;return{position:"relative",display:"flex",alignItems:"center",["& .".concat(nu.staticTooltipLabel)]:(0,a.A)({transition:t.transitions.create(["transform","opacity"],{duration:t.transitions.duration.shorter}),opacity:1},!o.open&&{opacity:0,transform:"scale(0.5)"},"left"===o.tooltipPlacement&&{transformOrigin:"100% 50%",right:"100%",marginRight:8},"right"===o.tooltipPlacement&&{transformOrigin:"0% 50%",left:"100%",marginLeft:8})}})),lu=(0,G.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel",overridesResolver:(e,t)=>t.staticTooltipLabel})((e=>{let{theme:t}=e;return(0,a.A)({position:"absolute"},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.paper,borderRadius:(t.vars||t).shape.borderRadius,boxShadow:(t.vars||t).shadows[1],color:(t.vars||t).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"})})),su=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSpeedDialAction"}),{className:r,delay:s=0,FabProps:c={},icon:d,id:u,open:m,TooltipClasses:h,tooltipOpen:v=!1,tooltipPlacement:f="left",tooltipTitle:g}=o,b=(0,i.A)(o,ru),A=(0,a.A)({},o,{tooltipPlacement:f}),y=(e=>{const{open:t,tooltipPlacement:o,classes:n}=e,r={fab:["fab",!t&&"fabClosed"],staticTooltip:["staticTooltip","tooltipPlacement".concat((0,K.A)(o)),!t&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return(0,S.A)(r,ou,n)})(A),[x,w]=n.useState(v),C={transitionDelay:"".concat(s,"ms")},k=(0,p.jsx)(au,(0,a.A)({size:"small",className:(0,l.A)(y.fab,r),tabIndex:-1,role:"menuitem",ownerState:A},c,{style:(0,a.A)({},C,c.style),children:d}));return v?(0,p.jsxs)(iu,(0,a.A)({id:u,ref:t,className:y.staticTooltip,ownerState:A},b,{children:[(0,p.jsx)(lu,{style:C,id:"".concat(u,"-label"),className:y.staticTooltipLabel,ownerState:A,children:g}),n.cloneElement(k,{"aria-labelledby":"".concat(u,"-label")})]})):(!m&&x&&w(!1),(0,p.jsx)(tu.A,(0,a.A)({id:u,ref:t,title:g,placement:f,onClose:()=>{w(!1)},onOpen:()=>{w(!0)},open:m&&x,classes:h},b,{children:k})))}));function cu(e){return(0,w.Ay)("MuiStepper",e)}(0,g.A)("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);const du=n.createContext({});const uu=du,pu=n.createContext({});const mu=pu;function hu(e){return(0,w.Ay)("MuiStepConnector",e)}(0,g.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const vu=["className"],fu=(0,G.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.completed&&t.completed]}})((e=>{let{ownerState:t}=e;return(0,a.A)({flex:"1 1 auto"},"vertical"===t.orientation&&{marginLeft:12},t.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})})),gu=(0,G.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.line,t["line".concat((0,K.A)(o.orientation))]]}})((e=>{let{ownerState:t,theme:o}=e;const n="light"===o.palette.mode?o.palette.grey[400]:o.palette.grey[600];return(0,a.A)({display:"block",borderColor:o.vars?o.vars.palette.StepConnector.border:n},"horizontal"===t.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===t.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})})),bu=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiStepConnector"}),{className:r}=o,s=(0,i.A)(o,vu),{alternativeLabel:c,orientation:d="horizontal"}=n.useContext(uu),{active:u,disabled:m,completed:h}=n.useContext(mu),v=(0,a.A)({},o,{alternativeLabel:c,orientation:d,active:u,completed:h,disabled:m}),f=(e=>{const{classes:t,orientation:o,alternativeLabel:n,active:r,completed:a,disabled:i}=e,l={root:["root",o,n&&"alternativeLabel",r&&"active",a&&"completed",i&&"disabled"],line:["line","line".concat((0,K.A)(o))]};return(0,S.A)(l,hu,t)})(v);return(0,p.jsx)(fu,(0,a.A)({className:(0,l.A)(f.root,r),ref:t,ownerState:v},s,{children:(0,p.jsx)(gu,{className:f.line,ownerState:v})}))})),Au=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],yu=(0,G.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex"},"horizontal"===t.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===t.orientation&&{flexDirection:"column"},t.alternativeLabel&&{alignItems:"flex-start"})})),xu=(0,p.jsx)(bu,{}),wu=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiStepper"}),{activeStep:r=0,alternativeLabel:s=!1,children:c,className:d,component:u="div",connector:m=xu,nonLinear:h=!1,orientation:v="horizontal"}=o,f=(0,i.A)(o,Au),g=(0,a.A)({},o,{alternativeLabel:s,orientation:v,component:u}),b=(e=>{const{orientation:t,alternativeLabel:o,classes:n}=e,r={root:["root",t,o&&"alternativeLabel"]};return(0,S.A)(r,cu,n)})(g),A=n.Children.toArray(c).filter(Boolean),y=A.map(((e,t)=>n.cloneElement(e,(0,a.A)({index:t,last:t+1===A.length},e.props)))),x=n.useMemo((()=>({activeStep:r,alternativeLabel:s,connector:m,nonLinear:h,orientation:v})),[r,s,m,h,v]);return(0,p.jsx)(uu.Provider,{value:x,children:(0,p.jsx)(yu,(0,a.A)({as:u,ownerState:g,className:(0,l.A)(b.root,d),ref:t},f,{children:y}))})}));function Su(e){return(0,w.Ay)("MuiStep",e)}(0,g.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const Cu=["active","children","className","component","completed","disabled","expanded","index","last"],ku=(0,G.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.completed&&t.completed]}})((e=>{let{ownerState:t}=e;return(0,a.A)({},"horizontal"===t.orientation&&{paddingLeft:8,paddingRight:8},t.alternativeLabel&&{flex:1,position:"relative"})})),Ru=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiStep"}),{active:r,children:s,className:c,component:d="div",completed:u,disabled:m,expanded:h=!1,index:v,last:f}=o,g=(0,i.A)(o,Cu),{activeStep:b,connector:A,alternativeLabel:y,orientation:x,nonLinear:w}=n.useContext(uu);let[C=!1,k=!1,R=!1]=[r,u,m];b===v?C=void 0===r||r:!w&&b>v?k=void 0===u||u:!w&&b({index:v,last:f,expanded:h,icon:v+1,active:C,completed:k,disabled:R})),[v,f,h,C,k,R]),M=(0,a.A)({},o,{active:C,orientation:x,alternativeLabel:y,completed:k,disabled:R,expanded:h,component:d}),L=(e=>{const{classes:t,orientation:o,alternativeLabel:n,completed:r}=e,a={root:["root",o,n&&"alternativeLabel",r&&"completed"]};return(0,S.A)(a,Su,t)})(M),I=(0,p.jsxs)(ku,(0,a.A)({as:d,className:(0,l.A)(L.root,c),ref:t,ownerState:M},g,{children:[A&&y&&0!==v?A:null,s]}));return(0,p.jsx)(mu.Provider,{value:E,children:A&&!y&&0!==v?(0,p.jsxs)(n.Fragment,{children:[A,I]}):I})})),Eu=Po((0,p.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),Mu=Po((0,p.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function Lu(e){return(0,w.Ay)("MuiStepIcon",e)}const Iu=(0,g.A)("MuiStepIcon",["root","active","completed","error","text"]);var Tu;const zu=["active","className","completed","error","icon"],Pu=(0,G.Ay)(zo,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,["&.".concat(Iu.completed)]:{color:(t.vars||t).palette.primary.main},["&.".concat(Iu.active)]:{color:(t.vars||t).palette.primary.main},["&.".concat(Iu.error)]:{color:(t.vars||t).palette.error.main}}})),Nu=(0,G.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})((e=>{let{theme:t}=e;return{fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}})),Ou=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiStepIcon"}),{active:n=!1,className:r,completed:s=!1,error:c=!1,icon:d}=o,u=(0,i.A)(o,zu),m=(0,a.A)({},o,{active:n,completed:s,error:c}),h=(e=>{const{classes:t,active:o,completed:n,error:r}=e,a={root:["root",o&&"active",n&&"completed",r&&"error"],text:["text"]};return(0,S.A)(a,Lu,t)})(m);if("number"===typeof d||"string"===typeof d){const e=(0,l.A)(r,h.root);return c?(0,p.jsx)(Pu,(0,a.A)({as:Mu,className:e,ref:t,ownerState:m},u)):s?(0,p.jsx)(Pu,(0,a.A)({as:Eu,className:e,ref:t,ownerState:m},u)):(0,p.jsxs)(Pu,(0,a.A)({className:e,ref:t,ownerState:m},u,{children:[Tu||(Tu=(0,p.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,p.jsx)(Nu,{className:h.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:m,children:d})]}))}return d}));function Bu(e){return(0,w.Ay)("MuiStepLabel",e)}const ju=(0,g.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),Fu=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],Wu=(0,G.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation]]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",alignItems:"center",["&.".concat(ju.alternativeLabel)]:{flexDirection:"column"},["&.".concat(ju.disabled)]:{cursor:"default"}},"vertical"===t.orientation&&{textAlign:"left",padding:"8px 0"})})),Du=(0,G.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})((e=>{let{theme:t}=e;return(0,a.A)({},t.typography.body2,{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),["&.".concat(ju.active)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(ju.completed)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(ju.alternativeLabel)]:{marginTop:16},["&.".concat(ju.error)]:{color:(t.vars||t).palette.error.main}})})),Hu=(0,G.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})((()=>({flexShrink:0,display:"flex",paddingRight:8,["&.".concat(ju.alternativeLabel)]:{paddingRight:0}}))),Vu=(0,G.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return{width:"100%",color:(t.vars||t).palette.text.secondary,["&.".concat(ju.alternativeLabel)]:{textAlign:"center"}}})),Ku=n.forwardRef((function(e,t){var o;const r=(0,q.A)({props:e,name:"MuiStepLabel"}),{children:s,className:c,componentsProps:d={},error:u=!1,icon:m,optional:h,slotProps:v={},StepIconComponent:f,StepIconProps:g}=r,b=(0,i.A)(r,Fu),{alternativeLabel:A,orientation:y}=n.useContext(uu),{active:x,disabled:w,completed:C,icon:k}=n.useContext(mu),R=m||k;let E=f;R&&!E&&(E=Ou);const M=(0,a.A)({},r,{active:x,alternativeLabel:A,completed:C,disabled:w,error:u,orientation:y}),L=(e=>{const{classes:t,orientation:o,active:n,completed:r,error:a,disabled:i,alternativeLabel:l}=e,s={root:["root",o,a&&"error",i&&"disabled",l&&"alternativeLabel"],label:["label",n&&"active",r&&"completed",a&&"error",i&&"disabled",l&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",r&&"completed",a&&"error",i&&"disabled",l&&"alternativeLabel"],labelContainer:["labelContainer",l&&"alternativeLabel"]};return(0,S.A)(s,Bu,t)})(M),I=null!=(o=v.label)?o:d.label;return(0,p.jsxs)(Wu,(0,a.A)({className:(0,l.A)(L.root,c),ref:t,ownerState:M},b,{children:[R||E?(0,p.jsx)(Hu,{className:L.iconContainer,ownerState:M,children:(0,p.jsx)(E,(0,a.A)({completed:C,active:x,error:u,icon:R},g))}):null,(0,p.jsxs)(Vu,{className:L.labelContainer,ownerState:M,children:[s?(0,p.jsx)(Du,(0,a.A)({ownerState:M},I,{className:(0,l.A)(L.label,null==I?void 0:I.className),children:s})):null,h]})]}))}));Ku.muiName="StepLabel";const Gu=Ku;function qu(e){return(0,w.Ay)("MuiTab",e)}const Uu=(0,g.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Xu=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Yu=(0,G.Ay)(bt.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.label&&o.icon&&t.labelIcon,t["textColor".concat((0,K.A)(o.textColor))],o.fullWidth&&t.fullWidth,o.wrapped&&t.wrapped]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},o.label&&{flexDirection:"top"===o.iconPosition||"bottom"===o.iconPosition?"column":"row"},{lineHeight:1.25},o.icon&&o.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(Uu.iconWrapper)]:(0,a.A)({},"top"===o.iconPosition&&{marginBottom:6},"bottom"===o.iconPosition&&{marginTop:6},"start"===o.iconPosition&&{marginRight:t.spacing(1)},"end"===o.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===o.textColor&&{color:"inherit",opacity:.6,["&.".concat(Uu.selected)]:{opacity:1},["&.".concat(Uu.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===o.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(Uu.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(Uu.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===o.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(Uu.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(Uu.disabled)]:{color:(t.vars||t).palette.text.disabled}},o.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},o.wrapped&&{fontSize:t.typography.pxToRem(12)})})),Qu=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTab"}),{className:r,disabled:s=!1,disableFocusRipple:c=!1,fullWidth:d,icon:u,iconPosition:m="top",indicator:h,label:v,onChange:f,onClick:g,onFocus:b,selected:A,selectionFollowsFocus:y,textColor:x="inherit",value:w,wrapped:C=!1}=o,k=(0,i.A)(o,Xu),R=(0,a.A)({},o,{disabled:s,disableFocusRipple:c,selected:A,icon:!!u,iconPosition:m,label:!!v,fullWidth:d,textColor:x,wrapped:C}),E=(e=>{const{classes:t,textColor:o,fullWidth:n,wrapped:r,icon:a,label:i,selected:l,disabled:s}=e,c={root:["root",a&&i&&"labelIcon","textColor".concat((0,K.A)(o)),n&&"fullWidth",r&&"wrapped",l&&"selected",s&&"disabled"],iconWrapper:["iconWrapper"]};return(0,S.A)(c,qu,t)})(R),M=u&&v&&n.isValidElement(u)?n.cloneElement(u,{className:(0,l.A)(E.iconWrapper,u.props.className)}):u;return(0,p.jsxs)(Yu,(0,a.A)({focusRipple:!c,className:(0,l.A)(E.root,r),ref:t,role:"tab","aria-selected":A,disabled:s,onClick:e=>{!A&&f&&f(e,w),g&&g(e)},onFocus:e=>{y&&!A&&f&&f(e,w),b&&b(e)},ownerState:R,tabIndex:A?0:-1},k,{children:["top"===m||"start"===m?(0,p.jsxs)(n.Fragment,{children:[M,v]}):(0,p.jsxs)(n.Fragment,{children:[v,M]}),h]}))}));let _u;function $u(){if(_u)return _u;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),_u="reverse",e.scrollLeft>0?_u="default":(e.scrollLeft=1,0===e.scrollLeft&&(_u="negative")),document.body.removeChild(e),_u}function Zu(e,t){const o=e.scrollLeft;if("rtl"!==t)return o;switch($u()){case"negative":return e.scrollWidth-e.clientWidth+o;case"reverse":return e.scrollWidth-e.clientWidth-o;default:return o}}function Ju(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const ep=["onChange"],tp={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const op=Po((0,p.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),np=Po((0,p.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function rp(e){return(0,w.Ay)("MuiTabScrollButton",e)}const ap=(0,g.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ip=["className","slots","slotProps","direction","orientation","disabled"],lp=(0,G.Ay)(bt.A,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.orientation&&t[o.orientation]]}})((e=>{let{ownerState:t}=e;return(0,a.A)({width:40,flexShrink:0,opacity:.8,["&.".concat(ap.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})})),sp=n.forwardRef((function(e,t){var o,n;const r=(0,q.A)({props:e,name:"MuiTabScrollButton"}),{className:s,slots:c={},slotProps:d={},direction:u}=r,m=(0,i.A)(r,ip),h=(0,Or.I)(),v=(0,a.A)({isRtl:h},r),f=(e=>{const{classes:t,orientation:o,disabled:n}=e,r={root:["root",o,n&&"disabled"]};return(0,S.A)(r,rp,t)})(v),g=null!=(o=c.StartScrollButtonIcon)?o:op,b=null!=(n=c.EndScrollButtonIcon)?n:np,A=(0,Nr.Q)({elementType:g,externalSlotProps:d.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v}),y=(0,Nr.Q)({elementType:b,externalSlotProps:d.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v});return(0,p.jsx)(lp,(0,a.A)({component:"div",className:(0,l.A)(f.root,s),ref:t,role:null,ownerState:v,tabIndex:null},m,{children:"left"===u?(0,p.jsx)(g,(0,a.A)({},A)):(0,p.jsx)(b,(0,a.A)({},y))}))}));var cp=o(3319);function dp(e){return(0,w.Ay)("MuiTabs",e)}const up=(0,g.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),pp=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],mp=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,hp=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,vp=(e,t,o)=>{let n=!1,r=o(e,t);for(;r;){if(r===e.firstChild){if(n)return;n=!0}const t=r.disabled||"true"===r.getAttribute("aria-disabled");if(r.hasAttribute("tabindex")&&!t)return void r.focus();r=o(e,r)}},fp=(0,G.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{["& .".concat(up.scrollButtons)]:t.scrollButtons},{["& .".concat(up.scrollButtons)]:o.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,o.vertical&&t.vertical]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(up.scrollButtons)]:{[o.breakpoints.down("sm")]:{display:"none"}}})})),gp=(0,G.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.scroller,o.fixed&&t.fixed,o.hideScrollbar&&t.hideScrollbar,o.scrollableX&&t.scrollableX,o.scrollableY&&t.scrollableY]}})((e=>{let{ownerState:t}=e;return(0,a.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})})),bp=(0,G.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.flexContainer,o.vertical&&t.flexContainerVertical,o.centered&&t.centered]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),Ap=(0,G.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:o.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(o.vars||o).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(o.vars||o).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),yp=(0,G.Ay)((function(e){const{onChange:t}=e,o=(0,i.A)(e,ep),r=n.useRef(),l=n.useRef(null),s=()=>{r.current=l.current.offsetHeight-l.current.clientHeight};return Tn((()=>{const e=Qr((()=>{const e=r.current;s(),e!==r.current&&t(r.current)})),o=_r(l.current);return o.addEventListener("resize",e),()=>{e.clear(),o.removeEventListener("resize",e)}}),[t]),n.useEffect((()=>{s(),t(r.current)}),[t]),(0,p.jsx)("div",(0,a.A)({style:tp,ref:l},o))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),xp={};const wp=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTabs"}),r=(0,pe.A)(),s=(0,Or.I)(),{"aria-label":c,"aria-labelledby":d,action:u,centered:m=!1,children:h,className:v,component:f="div",allowScrollButtonsMobile:g=!1,indicatorColor:b="primary",onChange:A,orientation:y="horizontal",ScrollButtonComponent:x=sp,scrollButtons:w="auto",selectionFollowsFocus:C,slots:k={},slotProps:R={},TabIndicatorProps:E={},TabScrollButtonProps:M={},textColor:L="primary",value:I,variant:T="standard",visibleScrollbar:z=!1}=o,P=(0,i.A)(o,pp),N="scrollable"===T,O="vertical"===y,B=O?"scrollTop":"scrollLeft",j=O?"top":"left",F=O?"bottom":"right",W=O?"clientHeight":"clientWidth",D=O?"height":"width",H=(0,a.A)({},o,{component:f,allowScrollButtonsMobile:g,indicatorColor:b,orientation:y,vertical:O,scrollButtons:w,textColor:L,variant:T,visibleScrollbar:z,fixed:!N,hideScrollbar:N&&!z,scrollableX:N&&!O,scrollableY:N&&O,centered:m&&!N,scrollButtonsHideMobile:!g}),V=(e=>{const{vertical:t,fixed:o,hideScrollbar:n,scrollableX:r,scrollableY:a,centered:i,scrollButtonsHideMobile:l,classes:s}=e,c={root:["root",t&&"vertical"],scroller:["scroller",o&&"fixed",n&&"hideScrollbar",r&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]};return(0,S.A)(c,dp,s)})(H),K=(0,Nr.Q)({elementType:k.StartScrollButtonIcon,externalSlotProps:R.startScrollButtonIcon,ownerState:H}),G=(0,Nr.Q)({elementType:k.EndScrollButtonIcon,externalSlotProps:R.endScrollButtonIcon,ownerState:H});const[U,X]=n.useState(!1),[Y,Q]=n.useState(xp),[_,$]=n.useState(!1),[Z,J]=n.useState(!1),[ee,te]=n.useState(!1),[oe,ne]=n.useState({overflow:"hidden",scrollbarWidth:0}),re=new Map,ae=n.useRef(null),ie=n.useRef(null),le=()=>{const e=ae.current;let t,o;if(e){const o=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Zu(e,s?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:o.top,bottom:o.bottom,left:o.left,right:o.right}}if(e&&!1!==I){const e=ie.current.children;if(e.length>0){const t=e[re.get(I)];0,o=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:o}},se=(0,cp.A)((()=>{const{tabsMeta:e,tabMeta:t}=le();let o,n=0;if(O)o="top",t&&e&&(n=t.top-e.top+e.scrollTop);else if(o=s?"right":"left",t&&e){const r=s?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;n=(s?-1:1)*(t[o]-e[o]+r)}const r={[o]:n,[D]:t?t[D]:0};if(isNaN(Y[o])||isNaN(Y[D]))Q(r);else{const e=Math.abs(Y[o]-r[o]),t=Math.abs(Y[D]-r[D]);(e>=1||t>=1)&&Q(r)}})),ce=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:a=Ju,duration:i=300}=n;let l=null;const s=t[e];let c=!1;const d=()=>{c=!0},u=n=>{if(c)return void r(new Error("Animation cancelled"));null===l&&(l=n);const d=Math.min(1,(n-l)/i);t[e]=a(d)*(o-s)+s,d>=1?requestAnimationFrame((()=>{r(null)})):requestAnimationFrame(u)};s===o?r(new Error("Element already at target position")):requestAnimationFrame(u)}(B,ae.current,e,{duration:r.transitions.duration.standard}):ae.current[B]=e},de=e=>{let t=ae.current[B];O?t+=e:(t+=e*(s?-1:1),t*=s&&"reverse"===$u()?-1:1),ce(t)},ue=()=>{const e=ae.current[W];let t=0;const o=Array.from(ie.current.children);for(let n=0;ne){0===n&&(t=e);break}t+=r[W]}return t},me=()=>{de(-1*ue())},he=()=>{de(ue())},ve=n.useCallback((e=>{ne({overflow:null,scrollbarWidth:e})}),[]),fe=(0,cp.A)((e=>{const{tabsMeta:t,tabMeta:o}=le();if(o&&t)if(o[j]t[F]){const n=t[B]+(o[F]-t[F]);ce(n,{animation:e})}})),ge=(0,cp.A)((()=>{N&&!1!==w&&te(!ee)}));n.useEffect((()=>{const e=Qr((()=>{ae.current&&se()}));let t;const o=o=>{o.forEach((e=>{e.removedNodes.forEach((e=>{var o;null==(o=t)||o.unobserve(e)})),e.addedNodes.forEach((e=>{var o;null==(o=t)||o.observe(e)}))})),e(),ge()},n=_r(ae.current);let r;return n.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ie.current.children).forEach((e=>{t.observe(e)}))),"undefined"!==typeof MutationObserver&&(r=new MutationObserver(o),r.observe(ie.current,{childList:!0})),()=>{var o,a;e.clear(),n.removeEventListener("resize",e),null==(o=r)||o.disconnect(),null==(a=t)||a.disconnect()}}),[se,ge]),n.useEffect((()=>{const e=Array.from(ie.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&N&&!1!==w){const o=e[0],n=e[t-1],r={root:ae.current,threshold:.99},a=new IntersectionObserver((e=>{$(!e[0].isIntersecting)}),r);a.observe(o);const i=new IntersectionObserver((e=>{J(!e[0].isIntersecting)}),r);return i.observe(n),()=>{a.disconnect(),i.disconnect()}}}),[N,w,ee,null==h?void 0:h.length]),n.useEffect((()=>{X(!0)}),[]),n.useEffect((()=>{se()})),n.useEffect((()=>{fe(xp!==Y)}),[fe,Y]),n.useImperativeHandle(u,(()=>({updateIndicator:se,updateScrollButtons:ge})),[se,ge]);const be=(0,p.jsx)(Ap,(0,a.A)({},E,{className:(0,l.A)(V.indicator,E.className),ownerState:H,style:(0,a.A)({},Y,E.style)}));let Ae=0;const ye=n.Children.map(h,(e=>{if(!n.isValidElement(e))return null;const t=void 0===e.props.value?Ae:e.props.value;re.set(t,Ae);const o=t===I;return Ae+=1,n.cloneElement(e,(0,a.A)({fullWidth:"fullWidth"===T,indicator:o&&!U&&be,selected:o,selectionFollowsFocus:C,onChange:A,textColor:L,value:t},1!==Ae||!1!==I||e.props.tabIndex?{}:{tabIndex:0}))})),xe=(()=>{const e={};e.scrollbarSizeListener=N?(0,p.jsx)(yp,{onChange:ve,className:(0,l.A)(V.scrollableX,V.hideScrollbar)}):null;const t=N&&("auto"===w&&(_||Z)||!0===w);return e.scrollButtonStart=t?(0,p.jsx)(x,(0,a.A)({slots:{StartScrollButtonIcon:k.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:K},orientation:y,direction:s?"right":"left",onClick:me,disabled:!_},M,{className:(0,l.A)(V.scrollButtons,M.className)})):null,e.scrollButtonEnd=t?(0,p.jsx)(x,(0,a.A)({slots:{EndScrollButtonIcon:k.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:G},orientation:y,direction:s?"left":"right",onClick:he,disabled:!Z},M,{className:(0,l.A)(V.scrollButtons,M.className)})):null,e})();return(0,p.jsxs)(fp,(0,a.A)({className:(0,l.A)(V.root,v),ownerState:H,ref:t,as:f},P,{children:[xe.scrollButtonStart,xe.scrollbarSizeListener,(0,p.jsxs)(gp,{className:V.scroller,ownerState:H,style:{overflow:oe.overflow,[O?"margin".concat(s?"Left":"Right"):"marginBottom"]:z?void 0:-oe.scrollbarWidth},ref:ae,children:[(0,p.jsx)(bp,{"aria-label":c,"aria-labelledby":d,"aria-orientation":"vertical"===y?"vertical":null,className:V.flexContainer,ownerState:H,onKeyDown:e=>{const t=ie.current,o=Pr(t).activeElement;if("tab"!==o.getAttribute("role"))return;let n="horizontal"===y?"ArrowLeft":"ArrowUp",r="horizontal"===y?"ArrowRight":"ArrowDown";switch("horizontal"===y&&s&&(n="ArrowRight",r="ArrowLeft"),e.key){case n:e.preventDefault(),vp(t,o,hp);break;case r:e.preventDefault(),vp(t,o,mp);break;case"Home":e.preventDefault(),vp(t,null,mp);break;case"End":e.preventDefault(),vp(t,null,hp)}},ref:ie,role:"tablist",children:ye}),U&&be]}),xe.scrollButtonEnd]}))})),Sp=Po((0,p.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function Cp(e){return(0,w.Ay)("MuiAvatar",e)}(0,g.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const kp=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],Rp=Ke(),Ep=(0,G.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],o.colorDefault&&t.colorDefault]}})((e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,a.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,a.A)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}})),Mp=(0,G.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),Lp=(0,G.Ay)(Sp,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const Ip=n.forwardRef((function(e,t){const o=Rp({props:e,name:"MuiAvatar"}),{alt:r,children:s,className:c,component:d="div",slots:u={},slotProps:m={},imgProps:h,sizes:v,src:f,srcSet:g,variant:b="circular"}=o,A=(0,i.A)(o,kp);let y=null;const x=function(e){let{crossOrigin:t,referrerPolicy:o,src:r,srcSet:a}=e;const[i,l]=n.useState(!1);return n.useEffect((()=>{if(!r&&!a)return;l(!1);let e=!0;const n=new Image;return n.onload=()=>{e&&l("loaded")},n.onerror=()=>{e&&l("error")},n.crossOrigin=t,n.referrerPolicy=o,n.src=r,a&&(n.srcset=a),()=>{e=!1}}),[t,o,r,a]),i}((0,a.A)({},h,{src:f,srcSet:g})),w=f||g,C=w&&"error"!==x,k=(0,a.A)({},o,{colorDefault:!C,component:d,variant:b}),R=(e=>{const{classes:t,variant:o,colorDefault:n}=e,r={root:["root",o,n&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,S.A)(r,Cp,t)})(k),[E,M]=ut("img",{className:R.img,elementType:Mp,externalForwardedProps:{slots:u,slotProps:{img:(0,a.A)({},h,m.img)}},additionalProps:{alt:r,src:f,srcSet:g,sizes:v},ownerState:k});return y=C?(0,p.jsx)(E,(0,a.A)({},M)):s||0===s?s:w&&r?r[0]:(0,p.jsx)(Lp,{ownerState:k,className:R.fallback}),(0,p.jsx)(Ep,(0,a.A)({as:d,ownerState:k,className:(0,l.A)(R.root,c),ref:t},A,{children:y}))}));function Tp(e){return(0,w.Ay)("MuiBadge",e)}const zp=(0,g.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),Pp=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],Np=Ke(),Op=(0,G.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Bp=(0,G.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.badge,t[o.variant],t["anchorOrigin".concat((0,K.A)(o.anchorOrigin.vertical)).concat((0,K.A)(o.anchorOrigin.horizontal)).concat((0,K.A)(o.overlap))],"default"!==o.color&&t["color".concat((0,K.A)(o.color))],o.invisible&&t.invisible]}})((e=>{let{theme:t}=e;var o;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(o=t.vars)?o:t).palette).filter((e=>{var o,n;return(null!=(o=t.vars)?o:t).palette[e].main&&(null!=(n=t.vars)?n:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",["&.".concat(zp.invisible)]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}})),jp=n.forwardRef((function(e,t){var o,n,r,s,c,d;const u=Np({props:e,name:"MuiBadge"}),{anchorOrigin:m={vertical:"top",horizontal:"right"},className:h,component:v,components:f={},componentsProps:g={},children:b,overlap:A="rectangular",color:y="default",invisible:x=!1,max:w=99,badgeContent:C,slots:k,slotProps:R,showZero:E=!1,variant:M="standard"}=u,L=(0,i.A)(u,Pp),{badgeContent:I,invisible:T,max:z,displayValue:P}=function(e){const{badgeContent:t,invisible:o=!1,max:n=99,showZero:r=!1}=e,a=ho({badgeContent:t,max:n});let i=o;!1!==o||0!==t||r||(i=!0);const{badgeContent:l,max:s=n}=i?a:e;return{badgeContent:l,invisible:i,max:s,displayValue:l&&Number(l)>s?"".concat(s,"+"):l}}({max:w,invisible:x,badgeContent:C,showZero:E}),N=ho({anchorOrigin:m,color:y,overlap:A,variant:M,badgeContent:C}),O=T||null==I&&"dot"!==M,{color:B=y,overlap:j=A,anchorOrigin:F=m,variant:W=M}=O?N:u,D="dot"!==W?P:void 0,H=(0,a.A)({},u,{badgeContent:I,invisible:O,max:z,displayValue:D,showZero:E,anchorOrigin:F,color:B,overlap:j,variant:W}),V=(e=>{const{color:t,anchorOrigin:o,invisible:n,overlap:r,variant:a,classes:i={}}=e,l={root:["root"],badge:["badge",a,n&&"invisible","anchorOrigin".concat((0,K.A)(o.vertical)).concat((0,K.A)(o.horizontal)),"anchorOrigin".concat((0,K.A)(o.vertical)).concat((0,K.A)(o.horizontal)).concat((0,K.A)(r)),"overlap".concat((0,K.A)(r)),"default"!==t&&"color".concat((0,K.A)(t))]};return(0,S.A)(l,Tp,i)})(H),G=null!=(o=null!=(n=null==k?void 0:k.root)?n:f.Root)?o:Op,q=null!=(r=null!=(s=null==k?void 0:k.badge)?s:f.Badge)?r:Bp,U=null!=(c=null==R?void 0:R.root)?c:g.root,X=null!=(d=null==R?void 0:R.badge)?d:g.badge,Y=(0,Nr.Q)({elementType:G,externalSlotProps:U,externalForwardedProps:L,additionalProps:{ref:t,as:v},ownerState:H,className:(0,l.A)(null==U?void 0:U.className,V.root,h)}),Q=(0,Nr.Q)({elementType:q,externalSlotProps:X,ownerState:H,className:(0,l.A)(V.badge,null==X?void 0:X.className)});return(0,p.jsxs)(G,(0,a.A)({},Y,{children:[b,(0,p.jsx)(q,(0,a.A)({},Q,{children:D}))]}))})),Fp=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Wp=(0,G.Ay)(bt.A,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.dense&&t.dense,"flex-start"===o.alignItems&&t.alignItemsFlexStart,o.divider&&t.divider,!o.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Zc.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Zc.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(Zc.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(Zc.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(Zc.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},o.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},"flex-start"===o.alignItems&&{alignItems:"flex-start"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.dense&&{paddingTop:4,paddingBottom:4})})),Dp=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:s=!1,component:c="div",children:d,dense:u=!1,disableGutters:m=!1,divider:h=!1,focusVisibleClassName:v,selected:f=!1,className:g}=o,b=(0,i.A)(o,Fp),A=n.useContext(Br),y=n.useMemo((()=>({dense:u||A.dense||!1,alignItems:r,disableGutters:m})),[r,A.dense,u,m]),x=n.useRef(null);Tn((()=>{s&&x.current&&x.current.focus()}),[s]);const w=(0,a.A)({},o,{alignItems:r,dense:y.dense,disableGutters:m,divider:h,selected:f}),C=(e=>{const{alignItems:t,classes:o,dense:n,disabled:r,disableGutters:i,divider:l,selected:s}=e,c={root:["root",n&&"dense",!i&&"gutters",l&&"divider",r&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},d=(0,S.A)(c,$c,o);return(0,a.A)({},o,d)})(w),k=(0,Ye.A)(x,t);return(0,p.jsx)(Br.Provider,{value:y,children:(0,p.jsx)(Wp,(0,a.A)({ref:k,href:b.href||b.to,component:(b.href||b.to)&&"div"===c?"button":c,focusVisibleClassName:(0,l.A)(C.focusVisible,v),ownerState:w,className:(0,l.A)(C.root,g)},b,{classes:C,children:d}))})}));function Hp(e){return(0,w.Ay)("MuiTableContainer",e)}(0,g.A)("MuiTableContainer",["root"]);const Vp=["className","component"],Kp=(0,G.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Gp=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTableContainer"}),{className:n,component:r="div"}=o,s=(0,i.A)(o,Vp),c=(0,a.A)({},o,{component:r}),d=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},Hp,t)})(c);return(0,p.jsx)(Kp,(0,a.A)({ref:t,as:r,className:(0,l.A)(d.root,n),ownerState:c},s))}));const qp=n.createContext();function Up(e){return(0,w.Ay)("MuiTable",e)}(0,g.A)("MuiTable",["root","stickyHeader"]);const Xp=["className","component","padding","size","stickyHeader"],Yp=(0,G.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,a.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},o.stickyHeader&&{borderCollapse:"separate"})})),Qp="table",_p=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTable"}),{className:r,component:s=Qp,padding:c="normal",size:d="medium",stickyHeader:u=!1}=o,m=(0,i.A)(o,Xp),h=(0,a.A)({},o,{component:s,padding:c,size:d,stickyHeader:u}),v=(e=>{const{classes:t,stickyHeader:o}=e,n={root:["root",o&&"stickyHeader"]};return(0,S.A)(n,Up,t)})(h),f=n.useMemo((()=>({padding:c,size:d,stickyHeader:u})),[c,d,u]);return(0,p.jsx)(qp.Provider,{value:f,children:(0,p.jsx)(Yp,(0,a.A)({as:s,role:s===Qp?null:"table",ref:t,className:(0,l.A)(v.root,r),ownerState:h},m))})}));const $p=n.createContext();function Zp(e){return(0,w.Ay)("MuiTableHead",e)}(0,g.A)("MuiTableHead",["root"]);const Jp=["className","component"],em=(0,G.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),tm={variant:"head"},om="thead",nm=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTableHead"}),{className:n,component:r=om}=o,s=(0,i.A)(o,Jp),c=(0,a.A)({},o,{component:r}),d=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},Zp,t)})(c);return(0,p.jsx)($p.Provider,{value:tm,children:(0,p.jsx)(em,(0,a.A)({as:r,className:(0,l.A)(d.root,n),ref:t,role:r===om?null:"rowgroup",ownerState:c},s))})}));function rm(e){return(0,w.Ay)("MuiTableRow",e)}const am=(0,g.A)("MuiTableRow",["root","selected","hover","head","footer"]),im=["className","component","hover","selected"],lm=(0,G.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.head&&t.head,o.footer&&t.footer]}})((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,["&.".concat(am.hover,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(am.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,re.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}})),sm="tr",cm=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTableRow"}),{className:r,component:s=sm,hover:c=!1,selected:d=!1}=o,u=(0,i.A)(o,im),m=n.useContext($p),h=(0,a.A)({},o,{component:s,hover:c,selected:d,head:m&&"head"===m.variant,footer:m&&"footer"===m.variant}),v=(e=>{const{classes:t,selected:o,hover:n,head:r,footer:a}=e,i={root:["root",o&&"selected",n&&"hover",r&&"head",a&&"footer"]};return(0,S.A)(i,rm,t)})(h);return(0,p.jsx)(lm,(0,a.A)({as:s,ref:t,className:(0,l.A)(v.root,r),role:s===sm?null:"row",ownerState:h},u))})),dm=cm;function um(e){return(0,w.Ay)("MuiTableCell",e)}const pm=(0,g.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),mm=["align","className","component","padding","scope","size","sortDirection","variant"],hm=(0,G.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t["size".concat((0,K.A)(o.size))],"normal"!==o.padding&&t["padding".concat((0,K.A)(o.padding))],"inherit"!==o.align&&t["align".concat((0,K.A)(o.align))],o.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n ".concat("light"===t.palette.mode?(0,re.a)((0,re.X4)(t.palette.divider,1),.88):(0,re.e$)((0,re.X4)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===o.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===o.variant&&{color:(t.vars||t).palette.text.primary},"footer"===o.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===o.size&&{padding:"6px 16px",["&.".concat(pm.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===o.padding&&{width:48,padding:"0 0 0 4px"},"none"===o.padding&&{padding:0},"left"===o.align&&{textAlign:"left"},"center"===o.align&&{textAlign:"center"},"right"===o.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===o.align&&{textAlign:"justify"},o.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),vm=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTableCell"}),{align:r="inherit",className:s,component:c,padding:d,scope:u,size:m,sortDirection:h,variant:v}=o,f=(0,i.A)(o,mm),g=n.useContext(qp),b=n.useContext($p),A=b&&"head"===b.variant;let y;y=c||(A?"th":"td");let x=u;"td"===y?x=void 0:!x&&A&&(x="col");const w=v||b&&b.variant,C=(0,a.A)({},o,{align:r,component:y,padding:d||(g&&g.padding?g.padding:"normal"),size:m||(g&&g.size?g.size:"medium"),sortDirection:h,stickyHeader:"head"===w&&g&&g.stickyHeader,variant:w}),k=(e=>{const{classes:t,variant:o,align:n,padding:r,size:a,stickyHeader:i}=e,l={root:["root",o,i&&"stickyHeader","inherit"!==n&&"align".concat((0,K.A)(n)),"normal"!==r&&"padding".concat((0,K.A)(r)),"size".concat((0,K.A)(a))]};return(0,S.A)(l,um,t)})(C);let R=null;return h&&(R="asc"===h?"ascending":"descending"),(0,p.jsx)(hm,(0,a.A)({as:y,ref:t,className:(0,l.A)(k.root,s),"aria-sort":R,scope:x,ownerState:C},f))})),fm=vm;function gm(e){return(0,w.Ay)("MuiTableBody",e)}(0,g.A)("MuiTableBody",["root"]);const bm=["className","component"],Am=(0,G.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),ym={variant:"body"},xm="tbody",wm=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiTableBody"}),{className:n,component:r=xm}=o,s=(0,i.A)(o,bm),c=(0,a.A)({},o,{component:r}),d=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},gm,t)})(c);return(0,p.jsx)($p.Provider,{value:ym,children:(0,p.jsx)(Am,(0,a.A)({className:(0,l.A)(d.root,n),as:r,ref:t,role:r===xm?null:"rowgroup",ownerState:c},s))})}));function Sm(e){return(0,w.Ay)("MuiAlert",e)}const Cm=(0,g.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),km=Po((0,p.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Rm=Po((0,p.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Em=Po((0,p.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Mm=Po((0,p.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Lm=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Im=Ke(),Tm=(0,G.Ay)(Le,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t["".concat(o.variant).concat((0,K.A)(o.color||o.severity))]]}})((e=>{let{theme:t}=e;const o="light"===t.palette.mode?re.e$:re.a,n="light"===t.palette.mode?re.a:re.e$;return(0,a.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[r]=e;return{props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:o(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(r,"StandardBg")]:n(t.palette[r].light,.9),["& .".concat(Cm.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[n]=e;return{props:{colorSeverity:n,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(n,"Color")]:o(t.palette[n].light,.6),border:"1px solid ".concat((t.vars||t).palette[n].light),["& .".concat(Cm.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(n,"IconColor")]}:{color:t.palette[n].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.dark})).map((e=>{let[o]=e;return{props:{colorSeverity:o,variant:"filled"},style:(0,a.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(o,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(o,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[o].dark:t.palette[o].main,color:t.palette.getContrastText(t.palette[o].main)})}}))]})})),zm=(0,G.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Pm=(0,G.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Nm=(0,G.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Om={success:(0,p.jsx)(km,{fontSize:"inherit"}),warning:(0,p.jsx)(Rm,{fontSize:"inherit"}),error:(0,p.jsx)(Em,{fontSize:"inherit"}),info:(0,p.jsx)(Mm,{fontSize:"inherit"})},Bm=n.forwardRef((function(e,t){const o=Im({props:e,name:"MuiAlert"}),{action:n,children:r,className:s,closeText:c="Close",color:d,components:u={},componentsProps:m={},icon:h,iconMapping:v=Om,onClose:f,role:g="alert",severity:b="success",slotProps:A={},slots:y={},variant:x="standard"}=o,w=(0,i.A)(o,Lm),C=(0,a.A)({},o,{color:d,severity:b,variant:x,colorSeverity:d||b}),k=(e=>{const{variant:t,color:o,severity:n,classes:r}=e,a={root:["root","color".concat((0,K.A)(o||n)),"".concat(t).concat((0,K.A)(o||n)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,S.A)(a,Sm,r)})(C),R={slots:(0,a.A)({closeButton:u.CloseButton,closeIcon:u.CloseIcon},y),slotProps:(0,a.A)({},m,A)},[E,M]=ut("closeButton",{elementType:$t,externalForwardedProps:R,ownerState:C}),[L,I]=ut("closeIcon",{elementType:_o,externalForwardedProps:R,ownerState:C});return(0,p.jsxs)(Tm,(0,a.A)({role:g,elevation:0,ownerState:C,className:(0,l.A)(k.root,s),ref:t},w,{children:[!1!==h?(0,p.jsx)(zm,{ownerState:C,className:k.icon,children:h||v[b]||Om[b]}):null,(0,p.jsx)(Pm,{ownerState:C,className:k.message,children:r}),null!=n?(0,p.jsx)(Nm,{ownerState:C,className:k.action,children:n}):null,null==n&&f?(0,p.jsx)(Nm,{ownerState:C,className:k.action,children:(0,p.jsx)(E,(0,a.A)({size:"small","aria-label":c,title:c,color:"inherit",onClick:f},M,{children:(0,p.jsx)(L,(0,a.A)({fontSize:"small"},I))}))}):null]}))}));var jm=o(7528),Fm=o(3290);function Wm(e){return(0,w.Ay)("MuiCircularProgress",e)}(0,g.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Dm,Hm,Vm,Km;const Gm=["className","color","disableShrink","size","style","thickness","value","variant"];let qm,Um,Xm,Ym;const Qm=44,_m=(0,Fm.i7)(qm||(qm=Dm||(Dm=(0,jm.A)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),$m=(0,Fm.i7)(Um||(Um=Hm||(Hm=(0,jm.A)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),Zm=(0,G.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t["color".concat((0,K.A)(o.color))]]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({display:"inline-block"},"determinate"===t.variant&&{transition:o.transitions.create("transform")},"inherit"!==t.color&&{color:(o.vars||o).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,Fm.AH)(Xm||(Xm=Vm||(Vm=(0,jm.A)(["\n animation: "," 1.4s linear infinite;\n "]))),_m)})),Jm=(0,G.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),eh=(0,G.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.circle,t["circle".concat((0,K.A)(o.variant))],o.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:o.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,Fm.AH)(Ym||(Ym=Km||(Km=(0,jm.A)(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),$m)})),th=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiCircularProgress"}),{className:n,color:r="primary",disableShrink:s=!1,size:c=40,style:d,thickness:u=3.6,value:m=0,variant:h="indeterminate"}=o,v=(0,i.A)(o,Gm),f=(0,a.A)({},o,{color:r,disableShrink:s,size:c,thickness:u,value:m,variant:h}),g=(e=>{const{classes:t,variant:o,color:n,disableShrink:r}=e,a={root:["root",o,"color".concat((0,K.A)(n))],svg:["svg"],circle:["circle","circle".concat((0,K.A)(o)),r&&"circleDisableShrink"]};return(0,S.A)(a,Wm,t)})(f),b={},A={},y={};if("determinate"===h){const e=2*Math.PI*((Qm-u)/2);b.strokeDasharray=e.toFixed(3),y["aria-valuenow"]=Math.round(m),b.strokeDashoffset="".concat(((100-m)/100*e).toFixed(3),"px"),A.transform="rotate(-90deg)"}return(0,p.jsx)(Zm,(0,a.A)({className:(0,l.A)(g.root,n),style:(0,a.A)({width:c,height:c},A,d),ownerState:f,ref:t,role:"progressbar"},y,v,{children:(0,p.jsx)(Jm,{className:g.svg,ownerState:f,viewBox:"".concat(22," ").concat(22," ").concat(Qm," ").concat(Qm),children:(0,p.jsx)(eh,{className:g.circle,style:b,ownerState:f,cx:Qm,cy:Qm,r:(Qm-u)/2,fill:"none",strokeWidth:u})})}))})),oh=th;function nh(e){return(0,w.Ay)("MuiDialogTitle",e)}const rh=(0,g.A)("MuiDialogTitle",["root"]);const ah=n.createContext({}),ih=["className","id"],lh=(0,G.Ay)(zt,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),sh=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDialogTitle"}),{className:r,id:s}=o,c=(0,i.A)(o,ih),d=o,u=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"]},nh,t)})(d),{titleId:m=s}=n.useContext(ah);return(0,p.jsx)(lh,(0,a.A)({component:"h2",className:(0,l.A)(u.root,r),ownerState:d,ref:t,variant:"h6",id:null!=s?s:m},c))}));function ch(e){return(0,w.Ay)("MuiDialogContent",e)}(0,g.A)("MuiDialogContent",["root","dividers"]);const dh=["className","dividers"],uh=(0,G.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.dividers&&t.dividers]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},o.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:{[".".concat(rh.root," + &")]:{paddingTop:0}})})),ph=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDialogContent"}),{className:n,dividers:r=!1}=o,s=(0,i.A)(o,dh),c=(0,a.A)({},o,{dividers:r}),d=(e=>{const{classes:t,dividers:o}=e,n={root:["root",o&&"dividers"]};return(0,S.A)(n,ch,t)})(c);return(0,p.jsx)(uh,(0,a.A)({className:(0,l.A)(d.root,n),ownerState:c,ref:t},s))}));function mh(e){return(0,w.Ay)("MuiDialogActions",e)}(0,g.A)("MuiDialogActions",["root","spacing"]);const hh=["className","disableSpacing"],vh=(0,G.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,a.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),fh=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDialogActions"}),{className:n,disableSpacing:r=!1}=o,s=(0,i.A)(o,hh),c=(0,a.A)({},o,{disableSpacing:r}),d=(e=>{const{classes:t,disableSpacing:o}=e,n={root:["root",!o&&"spacing"]};return(0,S.A)(n,mh,t)})(c);return(0,p.jsx)(vh,(0,a.A)({className:(0,l.A)(d.root,n),ownerState:c,ref:t},s))}));function gh(e){return(0,w.Ay)("MuiDialog",e)}const bh=(0,g.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Ah=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],yh=(0,G.Ay)(Aa,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),xh=(0,G.Ay)(Ca,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),wh=(0,G.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.container,t["scroll".concat((0,K.A)(o.scroll))]]}})((e=>{let{ownerState:t}=e;return(0,a.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),Sh=(0,G.Ay)(Le,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.paper,t["scrollPaper".concat((0,K.A)(o.scroll))],t["paperWidth".concat((0,K.A)(String(o.maxWidth)))],o.fullWidth&&t.paperFullWidth,o.fullScreen&&t.paperFullScreen]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===o.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===o.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!o.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===o.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"max(".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit,", 444px)"),["&.".concat(bh.paperScrollBody)]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},o.maxWidth&&"xs"!==o.maxWidth&&{maxWidth:"".concat(t.breakpoints.values[o.maxWidth]).concat(t.breakpoints.unit),["&.".concat(bh.paperScrollBody)]:{[t.breakpoints.down(t.breakpoints.values[o.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},o.fullWidth&&{width:"calc(100% - 64px)"},o.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,["&.".concat(bh.paperScrollBody)]:{margin:0,maxWidth:"100%"}})})),Ch=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDialog"}),r=(0,pe.A)(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":c,"aria-labelledby":d,BackdropComponent:u,BackdropProps:m,children:h,className:v,disableEscapeKeyDown:f=!1,fullScreen:g=!1,fullWidth:b=!1,maxWidth:A="sm",onBackdropClick:y,onClose:x,open:w,PaperComponent:C=Le,PaperProps:k={},scroll:R="paper",TransitionComponent:E=va,transitionDuration:M=s,TransitionProps:L}=o,I=(0,i.A)(o,Ah),T=(0,a.A)({},o,{disableEscapeKeyDown:f,fullScreen:g,fullWidth:b,maxWidth:A,scroll:R}),z=(e=>{const{classes:t,scroll:o,maxWidth:n,fullWidth:r,fullScreen:a}=e,i={root:["root"],container:["container","scroll".concat((0,K.A)(o))],paper:["paper","paperScroll".concat((0,K.A)(o)),"paperWidth".concat((0,K.A)(String(n))),r&&"paperFullWidth",a&&"paperFullScreen"]};return(0,S.A)(i,gh,t)})(T),P=n.useRef(),N=(0,po.A)(d),O=n.useMemo((()=>({titleId:N})),[N]);return(0,p.jsx)(xh,(0,a.A)({className:(0,l.A)(z.root,v),closeAfterTransition:!0,components:{Backdrop:yh},componentsProps:{backdrop:(0,a.A)({transitionDuration:M,as:u},m)},disableEscapeKeyDown:f,onClose:x,open:w,ref:t,onClick:e=>{P.current&&(P.current=null,y&&y(e),x&&x(e,"backdropClick"))},ownerState:T},I,{children:(0,p.jsx)(E,(0,a.A)({appear:!0,in:w,timeout:M,role:"presentation"},L,{children:(0,p.jsx)(wh,{className:(0,l.A)(z.container),onMouseDown:e=>{P.current=e.target===e.currentTarget},ownerState:T,children:(0,p.jsx)(Sh,(0,a.A)({as:C,elevation:24,role:"dialog","aria-describedby":c,"aria-labelledby":N},k,{className:(0,l.A)(z.paper,k.className),ownerState:T,children:(0,p.jsx)(ah.Provider,{value:O,children:h})}))})}))}))}));function kh(e){return(0,w.Ay)("MuiDialogContentText",e)}(0,g.A)("MuiDialogContentText",["root"]);const Rh=["children","className"],Eh=(0,G.Ay)(zt,{shouldForwardProp:e=>(0,Un.A)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Mh=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiDialogContentText"}),{className:n}=o,r=(0,i.A)(o,Rh),s=(e=>{const{classes:t}=e,o=(0,S.A)({root:["root"]},kh,t);return(0,a.A)({},t,o)})(r);return(0,p.jsx)(Eh,(0,a.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:r,className:(0,l.A)(s.root,n)},o,{classes:s}))}));function Lh(e){return(0,w.Ay)("MuiLinearProgress",e)}(0,g.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var Ih,Th,zh,Ph,Nh,Oh;const Bh=["className","color","value","valueBuffer","variant"];let jh,Fh,Wh,Dh,Hh,Vh;const Kh=(0,Fm.i7)(jh||(jh=Ih||(Ih=(0,jm.A)(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),Gh=(0,Fm.i7)(Fh||(Fh=Th||(Th=(0,jm.A)(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),qh=(0,Fm.i7)(Wh||(Wh=zh||(zh=(0,jm.A)(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),Uh=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,re.a)(e.palette[t].main,.62):(0,re.e$)(e.palette[t].main,.5),Xh=(0,G.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["color".concat((0,K.A)(o.color))],t[o.variant]]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:Uh(o,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),Yh=(0,G.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.dashed,t["dashedColor".concat((0,K.A)(o.color))]]}})((e=>{let{ownerState:t,theme:o}=e;const n=Uh(o,t.color);return(0,a.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,Fm.AH)(Dh||(Dh=Ph||(Ph=(0,jm.A)(["\n animation: "," 3s infinite linear;\n "]))),qh)),Qh=(0,G.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.bar,t["barColor".concat((0,K.A)(o.color))],("indeterminate"===o.variant||"query"===o.variant)&&t.bar1Indeterminate,"determinate"===o.variant&&t.bar1Determinate,"buffer"===o.variant&&t.bar1Buffer]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(o.vars||o).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Fm.AH)(Hh||(Hh=Nh||(Nh=(0,jm.A)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),Kh)})),_h=(0,G.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.bar,t["barColor".concat((0,K.A)(o.color))],("indeterminate"===o.variant||"query"===o.variant)&&t.bar2Indeterminate,"buffer"===o.variant&&t.bar2Buffer]}})((e=>{let{ownerState:t,theme:o}=e;return(0,a.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(o.vars||o).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:Uh(o,t.color),transition:"transform .".concat(4,"s linear")})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Fm.AH)(Vh||(Vh=Oh||(Oh=(0,jm.A)(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),Gh)})),$h=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiLinearProgress"}),{className:n,color:r="primary",value:s,valueBuffer:c,variant:d="indeterminate"}=o,u=(0,i.A)(o,Bh),m=(0,a.A)({},o,{color:r,variant:d}),h=(e=>{const{classes:t,variant:o,color:n}=e,r={root:["root","color".concat((0,K.A)(n)),o],dashed:["dashed","dashedColor".concat((0,K.A)(n))],bar1:["bar","barColor".concat((0,K.A)(n)),("indeterminate"===o||"query"===o)&&"bar1Indeterminate","determinate"===o&&"bar1Determinate","buffer"===o&&"bar1Buffer"],bar2:["bar","buffer"!==o&&"barColor".concat((0,K.A)(n)),"buffer"===o&&"color".concat((0,K.A)(n)),("indeterminate"===o||"query"===o)&&"bar2Indeterminate","buffer"===o&&"bar2Buffer"]};return(0,S.A)(r,Lh,t)})(m),v=(0,Or.I)(),f={},g={bar1:{},bar2:{}};if("determinate"===d||"buffer"===d)if(void 0!==s){f["aria-valuenow"]=Math.round(s),f["aria-valuemin"]=0,f["aria-valuemax"]=100;let e=s-100;v&&(e=-e),g.bar1.transform="translateX(".concat(e,"%)")}else 0;if("buffer"===d)if(void 0!==c){let e=(c||0)-100;v&&(e=-e),g.bar2.transform="translateX(".concat(e,"%)")}else 0;return(0,p.jsxs)(Xh,(0,a.A)({className:(0,l.A)(h.root,n),ownerState:m,role:"progressbar"},f,{ref:t},u,{children:["buffer"===d?(0,p.jsx)(Yh,{className:h.dashed,ownerState:m}):null,(0,p.jsx)(Qh,{className:h.bar1,ownerState:m,style:g.bar1}),"determinate"===d?null:(0,p.jsx)(_h,{className:h.bar2,ownerState:m,style:g.bar2})]}))}));function Zh(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Jh(e){return parseFloat(e)}function ev(e){return(0,w.Ay)("MuiSkeleton",e)}(0,g.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var tv,ov,nv,rv;const av=["animation","className","component","height","style","variant","width"];let iv,lv,sv,cv;const dv=(0,Fm.i7)(iv||(iv=tv||(tv=(0,jm.A)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),uv=(0,Fm.i7)(lv||(lv=ov||(ov=(0,jm.A)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),pv=(0,G.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],!1!==o.animation&&t[o.animation],o.hasChildren&&t.withChildren,o.hasChildren&&!o.width&&t.fitContent,o.hasChildren&&!o.height&&t.heightAuto]}})((e=>{let{theme:t,ownerState:o}=e;const n=Zh(t.shape.borderRadius)||"px",r=Jh(t.shape.borderRadius);return(0,a.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:Js(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===o.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(r).concat(n,"/").concat(Math.round(r/.6*10)/10).concat(n),"&:empty:before":{content:'"\\00a0"'}},"circular"===o.variant&&{borderRadius:"50%"},"rounded"===o.variant&&{borderRadius:(t.vars||t).shape.borderRadius},o.hasChildren&&{"& > *":{visibility:"hidden"}},o.hasChildren&&!o.width&&{maxWidth:"fit-content"},o.hasChildren&&!o.height&&{height:"auto"})}),(e=>{let{ownerState:t}=e;return"pulse"===t.animation&&(0,Fm.AH)(sv||(sv=nv||(nv=(0,jm.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),dv)}),(e=>{let{ownerState:t,theme:o}=e;return"wave"===t.animation&&(0,Fm.AH)(cv||(cv=rv||(rv=(0,jm.A)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),uv,(o.vars||o).palette.action.hover)})),mv=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSkeleton"}),{animation:n="pulse",className:r,component:s="span",height:c,style:d,variant:u="text",width:m}=o,h=(0,i.A)(o,av),v=(0,a.A)({},o,{animation:n,component:s,variant:u,hasChildren:Boolean(h.children)}),f=(e=>{const{classes:t,variant:o,animation:n,hasChildren:r,width:a,height:i}=e,l={root:["root",o,n,r&&"withChildren",r&&!a&&"fitContent",r&&!i&&"heightAuto"]};return(0,S.A)(l,ev,t)})(v);return(0,p.jsx)(pv,(0,a.A)({as:s,ref:t,className:(0,l.A)(f.root,r),ownerState:v},h,{style:(0,a.A)({width:m,height:c},d)}))})),hv=mv;function vv(e){return e.substring(2).toLowerCase()}function fv(e){const{children:t,disableReactTree:o=!1,mouseEvent:r="onClick",onClickAway:a,touchEvent:i="onTouchEnd"}=e,l=n.useRef(!1),s=n.useRef(null),c=n.useRef(!1),d=n.useRef(!1);n.useEffect((()=>(setTimeout((()=>{c.current=!0}),0),()=>{c.current=!1})),[]);const u=(0,rt.A)(t.ref,s),m=(0,vo.A)((e=>{const t=d.current;d.current=!1;const n=(0,An.A)(s.current);if(!c.current||!s.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!n.documentElement.contains(e.target)||s.current.contains(e.target),r||!o&&t||a(e)})),h=e=>o=>{d.current=!0;const n=t.props[e];n&&n(o)},v={ref:u};return!1!==i&&(v[i]=h(i)),n.useEffect((()=>{if(!1!==i){const e=vv(i),t=(0,An.A)(s.current),o=()=>{l.current=!0};return t.addEventListener(e,m),t.addEventListener("touchmove",o),()=>{t.removeEventListener(e,m),t.removeEventListener("touchmove",o)}}}),[m,i]),!1!==r&&(v[r]=h(r)),n.useEffect((()=>{if(!1!==r){const e=vv(r),t=(0,An.A)(s.current);return t.addEventListener(e,m),()=>{t.removeEventListener(e,m)}}}),[m,r]),(0,p.jsx)(n.Fragment,{children:n.cloneElement(t,v)})}function gv(e){return(0,w.Ay)("MuiSnackbarContent",e)}(0,g.A)("MuiSnackbarContent",["root","message","action"]);const bv=["action","className","message","role"],Av=(0,G.Ay)(Le,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const o="light"===t.palette.mode?.8:.98,n=(0,re.tL)(t.palette.background.default,o);return(0,a.A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),yv=(0,G.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),xv=(0,G.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),wv=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSnackbarContent"}),{action:n,className:r,message:s,role:c="alert"}=o,d=(0,i.A)(o,bv),u=o,m=(e=>{const{classes:t}=e;return(0,S.A)({root:["root"],action:["action"],message:["message"]},gv,t)})(u);return(0,p.jsxs)(Av,(0,a.A)({role:c,square:!0,elevation:6,className:(0,l.A)(m.root,r),ownerState:u,ref:t},d,{children:[(0,p.jsx)(yv,{className:m.message,ownerState:u,children:s}),n?(0,p.jsx)(xv,{className:m.action,ownerState:u,children:n}):null]}))}));function Sv(e){return(0,w.Ay)("MuiSnackbar",e)}(0,g.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Cv=["onEnter","onExited"],kv=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],Rv=(0,G.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t["anchorOrigin".concat((0,K.A)(o.anchorOrigin.vertical)).concat((0,K.A)(o.anchorOrigin.horizontal))]]}})((e=>{let{theme:t,ownerState:o}=e;return(0,a.A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===o.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===o.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===o.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,a.A)({},"top"===o.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===o.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===o.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===o.anchorOrigin.horizontal&&{right:24,left:"auto"})})})),Ev=n.forwardRef((function(e,t){const o=(0,q.A)({props:e,name:"MuiSnackbar"}),r=(0,pe.A)(),l={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:c,horizontal:d}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:m,className:h,ClickAwayListenerProps:v,ContentProps:f,disableWindowBlurListener:g=!1,message:b,open:A,TransitionComponent:y=$r.A,transitionDuration:x=l,TransitionProps:{onEnter:w,onExited:C}={}}=o,k=(0,i.A)(o.TransitionProps,Cv),R=(0,i.A)(o,kv),E=(0,a.A)({},o,{anchorOrigin:{vertical:c,horizontal:d},autoHideDuration:u,disableWindowBlurListener:g,TransitionComponent:y,transitionDuration:x}),M=(e=>{const{classes:t,anchorOrigin:o}=e,n={root:["root","anchorOrigin".concat((0,K.A)(o.vertical)).concat((0,K.A)(o.horizontal))]};return(0,S.A)(n,Sv,t)})(E),{getRootProps:L,onClickAway:I}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:o=!1,onClose:r,open:i,resumeHideDuration:l}=e,s=(0,qe.A)();n.useEffect((()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==r||r(e,"escapeKeyDown")}}),[i,r]);const c=(0,vo.A)(((e,t)=>{null==r||r(e,t)})),d=(0,vo.A)((e=>{r&&null!=e&&s.start(e,(()=>{c(null,"timeout")}))}));n.useEffect((()=>(i&&d(t),s.clear)),[i,t,d,s]);const u=s.clear,p=n.useCallback((()=>{null!=t&&d(null!=l?l:.5*t)}),[t,l,d]),m=e=>t=>{const o=e.onFocus;null==o||o(t),u()},h=e=>t=>{const o=e.onMouseEnter;null==o||o(t),u()},v=e=>t=>{const o=e.onMouseLeave;null==o||o(t),p()};return n.useEffect((()=>{if(!o&&i)return window.addEventListener("focus",p),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",u)}}),[o,i,p,u]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(0,a.A)({},(0,Jr.h)(e),(0,Jr.h)(t));return(0,a.A)({role:"presentation"},t,o,{onBlur:(n=o,e=>{const t=n.onBlur;null==t||t(e),p()}),onFocus:m(o),onMouseEnter:h(o),onMouseLeave:v(o)});var n},onClickAway:e=>{null==r||r(e,"clickaway")}}}((0,a.A)({},E)),[T,z]=n.useState(!0),P=(0,Nr.Q)({elementType:Rv,getSlotProps:L,externalForwardedProps:R,ownerState:E,additionalProps:{ref:t},className:[M.root,h]});return!A&&T?null:(0,p.jsx)(fv,(0,a.A)({onClickAway:I},v,{children:(0,p.jsx)(Rv,(0,a.A)({},P,{children:(0,p.jsx)(y,(0,a.A)({appear:!0,in:A,timeout:x,direction:"top"===c?"down":"up",onEnter:(e,t)=>{z(!1),w&&w(e,t)},onExited:e=>{z(!0),C&&C(e)}},k,{children:m||(0,p.jsx)(wv,(0,a.A)({message:b,action:s},f))}))}))}))})),Mv=Po((0,p.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Lv=Po((0,p.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Iv=Po((0,p.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Tv=Po((0,p.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),zv=Po((0,p.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Pv=Po((0,p.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorder"),Nv=Po((0,p.jsx)("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"}),"Favorite"),Ov=Po((0,p.jsx)("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),Bv=Po((0,p.jsx)("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),jv=Po((0,p.jsx)("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),Fv=Po((0,p.jsx)("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),Wv=Po((0,p.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"Restore"),Dv=Po((0,p.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn"),Hv=Po((0,p.jsx)("path",{d:"M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z"}),"ContentCut"),Vv=Po((0,p.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),Kv=Po((0,p.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste"),Gv=Po((0,p.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96"}),"Cloud"),qv=Po((0,p.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),Uv=Po((0,p.jsx)("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92"}),"Share"),Xv=Po((0,p.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print"),Yv=Po((0,p.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Mail"),Qv=Po((0,p.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox"),_v=Po((0,p.jsx)("path",{d:"M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zM12 13 3.74 7.84 12 3l8.26 4.84z"}),"Drafts");var $v=()=>n.createElement(r.es,{embeddable:!0},n.createElement(r.b7,{name:"Layout"},n.createElement(r.uA,{name:"Box",docURL:"https://mui.com/material-ui/react-box/"},n.createElement(r.KT,null,n.createElement(x,null,"Content"))),n.createElement(r.uA,{name:"Container",docURL:"https://mui.com/material-ui/react-container/"},n.createElement(r.KT,null,n.createElement(X,{maxWidth:"sm"},"Content")),n.createElement(r.KT,{name:"fixed"},n.createElement(X,{fixed:!0},"Content"))),n.createElement(r.uA,{name:"Stack",docURL:"https://mui.com/material-ui/react-stack/"},n.createElement(r.KT,null,n.createElement(ne,{my:1,spacing:2},n.createElement(x,null,"Item1"),n.createElement(x,null,"Item2"),n.createElement(x,null,"Item3"))),n.createElement(r.KT,{name:"horizontal"},n.createElement(ne,{my:1,direction:"row",divider:n.createElement(ue,{orientation:"vertical",flexItem:!0}),spacing:2},n.createElement(x,{sx:{border:"1px dashed grey"}},"Item 1"),n.createElement(x,{sx:{border:"1px dashed grey"}},"Item 2"),n.createElement(x,{sx:{border:"1px dashed grey"}},"Item 3")))),n.createElement(r.uA,{name:"Grid",docURL:"https://mui.com/material-ui/react-grid/"},n.createElement(r.KT,null,n.createElement(Ce,{container:!0,spacing:2},n.createElement(Ce,{item:!0,xs:6,md:8},n.createElement(Le,null,"xs=6 md=8")),n.createElement(Ce,{item:!0,xs:6,md:4},n.createElement(Le,null,"xs=6 md=4")),n.createElement(Ce,{item:!0,xs:6,md:4},n.createElement(Le,null,"xs=6 md=4")),n.createElement(Ce,{item:!0,xs:6,md:8},n.createElement(Le,null,"xs=6 md=8"))))),n.createElement(r.uA,{name:"ImageList",docURL:"https://mui.com/material-ui/react-image-list/"},n.createElement(r.KT,null,n.createElement(Oe,{sx:{width:500,height:450},cols:3,rowHeight:164},n.createElement(Ve,null,n.createElement("img",{src:"https://images.unsplash.com/photo-1551963831-b3b1ca40c98e",srcSet:"https://images.unsplash.com/photo-1551963831-b3b1ca40c98e?w=164&h=164&fit=crop&auto=format&dpr=2 2x",alt:"Breakfast",loading:"lazy"})),n.createElement(Ve,null,n.createElement("img",{src:"https://images.unsplash.com/photo-1522770179533-24471fcdba45",srcSet:"https://images.unsplash.com/photo-1522770179533-24471fcdba45?w=164&h=164&fit=crop&auto=format&dpr=2 2x",alt:"Camera",loading:"lazy"})))))),n.createElement(r.b7,{name:"Surfaces"},n.createElement(r.uA,{name:"Accordion",docURL:"https://mui.com/material-ui/react-accordion/"},n.createElement(r.KT,null,n.createElement(ne,null,n.createElement(gt,null,n.createElement(Rt,{expandIcon:n.createElement(Mv,null),"aria-controls":"panel1a-content",id:"panel1a-header"},n.createElement(zt,null,"Accordion 1")),n.createElement(jt,null,n.createElement(zt,null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget."))),n.createElement(gt,null,n.createElement(Rt,{expandIcon:n.createElement(Mv,null),"aria-controls":"panel2a-content",id:"panel2a-header"},n.createElement(zt,null,"Accordion 2")),n.createElement(jt,null,n.createElement(zt,null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.")))))),n.createElement(r.uA,{name:"AppBar",docURL:"https://mui.com/material-ui/react-app-bar/"},n.createElement(r.KT,null,n.createElement(Vt,{position:"static"},n.createElement(Ut,null,n.createElement($t,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2}},n.createElement(Lv,null)),n.createElement(zt,{variant:"h6",component:"div",sx:{flexGrow:1}},"News"),n.createElement(Zt.A,{color:"inherit"},"Login"))))),n.createElement(r.uA,{name:"Card",subComponents:[n.createElement(oo,null),n.createElement(io,null)],docURL:"https://mui.com/material-ui/react-card/"},n.createElement(r.KT,null,n.createElement(uo,null)),n.createElement(r.KT,{name:"template"},n.createElement(uo,{variant:"outlined"},n.createElement(oo,null,n.createElement(zt,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0},"Word of the Day"),n.createElement(zt,{variant:"h5",component:"div"},"benevolent"),n.createElement(zt,{sx:{mb:1.5},color:"text.secondary"},"adjective"),n.createElement(zt,{variant:"body2"},"well meaning and kindly.",n.createElement("br",null),'"a benevolent smile"')),n.createElement(io,null,n.createElement(Zt.A,{size:"small"},"Learn More"))))),n.createElement(r.uA,{name:"Paper",docURL:"https://mui.com/material-ui/react-paper/"},n.createElement(r.KT,null,n.createElement(Le,null,"elevation 0")),n.createElement(r.KT,{name:"elevation 8"},n.createElement(Le,{elevation:8},"elevation 8")),n.createElement(r.KT,{name:"elevation 24"},n.createElement(Le,{elevation:24},"elevation 24")))),n.createElement(r.b7,{name:"Typography"},n.createElement(r.uA,{name:"h1",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"h1",gutterBottom:!0,component:"h1"},"Heading 1"))),n.createElement(r.uA,{name:"h2",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"h2",gutterBottom:!0,component:"h2"},"Heading 2"))),n.createElement(r.uA,{name:"h3",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"h3",gutterBottom:!0,component:"h3"},"Heading 3"))),n.createElement(r.uA,{name:"h4",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"h4",gutterBottom:!0,component:"h4"},"Heading 4"))),n.createElement(r.uA,{name:"h5",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"h5",gutterBottom:!0,component:"h5"},"Heading 5"))),n.createElement(r.uA,{name:"h6",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"h6",gutterBottom:!0,component:"h6"},"Heading 6"))),n.createElement(r.uA,{name:"subtitle1",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"subtitle1",gutterBottom:!0,component:"div"},"subtitle1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur"))),n.createElement(r.uA,{name:"subtitle2",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"subtitle2",gutterBottom:!0,component:"div"},"subtitle2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur"))),n.createElement(r.uA,{name:"body1",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"body1",gutterBottom:!0},"body1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam."))),n.createElement(r.uA,{name:"body2",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"body2",gutterBottom:!0},"body2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam."))),n.createElement(r.uA,{name:"button (typography)",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"button",display:"block",gutterBottom:!0},"button text"))),n.createElement(r.uA,{name:"caption",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"caption",display:"block",gutterBottom:!0},"caption text"))),n.createElement(r.uA,{name:"overline",docURL:"https://mui.com/material-ui/react-typography/"},n.createElement(r.KT,null,n.createElement(zt,{variant:"overline",display:"block",gutterBottom:!0},"overline text")))),n.createElement(r.b7,{name:"Inputs"},n.createElement(r.uA,{name:"Autocomplete",docURL:"https://mui.com/material-ui/react-autocomplete/"},n.createElement(r.KT,null,n.createElement(gn,{disablePortal:!0,options:[],sx:{width:300},renderInput:e=>n.createElement(wi,Object.assign({},e,{label:"Movie"}))}))),n.createElement(r.uA,{name:"Button",docURL:"https://mui.com/material-ui/react-button/"},n.createElement(r.KT,{name:"text"},n.createElement(Zt.A,{variant:"text"},"Text")),n.createElement(r.KT,{name:"contained"},n.createElement(Zt.A,{variant:"contained",sx:{my:2}},"Contained")),n.createElement(r.KT,{name:"outlined"},n.createElement(Zt.A,{variant:"outlined"},"Outlined"))),n.createElement(r.uA,{name:"IconButton",docURL:"https://mui.com/material-ui/react-button/#icon-button"},n.createElement(r.KT,{name:"add"},n.createElement($t,{"aria-label":"add"},n.createElement(Iv,null))),n.createElement(r.KT,{name:"edit"},n.createElement($t,{"aria-label":"edit"},n.createElement(Tv,null))),n.createElement(r.KT,{name:"delete"},n.createElement($t,{"aria-label":"delete"},n.createElement(zv,null)))),n.createElement(r.uA,{name:"Button Group",docURL:"https://mui.com/material-ui/react-button-group/"},n.createElement(r.KT,{name:"contained"},n.createElement(Ii,{variant:"contained","aria-label":"outlined primary button group"},n.createElement(Zt.A,null,"One"),n.createElement(Zt.A,null,"Two"),n.createElement(Zt.A,null,"Three"))),n.createElement(r.KT,{name:"outlined"},n.createElement(Ii,{variant:"outlined","aria-label":"outlined button group"},n.createElement(Zt.A,null,"One"),n.createElement(Zt.A,null,"Two"),n.createElement(Zt.A,null,"Three"))),n.createElement(r.KT,{name:"text"},n.createElement(Ii,{variant:"text","aria-label":"text button group"},n.createElement(Zt.A,null,"One"),n.createElement(Zt.A,null,"Two"),n.createElement(Zt.A,null,"Three")))),n.createElement(r.uA,{name:"Checkbox",docURL:"https://mui.com/material-ui/react-checkbox/"},n.createElement(r.KT,null,n.createElement(Ni,null,n.createElement(Di,{control:n.createElement(ol,{defaultChecked:!0}),label:"Label"}))),n.createElement(r.KT,{name:"icon"},n.createElement(ol,{icon:n.createElement(Pv,null),checkedIcon:n.createElement(Nv,null)}))),n.createElement(r.uA,{name:"Floating action button",docURL:"https://mui.com/material-ui/react-floating-action-button/"},n.createElement(r.KT,null,n.createElement(ll,{color:"primary","aria-label":"add"},n.createElement(Iv,null)))),n.createElement(r.uA,{name:"Radio Group",docURL:"https://mui.com/material-ui/react-radio-button/"},n.createElement(r.KT,null,n.createElement(Rr,{component:"fieldset"},n.createElement(br,{component:"legend"},"Season"),n.createElement(ul,{"aria-label":"season",defaultValue:"summer",name:"radio-buttons-group"},n.createElement(Di,{value:"summer",control:n.createElement(kl,null),label:"Summer"}),n.createElement(Di,{value:"autumn",control:n.createElement(kl,null),label:"Autumn"}),n.createElement(Di,{value:"winter",control:n.createElement(kl,null),label:"Winter"}),n.createElement(Di,{value:"spring",control:n.createElement(kl,null),label:"Spring"}))))),n.createElement(r.uA,{name:"Rating",docURL:"https://mui.com/material-ui/react-rating/"},n.createElement(r.KT,null,n.createElement(ql,{name:"simple-controlled"}))),n.createElement(r.uA,{name:"Select",docURL:"https://mui.com/material-ui/react-select/"},n.createElement(r.KT,null,n.createElement(Rr,{fullWidth:!0},n.createElement(wr,{id:"demo-simple-select-label"},"Age"),n.createElement(gi,{labelId:"demo-simple-select-label",id:"demo-simple-select",label:"Age"},n.createElement(es,{value:10},"Ten"),n.createElement(es,{value:20},"Twenty"),n.createElement(es,{value:30},"Thirty"))))),n.createElement(r.uA,{name:"Slider",docURL:"https://mui.com/material-ui/react-slider/"},n.createElement(r.KT,null,n.createElement(Is,{defaultValue:30,"aria-label":"Slider"}))),n.createElement(r.uA,{name:"Switch",docURL:"https://mui.com/material-ui/react-switch/"},n.createElement(r.KT,null,n.createElement(Ws,null)),n.createElement(r.KT,{name:"with label"},n.createElement(Ni,null,n.createElement(Di,{control:n.createElement(Ws,{defaultChecked:!0}),label:"Label"})))),n.createElement(r.uA,{name:"TextField",docURL:"https://mui.com/material-ui/react-text-field/"},n.createElement(r.KT,{name:"outlined"},n.createElement(wi,{id:"outlined-basic",label:"Outlined",variant:"outlined"})),n.createElement(r.KT,{name:"filled"},n.createElement(wi,{id:"filled-basic",label:"Filled",variant:"filled"})),n.createElement(r.KT,{name:"standard"},n.createElement(wi,{id:"standard-basic",label:"Standard",variant:"standard"})),n.createElement(r.KT,{name:"select"},n.createElement(wi,{id:"outlined-select-currency",select:!0,label:"Select",helperText:"Please select your currency"},n.createElement(es,{value:"dollar"},"dollar"),n.createElement(es,{value:"euro"},"euro")))),n.createElement(r.uA,{name:"ToggleButtonGroup",docURL:"https://mui.com/material-ui/react-toggle-button/"},n.createElement(r.KT,null,n.createElement(Ys,{exclusive:!0,"aria-label":"text alignment"},n.createElement(rc,{value:"left","aria-label":"left aligned"},n.createElement(Ov,null)),n.createElement(rc,{value:"center","aria-label":"centered"},n.createElement(Bv,null)),n.createElement(rc,{value:"right","aria-label":"right aligned"},n.createElement(jv,null)),n.createElement(rc,{value:"justify","aria-label":"justified",disabled:!0},n.createElement(Fv,null)))))),n.createElement(r.b7,{name:"Navigation"},n.createElement(r.uA,{name:"BottomNavigation",docURL:"https://mui.com/material-ui/react-bottom-navigation/"},n.createElement(r.KT,null,n.createElement(sc,{showLabels:!0},n.createElement(hc,{label:"Recents",icon:n.createElement(Wv,null)}),n.createElement(hc,{label:"Favorites",icon:n.createElement(Nv,null)}),n.createElement(hc,{label:"Nearby",icon:n.createElement(Dv,null)})))),n.createElement(r.uA,{name:"Breadcrumbs",docURL:"https://mui.com/material-ui/react-breadcrumbs/"},n.createElement(r.KT,null,n.createElement(Ec,{"aria-label":"breadcrumb"},n.createElement(Oc,{underline:"hover",color:"inherit",href:"#"},"Home"),n.createElement(Oc,{underline:"hover",color:"inherit",href:"#products"},"Products"),n.createElement(zt,{color:"text.primary"},"Item")))),n.createElement(r.uA,{name:"Drawer",docURL:"https://mui.com/material-ui/react-drawer/"},n.createElement(r.KT,null,n.createElement(Yc,{open:!0,variant:"persistent"},n.createElement(Dr,null,n.createElement(sd,null,n.createElement(ud,null,"Item1")),n.createElement(sd,null,n.createElement(ud,null,"Item2")))))),n.createElement(r.uA,{name:"Link",docURL:"https://mui.com/material-ui/react-link/"},n.createElement(r.KT,null,n.createElement(Oc,{href:"#"},"Link"))),n.createElement(r.uA,{name:"Menu",docURL:"https://mui.com/material-ui/react-menu/"},n.createElement(r.KT,null,n.createElement(Yr,null)),n.createElement(r.KT,{name:"example"},n.createElement(Yr,null,n.createElement(es,null,n.createElement(hd,null,n.createElement(Hv,{fontSize:"small"})),n.createElement(ud,null,"Cut"),n.createElement(zt,{variant:"body2",color:"text.secondary"},"\u2318X")),n.createElement(es,null,n.createElement(hd,null,n.createElement(Vv,{fontSize:"small"})),n.createElement(ud,null,"Copy"),n.createElement(zt,{variant:"body2",color:"text.secondary"},"\u2318C")),n.createElement(es,null,n.createElement(hd,null,n.createElement(Kv,{fontSize:"small"})),n.createElement(ud,null,"Paste"),n.createElement(zt,{variant:"body2",color:"text.secondary"},"\u2318V")),n.createElement(ue,null),n.createElement(es,null,n.createElement(hd,null,n.createElement(Gv,{fontSize:"small"})),n.createElement(ud,null,"Web Clipboard"))))),n.createElement(r.uA,{name:"Pagination",docURL:"https://mui.com/material-ui/react-pagination/"},n.createElement(r.KT,null,n.createElement(Pd,{count:10}))),n.createElement(r.uA,{name:"SpeedDial",docURL:"https://mui.com/material-ui/react-speed-dial/"},n.createElement(r.KT,null,n.createElement(Xd,{ariaLabel:"SpeedDial basic example",sx:{position:"absolute",bottom:16,right:16},icon:n.createElement(eu,null)},n.createElement(su,{key:"Save",icon:n.createElement(qv,null),tooltipTitle:"Save"}),n.createElement(su,{key:"Share",icon:n.createElement(Uv,null),tooltipTitle:"Share"}),n.createElement(su,{key:"Print",icon:n.createElement(Xv,null),tooltipTitle:"Print"})))),n.createElement(r.uA,{name:"Stepper",docURL:"https://mui.com/material-ui/react-stepper/"},n.createElement(r.KT,null,n.createElement(wu,{activeStep:1,alternativeLabel:!0},n.createElement(Ru,{key:"Select master blaster campaign settings"},n.createElement(Gu,null,"Select master blaster campaign settings")),n.createElement(Ru,{key:"Create an ad group"},n.createElement(Gu,null,"Create an ad group")),n.createElement(Ru,{key:"Create an ad"},n.createElement(Gu,null,"Create an ad"))))),n.createElement(r.uA,{name:"Tabs",subComponents:[n.createElement(Qu,{label:"Label"})],docURL:"https://mui.com/material-ui/react-tabs/"},n.createElement(r.KT,null,n.createElement(wp,{value:0,"aria-label":"basic tabs example"})),n.createElement(r.KT,{name:"example"},n.createElement(wp,{value:0,"aria-label":"basic tabs example"},n.createElement(Qu,{label:"Item One"}),n.createElement(Qu,{label:"Item Two"}),n.createElement(Qu,{label:"Item Three"}))))),n.createElement(r.b7,{name:"Data Display"},n.createElement(r.uA,{name:"Avatar",docURL:"https://mui.com/material-ui/react-avatar/"},n.createElement(r.KT,null,n.createElement(Ip,null,"N"))),n.createElement(r.uA,{name:"Badge",docURL:"https://mui.com/material-ui/react-badge/"},n.createElement(r.KT,null,n.createElement(jp,{color:"secondary",badgeContent:1},n.createElement(Yv,null)))),n.createElement(r.uA,{name:"Chip",docURL:"https://mui.com/material-ui/react-chip/"},n.createElement(r.KT,null,n.createElement(Ho,{label:"Chip Filled"})),n.createElement(r.KT,{name:"outlined"},n.createElement(Ho,{label:"Chip Outlined",variant:"outlined"}))),n.createElement(r.uA,{name:"Divider",docURL:"https://mui.com/material-ui/react-divider/"},n.createElement(r.KT,{previewLayout:"stretch",style:{padding:10}},n.createElement(ue,null))),n.createElement(r.uA,{name:"List",docURL:"https://mui.com/material-ui/react-list/"},n.createElement(r.KT,null,n.createElement(Dr,null,n.createElement(sd,{disablePadding:!0},n.createElement(Dp,null,n.createElement(hd,null,n.createElement(Qv,null)),n.createElement(ud,{primary:"Inbox"}))),n.createElement(sd,{disablePadding:!0},n.createElement(Dp,null,n.createElement(hd,null,n.createElement(_v,null)),n.createElement(ud,{primary:"Drafts"})))))),n.createElement(r.uA,{name:"Table",docURL:"https://mui.com/material-ui/react-table/"},n.createElement(r.KT,null,n.createElement(Gp,{component:Le},n.createElement(_p,{"aria-label":"simple table"},n.createElement(nm,null,n.createElement(dm,null,n.createElement(fm,null,"Label 1"),n.createElement(fm,null,"Label 2"))),n.createElement(wm,null,n.createElement(dm,null,n.createElement(fm,null,"value 1"),n.createElement(fm,null,"value 2")),n.createElement(dm,null,n.createElement(fm,null,"value 1"),n.createElement(fm,null,"value 2"))))))),n.createElement(r.uA,{name:"Tooltip",docURL:"https://mui.com/material-ui/react-tooltip/"},n.createElement(r.KT,null,n.createElement(tu.A,{title:"Add",arrow:!0},n.createElement(Zt.A,null,"Arrow"))))),n.createElement(r.b7,{name:"Feedback"},n.createElement(r.uA,{name:"Alert",docURL:"https://mui.com/material-ui/react-alert/"},n.createElement(r.KT,{name:"error"},n.createElement(Bm,{severity:"error"},"This is an error alert \u2014 check it out!")),n.createElement(r.KT,{name:"warning"},n.createElement(Bm,{severity:"warning"},"This is a warning alert \u2014 check it out!")),n.createElement(r.KT,{name:"info"},n.createElement(Bm,{severity:"info"},"This is an info alert \u2014 check it out!")),n.createElement(r.KT,{name:"success"},n.createElement(Bm,{severity:"success"},"This is a success alert \u2014 check it out!"))),n.createElement(r.uA,{name:"Backdrop",docURL:"https://mui.com/material-ui/react-backdrop/"},n.createElement(r.KT,null,n.createElement(Aa,{open:!0},n.createElement(oh,{color:"inherit"})))),n.createElement(r.uA,{name:"Dialog",subComponents:[n.createElement(sh,null),n.createElement(ph,null),n.createElement(fh,null)],docURL:"https://mui.com/material-ui/react-dialog/"},n.createElement(r.KT,null,n.createElement(Ch,{open:!0})),n.createElement(r.KT,{name:"template"},n.createElement(Ch,{open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},n.createElement(sh,{id:"alert-dialog-title"},"Use Google's location service?"),n.createElement(ph,null,n.createElement(Mh,{id:"alert-dialog-description"},"Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.")),n.createElement(fh,null,n.createElement(Zt.A,null,"Disagree"),n.createElement(Zt.A,{autoFocus:!0},"Agree"))))),n.createElement(r.uA,{name:"Progress",docURL:"https://mui.com/material-ui/react-progress/"},n.createElement(r.KT,{name:"circular"},n.createElement(oh,null)),n.createElement(r.KT,{name:"linear",previewLayout:"stretch",style:{padding:10}},n.createElement($h,null))),n.createElement(r.uA,{name:"Skeleton",docURL:"https://mui.com/material-ui/react-skeleton/"},n.createElement(r.KT,null,n.createElement(ne,{spacing:1},n.createElement(hv,{variant:"text"}),n.createElement(hv,{variant:"circular",width:40,height:40}),n.createElement(hv,{variant:"rectangular",width:210,height:118}))),n.createElement(r.KT,{name:"text"},n.createElement(hv,{variant:"text"})),n.createElement(r.KT,{name:"circular"},n.createElement(hv,{variant:"circular",width:40,height:40})),n.createElement(r.KT,{name:"rectangular"},n.createElement(hv,{variant:"rectangular",width:210,height:60}))),n.createElement(r.uA,{name:"Snackbar",docURL:"https://mui.com/material-ui/react-snackbar/"},n.createElement(r.KT,null,n.createElement(Ev,{open:!0,autoHideDuration:6e3,message:"Note archived"})))))}}]); +//# sourceMappingURL=802.7276d5f7.chunk.js.map \ No newline at end of file diff --git a/static/js/369.3d4a775d.chunk.js.LICENSE.txt b/static/js/802.7276d5f7.chunk.js.LICENSE.txt similarity index 100% rename from static/js/369.3d4a775d.chunk.js.LICENSE.txt rename to static/js/802.7276d5f7.chunk.js.LICENSE.txt diff --git a/static/js/802.7276d5f7.chunk.js.map b/static/js/802.7276d5f7.chunk.js.map new file mode 100644 index 0000000..d260c9f --- /dev/null +++ b/static/js/802.7276d5f7.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/802.7276d5f7.chunk.js","mappings":";yHASycA,EAAxbC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,gBAAgBE,EAAEH,OAAOC,IAAI,kBAAkBG,EAAEJ,OAAOC,IAAI,qBAAqBI,EAAEL,OAAOC,IAAI,kBAAkBK,EAAEN,OAAOC,IAAI,kBAAkBM,EAAEP,OAAOC,IAAI,iBAAiBO,EAAER,OAAOC,IAAI,wBAAwBQ,EAAET,OAAOC,IAAI,qBAAqBS,EAAEV,OAAOC,IAAI,kBAAkBU,EAAEX,OAAOC,IAAI,uBAAuBW,EAAEZ,OAAOC,IAAI,cAAcY,EAAEb,OAAOC,IAAI,cAAca,EAAEd,OAAOC,IAAI,mBACtb,SAASc,EAAEC,GAAG,GAAG,kBAAkBA,GAAG,OAAOA,EAAE,CAAC,IAAIC,EAAED,EAAEE,SAAS,OAAOD,GAAG,KAAKlB,EAAE,OAAOiB,EAAEA,EAAEG,MAAQ,KAAKhB,EAAE,KAAKE,EAAE,KAAKD,EAAE,KAAKM,EAAE,KAAKC,EAAE,OAAOK,EAAE,QAAQ,OAAOA,EAAEA,GAAGA,EAAEE,UAAY,KAAKV,EAAE,KAAKD,EAAE,KAAKE,EAAE,KAAKI,EAAE,KAAKD,EAAE,KAAKN,EAAE,OAAOU,EAAE,QAAQ,OAAOC,GAAG,KAAKf,EAAE,OAAOe,EAAE,CAA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AA,cAACF,GAAA,CAAMkK,QAAS,GACdhK,EAAAA,cAACkpF,GAAA,CAAS9jF,QAAQ,SAClBpF,EAAAA,cAACkpF,GAAA,CAAS9jF,QAAQ,WAAWsE,MAAO,GAAIsF,OAAQ,KAChDhP,EAAAA,cAACkpF,GAAA,CAAS9jF,QAAQ,cAAcsE,MAAO,IAAKsF,OAAQ,QAGxDhP,EAAAA,cAACO,EAAAA,GAAA,CAAQ2F,KAAK,QACZlG,EAAAA,cAACkpF,GAAA,CAAS9jF,QAAQ,UAEpBpF,EAAAA,cAACO,EAAAA,GAAA,CAAQ2F,KAAK,YACZlG,EAAAA,cAACkpF,GAAA,CAAS9jF,QAAQ,WAAWsE,MAAO,GAAIsF,OAAQ,MAElDhP,EAAAA,cAACO,EAAAA,GAAA,CAAQ2F,KAAK,eACZlG,EAAAA,cAACkpF,GAAA,CAAS9jF,QAAQ,cAAcsE,MAAO,IAAKsF,OAAQ,OAGxDhP,EAAAA,cAACK,EAAAA,GAAA,CACC6F,KAAK,WACLu9E,OAAO,+CAEPzjF,EAAAA,cAACO,EAAAA,GAAA,KACCP,EAAAA,cAACmpF,GAAA,CACCxgE,MAAA,EACA05D,iBAAkB,IAClB9I,QAAQ","sources":["../node_modules/@mui/material/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/@mui/material/node_modules/react-is/index.js","../node_modules/@mui/system/esm/createBox.js","../node_modules/@mui/material/Box/boxClasses.js","../node_modules/@mui/material/Box/Box.js","../node_modules/@mui/system/esm/createStyled.js","../node_modules/@mui/system/esm/styled.js","../node_modules/@mui/system/esm/Container/createContainer.js","../node_modules/@mui/material/Container/Container.js","../node_modules/@mui/system/esm/Stack/createStack.js","../node_modules/@mui/material/Stack/Stack.js","../node_modules/@mui/material/Divider/dividerClasses.js","../node_modules/@mui/material/Divider/Divider.js","../node_modules/@mui/material/Grid/GridContext.js","../node_modules/@mui/material/Grid/gridClasses.js","../node_modules/@mui/material/Grid/Grid.js","../node_modules/@mui/material/styles/getOverlayAlpha.js","../node_modules/@mui/material/Paper/paperClasses.js","../node_modules/@mui/material/Paper/Paper.js","../node_modules/@mui/material/ImageList/imageListClasses.js","../node_modules/@mui/material/ImageList/ImageListContext.js","../node_modules/@mui/material/ImageList/ImageList.js","../node_modules/@mui/material/utils/isMuiElement.js","../node_modules/@mui/utils/isMuiElement/isMuiElement.js","../node_modules/@mui/material/ImageListItem/imageListItemClasses.js","../node_modules/@mui/material/ImageListItem/ImageListItem.js","../node_modules/@mui/material/zero-styled/index.js","../node_modules/@mui/material/Collapse/collapseClasses.js","../node_modules/@mui/material/Collapse/Collapse.js","../node_modules/@mui/material/Accordion/AccordionContext.js","../node_modules/@mui/material/utils/useSlot.js","../node_modules/@mui/material/Accordion/accordionClasses.js","../node_modules/@mui/material/Accordion/Accordion.js","../node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.js","../node_modules/@mui/material/AccordionSummary/AccordionSummary.js","../node_modules/@mui/material/Typography/typographyClasses.js","../node_modules/@mui/material/Typography/Typography.js","../node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.js","../node_modules/@mui/material/AccordionDetails/AccordionDetails.js","../node_modules/@mui/material/AppBar/appBarClasses.js","../node_modules/@mui/material/AppBar/AppBar.js","../node_modules/@mui/material/Toolbar/toolbarClasses.js","../node_modules/@mui/material/Toolbar/Toolbar.js","../node_modules/@mui/material/IconButton/iconButtonClasses.js","../node_modules/@mui/material/IconButton/IconButton.js","../node_modules/@mui/material/CardContent/cardContentClasses.js","../node_modules/@mui/material/CardContent/CardContent.js","../node_modules/@mui/material/CardActions/cardActionsClasses.js","../node_modules/@mui/material/CardActions/CardActions.js","../node_modules/@mui/material/Card/cardClasses.js","../node_modules/@mui/material/Card/Card.js","../node_modules/@mui/utils/usePreviousProps/usePreviousProps.js","../node_modules/@mui/base/useAutocomplete/useAutocomplete.js","../node_modules/@mui/material/ListSubheader/listSubheaderClasses.js","../node_modules/@mui/material/ListSubheader/ListSubheader.js","../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../node_modules/@mui/material/SvgIcon/SvgIcon.js","../node_modules/@mui/material/utils/createSvgIcon.js","../node_modules/@mui/material/internal/svg-icons/Cancel.js","../node_modules/@mui/material/Chip/chipClasses.js","../node_modules/@mui/material/Chip/Chip.js","../node_modules/@mui/material/InputBase/inputBaseClasses.js","../node_modules/@mui/material/Input/inputClasses.js","../node_modules/@mui/material/OutlinedInput/outlinedInputClasses.js","../node_modules/@mui/material/FilledInput/filledInputClasses.js","../node_modules/@mui/material/internal/svg-icons/Close.js","../node_modules/@mui/material/internal/svg-icons/ArrowDropDown.js","../node_modules/@mui/material/Autocomplete/autocompleteClasses.js","../node_modules/@mui/material/Autocomplete/Autocomplete.js","../node_modules/@mui/utils/ownerWindow/ownerWindow.js","../node_modules/@mui/utils/debounce/debounce.js","../node_modules/@mui/base/TextareaAutosize/TextareaAutosize.js","../node_modules/@mui/material/FormControl/formControlState.js","../node_modules/@mui/material/FormControl/FormControlContext.js","../node_modules/@mui/material/FormControl/useFormControl.js","../node_modules/@mui/material/utils/useEnhancedEffect.js","../node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js","../node_modules/@mui/material/GlobalStyles/GlobalStyles.js","../node_modules/@mui/material/InputBase/utils.js","../node_modules/@mui/material/InputBase/InputBase.js","../node_modules/@mui/material/Input/Input.js","../node_modules/@mui/material/FilledInput/FilledInput.js","../node_modules/@mui/material/OutlinedInput/NotchedOutline.js","../node_modules/@mui/material/OutlinedInput/OutlinedInput.js","../node_modules/@mui/material/FormLabel/formLabelClasses.js","../node_modules/@mui/material/FormLabel/FormLabel.js","../node_modules/@mui/material/InputLabel/inputLabelClasses.js","../node_modules/@mui/material/InputLabel/InputLabel.js","../node_modules/@mui/material/FormControl/formControlClasses.js","../node_modules/@mui/material/FormControl/FormControl.js","../node_modules/@mui/material/FormHelperText/formHelperTextClasses.js","../node_modules/@mui/material/FormHelperText/FormHelperText.js","../node_modules/@mui/material/utils/ownerDocument.js","../node_modules/@mui/material/List/ListContext.js","../node_modules/@mui/material/List/listClasses.js","../node_modules/@mui/material/List/List.js","../node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.js","../node_modules/@mui/material/utils/getScrollbarSize.js","../node_modules/@mui/material/MenuList/MenuList.js","../node_modules/@mui/material/utils/debounce.js","../node_modules/@mui/material/utils/ownerWindow.js","../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../node_modules/@mui/base/unstable_useModal/ModalManager.js","../node_modules/@mui/base/unstable_useModal/useModal.js","../node_modules/@mui/base/FocusTrap/FocusTrap.js","../node_modules/@mui/material/Fade/Fade.js","../node_modules/@mui/material/Backdrop/backdropClasses.js","../node_modules/@mui/material/Backdrop/Backdrop.js","../node_modules/@mui/material/Modal/modalClasses.js","../node_modules/@mui/material/Modal/Modal.js","../node_modules/@mui/material/Popover/popoverClasses.js","../node_modules/@mui/material/Popover/Popover.js","../node_modules/@mui/material/Menu/menuClasses.js","../node_modules/@mui/material/Menu/Menu.js","../node_modules/@mui/material/NativeSelect/nativeSelectClasses.js","../node_modules/@mui/material/NativeSelect/NativeSelectInput.js","../node_modules/@mui/material/Select/selectClasses.js","../node_modules/@mui/material/Select/SelectInput.js","../node_modules/@mui/material/Select/Select.js","../node_modules/@mui/material/TextField/textFieldClasses.js","../node_modules/@mui/material/TextField/TextField.js","../node_modules/@mui/utils/getValidReactChildren/getValidReactChildren.js","../node_modules/@mui/material/ButtonGroup/buttonGroupClasses.js","../node_modules/@mui/material/ButtonGroup/ButtonGroup.js","../node_modules/@mui/material/FormGroup/formGroupClasses.js","../node_modules/@mui/material/FormGroup/FormGroup.js","../node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js","../node_modules/@mui/material/FormControlLabel/FormControlLabel.js","../node_modules/@mui/material/internal/switchBaseClasses.js","../node_modules/@mui/material/internal/SwitchBase.js","../node_modules/@mui/material/internal/svg-icons/CheckBoxOutlineBlank.js","../node_modules/@mui/material/internal/svg-icons/CheckBox.js","../node_modules/@mui/material/internal/svg-icons/IndeterminateCheckBox.js","../node_modules/@mui/material/Checkbox/checkboxClasses.js","../node_modules/@mui/material/Checkbox/Checkbox.js","../node_modules/@mui/material/Fab/fabClasses.js","../node_modules/@mui/material/Fab/Fab.js","../node_modules/@mui/material/RadioGroup/RadioGroupContext.js","../node_modules/@mui/material/RadioGroup/RadioGroup.js","../node_modules/@mui/material/internal/svg-icons/RadioButtonUnchecked.js","../node_modules/@mui/material/internal/svg-icons/RadioButtonChecked.js","../node_modules/@mui/material/Radio/RadioButtonIcon.js","../node_modules/@mui/material/utils/createChainedFunction.js","../node_modules/@mui/material/Radio/radioClasses.js","../node_modules/@mui/material/Radio/Radio.js","../node_modules/@mui/material/RadioGroup/useRadioGroup.js","../node_modules/@mui/utils/visuallyHidden/visuallyHidden.js","../node_modules/@mui/material/internal/svg-icons/Star.js","../node_modules/@mui/material/internal/svg-icons/StarBorder.js","../node_modules/@mui/material/Rating/ratingClasses.js","../node_modules/@mui/material/Rating/Rating.js","../node_modules/@mui/material/ListItemIcon/listItemIconClasses.js","../node_modules/@mui/material/ListItemText/listItemTextClasses.js","../node_modules/@mui/material/MenuItem/menuItemClasses.js","../node_modules/@mui/material/MenuItem/MenuItem.js","../node_modules/@mui/base/useSlider/useSlider.js","../node_modules/@mui/base/utils/areArraysEqual.js","../node_modules/@mui/material/utils/shouldSpreadAdditionalProps.js","../node_modules/@mui/material/Slider/sliderClasses.js","../node_modules/@mui/material/Slider/Slider.js","../node_modules/@mui/material/Slider/SliderValueLabel.js","../node_modules/@mui/material/Switch/switchClasses.js","../node_modules/@mui/material/Switch/Switch.js","../node_modules/@mui/material/ToggleButtonGroup/toggleButtonGroupClasses.js","../node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext.js","../node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupButtonContext.js","../node_modules/@mui/material/ToggleButton/toggleButtonClasses.js","../node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.js","../node_modules/@mui/system/esm/colorManipulator.js","../node_modules/@mui/material/ToggleButtonGroup/isValueSelected.js","../node_modules/@mui/material/ToggleButton/ToggleButton.js","../node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.js","../node_modules/@mui/material/BottomNavigation/BottomNavigation.js","../node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses.js","../node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.js","../node_modules/@mui/material/internal/svg-icons/MoreHoriz.js","../node_modules/@mui/material/Breadcrumbs/BreadcrumbCollapsed.js","../node_modules/@mui/material/Breadcrumbs/breadcrumbsClasses.js","../node_modules/@mui/material/Breadcrumbs/Breadcrumbs.js","../node_modules/@mui/material/Link/linkClasses.js","../node_modules/@mui/material/Link/getTextDecoration.js","../node_modules/@mui/material/Link/Link.js","../node_modules/@mui/material/Slide/Slide.js","../node_modules/@mui/material/Drawer/drawerClasses.js","../node_modules/@mui/material/Drawer/Drawer.js","../node_modules/@mui/material/ListItem/listItemClasses.js","../node_modules/@mui/material/ListItemButton/listItemButtonClasses.js","../node_modules/@mui/material/ListItemSecondaryAction/listItemSecondaryActionClasses.js","../node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.js","../node_modules/@mui/material/ListItem/ListItem.js","../node_modules/@mui/material/ListItemText/ListItemText.js","../node_modules/@mui/material/ListItemIcon/ListItemIcon.js","../node_modules/@mui/material/Pagination/paginationClasses.js","../node_modules/@mui/material/usePagination/usePagination.js","../node_modules/@mui/material/PaginationItem/paginationItemClasses.js","../node_modules/@mui/material/internal/svg-icons/FirstPage.js","../node_modules/@mui/material/internal/svg-icons/LastPage.js","../node_modules/@mui/material/internal/svg-icons/NavigateBefore.js","../node_modules/@mui/material/internal/svg-icons/NavigateNext.js","../node_modules/@mui/material/PaginationItem/PaginationItem.js","../node_modules/@mui/material/Pagination/Pagination.js","../node_modules/@mui/material/Zoom/Zoom.js","../node_modules/@mui/material/SpeedDial/speedDialClasses.js","../node_modules/@mui/material/SpeedDial/SpeedDial.js","../node_modules/@mui/material/internal/svg-icons/Add.js","../node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses.js","../node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.js","../node_modules/@mui/material/SpeedDialAction/speedDialActionClasses.js","../node_modules/@mui/material/SpeedDialAction/SpeedDialAction.js","../node_modules/@mui/material/Stepper/stepperClasses.js","../node_modules/@mui/material/Stepper/StepperContext.js","../node_modules/@mui/material/Step/StepContext.js","../node_modules/@mui/material/StepConnector/stepConnectorClasses.js","../node_modules/@mui/material/StepConnector/StepConnector.js","../node_modules/@mui/material/Stepper/Stepper.js","../node_modules/@mui/material/Step/stepClasses.js","../node_modules/@mui/material/Step/Step.js","../node_modules/@mui/material/internal/svg-icons/CheckCircle.js","../node_modules/@mui/material/internal/svg-icons/Warning.js","../node_modules/@mui/material/StepIcon/stepIconClasses.js","../node_modules/@mui/material/StepIcon/StepIcon.js","../node_modules/@mui/material/StepLabel/stepLabelClasses.js","../node_modules/@mui/material/StepLabel/StepLabel.js","../node_modules/@mui/material/Tab/tabClasses.js","../node_modules/@mui/material/Tab/Tab.js","../node_modules/@mui/utils/scrollLeft/scrollLeft.js","../node_modules/@mui/material/internal/animate.js","../node_modules/@mui/material/Tabs/ScrollbarSize.js","../node_modules/@mui/material/internal/svg-icons/KeyboardArrowLeft.js","../node_modules/@mui/material/internal/svg-icons/KeyboardArrowRight.js","../node_modules/@mui/material/TabScrollButton/tabScrollButtonClasses.js","../node_modules/@mui/material/TabScrollButton/TabScrollButton.js","../node_modules/@mui/material/Tabs/tabsClasses.js","../node_modules/@mui/material/Tabs/Tabs.js","../node_modules/@mui/material/internal/svg-icons/Person.js","../node_modules/@mui/material/Avatar/avatarClasses.js","../node_modules/@mui/material/Avatar/Avatar.js","../node_modules/@mui/material/Badge/badgeClasses.js","../node_modules/@mui/material/Badge/Badge.js","../node_modules/@mui/base/useBadge/useBadge.js","../node_modules/@mui/material/ListItemButton/ListItemButton.js","../node_modules/@mui/material/TableContainer/tableContainerClasses.js","../node_modules/@mui/material/TableContainer/TableContainer.js","../node_modules/@mui/material/Table/TableContext.js","../node_modules/@mui/material/Table/tableClasses.js","../node_modules/@mui/material/Table/Table.js","../node_modules/@mui/material/Table/Tablelvl2Context.js","../node_modules/@mui/material/TableHead/tableHeadClasses.js","../node_modules/@mui/material/TableHead/TableHead.js","../node_modules/@mui/material/TableRow/tableRowClasses.js","../node_modules/@mui/material/TableRow/TableRow.js","../node_modules/@mui/material/TableCell/tableCellClasses.js","../node_modules/@mui/material/TableCell/TableCell.js","../node_modules/@mui/material/TableBody/tableBodyClasses.js","../node_modules/@mui/material/TableBody/TableBody.js","../node_modules/@mui/material/Alert/alertClasses.js","../node_modules/@mui/material/internal/svg-icons/SuccessOutlined.js","../node_modules/@mui/material/internal/svg-icons/ReportProblemOutlined.js","../node_modules/@mui/material/internal/svg-icons/ErrorOutline.js","../node_modules/@mui/material/internal/svg-icons/InfoOutlined.js","../node_modules/@mui/material/Alert/Alert.js","../node_modules/@mui/material/CircularProgress/circularProgressClasses.js","../node_modules/@mui/material/CircularProgress/CircularProgress.js","../node_modules/@mui/material/DialogTitle/dialogTitleClasses.js","../node_modules/@mui/material/Dialog/DialogContext.js","../node_modules/@mui/material/DialogTitle/DialogTitle.js","../node_modules/@mui/material/DialogContent/dialogContentClasses.js","../node_modules/@mui/material/DialogContent/DialogContent.js","../node_modules/@mui/material/DialogActions/dialogActionsClasses.js","../node_modules/@mui/material/DialogActions/DialogActions.js","../node_modules/@mui/material/Dialog/dialogClasses.js","../node_modules/@mui/material/Dialog/Dialog.js","../node_modules/@mui/material/DialogContentText/dialogContentTextClasses.js","../node_modules/@mui/material/DialogContentText/DialogContentText.js","../node_modules/@mui/material/LinearProgress/linearProgressClasses.js","../node_modules/@mui/material/LinearProgress/LinearProgress.js","../node_modules/@mui/material/styles/cssUtils.js","../node_modules/@mui/material/Skeleton/skeletonClasses.js","../node_modules/@mui/material/Skeleton/Skeleton.js","../node_modules/@mui/base/ClickAwayListener/ClickAwayListener.js","../node_modules/@mui/material/SnackbarContent/snackbarContentClasses.js","../node_modules/@mui/material/SnackbarContent/SnackbarContent.js","../node_modules/@mui/material/Snackbar/snackbarClasses.js","../node_modules/@mui/material/Snackbar/Snackbar.js","../node_modules/@mui/base/useSnackbar/useSnackbar.js","../node_modules/@mui/icons-material/esm/ExpandMore.js","../node_modules/@mui/icons-material/esm/Menu.js","../node_modules/@mui/icons-material/esm/Add.js","../node_modules/@mui/icons-material/esm/Edit.js","../node_modules/@mui/icons-material/esm/Delete.js","../node_modules/@mui/icons-material/esm/FavoriteBorder.js","../node_modules/@mui/icons-material/esm/Favorite.js","../node_modules/@mui/icons-material/esm/FormatAlignLeft.js","../node_modules/@mui/icons-material/esm/FormatAlignCenter.js","../node_modules/@mui/icons-material/esm/FormatAlignRight.js","../node_modules/@mui/icons-material/esm/FormatAlignJustify.js","../node_modules/@mui/icons-material/esm/Restore.js","../node_modules/@mui/icons-material/esm/LocationOn.js","../node_modules/@mui/icons-material/esm/ContentCut.js","../node_modules/@mui/icons-material/esm/ContentCopy.js","../node_modules/@mui/icons-material/esm/ContentPaste.js","../node_modules/@mui/icons-material/esm/Cloud.js","../node_modules/@mui/icons-material/esm/Save.js","../node_modules/@mui/icons-material/esm/Share.js","../node_modules/@mui/icons-material/esm/Print.js","../node_modules/@mui/icons-material/esm/Mail.js","../node_modules/@mui/icons-material/esm/Inbox.js","../node_modules/@mui/icons-material/esm/Drafts.js","../node_modules/@react-buddy/palette-mui/palette.tsx"],"sourcesContent":["/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"component\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport styled from '@mui/styled-engine';\nimport styleFunctionSx, { extendSxProp } from './styleFunctionSx';\nimport useTheme from './useTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createBox(options = {}) {\n const {\n themeId,\n defaultTheme,\n defaultClassName = 'MuiBox-root',\n generateClassName\n } = options;\n const BoxRoot = styled('div', {\n shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'\n })(styleFunctionSx);\n const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {\n const theme = useTheme(defaultTheme);\n const _extendSxProp = extendSxProp(inProps),\n {\n className,\n component = 'div'\n } = _extendSxProp,\n other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded);\n return /*#__PURE__*/_jsx(BoxRoot, _extends({\n as: component,\n ref: ref,\n className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),\n theme: themeId ? theme[themeId] || theme : theme\n }, other));\n });\n return Box;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nconst boxClasses = generateUtilityClasses('MuiBox', ['root']);\nexport default boxClasses;","'use client';\n\nimport { createBox } from '@mui/system';\nimport PropTypes from 'prop-types';\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '../className';\nimport { createTheme } from '../styles';\nimport THEME_ID from '../styles/identifier';\nimport boxClasses from './boxClasses';\nconst defaultTheme = createTheme();\nconst Box = createBox({\n themeId: THEME_ID,\n defaultTheme,\n defaultClassName: boxClasses.root,\n generateClassName: ClassNameGenerator.generate\n});\nprocess.env.NODE_ENV !== \"production\" ? Box.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Box;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\nimport styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from './createTheme';\nimport styleFunctionSx from './styleFunctionSx';\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport const systemDefaultTheme = createTheme();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle(_extends({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, _extends({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = _objectWithoutPropertiesLoose(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props(_extends({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style(_extends({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return styleFunctionSx(_extends({}, props, {\n theme: resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = _objectWithoutPropertiesLoose(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, _extends({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || isPlainObject(stylesArg)) {\n return props => processStyleArg(stylesArg, _extends({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, _extends({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${capitalize(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}","import createStyled from './createStyled';\nconst styled = createStyled();\nexport default styled;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"disableGutters\", \"fixed\", \"maxWidth\", \"classes\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport useThemePropsSystem from '../useThemeProps';\nimport systemStyled from '../styled';\nimport createTheme from '../createTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultTheme = createTheme();\nconst defaultCreateStyledComponent = systemStyled('div', {\n name: 'MuiContainer',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];\n }\n});\nconst useThemePropsDefault = inProps => useThemePropsSystem({\n props: inProps,\n name: 'MuiContainer',\n defaultTheme\n});\nconst useUtilityClasses = (ownerState, componentName) => {\n const getContainerUtilityClass = slot => {\n return generateUtilityClass(componentName, slot);\n };\n const {\n classes,\n fixed,\n disableGutters,\n maxWidth\n } = ownerState;\n const slots = {\n root: ['root', maxWidth && `maxWidth${capitalize(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']\n };\n return composeClasses(slots, getContainerUtilityClass, classes);\n};\nexport default function createContainer(options = {}) {\n const {\n // This will allow adding custom styled fn (for example for custom sx style function)\n createStyledComponent = defaultCreateStyledComponent,\n useThemeProps = useThemePropsDefault,\n componentName = 'MuiContainer'\n } = options;\n const ContainerRoot = createStyledComponent(({\n theme,\n ownerState\n }) => _extends({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n display: 'block'\n }, !ownerState.disableGutters && {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }\n }), ({\n theme,\n ownerState\n }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {\n const breakpoint = breakpointValueKey;\n const value = theme.breakpoints.values[breakpoint];\n if (value !== 0) {\n // @ts-ignore\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: `${value}${theme.breakpoints.unit}`\n };\n }\n return acc;\n }, {}), ({\n theme,\n ownerState\n }) => _extends({}, ownerState.maxWidth === 'xs' && {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up('xs')]: {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }\n }, ownerState.maxWidth &&\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ownerState.maxWidth !== 'xs' && {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up(ownerState.maxWidth)]: {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`\n }\n }));\n const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {\n const props = useThemeProps(inProps);\n const {\n className,\n component = 'div',\n disableGutters = false,\n fixed = false,\n maxWidth = 'lg'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n disableGutters,\n fixed,\n maxWidth\n });\n\n // @ts-ignore module augmentation fails if custom breakpoints are used\n const classes = useUtilityClasses(ownerState, componentName);\n return (\n /*#__PURE__*/\n // @ts-ignore theme is injected by the styled util\n _jsx(ContainerRoot, _extends({\n as: component\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other))\n );\n });\n process.env.NODE_ENV !== \"production\" ? Container.propTypes /* remove-proptypes */ = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n component: PropTypes.elementType,\n disableGutters: PropTypes.bool,\n fixed: PropTypes.bool,\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n } : void 0;\n return Container;\n}","'use client';\n\nimport PropTypes from 'prop-types';\nimport { createContainer } from '@mui/system';\nimport capitalize from '../utils/capitalize';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nconst Container = createContainer({\n createStyledComponent: styled('div', {\n name: 'MuiContainer',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];\n }\n }),\n useThemeProps: inProps => useThemeProps({\n props: inProps,\n name: 'MuiContainer'\n })\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n * @default false\n */\n fixed: PropTypes.bool,\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n * @default 'lg'\n */\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Container;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"component\", \"direction\", \"spacing\", \"divider\", \"children\", \"className\", \"useFlexGap\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport deepmerge from '@mui/utils/deepmerge';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport composeClasses from '@mui/utils/composeClasses';\nimport systemStyled from '../styled';\nimport useThemePropsSystem from '../useThemeProps';\nimport { extendSxProp } from '../styleFunctionSx';\nimport createTheme from '../createTheme';\nimport { handleBreakpoints, mergeBreakpointsInOrder, resolveBreakpointValues } from '../breakpoints';\nimport { createUnarySpacing, getValue } from '../spacing';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultTheme = createTheme();\n// widening Theme to any so that the consumer can own the theme structure.\nconst defaultCreateStyledComponent = systemStyled('div', {\n name: 'MuiStack',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n});\nfunction useThemePropsDefault(props) {\n return useThemePropsSystem({\n props,\n name: 'MuiStack',\n defaultTheme\n });\n}\n\n/**\n * Return an array with the separator React element interspersed between\n * each React node of the input children.\n *\n * > joinChildren([1,2,3], 0)\n * [1,0,2,0,3]\n */\nfunction joinChildren(children, separator) {\n const childrenArray = React.Children.toArray(children).filter(Boolean);\n return childrenArray.reduce((output, child, index) => {\n output.push(child);\n if (index < childrenArray.length - 1) {\n output.push( /*#__PURE__*/React.cloneElement(separator, {\n key: `separator-${index}`\n }));\n }\n return output;\n }, []);\n}\nconst getSideFromDirection = direction => {\n return {\n row: 'Left',\n 'row-reverse': 'Right',\n column: 'Top',\n 'column-reverse': 'Bottom'\n }[direction];\n};\nexport const style = ({\n ownerState,\n theme\n}) => {\n let styles = _extends({\n display: 'flex',\n flexDirection: 'column'\n }, handleBreakpoints({\n theme\n }, resolveBreakpointValues({\n values: ownerState.direction,\n breakpoints: theme.breakpoints.values\n }), propValue => ({\n flexDirection: propValue\n })));\n if (ownerState.spacing) {\n const transformer = createUnarySpacing(theme);\n const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {\n if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {\n acc[breakpoint] = true;\n }\n return acc;\n }, {});\n const directionValues = resolveBreakpointValues({\n values: ownerState.direction,\n base\n });\n const spacingValues = resolveBreakpointValues({\n values: ownerState.spacing,\n base\n });\n if (typeof directionValues === 'object') {\n Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {\n const directionValue = directionValues[breakpoint];\n if (!directionValue) {\n const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';\n directionValues[breakpoint] = previousDirectionValue;\n }\n });\n }\n const styleFromPropValue = (propValue, breakpoint) => {\n if (ownerState.useFlexGap) {\n return {\n gap: getValue(transformer, propValue)\n };\n }\n return {\n // The useFlexGap={false} implement relies on each child to give up control of the margin.\n // We need to reset the margin to avoid double spacing.\n '& > :not(style):not(style)': {\n margin: 0\n },\n '& > :not(style) ~ :not(style)': {\n [`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: getValue(transformer, propValue)\n }\n };\n };\n styles = deepmerge(styles, handleBreakpoints({\n theme\n }, spacingValues, styleFromPropValue));\n }\n styles = mergeBreakpointsInOrder(theme.breakpoints, styles);\n return styles;\n};\nexport default function createStack(options = {}) {\n const {\n // This will allow adding custom styled fn (for example for custom sx style function)\n createStyledComponent = defaultCreateStyledComponent,\n useThemeProps = useThemePropsDefault,\n componentName = 'MuiStack'\n } = options;\n const useUtilityClasses = () => {\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});\n };\n const StackRoot = createStyledComponent(style);\n const Stack = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {\n const themeProps = useThemeProps(inProps);\n const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.\n const {\n component = 'div',\n direction = 'column',\n spacing = 0,\n divider,\n children,\n className,\n useFlexGap = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = {\n direction,\n spacing,\n useFlexGap\n };\n const classes = useUtilityClasses();\n return /*#__PURE__*/_jsx(StackRoot, _extends({\n as: component,\n ownerState: ownerState,\n ref: ref,\n className: clsx(classes.root, className)\n }, other, {\n children: divider ? joinChildren(children, divider) : children\n }));\n });\n process.env.NODE_ENV !== \"production\" ? Stack.propTypes /* remove-proptypes */ = {\n children: PropTypes.node,\n direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),\n divider: PropTypes.node,\n spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n } : void 0;\n return Stack;\n}","'use client';\n\nimport PropTypes from 'prop-types';\nimport { createStack } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nconst Stack = createStack({\n createStyledComponent: styled('div', {\n name: 'MuiStack',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n }),\n useThemeProps: inProps => useThemeProps({\n props: inProps,\n name: 'MuiStack'\n })\n});\nprocess.env.NODE_ENV !== \"production\" ? Stack.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'column'\n */\n direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),\n /**\n * Add an element between each child.\n */\n divider: PropTypes.node,\n /**\n * Defines the space between immediate children.\n * @default 0\n */\n spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * The system prop, which allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.\n *\n * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),\n * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.\n *\n * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.\n * @default false\n */\n useFlexGap: PropTypes.bool\n} : void 0;\nexport default Stack;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDividerUtilityClass(slot) {\n return generateUtilityClass('MuiDivider', slot);\n}\nconst dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);\nexport default dividerClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"absolute\", \"children\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"textAlign\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDividerUtilityClass } from './dividerClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n absolute,\n children,\n classes,\n flexItem,\n light,\n orientation,\n textAlign,\n variant\n } = ownerState;\n const slots = {\n root: ['root', absolute && 'absolute', variant, light && 'light', orientation === 'vertical' && 'vertical', flexItem && 'flexItem', children && 'withChildren', children && orientation === 'vertical' && 'withChildrenVertical', textAlign === 'right' && orientation !== 'vertical' && 'textAlignRight', textAlign === 'left' && orientation !== 'vertical' && 'textAlignLeft'],\n wrapper: ['wrapper', orientation === 'vertical' && 'wrapperVertical']\n };\n return composeClasses(slots, getDividerUtilityClass, classes);\n};\nconst DividerRoot = styled('div', {\n name: 'MuiDivider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.absolute && styles.absolute, styles[ownerState.variant], ownerState.light && styles.light, ownerState.orientation === 'vertical' && styles.vertical, ownerState.flexItem && styles.flexItem, ownerState.children && styles.withChildren, ownerState.children && ownerState.orientation === 'vertical' && styles.withChildrenVertical, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && styles.textAlignRight, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && styles.textAlignLeft];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n margin: 0,\n // Reset browser default style.\n flexShrink: 0,\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: (theme.vars || theme).palette.divider,\n borderBottomWidth: 'thin'\n}, ownerState.absolute && {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n}, ownerState.light && {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.dividerChannel} / 0.08)` : alpha(theme.palette.divider, 0.08)\n}, ownerState.variant === 'inset' && {\n marginLeft: 72\n}, ownerState.variant === 'middle' && ownerState.orientation === 'horizontal' && {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n}, ownerState.variant === 'middle' && ownerState.orientation === 'vertical' && {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n}, ownerState.orientation === 'vertical' && {\n height: '100%',\n borderBottomWidth: 0,\n borderRightWidth: 'thin'\n}, ownerState.flexItem && {\n alignSelf: 'stretch',\n height: 'auto'\n}), ({\n ownerState\n}) => _extends({}, ownerState.children && {\n display: 'flex',\n whiteSpace: 'nowrap',\n textAlign: 'center',\n border: 0,\n '&::before, &::after': {\n content: '\"\"',\n alignSelf: 'center'\n }\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.children && ownerState.orientation !== 'vertical' && {\n '&::before, &::after': {\n width: '100%',\n borderTop: `thin solid ${(theme.vars || theme).palette.divider}`\n }\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.children && ownerState.orientation === 'vertical' && {\n flexDirection: 'column',\n '&::before, &::after': {\n height: '100%',\n borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`\n }\n}), ({\n ownerState\n}) => _extends({}, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && {\n '&::before': {\n width: '90%'\n },\n '&::after': {\n width: '10%'\n }\n}, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && {\n '&::before': {\n width: '10%'\n },\n '&::after': {\n width: '90%'\n }\n}));\nconst DividerWrapper = styled('span', {\n name: 'MuiDivider',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'inline-block',\n paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,\n paddingRight: `calc(${theme.spacing(1)} * 1.2)`\n}, ownerState.orientation === 'vertical' && {\n paddingTop: `calc(${theme.spacing(1)} * 1.2)`,\n paddingBottom: `calc(${theme.spacing(1)} * 1.2)`\n}));\nconst Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDivider'\n });\n const {\n absolute = false,\n children,\n className,\n component = children ? 'div' : 'hr',\n flexItem = false,\n light = false,\n orientation = 'horizontal',\n role = component !== 'hr' ? 'separator' : undefined,\n textAlign = 'center',\n variant = 'fullWidth'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n absolute,\n component,\n flexItem,\n light,\n orientation,\n role,\n textAlign,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DividerRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n role: role,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: children ? /*#__PURE__*/_jsx(DividerWrapper, {\n className: classes.wrapper,\n ownerState: ownerState,\n children: children\n }) : null\n }));\n});\n\n/**\n * The following flag is used to ensure that this component isn't tabbable i.e.\n * does not get highlight/focus inside of MUI List.\n */\nDivider.muiSkipListHighlight = true;\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Absolutely position the element.\n * @default false\n */\n absolute: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n * @default false\n */\n flexItem: PropTypes.bool,\n /**\n * If `true`, the divider will have a lighter color.\n * @default false\n * @deprecated Use (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)\n */\n light: PropTypes.bool,\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * @ignore\n */\n role: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The text alignment.\n * @default 'center'\n */\n textAlign: PropTypes.oneOf(['center', 'left', 'right']),\n /**\n * The variant to use.\n * @default 'fullWidth'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['fullWidth', 'inset', 'middle']), PropTypes.string])\n} : void 0;\nexport default Divider;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst GridContext = /*#__PURE__*/React.createContext();\nif (process.env.NODE_ENV !== 'production') {\n GridContext.displayName = 'GridContext';\n}\nexport default GridContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getGridUtilityClass(slot) {\n return generateUtilityClass('MuiGrid', slot);\n}\nconst SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];\nconst WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];\nconst GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nconst gridClasses = generateUtilityClasses('MuiGrid', ['root', 'container', 'item', 'zeroMinWidth',\n// spacings\n...SPACINGS.map(spacing => `spacing-xs-${spacing}`),\n// direction values\n...DIRECTIONS.map(direction => `direction-xs-${direction}`),\n// wrap values\n...WRAPS.map(wrap => `wrap-xs-${wrap}`),\n// grid sizes for all breakpoints\n...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);\nexport default gridClasses;","'use client';\n\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"columns\", \"columnSpacing\", \"component\", \"container\", \"direction\", \"item\", \"rowSpacing\", \"spacing\", \"wrap\", \"zeroMinWidth\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';\nimport { extendSxProp } from '@mui/system/styleFunctionSx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport requirePropFactory from '../utils/requirePropFactory';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport GridContext from './GridContext';\nimport gridClasses, { getGridUtilityClass } from './gridClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getOffset(val) {\n const parse = parseFloat(val);\n return `${parse}${String(val).replace(String(parse), '') || 'px'}`;\n}\nexport function generateGrid({\n theme,\n ownerState\n}) {\n let size;\n return theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n let styles = {};\n if (ownerState[breakpoint]) {\n size = ownerState[breakpoint];\n }\n if (!size) {\n return globalStyles;\n }\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = resolveBreakpointValues({\n values: ownerState.columns,\n breakpoints: theme.breakpoints.values\n });\n const columnValue = typeof columnsBreakpointValues === 'object' ? columnsBreakpointValues[breakpoint] : columnsBreakpointValues;\n if (columnValue === undefined || columnValue === null) {\n return globalStyles;\n }\n // Keep 7 significant numbers.\n const width = `${Math.round(size / columnValue * 10e7) / 10e5}%`;\n let more = {};\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n }\n\n // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n styles = _extends({\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n }, more);\n }\n\n // No need for a media query for the first size.\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n return globalStyles;\n }, {});\n}\nexport function generateDirection({\n theme,\n ownerState\n}) {\n const directionValues = resolveBreakpointValues({\n values: ownerState.direction,\n breakpoints: theme.breakpoints.values\n });\n return handleBreakpoints({\n theme\n }, directionValues, propValue => {\n const output = {\n flexDirection: propValue\n };\n if (propValue.indexOf('column') === 0) {\n output[`& > .${gridClasses.item}`] = {\n maxWidth: 'none'\n };\n }\n return output;\n });\n}\n\n/**\n * Extracts zero value breakpoint keys before a non-zero value breakpoint key.\n * @example { xs: 0, sm: 0, md: 2, lg: 0, xl: 0 } or [0, 0, 2, 0, 0]\n * @returns [xs, sm]\n */\nfunction extractZeroValueBreakpointKeys({\n breakpoints,\n values\n}) {\n let nonZeroKey = '';\n Object.keys(values).forEach(key => {\n if (nonZeroKey !== '') {\n return;\n }\n if (values[key] !== 0) {\n nonZeroKey = key;\n }\n });\n const sortedBreakpointKeysByValue = Object.keys(breakpoints).sort((a, b) => {\n return breakpoints[a] - breakpoints[b];\n });\n return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));\n}\nexport function generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n if (container && rowSpacing !== 0) {\n const rowSpacingValues = resolveBreakpointValues({\n values: rowSpacing,\n breakpoints: theme.breakpoints.values\n });\n let zeroValueBreakpointKeys;\n if (typeof rowSpacingValues === 'object') {\n zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({\n breakpoints: theme.breakpoints.values,\n values: rowSpacingValues\n });\n }\n styles = handleBreakpoints({\n theme\n }, rowSpacingValues, (propValue, breakpoint) => {\n var _zeroValueBreakpointK;\n const themeSpacing = theme.spacing(propValue);\n if (themeSpacing !== '0px') {\n return {\n marginTop: `-${getOffset(themeSpacing)}`,\n [`& > .${gridClasses.item}`]: {\n paddingTop: getOffset(themeSpacing)\n }\n };\n }\n if ((_zeroValueBreakpointK = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK.includes(breakpoint)) {\n return {};\n }\n return {\n marginTop: 0,\n [`& > .${gridClasses.item}`]: {\n paddingTop: 0\n }\n };\n });\n }\n return styles;\n}\nexport function generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n if (container && columnSpacing !== 0) {\n const columnSpacingValues = resolveBreakpointValues({\n values: columnSpacing,\n breakpoints: theme.breakpoints.values\n });\n let zeroValueBreakpointKeys;\n if (typeof columnSpacingValues === 'object') {\n zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({\n breakpoints: theme.breakpoints.values,\n values: columnSpacingValues\n });\n }\n styles = handleBreakpoints({\n theme\n }, columnSpacingValues, (propValue, breakpoint) => {\n var _zeroValueBreakpointK2;\n const themeSpacing = theme.spacing(propValue);\n if (themeSpacing !== '0px') {\n return {\n width: `calc(100% + ${getOffset(themeSpacing)})`,\n marginLeft: `-${getOffset(themeSpacing)}`,\n [`& > .${gridClasses.item}`]: {\n paddingLeft: getOffset(themeSpacing)\n }\n };\n }\n if ((_zeroValueBreakpointK2 = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK2.includes(breakpoint)) {\n return {};\n }\n return {\n width: '100%',\n marginLeft: 0,\n [`& > .${gridClasses.item}`]: {\n paddingLeft: 0\n }\n };\n });\n }\n return styles;\n}\nexport function resolveSpacingStyles(spacing, breakpoints, styles = {}) {\n // undefined/null or `spacing` <= 0\n if (!spacing || spacing <= 0) {\n return [];\n }\n // in case of string/number `spacing`\n if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {\n return [styles[`spacing-xs-${String(spacing)}`]];\n }\n // in case of object `spacing`\n const spacingStyles = [];\n breakpoints.forEach(breakpoint => {\n const value = spacing[breakpoint];\n if (Number(value) > 0) {\n spacingStyles.push(styles[`spacing-${breakpoint}-${String(value)}`]);\n }\n });\n return spacingStyles;\n}\n\n// Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\nconst GridRoot = styled('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n const {\n container,\n direction,\n item,\n spacing,\n wrap,\n zeroMinWidth,\n breakpoints\n } = ownerState;\n let spacingStyles = [];\n\n // in case of grid item\n if (container) {\n spacingStyles = resolveSpacingStyles(spacing, breakpoints, styles);\n }\n const breakpointsStyles = [];\n breakpoints.forEach(breakpoint => {\n const value = ownerState[breakpoint];\n if (value) {\n breakpointsStyles.push(styles[`grid-${breakpoint}-${String(value)}`]);\n }\n });\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, ...spacingStyles, direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], ...breakpointsStyles];\n }\n})(({\n ownerState\n}) => _extends({\n boxSizing: 'border-box'\n}, ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n}, ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n}, ownerState.zeroMinWidth && {\n minWidth: 0\n}, ownerState.wrap !== 'wrap' && {\n flexWrap: ownerState.wrap\n}), generateDirection, generateRowGap, generateColumnGap, generateGrid);\nexport function resolveSpacingClasses(spacing, breakpoints) {\n // undefined/null or `spacing` <= 0\n if (!spacing || spacing <= 0) {\n return [];\n }\n // in case of string/number `spacing`\n if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {\n return [`spacing-xs-${String(spacing)}`];\n }\n // in case of object `spacing`\n const classes = [];\n breakpoints.forEach(breakpoint => {\n const value = spacing[breakpoint];\n if (Number(value) > 0) {\n const className = `spacing-${breakpoint}-${String(value)}`;\n classes.push(className);\n }\n });\n return classes;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n spacing,\n wrap,\n zeroMinWidth,\n breakpoints\n } = ownerState;\n let spacingClasses = [];\n\n // in case of grid item\n if (container) {\n spacingClasses = resolveSpacingClasses(spacing, breakpoints);\n }\n const breakpointsClasses = [];\n breakpoints.forEach(breakpoint => {\n const value = ownerState[breakpoint];\n if (value) {\n breakpointsClasses.push(`grid-${breakpoint}-${String(value)}`);\n }\n });\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', ...spacingClasses, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...breakpointsClasses]\n };\n return composeClasses(slots, getGridUtilityClass, classes);\n};\nconst Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiGrid'\n });\n const {\n breakpoints\n } = useTheme();\n const props = extendSxProp(themeProps);\n const {\n className,\n columns: columnsProp,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n rowSpacing: rowSpacingProp,\n spacing = 0,\n wrap = 'wrap',\n zeroMinWidth = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columnsContext = React.useContext(GridContext);\n\n // columns set with default breakpoint unit of 12\n const columns = container ? columnsProp || 12 : columnsContext;\n const breakpointsValues = {};\n const otherFiltered = _extends({}, other);\n breakpoints.keys.forEach(breakpoint => {\n if (other[breakpoint] != null) {\n breakpointsValues[breakpoint] = other[breakpoint];\n delete otherFiltered[breakpoint];\n }\n });\n const ownerState = _extends({}, props, {\n columns,\n container,\n direction,\n item,\n rowSpacing,\n columnSpacing,\n wrap,\n zeroMinWidth,\n spacing\n }, breakpointsValues, {\n breakpoints: breakpoints.keys\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(GridContext.Provider, {\n value: columns,\n children: /*#__PURE__*/_jsx(GridRoot, _extends({\n ownerState: ownerState,\n className: clsx(classes.root, className),\n as: component,\n ref: ref\n }, otherFiltered))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grid.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The number of columns.\n * @default 12\n */\n columns: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: PropTypes.bool,\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: PropTypes.bool,\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n */\n wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `xl` breakpoint and wider screens if not overridden.\n * @default false\n */\n xl: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n const requireProp = requirePropFactory('Grid', Grid);\n // eslint-disable-next-line no-useless-concat\n Grid['propTypes' + ''] = _extends({}, Grid.propTypes, {\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\nexport default Grid;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nconst getOverlayAlpha = elevation => {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return (alphaValue / 100).toFixed(2);\n};\nexport default getOverlayAlpha;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"elevation\", \"square\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport styled from '../styles/styled';\nimport getOverlayAlpha from '../styles/getOverlayAlpha';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport { getPaperUtilityClass } from './paperClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$overlays;\n return _extends({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n }, !ownerState.square && {\n borderRadius: theme.shape.borderRadius\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }, ownerState.variant === 'elevation' && _extends({\n boxShadow: (theme.vars || theme).shadows[ownerState.elevation]\n }, !theme.vars && theme.palette.mode === 'dark' && {\n backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`\n }, theme.vars && {\n backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]\n }));\n});\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n elevation,\n square,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const theme = useTheme();\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getImageListUtilityClass(slot) {\n return generateUtilityClass('MuiImageList', slot);\n}\nconst imageListClasses = generateUtilityClasses('MuiImageList', ['root', 'masonry', 'quilted', 'standard', 'woven']);\nexport default imageListClasses;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\nconst ImageListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ImageListContext.displayName = 'ImageListContext';\n}\nexport default ImageListContext;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"cols\", \"component\", \"rowHeight\", \"gap\", \"style\", \"variant\"];\nimport composeClasses from '@mui/utils/composeClasses';\nimport integerPropType from '@mui/utils/integerPropType';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getImageListUtilityClass } from './imageListClasses';\nimport ImageListContext from './ImageListContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant\n } = ownerState;\n const slots = {\n root: ['root', variant]\n };\n return composeClasses(slots, getImageListUtilityClass, classes);\n};\nconst ImageListRoot = styled('ul', {\n name: 'MuiImageList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant]];\n }\n})(({\n ownerState\n}) => {\n return _extends({\n display: 'grid',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n }, ownerState.variant === 'masonry' && {\n display: 'block'\n });\n});\nconst ImageList = /*#__PURE__*/React.forwardRef(function ImageList(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiImageList'\n });\n const {\n children,\n className,\n cols = 2,\n component = 'ul',\n rowHeight = 'auto',\n gap = 4,\n style: styleProp,\n variant = 'standard'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const contextValue = React.useMemo(() => ({\n rowHeight,\n gap,\n variant\n }), [rowHeight, gap, variant]);\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production') {\n // Detect Internet Explorer 8+\n if (document !== undefined && 'objectFit' in document.documentElement.style === false) {\n console.error(['MUI: ImageList v5+ no longer natively supports Internet Explorer.', 'Use v4 of this component instead, or polyfill CSS object-fit.'].join('\\n'));\n }\n }\n }, []);\n const style = variant === 'masonry' ? _extends({\n columnCount: cols,\n columnGap: gap\n }, styleProp) : _extends({\n gridTemplateColumns: `repeat(${cols}, 1fr)`,\n gap\n }, styleProp);\n const ownerState = _extends({}, props, {\n component,\n gap,\n rowHeight,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ImageListRoot, _extends({\n as: component,\n className: clsx(classes.root, classes[variant], className),\n ref: ref,\n style: style,\n ownerState: ownerState\n }, other, {\n children: /*#__PURE__*/_jsx(ImageListContext.Provider, {\n value: contextValue,\n children: children\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageList.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally `ImageListItem`s.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.node.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * Number of columns.\n * @default 2\n */\n cols: integerPropType,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The gap between items in px.\n * @default 4\n */\n gap: PropTypes.number,\n /**\n * The height of one row in px.\n * @default 'auto'\n */\n rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'standard'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['masonry', 'quilted', 'standard', 'woven']), PropTypes.string])\n} : void 0;\nexport default ImageList;","import isMuiElement from '@mui/utils/isMuiElement';\nexport default isMuiElement;","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n var _muiName, _element$type;\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getImageListItemUtilityClass(slot) {\n return generateUtilityClass('MuiImageListItem', slot);\n}\nconst imageListItemClasses = generateUtilityClasses('MuiImageListItem', ['root', 'img', 'standard', 'woven', 'masonry', 'quilted']);\nexport default imageListItemClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"cols\", \"component\", \"rows\", \"style\"];\nimport composeClasses from '@mui/utils/composeClasses';\nimport integerPropType from '@mui/utils/integerPropType';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport ImageListContext from '../ImageList/ImageListContext';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport isMuiElement from '../utils/isMuiElement';\nimport imageListItemClasses, { getImageListItemUtilityClass } from './imageListItemClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant\n } = ownerState;\n const slots = {\n root: ['root', variant],\n img: ['img']\n };\n return composeClasses(slots, getImageListItemUtilityClass, classes);\n};\nconst ImageListItemRoot = styled('li', {\n name: 'MuiImageListItem',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${imageListItemClasses.img}`]: styles.img\n }, styles.root, styles[ownerState.variant]];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'block',\n position: 'relative'\n}, ownerState.variant === 'standard' && {\n // For titlebar under list item\n display: 'flex',\n flexDirection: 'column'\n}, ownerState.variant === 'woven' && {\n height: '100%',\n alignSelf: 'center',\n '&:nth-of-type(even)': {\n height: '70%'\n }\n}, {\n [`& .${imageListItemClasses.img}`]: _extends({\n objectFit: 'cover',\n width: '100%',\n height: '100%',\n display: 'block'\n }, ownerState.variant === 'standard' && {\n height: 'auto',\n flexGrow: 1\n })\n}));\nconst ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiImageListItem'\n });\n\n // TODO: - Use jsdoc @default?: \"cols rows default values are for docs only\"\n const {\n children,\n className,\n cols = 1,\n component = 'li',\n rows = 1,\n style\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n rowHeight = 'auto',\n gap,\n variant\n } = React.useContext(ImageListContext);\n let height = 'auto';\n if (variant === 'woven') {\n height = undefined;\n } else if (rowHeight !== 'auto') {\n height = rowHeight * rows + gap * (rows - 1);\n }\n const ownerState = _extends({}, props, {\n cols,\n component,\n gap,\n rowHeight,\n rows,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ImageListItemRoot, _extends({\n as: component,\n className: clsx(classes.root, classes[variant], className),\n ref: ref,\n style: _extends({\n height,\n gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,\n gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,\n marginBottom: variant === 'masonry' ? gap : undefined,\n breakInside: variant === 'masonry' ? 'avoid' : undefined\n }, style),\n ownerState: ownerState\n }, other, {\n children: React.Children.map(children, child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The ImageListItem component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n className: clsx(classes.img, child.props.className)\n });\n }\n return child;\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally an ``.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * Width of the item in number of grid columns.\n * @default 1\n */\n cols: integerPropType,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Height of the item in number of grid rows.\n * @default 1\n */\n rows: integerPropType,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ImageListItem;","import useThemeProps from '../styles/useThemeProps';\nexport { default as styled } from '../styles/styled';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function createUseThemeProps(name) {\n return useThemeProps;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCollapseUtilityClass(slot) {\n return generateUtilityClass('MuiCollapse', slot);\n}\nconst collapseClasses = generateUtilityClasses('MuiCollapse', ['root', 'horizontal', 'vertical', 'entered', 'hidden', 'wrapper', 'wrapperInner']);\nexport default collapseClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"addEndListener\", \"children\", \"className\", \"collapsedSize\", \"component\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"orientation\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { duration } from '../styles/createTransitions';\nimport { getTransitionProps } from '../transitions/utils';\nimport useTheme from '../styles/useTheme';\nimport { useForkRef } from '../utils';\nimport { getCollapseUtilityClass } from './collapseClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n orientation,\n classes\n } = ownerState;\n const slots = {\n root: ['root', `${orientation}`],\n entered: ['entered'],\n hidden: ['hidden'],\n wrapper: ['wrapper', `${orientation}`],\n wrapperInner: ['wrapperInner', `${orientation}`]\n };\n return composeClasses(slots, getCollapseUtilityClass, classes);\n};\nconst CollapseRoot = styled('div', {\n name: 'MuiCollapse',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.orientation], ownerState.state === 'entered' && styles.entered, ownerState.state === 'exited' && !ownerState.in && ownerState.collapsedSize === '0px' && styles.hidden];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n height: 0,\n overflow: 'hidden',\n transition: theme.transitions.create('height')\n}, ownerState.orientation === 'horizontal' && {\n height: 'auto',\n width: 0,\n transition: theme.transitions.create('width')\n}, ownerState.state === 'entered' && _extends({\n height: 'auto',\n overflow: 'visible'\n}, ownerState.orientation === 'horizontal' && {\n width: 'auto'\n}), ownerState.state === 'exited' && !ownerState.in && ownerState.collapsedSize === '0px' && {\n visibility: 'hidden'\n}));\nconst CollapseWrapper = styled('div', {\n name: 'MuiCollapse',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => styles.wrapper\n})(({\n ownerState\n}) => _extends({\n // Hack to get children with a negative margin to not falsify the height computation.\n display: 'flex',\n width: '100%'\n}, ownerState.orientation === 'horizontal' && {\n width: 'auto',\n height: '100%'\n}));\nconst CollapseWrapperInner = styled('div', {\n name: 'MuiCollapse',\n slot: 'WrapperInner',\n overridesResolver: (props, styles) => styles.wrapperInner\n})(({\n ownerState\n}) => _extends({\n width: '100%'\n}, ownerState.orientation === 'horizontal' && {\n width: 'auto',\n height: '100%'\n}));\n\n/**\n * The Collapse transition is used by the\n * [Vertical Stepper](/material-ui/react-stepper/#vertical-stepper) StepContent component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiCollapse'\n });\n const {\n addEndListener,\n children,\n className,\n collapsedSize: collapsedSizeProp = '0px',\n component,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n orientation = 'vertical',\n style,\n timeout = duration.standard,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n orientation,\n collapsedSize: collapsedSizeProp\n });\n const classes = useUtilityClasses(ownerState);\n const theme = useTheme();\n const timer = useTimeout();\n const wrapperRef = React.useRef(null);\n const autoTransitionDuration = React.useRef();\n const collapsedSize = typeof collapsedSizeProp === 'number' ? `${collapsedSizeProp}px` : collapsedSizeProp;\n const isHorizontal = orientation === 'horizontal';\n const size = isHorizontal ? 'width' : 'height';\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(ref, nodeRef);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const getWrapperSize = () => wrapperRef.current ? wrapperRef.current[isHorizontal ? 'clientWidth' : 'clientHeight'] : 0;\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n if (wrapperRef.current && isHorizontal) {\n // Set absolute position to get the size of collapsed content\n wrapperRef.current.style.position = 'absolute';\n }\n node.style[size] = collapsedSize;\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntering = normalizedTransitionCallback((node, isAppearing) => {\n const wrapperSize = getWrapperSize();\n if (wrapperRef.current && isHorizontal) {\n // After the size is read reset the position back to default\n wrapperRef.current.style.position = '';\n }\n const {\n duration: transitionDuration,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n if (timeout === 'auto') {\n const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);\n node.style.transitionDuration = `${duration2}ms`;\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : `${transitionDuration}ms`;\n }\n node.style[size] = `${wrapperSize}px`;\n node.style.transitionTimingFunction = transitionTimingFunction;\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback((node, isAppearing) => {\n node.style[size] = 'auto';\n if (onEntered) {\n onEntered(node, isAppearing);\n }\n });\n const handleExit = normalizedTransitionCallback(node => {\n node.style[size] = `${getWrapperSize()}px`;\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleExiting = normalizedTransitionCallback(node => {\n const wrapperSize = getWrapperSize();\n const {\n duration: transitionDuration,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n if (timeout === 'auto') {\n // TODO: rename getAutoHeightDuration to something more generic (width support)\n // Actually it just calculates animation duration based on size\n const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);\n node.style.transitionDuration = `${duration2}ms`;\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : `${transitionDuration}ms`;\n }\n node.style[size] = collapsedSize;\n node.style.transitionTimingFunction = transitionTimingFunction;\n if (onExiting) {\n onExiting(node);\n }\n });\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTransitionDuration.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: inProp,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n nodeRef: nodeRef,\n timeout: timeout === 'auto' ? null : timeout\n }, other, {\n children: (state, childProps) => /*#__PURE__*/_jsx(CollapseRoot, _extends({\n as: component,\n className: clsx(classes.root, className, {\n 'entered': classes.entered,\n 'exited': !inProp && collapsedSize === '0px' && classes.hidden\n }[state]),\n style: _extends({\n [isHorizontal ? 'minWidth' : 'minHeight']: collapsedSize\n }, style),\n ref: handleRef\n }, childProps, {\n // `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`\n // that might have been forwarded from the Transition component.\n ownerState: _extends({}, ownerState, {\n state\n }),\n children: /*#__PURE__*/_jsx(CollapseWrapper, {\n ownerState: _extends({}, ownerState, {\n state\n }),\n className: classes.wrapper,\n ref: wrapperRef,\n children: /*#__PURE__*/_jsx(CollapseWrapperInner, {\n ownerState: _extends({}, ownerState, {\n state\n }),\n className: classes.wrapperInner,\n children: children\n })\n })\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Collapse.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * The content node to be collapsed.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The width (horizontal) or height (vertical) of the container when collapsed.\n * @default '0px'\n */\n collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * The transition orientation.\n * @default 'vertical'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default duration.standard\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nCollapse.muiSupportAuto = true;\nexport default Collapse;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\nconst AccordionContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\nexport default AccordionContext;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"elementType\", \"ownerState\", \"externalForwardedProps\", \"getSlotOwnerState\", \"internalForwardedProps\"],\n _excluded2 = [\"component\", \"slots\", \"slotProps\"],\n _excluded3 = [\"component\"];\nimport useForkRef from '@mui/utils/useForkRef';\nimport { appendOwnerState, resolveComponentProps, mergeSlotProps } from '@mui/base/utils';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n getSlotOwnerState,\n internalForwardedProps\n } = parameters,\n useSlotPropsParams = _objectWithoutPropertiesLoose(parameters, _excluded);\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n }\n } = externalForwardedProps,\n other = _objectWithoutPropertiesLoose(externalForwardedProps, _excluded2);\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const _mergeSlotProps = mergeSlotProps(_extends({\n className\n }, useSlotPropsParams, {\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n })),\n {\n props: {\n component: slotComponent\n },\n internalRef\n } = _mergeSlotProps,\n mergedProps = _objectWithoutPropertiesLoose(_mergeSlotProps.props, _excluded3);\n const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref);\n const slotOwnerState = getSlotOwnerState ? getSlotOwnerState(mergedProps) : {};\n const finalOwnerState = _extends({}, ownerState, slotOwnerState);\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, _extends({}, name === 'root' && !rootComponent && !slots[name] && internalForwardedProps, name !== 'root' && !slots[name] && internalForwardedProps, mergedProps, LeafComponent && {\n as: LeafComponent\n }, {\n ref\n }), finalOwnerState);\n Object.keys(slotOwnerState).forEach(propName => {\n delete props[propName];\n });\n return [elementType, props];\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getAccordionUtilityClass(slot) {\n return generateUtilityClass('MuiAccordion', slot);\n}\nconst accordionClasses = generateUtilityClasses('MuiAccordion', ['root', 'rounded', 'expanded', 'disabled', 'gutters', 'region']);\nexport default accordionClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"defaultExpanded\", \"disabled\", \"disableGutters\", \"expanded\", \"onChange\", \"square\", \"slots\", \"slotProps\", \"TransitionComponent\", \"TransitionProps\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled, createUseThemeProps } from '../zero-styled';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nimport useSlot from '../utils/useSlot';\nimport accordionClasses, { getAccordionUtilityClass } from './accordionClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useThemeProps = createUseThemeProps('MuiAccordion');\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n square,\n expanded,\n disabled,\n disableGutters\n } = ownerState;\n const slots = {\n root: ['root', !square && 'rounded', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],\n region: ['region']\n };\n return composeClasses(slots, getAccordionUtilityClass, classes);\n};\nconst AccordionRoot = styled(Paper, {\n name: 'MuiAccordion',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${accordionClasses.region}`]: styles.region\n }, styles.root, !ownerState.square && styles.rounded, !ownerState.disableGutters && styles.gutters];\n }\n})(({\n theme\n}) => {\n const transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n overflowAnchor: 'none',\n // Keep the same scrolling position\n '&::before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: (theme.vars || theme).palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-of-type': {\n '&::before': {\n display: 'none'\n }\n },\n [`&.${accordionClasses.expanded}`]: {\n '&::before': {\n opacity: 0\n },\n '&:first-of-type': {\n marginTop: 0\n },\n '&:last-of-type': {\n marginBottom: 0\n },\n '& + &': {\n '&::before': {\n display: 'none'\n }\n }\n },\n [`&.${accordionClasses.disabled}`]: {\n backgroundColor: (theme.vars || theme).palette.action.disabledBackground\n }\n };\n}, ({\n theme\n}) => ({\n variants: [{\n props: props => !props.square,\n style: {\n borderRadius: 0,\n '&:first-of-type': {\n borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,\n borderTopRightRadius: (theme.vars || theme).shape.borderRadius\n },\n '&:last-of-type': {\n borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,\n borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n }\n }, {\n props: props => !props.disableGutters,\n style: {\n [`&.${accordionClasses.expanded}`]: {\n margin: '16px 0'\n }\n }\n }]\n}));\nconst Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAccordion'\n });\n const {\n children: childrenProp,\n className,\n defaultExpanded = false,\n disabled = false,\n disableGutters = false,\n expanded: expandedProp,\n onChange,\n square = false,\n slots = {},\n slotProps = {},\n TransitionComponent: TransitionComponentProp,\n TransitionProps: TransitionPropsProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const [expanded, setExpandedState] = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n });\n const handleChange = React.useCallback(event => {\n setExpandedState(!expanded);\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n const [summary, ...children] = React.Children.toArray(childrenProp);\n const contextValue = React.useMemo(() => ({\n expanded,\n disabled,\n disableGutters,\n toggle: handleChange\n }), [expanded, disabled, disableGutters, handleChange]);\n const ownerState = _extends({}, props, {\n square,\n disabled,\n disableGutters,\n expanded\n });\n const classes = useUtilityClasses(ownerState);\n const backwardCompatibleSlots = _extends({\n transition: TransitionComponentProp\n }, slots);\n const backwardCompatibleSlotProps = _extends({\n transition: TransitionPropsProp\n }, slotProps);\n const [TransitionSlot, transitionProps] = useSlot('transition', {\n elementType: Collapse,\n externalForwardedProps: {\n slots: backwardCompatibleSlots,\n slotProps: backwardCompatibleSlotProps\n },\n ownerState\n });\n return /*#__PURE__*/_jsxs(AccordionRoot, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n square: square\n }, other, {\n children: [/*#__PURE__*/_jsx(AccordionContext.Provider, {\n value: contextValue,\n children: summary\n }), /*#__PURE__*/_jsx(TransitionSlot, _extends({\n in: expanded,\n timeout: \"auto\"\n }, transitionProps, {\n children: /*#__PURE__*/_jsx(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\",\n className: classes.region,\n children: children\n })\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: chainPropTypes(PropTypes.node.isRequired, props => {\n const summary = React.Children.toArray(props.children)[0];\n if (isFragment(summary)) {\n return new Error(\"MUI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('MUI: Expected the first child of Accordion to be a valid element.');\n }\n return null;\n }),\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, expands the accordion by default.\n * @default false\n */\n defaultExpanded: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, it removes the margin between two expanded accordion items and the increase of height.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n transition: PropTypes.elementType\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Accordion;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getAccordionSummaryUtilityClass(slot) {\n return generateUtilityClass('MuiAccordionSummary', slot);\n}\nconst accordionSummaryClasses = generateUtilityClasses('MuiAccordionSummary', ['root', 'expanded', 'focusVisible', 'disabled', 'gutters', 'contentGutters', 'content', 'expandIconWrapper']);\nexport default accordionSummaryClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"onClick\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled, createUseThemeProps } from '../zero-styled';\nimport ButtonBase from '../ButtonBase';\nimport AccordionContext from '../Accordion/AccordionContext';\nimport accordionSummaryClasses, { getAccordionSummaryUtilityClass } from './accordionSummaryClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useThemeProps = createUseThemeProps('MuiAccordionSummary');\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n expanded,\n disabled,\n disableGutters\n } = ownerState;\n const slots = {\n root: ['root', expanded && 'expanded', disabled && 'disabled', !disableGutters && 'gutters'],\n focusVisible: ['focusVisible'],\n content: ['content', expanded && 'expanded', !disableGutters && 'contentGutters'],\n expandIconWrapper: ['expandIconWrapper', expanded && 'expanded']\n };\n return composeClasses(slots, getAccordionSummaryUtilityClass, classes);\n};\nconst AccordionSummaryRoot = styled(ButtonBase, {\n name: 'MuiAccordionSummary',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => {\n const transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n display: 'flex',\n minHeight: 48,\n padding: theme.spacing(0, 2),\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n [`&.${accordionSummaryClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette.action.focus\n },\n [`&.${accordionSummaryClasses.disabled}`]: {\n opacity: (theme.vars || theme).palette.action.disabledOpacity\n },\n [`&:hover:not(.${accordionSummaryClasses.disabled})`]: {\n cursor: 'pointer'\n },\n variants: [{\n props: props => !props.disableGutters,\n style: {\n [`&.${accordionSummaryClasses.expanded}`]: {\n minHeight: 64\n }\n }\n }]\n };\n});\nconst AccordionSummaryContent = styled('div', {\n name: 'MuiAccordionSummary',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.content\n})(({\n theme\n}) => ({\n display: 'flex',\n flexGrow: 1,\n margin: '12px 0',\n variants: [{\n props: props => !props.disableGutters,\n style: {\n transition: theme.transitions.create(['margin'], {\n duration: theme.transitions.duration.shortest\n }),\n [`&.${accordionSummaryClasses.expanded}`]: {\n margin: '20px 0'\n }\n }\n }]\n}));\nconst AccordionSummaryExpandIconWrapper = styled('div', {\n name: 'MuiAccordionSummary',\n slot: 'ExpandIconWrapper',\n overridesResolver: (props, styles) => styles.expandIconWrapper\n})(({\n theme\n}) => ({\n display: 'flex',\n color: (theme.vars || theme).palette.action.active,\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest\n }),\n [`&.${accordionSummaryClasses.expanded}`]: {\n transform: 'rotate(180deg)'\n }\n}));\nconst AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAccordionSummary'\n });\n const {\n children,\n className,\n expandIcon,\n focusVisibleClassName,\n onClick\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n disabled = false,\n disableGutters,\n expanded,\n toggle\n } = React.useContext(AccordionContext);\n const handleChange = event => {\n if (toggle) {\n toggle(event);\n }\n if (onClick) {\n onClick(event);\n }\n };\n const ownerState = _extends({}, props, {\n expanded,\n disabled,\n disableGutters\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(AccordionSummaryRoot, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className),\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n onClick: handleChange,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(AccordionSummaryContent, {\n className: classes.content,\n ownerState: ownerState,\n children: children\n }), expandIcon && /*#__PURE__*/_jsx(AccordionSummaryExpandIconWrapper, {\n className: classes.expandIconWrapper,\n ownerState: ownerState,\n children: expandIcon\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default AccordionSummary;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTypographyUtilityClass(slot) {\n return generateUtilityClass('MuiTypography', slot);\n}\nconst typographyClasses = generateUtilityClasses('MuiTypography', ['root', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'inherit', 'button', 'caption', 'overline', 'alignLeft', 'alignRight', 'alignCenter', 'alignJustify', 'noWrap', 'gutterBottom', 'paragraph']);\nexport default typographyClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"align\", \"className\", \"component\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { extendSxProp } from '@mui/system/styleFunctionSx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport { getTypographyUtilityClass } from './typographyClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${capitalize(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return composeClasses(slots, getTypographyUtilityClass, classes);\n};\nexport const TypographyRoot = styled('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${capitalize(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n margin: 0\n}, ownerState.variant === 'inherit' && {\n // Some elements, like \n \n \n \n \n ,\n ,\n ]}\n docURL=\"https://mui.com/material-ui/react-card/\"\n >\n \n \n \n \n \n \n \n Word of the Day\n \n \n benevolent\n \n \n adjective\n \n \n well meaning and kindly.\n
\n {'\"a benevolent smile\"'}\n
\n
\n \n \n \n
\n
\n \n \n \n elevation 0\n \n \n elevation 8\n \n \n elevation 24\n \n \n \n \n \n \n \n Heading 1\n \n \n \n \n \n \n Heading 2\n \n \n \n \n \n \n Heading 3\n \n \n \n \n \n \n Heading 4\n \n \n \n \n \n \n Heading 5\n \n \n \n \n \n \n Heading 6\n \n \n \n \n \n \n subtitle1. Lorem ipsum dolor sit amet, consectetur adipisicing elit.\n Quos blanditiis tenetur\n \n \n \n \n \n \n subtitle2. Lorem ipsum dolor sit amet, consectetur adipisicing elit.\n Quos blanditiis tenetur\n \n \n \n \n \n \n body1. Lorem ipsum dolor sit amet, consectetur adipisicing elit.\n Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore\n consectetur, neque doloribus, cupiditate numquam dignissimos laborum\n fugiat deleniti? Eum quasi quidem quibusdam.\n \n \n \n \n \n \n body2. Lorem ipsum dolor sit amet, consectetur adipisicing elit.\n Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore\n consectetur, neque doloribus, cupiditate numquam dignissimos laborum\n fugiat deleniti? Eum quasi quidem quibusdam.\n \n \n \n \n \n \n button text\n \n \n \n \n \n \n caption text\n \n \n \n \n \n \n overline text\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 \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 label=\"Label\"\n />\n \n \n \n } checkedIcon={} />\n \n \n \n \n \n \n \n \n \n \n \n \n Season\n \n }\n label=\"Summer\"\n />\n }\n label=\"Autumn\"\n />\n }\n label=\"Winter\"\n />\n }\n label=\"Spring\"\n />\n \n \n \n \n \n \n \n \n \n \n \n \n Age\n \n Ten\n Twenty\n Thirty\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }\n label=\"Label\"\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n dollar\n euro\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 Home\n \n \n Products\n \n Item\n \n \n \n \n \n \n \n \n Item1\n \n \n Item2\n \n \n \n \n \n \n \n Link\n \n \n \n \n \n \n \n \n \n \n \n \n Cut\n \n ⌘X\n \n \n \n \n \n \n Copy\n \n ⌘C\n \n \n \n \n \n \n Paste\n \n ⌘V\n \n \n \n \n \n \n \n Web Clipboard\n \n \n \n \n \n \n \n \n \n \n \n }\n >\n }\n tooltipTitle={\"Save\"}\n />\n }\n tooltipTitle={\"Share\"}\n />\n }\n tooltipTitle={\"Print\"}\n />\n \n \n \n \n \n \n \n {\"Select master blaster campaign settings\"}\n \n \n {\"Create an ad group\"}\n \n \n {\"Create an ad\"}\n \n \n \n \n ]}\n docURL=\"https://mui.com/material-ui/react-tabs/\"\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 \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 Label 1\n Label 2\n \n \n \n \n value 1\n value 2\n \n \n value 1\n value 2\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n \n
\n \n \n \n This is an error alert — check it out!\n \n \n \n This is a warning alert — check it out!\n \n \n \n This is an info alert — check it out!\n \n \n \n This is a success alert — check it out!\n \n \n \n \n \n \n \n \n \n \n ,\n ,\n ,\n ]}\n docURL=\"https://mui.com/material-ui/react-dialog/\"\n >\n \n \n \n \n \n \n {\"Use Google's location service?\"}\n \n \n \n Let Google help apps determine location. This means sending\n anonymous location data to Google, even when no apps are\n running.\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 \n \n \n \n);\n"],"names":["u","b","Symbol","for","c","d","e","f","g","h","k","l","m","n","p","q","t","v","a","r","$$typeof","type","module","_excluded","generateUtilityClasses","defaultTheme","createTheme","Box","options","arguments","length","undefined","themeId","defaultClassName","generateClassName","BoxRoot","styled","shouldForwardProp","prop","styleFunctionSx","React","inProps","ref","theme","useTheme","_extendSxProp","extendSxProp","className","component","other","_objectWithoutPropertiesLoose","_jsx","_extends","as","clsx","createBox","THEME_ID","boxClasses","root","ClassNameGenerator","generate","_excluded2","_excluded3","systemDefaultTheme","lowercaseFirstLetter","string","charAt","toLowerCase","slice","resolveTheme","_ref2","obj","Object","keys","defaultOverridesResolver","slot","props","styles","processStyleArg","callableStyle","_ref","ownerState","resolvedStylesArg","Array","isArray","flatMap","resolvedStyle","variants","result","forEach","variant","isMatch","key","push","style","input","rootShouldForwardProp","slotShouldForwardProp","systemSx","__mui_systemSx","tag","inputOptions","processStyles","filter","name","componentName","componentSlot","skipVariantsResolver","inputSkipVariantsResolver","skipSx","inputSkipSx","overridesResolver","shouldForwardPropOption","charCodeAt","isStringTag","defaultStyledResolver","styledEngineStyled","label","transformStyleArg","stylesArg","__emotion_real","isPlainObject","muiStyledResolver","styleArg","transformedStyleArg","_len","expressions","_key","expressionsWithDefaultTheme","map","components","styleOverrides","resolvedStyleOverrides","entries","_ref3","slotKey","slotStyle","_theme$components","numOfCustomFnsApplied","placeholders","fill","raw","Component","muiName","withConfig","createStyled","defaultCreateStyledComponent","systemStyled","concat","capitalize","String","maxWidth","fixed","disableGutters","useThemePropsDefault","useThemePropsSystem","Container","createStyledComponent","useThemeProps","ContainerRoot","width","marginLeft","boxSizing","marginRight","display","paddingLeft","spacing","paddingRight","breakpoints","up","values","reduce","acc","breakpointValueKey","breakpoint","value","unit","Math","max","xs","classes","useUtilityClasses","slots","composeClasses","generateUtilityClass","createContainer","joinChildren","children","separator","childrenArray","toArray","Boolean","output","child","index","flexDirection","handleBreakpoints","resolveBreakpointValues","direction","propValue","transformer","createUnarySpacing","base","directionValues","spacingValues","previousDirectionValue","styleFromPropValue","useFlexGap","gap","getValue","margin","row","column","deepmerge","mergeBreakpointsInOrder","Stack","StackRoot","themeProps","divider","createStack","getDividerUtilityClass","DividerRoot","absolute","light","orientation","vertical","flexItem","withChildren","withChildrenVertical","textAlign","textAlignRight","textAlignLeft","flexShrink","borderWidth","borderStyle","borderColor","vars","palette","borderBottomWidth","position","bottom","left","dividerChannel","alpha","marginTop","marginBottom","height","borderRightWidth","alignSelf","whiteSpace","border","content","borderTop","_ref4","borderLeft","_ref5","DividerWrapper","wrapper","wrapperVertical","_ref6","paddingTop","paddingBottom","Divider","role","muiSkipListHighlight","getGridUtilityClass","GRID_SIZES","gridClasses","wrap","size","getOffset","val","parse","parseFloat","replace","extractZeroValueBreakpointKeys","nonZeroKey","sortedBreakpointKeysByValue","sort","indexOf","GridRoot","container","item","zeroMinWidth","spacingStyles","Number","isNaN","resolveSpacingStyles","breakpointsStyles","flexWrap","minWidth","rowSpacing","rowSpacingValues","zeroValueBreakpointKeys","_zeroValueBreakpointK","themeSpacing","includes","columnSpacing","columnSpacingValues","_zeroValueBreakpointK2","globalStyles","flexBasis","flexGrow","columnsBreakpointValues","columns","columnValue","round","more","fullWidth","assign","spacingClasses","resolveSpacingClasses","breakpointsClasses","Grid","columnsProp","columnSpacingProp","rowSpacingProp","columnsContext","GridContext","breakpointsValues","otherFiltered","Provider","elevation","alphaValue","log","toFixed","getPaperUtilityClass","PaperRoot","square","rounded","_theme$vars$overlays","backgroundColor","background","paper","color","text","primary","transition","transitions","create","borderRadius","shape","boxShadow","shadows","mode","backgroundImage","getOverlayAlpha","overlays","getImageListUtilityClass","ImageListRoot","overflowY","listStyle","padding","WebkitOverflowScrolling","ImageList","cols","rowHeight","styleProp","contextValue","process","columnCount","columnGap","gridTemplateColumns","ImageListContext","element","muiNames","_muiName","_element$type","_payload","getImageListItemUtilityClass","ImageListItemRoot","imageListItemClasses","img","objectFit","ImageListItem","rows","gridColumnEnd","gridRowEnd","breakInside","isMuiElement","createUseThemeProps","getCollapseUtilityClass","CollapseRoot","state","entered","in","collapsedSize","hidden","overflow","visibility","CollapseWrapper","CollapseWrapperInner","wrapperInner","Collapse","addEndListener","collapsedSizeProp","easing","inProp","onEnter","onEntered","onEntering","onExit","onExited","onExiting","timeout","duration","standard","TransitionComponent","Transition","timer","useTimeout","wrapperRef","autoTransitionDuration","isHorizontal","nodeRef","handleRef","useForkRef","normalizedTransitionCallback","callback","maybeIsAppearing","node","current","getWrapperSize","handleEnter","isAppearing","handleEntering","wrapperSize","transitionDuration","transitionTimingFunction","getTransitionProps","duration2","getAutoHeightDuration","handleEntered","handleExit","handleExited","handleExiting","next","start","childProps","muiSupportAuto","useSlot","parameters","elementType","initialElementType","externalForwardedProps","getSlotOwnerState","internalForwardedProps","useSlotPropsParams","rootComponent","slotProps","resolvedComponentsProps","resolveComponentProps","_mergeSlotProps","mergeSlotProps","externalSlotProps","slotComponent","internalRef","mergedProps","slotOwnerState","finalOwnerState","LeafComponent","appendOwnerState","propName","getAccordionUtilityClass","AccordionRoot","Paper","accordionClasses","region","gutters","shortest","overflowAnchor","top","right","opacity","expanded","disabled","action","disabledBackground","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","childrenProp","defaultExpanded","expandedProp","onChange","TransitionComponentProp","TransitionProps","TransitionPropsProp","setExpandedState","useControlled","controlled","default","handleChange","event","summary","toggle","backwardCompatibleSlots","backwardCompatibleSlotProps","TransitionSlot","transitionProps","_jsxs","AccordionContext","id","getAccordionSummaryUtilityClass","AccordionSummaryRoot","ButtonBase","minHeight","accordionSummaryClasses","focusVisible","focus","disabledOpacity","cursor","AccordionSummaryContent","AccordionSummaryExpandIconWrapper","expandIconWrapper","active","transform","expandIcon","focusVisibleClassName","onClick","focusRipple","disableRipple","getTypographyUtilityClass","TypographyRoot","align","noWrap","gutterBottom","paragraph","font","typography","textOverflow","defaultVariantMapping","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","colorTransformations","textPrimary","secondary","textSecondary","error","transformDeprecatedColors","variantMapping","getAccordionDetailsUtilityClass","AccordionDetailsRoot","getAppBarUtilityClass","joinVars","var1","var2","AppBarRoot","backgroundColorDefault","grey","zIndex","appBar","getContrastText","main","contrastText","enableColorOnDark","AppBar","defaultBg","darkBg","darkColor","match","getToolbarUtilityClass","ToolbarRoot","alignItems","mixins","toolbar","getIconButtonUtilityClass","IconButtonRoot","edge","flex","fontSize","pxToRem","activeChannel","hoverOpacity","_palette","mainChannel","iconButtonClasses","disableFocusRipple","centerRipple","getCardContentUtilityClass","CardContentRoot","getCardActionsUtilityClass","CardActionsRoot","disableSpacing","getCardUtilityClass","CardRoot","raised","stripDiacritics","normalize","findIndex","array","comp","i","defaultFilterOptions","config","ignoreAccents","ignoreCase","limit","matchFrom","stringify","trim","inputValue","getOptionLabel","filteredOptions","option","candidate","createFilterOptions","defaultIsActiveElementInListbox","listboxRef","_listboxRef$current$p","parentElement","contains","document","activeElement","useAutocomplete","unstable_isActiveElementInListbox","unstable_classNamePrefix","autoComplete","autoHighlight","autoSelect","blurOnSelect","clearOnBlur","freeSolo","clearOnEscape","defaultValue","multiple","disableClearable","disableCloseOnSelect","disabledProp","disabledItemsFocusable","disableListWrap","filterOptions","filterSelectedOptions","getOptionDisabled","getOptionKey","getOptionLabelProp","_option$label","groupBy","handleHomeEndKeys","idProp","includeInputInList","inputValueProp","isOptionEqualToValue","onClose","onHighlightChange","onInputChange","onOpen","open","openProp","openOnFocus","readOnly","selectOnFocus","valueProp","useId","optionLabel","ignoreFocus","firstFocus","inputRef","anchorEl","setAnchorEl","focusedTag","setFocusedTag","defaultHighlighted","highlightedIndexRef","setValueState","setInputValueState","focused","setFocused","resetInputValue","newValue","newInputValue","setOpenState","inputPristine","setInputPristine","inputValueIsSelectedValue","popupOpen","some","value2","previousProps","usePreviousProps","valueChange","listboxAvailable","focusTag","useEventCallback","tagToFocus","querySelector","setHighlightedIndex","reason","removeAttribute","setAttribute","prev","classList","remove","listboxNode","getAttribute","scrollTop","add","scrollHeight","clientHeight","scrollBottom","elementBottom","offsetTop","offsetHeight","changeHighlightedIndex","diff","nextIndex","nextFocus","nextFocusDisabled","hasAttribute","validOptionIndex","getNextIndex","maxIndex","newIndex","abs","setSelectionRange","syncHighlightedIndex","previousHighlightedOptionIndex","getPreviousHighlightedOptionIndex","every","value1","previousHighlightedOption","isSameValue","valueItem","currentOption","itemIndex","optionItem","handleListboxRef","setRef","handleOpen","handleClose","handleValue","details","isTouch","selectNewValue","origin","splice","ctrlKey","metaKey","blur","handleFocusTag","nextTag","validTagIndex","handleClear","handleKeyDown","onKeyDown","defaultMuiPrevented","which","preventDefault","stopPropagation","handleFocus","handleBlur","handleInputChange","target","handleOptionMouseMove","currentTarget","handleOptionTouchStart","handleOptionClick","handleTagDelete","handlePopupIndicator","handleMouseDown","handleClick","selectionEnd","selectionStart","select","handleInputMouseDown","dirty","groupedOptions","Map","group","getRootProps","onMouseDown","getInputLabelProps","htmlFor","getInputProps","onBlur","onFocus","autoCapitalize","spellCheck","getClearProps","tabIndex","getPopupIndicatorProps","getTagProps","onDelete","getListboxProps","getOptionProps","_getOptionKey","selected","onMouseMove","onTouchStart","getListSubheaderUtilityClass","ListSubheaderRoot","inset","disableSticky","sticky","lineHeight","fontFamily","fontWeight","fontWeightMedium","ListSubheader","getSvgIconUtilityClass","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette2","_palette3","userSelect","hasSvgAsChild","call","shorter","small","medium","large","SvgIcon","htmlColor","inheritViewBox","titleAccess","viewBox","instanceFontSize","focusable","createSvgIcon","path","displayName","getChipUtilityClass","ChipRoot","iconColor","clickable","chipClasses","avatar","icon","deleteIcon","deletable","textColor","justifyContent","outline","textDecoration","verticalAlign","pointerEvents","Chip","defaultAvatarColor","avatarColorPrimary","dark","avatarColorSecondary","avatarSmall","defaultIconColor","WebkitTapHighlightColor","primaryChannel","contrastTextChannel","selectedChannel","selectedOpacity","focusOpacity","defaultBorder","hover","iconSmall","deleteIconSmall","ChipLabel","isDeleteKeyboardEvent","keyboardEvent","avatarProp","clickableProp","ComponentProp","deleteIconProp","iconProp","onKeyUp","skipFocusWhenDisabled","chipRef","handleDeleteIconClick","moreProps","CancelIcon","getInputBaseUtilityClass","getInputUtilityClass","inputBaseClasses","getOutlinedInputUtilityClass","getFilledInputUtilityClass","getAutocompleteUtilityClass","_ClearIcon","_ArrowDropDownIcon","AutocompleteRoot","hasClearIcon","hasPopupIcon","inputFocused","autocompleteClasses","inputRoot","clearIndicator","inputClasses","sizeSmall","outlinedInputClasses","endAdornment","filledInputClasses","hiddenLabel","AutocompleteEndAdornment","AutocompleteClearIndicator","IconButton","AutocompletePopupIndicator","popupIndicator","popupIndicatorOpen","AutocompletePopper","Popper","popper","disablePortal","popperDisablePortal","modal","AutocompletePaper","AutocompleteLoading","loading","AutocompleteNoOptions","noOptions","AutocompleteListbox","listbox","maxHeight","AutocompleteGroupLabel","groupLabel","_ref7","AutocompleteGroupUl","groupUl","_slotProps$clearIndic","_slotProps$paper","_slotProps$popper","_slotProps$popupIndic","ChipProps","clearIcon","ClearIcon","clearText","closeText","componentsProps","forcePopupIcon","getLimitTagsText","limitTags","ListboxComponent","ListboxProps","loadingText","noOptionsText","openText","PaperComponent","PopperComponent","popupIcon","ArrowDropDownIcon","renderGroup","renderGroupProp","renderInput","renderOption","renderOptionProp","renderTags","externalListboxRef","_getListboxProps","otherListboxProps","combinedListboxRef","startAdornment","getCustomizedTagProps","params","defaultRenderOption","props2","_createElement","renderListOption","optionProps","clearIndicatorSlotProps","paperSlotProps","popperSlotProps","popupIndicatorSlotProps","renderAutocompletePopperChildren","clientWidth","autocompletePopper","option2","index2","InputLabelProps","InputProps","title","inputProps","ownerWindow","ownerDocument","defaultView","window","debounce","func","wait","debounced","args","clearTimeout","setTimeout","later","apply","this","clear","getStyleValue","parseInt","TextareaAutosize","forwardedRef","maxRows","minRows","isControlled","shadowRef","calculateTextareaStyles","computedStyle","getComputedStyle","outerHeightStyle","overflowing","inputShallow","placeholder","borderTopWidth","innerHeight","singleRowHeight","outerHeight","min","syncHeight","textareaStyles","useEnhancedEffect","handleResize","rAF","debounceHandleResize","containerWindow","resizeObserver","addEventListener","ResizeObserver","observe","cancelAnimationFrame","removeEventListener","disconnect","formControlState","states","muiFormControl","useFormControl","FormControlContext","upperTheme","MuiGlobalStyles","SystemGlobalStyles","hasValue","isFilled","SSR","rootOverridesResolver","formControl","adornedStart","adornedEnd","multiline","inputOverridesResolver","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel","InputBaseRoot","InputBaseComponent","inputPlaceholder","placeholderHidden","placeholderVisible","letterSpacing","animationName","animationDuration","WebkitAppearance","WebkitTextFillColor","resize","MozAppearance","inputGlobalStyles","GlobalStyles","from","InputBase","_slotProps$input","ariaDescribedby","autoFocus","disableInjectingGlobalStyles","inputComponent","inputPropsProp","inputRefProp","renderSuffix","handleInputRefWarning","instance","handleInputRef","fcs","onFilled","onEmpty","checkDirty","InputComponent","setAdornedStart","Root","rootProps","Input","isHostComponent","onAnimationStart","required","Error","_formatMuiErrorMessage","InputRoot","inputBaseRootOverridesResolver","disableUnderline","underline","bottomLineColor","common","onBackgroundChannel","inputUnderline","borderBottom","easeOut","borderBottomColor","borderBottomStyle","InputInput","InputBaseInput","inputBaseInputOverridesResolver","_slots$root","_slots$input","componentsPropsProp","composedClasses","inputComponentsProps","RootSlot","InputSlot","FilledInputRoot","hoverBackground","FilledInput","bg","hoverBg","disabledBg","FilledInputInput","WebkitBoxShadow","caretColor","getColorSchemeSelector","filledInputComponentsProps","_span","NotchedOutlineRoot","NotchedOutlineLegend","float","withLabel","notched","delay","OutlinedInputRoot","notchedOutline","OutlinedInputInput","OutlinedInput","_React$Fragment","filled","getFormLabelUtilityClasses","FormLabelRoot","colorSecondary","formLabelClasses","AsteriskComponent","asterisk","getInputLabelUtilityClasses","InputLabelRoot","FormLabel","shrink","disableAnimation","animated","transformOrigin","shrinkProp","getFormControlUtilityClasses","FormControlRoot","visuallyFocused","initialAdornedStart","setFilled","initialFilled","focusedState","registerEffect","childContext","getFormHelperTextUtilityClasses","FormHelperTextRoot","contained","caption","formHelperTextClasses","getListUtilityClass","ListRoot","disablePadding","dense","subheader","context","ListContext","getScrollbarSize","doc","documentWidth","documentElement","innerWidth","nextItem","list","firstChild","nextElementSibling","previousItem","lastChild","previousElementSibling","textCriteriaMatches","textCriteria","innerText","textContent","repeating","join","moveFocus","currentFocus","traversalFunction","wrappedOnce","actions","autoFocusItem","listRef","textCriteriaRef","previousKeyMatched","lastTime","adjustStyleForScrollbar","containerElement","noExplicitWidth","scrollbarSize","activeItemIndex","items","newChildProps","List","criteria","lowerKey","currTime","performance","now","keepFocusOnCurrent","createChainedFunction","funcs","_len2","_key2","ariaHidden","show","getPaddingRight","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","isNotExcludedElement","isNotForbiddenElement","isForbiddenTagName","tagName","isInputHidden","isAriaHiddenForbiddenOnElement","findIndexOf","idx","handleContainer","containerInfo","restoreStyle","disableScrollLock","body","isOverflowing","property","el","fixedElements","querySelectorAll","scrollContainer","parentNode","DocumentFragment","parent","nodeName","overflowX","restore","setProperty","removeProperty","defaultManager","constructor","containers","modals","modalIndex","modalRef","hiddenSiblings","getHiddenSiblings","mount","containerIndex","ariaHiddenState","nextTop","isTopModal","useModal","disableEscapeKeyDown","manager","closeAfterTransition","onTransitionEnter","onTransitionExited","rootRef","mountNodeRef","exited","setExited","hasTransition","hasOwnProperty","getHasTransition","ariaHiddenProp","getModal","handleMounted","resolvedContainer","getContainer","handlePortalRef","createHandleKeyDown","otherHandlers","_otherHandlers$onKeyD","createHandleBackdropClick","_otherHandlers$onClic","propsEventHandlers","extractEventHandlers","externalEventHandlers","getBackdropProps","portalRef","candidatesSelector","defaultGetTabbable","regularTabNodes","orderedTabNodes","nodeTabIndex","tabindexAttr","contentEditable","getTabIndex","getRadio","selector","roving","isNonTabbableRadio","isNodeMatchingSelectorFocusable","documentOrder","defaultIsEnabled","FocusTrap","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","lastKeydown","loopFocus","nativeEvent","shiftKey","contain","rootElement","hasFocus","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","focusNext","focusPrevious","interval","setInterval","clearInterval","handleFocusSentinel","relatedTarget","childrenPropsHandler","entering","Fade","defaultTimeout","enter","enteringScreen","exit","leavingScreen","appear","reflow","webkitTransition","getBackdropUtilityClass","BackdropRoot","invisible","_slotProps$root","rootSlotProps","getModalUtilityClass","ModalRoot","ModalBackdrop","Backdrop","backdrop","_slots$backdrop","_slotProps$backdrop","BackdropComponent","BackdropProps","hideBackdrop","keepMounted","onBackdropClick","propsWithDefaults","BackdropSlot","backdropSlotProps","useSlotProps","getSlotProps","additionalProps","backdropProps","Portal","getPopoverUtilityClass","getOffsetTop","rect","offset","getOffsetLeft","horizontal","getTransformOriginValue","resolveAnchorEl","PopoverRoot","Modal","PopoverPaper","PaperBase","_slots$paper","anchorOrigin","anchorPosition","anchorReference","containerProp","marginThreshold","PaperProps","PaperPropsProp","Grow","transitionDurationProp","externalPaperSlotProps","paperRef","handlePaperRef","getAnchorOffset","resolvedAnchorEl","anchorRect","nodeType","getBoundingClientRect","getTransformOrigin","elemRect","getPositioningStyle","offsetWidth","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","isPositioned","setIsPositioned","setPositioningStyles","positioning","updatePosition","PaperSlot","paperProps","_useSlotProps","rootSlotPropsProp","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","Popover","MenuPaper","MenuMenuList","MenuList","disableAutoFocusItem","MenuListProps","PopoverClasses","isRtl","useRtl","menuListActionsRef","paperExternalSlotProps","getNativeSelectUtilityClasses","nativeSelectSelectStyles","nativeSelectClasses","NativeSelectSelect","nativeSelectIconStyles","NativeSelectIcon","iconOpen","IconComponent","getSelectUtilityClasses","SelectSelect","selectClasses","SelectIcon","SelectNativeInput","nativeInput","areEqualValues","isEmpty","_MenuProps$slotProps","ariaLabel","autoWidth","defaultOpen","displayEmpty","labelId","MenuProps","renderValue","SelectDisplayProps","tabIndexProp","openState","displayRef","displayNode","setDisplayNode","isOpenControlled","menuMinWidthState","setMenuMinWidthState","handleDisplayRef","anchorElement","getElementById","handler","getSelection","isCollapsed","update","handleItemClick","clonedEvent","defineProperty","writable","displaySingle","displayMultiple","computeDisplay","foundMatch","menuMinWidth","buttonId","listboxId","button","find","childItem","Menu","styledRootConfig","StyledInput","StyledOutlinedInput","StyledFilledInput","Select","classesProp","native","variantProp","NativeSelectInput","SelectInput","restOfClasses","outlined","inputComponentRef","getTextFieldUtilityClass","variantComponent","TextFieldRoot","FormControl","FormHelperTextProps","helperText","idOverride","SelectProps","InputMore","helperTextId","inputLabelId","InputElement","InputLabel","FormHelperText","getValidReactChildren","getButtonGroupUtilityClass","ButtonGroupRoot","buttonGroupClasses","grouped","firstButton","lastButton","middleButton","disableElevation","borderRight","borderRightColor","validChildren","childrenCount","getButtonPositionClassName","isFirstButton","isLastButton","ButtonGroupContext","ButtonGroupButtonContext","getFormGroupUtilityClass","FormGroupRoot","getFormControlLabelUtilityClasses","FormControlLabelRoot","formControlLabelClasses","labelPlacement","_slotProps$typography","control","disableTypography","labelProp","requiredProp","controlProps","typographySlotProps","Typography","getSwitchBaseUtilityClass","SwitchBaseRoot","SwitchBaseInput","checked","checkedProp","checkedIcon","defaultChecked","setCheckedState","hasLabelFor","defaultPrevented","newChecked","getCheckboxUtilityClass","CheckboxRoot","SwitchBase","indeterminate","checkboxClasses","defaultCheckedIcon","CheckBoxIcon","defaultIcon","CheckBoxOutlineBlankIcon","defaultIndeterminateIcon","IndeterminateCheckBoxIcon","_icon$props$fontSize","_indeterminateIcon$pr","indeterminateIcon","indeterminateIconProp","getFabUtilityClass","FabRoot","colorInherit","_theme$palette$getCon","_theme$palette","short","fab","A100","fabClasses","nameProp","RadioGroupContext","FormGroup","RadioButtonIconRoot","RadioButtonIconBackground","RadioButtonUncheckedIcon","RadioButtonIconDot","RadioButtonCheckedIcon","easeIn","dot","getRadioUtilityClass","RadioRoot","radioClasses","RadioButtonIcon","_defaultIcon$props$fo","_defaultCheckedIcon$p","onChangeProp","radioGroup","clip","getRatingUtilityClass","roundValueToPrecision","precision","nearest","num","decimalPart","toString","split","getDecimalPrecision","RatingRoot","ratingClasses","visuallyHidden","iconActive","RatingLabel","emptyValueFocused","labelEmptyValueActive","RatingIcon","iconEmpty","iconFilled","iconHover","iconFocus","RatingDecimal","decimal","IconContainer","RatingItem","emptyIcon","getLabelText","highlightSelectedOnly","IconContainerComponent","isActive","itemValue","labelProps","ratingValue","ratingValueRounded","isHovered","isFocused","isChecked","Star","defaultEmptyIcon","StarBorder","defaultLabelText","emptyLabelText","onChangeActive","onMouseLeave","valueDerived","valueRounded","setState","isFocusVisibleRef","handleBlurVisible","handleFocusVisible","focusVisibleRef","useIsFocusVisible","setFocusVisible","clientX","clientY","newFocus","setEmptyValueFocused","labelEmptyValue","rootNode","containerWidth","percent","newHover","clamp","_","ratingItemProps","ceil","$","indexDecimal","itemDecimalValue","getListItemIconUtilityClass","getListItemTextUtilityClass","getMenuItemUtilityClass","MenuItemRoot","backgroundClip","menuItemClasses","dividerClasses","listItemTextClasses","listItemIconClasses","menuItemRef","asc","findClosest","currentValue","_values$reduce","closestIndex","distance","trackFinger","touchId","changedTouches","touchEvent","touch","identifier","x","y","valueToPercent","roundValueToStep","step","parts","toExponential","matissaDecimalPart","setValueIndex","focusThumb","sliderRef","activeIndex","setActive","_sliderRef$current","_doc$activeElement","_sliderRef$current2","areValuesEqual","oldValue","array1","array2","itemComparer","areArraysEqual","axisProps","leap","Identity","cachedSupportsTouchActionNone","doesSupportTouchActionNone","CSS","supports","useSlider","ariaLabelledby","disableSwap","marks","marksProp","onChangeCommitted","scale","shiftStep","setOpen","dragging","setDragging","moveCount","thumbIndex","range","floor","marksValues","mark","focusedThumbIndex","setFocusedThumbIndex","handleFocusRef","createHandleHiddenInputFocus","_otherHandlers$onFocu","createHandleHiddenInputBlur","_otherHandlers$onBlur","changeValue","valueInput","marksIndex","maxMarksValue","Infinity","previousValue","createHandleHiddenInputKeyDown","_document$activeEleme","previousIndex","axis","getFingerNewValue","finger","move","slider","percentToValue","handleTouchMove","buttons","handleTouchEnd","stopListening","handleTouchStart","passive","trackOffset","trackLeap","createHandleMouseLeave","_otherHandlers$onMous3","getHiddenInputProps","externalProps","_parameters$step","externalHandlers","ownEventHandlers","_otherHandlers$onChan","valueAsNumber","mergedEventHandlers","_otherHandlers$onMous","getThumbProps","onMouseOver","_otherHandlers$onMous2","getThumbStyle","Slot","getSliderUtilityClass","SliderRoot","marked","track","trackInverted","trackFalse","_ref9","_theme$vars","touchAction","colorAdjust","sliderClasses","thumb","_theme$vars2","SliderRail","rail","SliderTrack","_ref10","_theme$vars3","_theme$vars4","Slider","lighten","applyStyles","darken","SliderThumb","_ref11","_theme$vars5","_theme$vars6","SliderValueLabel","valueLabelOpen","circle","valueLabelCircle","valueLabelLabel","useValueLabelClasses","valueLabel","_ref12","white","SliderMark","markActive","_ref13","SliderMarkLabel","markLabel","_ref14","markLabelActive","Forward","_ref15","_slots$rail","_slots$track","_slots$thumb","_slots$valueLabel","_slots$mark","_slots$markLabel","_ref8","_slotProps$rail","_slotProps$track","_slotProps$thumb","_slotProps$valueLabel","_slotProps$mark","_slotProps$markLabel","ariaValuetext","getAriaLabel","getAriaValueText","valueLabelDisplay","valueLabelFormat","RailSlot","Rail","TrackSlot","Track","ThumbSlot","Thumb","ValueLabelSlot","ValueLabel","MarkSlot","Mark","MarkLabelSlot","MarkLabel","railSlotProps","trackSlotProps","thumbSlotProps","valueLabelSlotProps","markSlotProps","markLabelSlotProps","inputSlotProps","shouldSpreadAdditionalProps","railProps","trackProps","thumbProps","valueLabelProps","markProps","markLabelProps","inputSliderProps","ValueLabelComponent","getSwitchUtilityClass","SwitchRoot","switchClasses","switchBase","SwitchSwitchBase","Switch","defaultColor","defaultDisabledColor","switchTrackDisabled","SwitchTrack","onBackground","black","switchTrack","SwitchThumb","sx","getToggleButtonGroupUtilityClass","getToggleButtonUtilityClass","ToggleButtonGroupRoot","toggleButtonGroupClasses","toggleButtonClasses","exclusive","buttonValue","handleExclusiveChange","ToggleButtonGroupContext","ToggleButtonGroupButtonContext","clampWrapper","decomposeColor","re","RegExp","colors","hexToRgb","marker","substring","colorSpace","shift","recomposeColor","isValueSelected","ToggleButtonRoot","selectedColorChannel","selectedColor","_React$useContext","contextProps","toggleButtonGroupButtonContextPositionClassName","resolvedProps","resolveProps","positionClassName","getBottomNavigationUtilityClass","BottomNavigationRoot","showLabels","childIndex","childValue","showLabel","getBottomNavigationActionUtilityClass","BottomNavigationActionRoot","iconOnly","bottomNavigationActionClasses","BottomNavigationActionLabel","transitionDelay","BreadcrumbCollapsedButton","emphasize","BreadcrumbCollapsedIcon","MoreHorizIcon","otherProps","CollapsedIcon","collapsedIcon","getBreadcrumbsUtilityClass","BreadcrumbsRoot","breadcrumbsClasses","li","BreadcrumbsOl","ol","BreadcrumbsSeparator","insertSeparators","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","setExpanded","collapsedIconSlotProps","allItems","BreadcrumbCollapsed","handleClickExpand","renderItemsBeforeAndAfter","getLinkUtilityClass","transformedColor","getPath","channelColor","LinkRoot","textDecorationColor","getTextDecoration","linkClasses","TypographyClasses","handlerRef","setTranslateValue","containerPropProp","containerRect","fakeTransform","getPropertyValue","offsetX","offsetY","transformValues","getTranslateValue","webkitTransform","Slide","defaultEasing","sharp","easingProp","childrenRef","getDrawerUtilityClass","docked","DrawerRoot","drawer","DrawerDockedRoot","DrawerPaper","anchor","oppositeDirection","defaultTransitionDuration","anchorProp","ModalProps","BackdropPropsProp","SlideProps","mounted","anchorInvariant","getAnchor","slidingDrawer","getListItemUtilityClass","getListItemButtonUtilityClass","getListItemSecondaryActionClassesUtilityClass","ListItemSecondaryActionRoot","ListItemSecondaryAction","ListItemRoot","alignItemsFlexStart","hasSecondaryAction","secondaryAction","listItemButtonClasses","listItemClasses","ListItemContainer","componentProp","ContainerComponent","ContainerProps","ContainerClassName","listItemRef","componentProps","pop","ListItemTextRoot","primaryProp","primaryTypographyProps","secondaryProp","secondaryTypographyProps","ListItemIconRoot","getPaginationUtilityClass","getPaginationItemUtilityClass","page","ellipsis","previousNext","firstLast","PaginationItemEllipsis","paginationItemClasses","PaginationItemPage","activatedOpacity","PaginationItemPageIcon","first","last","previous","Icon","NavigateNextIcon","NavigateBeforeIcon","FirstPageIcon","LastPageIcon","PaginationRoot","PaginationUl","ul","defaultGetAriaLabel","boundaryCount","count","defaultPage","getItemAriaLabel","hideNextButton","hidePrevButton","renderItem","PaginationItem","showFirstButton","showLastButton","siblingCount","pageProp","setPageState","end","startPages","endPages","siblingsStart","siblingsEnd","itemList","buttonPage","usePagination","Zoom","getSpeedDialUtilityClass","getOrientation","SpeedDialRoot","speedDial","speedDialClasses","spacingActions","SpeedDialFab","Fab","SpeedDialActions","actionsClosed","FabProps","origDialButtonRef","onMouseEnter","eventTimer","focusedAction","nextItemArrowKey","handleOwnFabRef","fabFef","handleFabRef","createHandleSpeedDialActionButtonRef","dialActionIndex","origButtonRef","buttonRef","mouseenter","_child$props","tooltipPlacement","tooltipPlacementProp","ChildFabProps","nextItemArrowKeyCurrent","actionStep","nextAction","unmountOnExit","getSpeedDialIconUtilityClass","SpeedDialIconRoot","speedDialIconClasses","openIcon","iconWithOpenIconOpen","openIconOpen","SpeedDialIcon","openIconProp","formatIcon","newClassName","AddIcon","getSpeedDialActionUtilityClass","SpeedDialActionFab","fabClosed","SpeedDialAction","fabHoverBg","SpeedDialActionStaticTooltip","staticTooltip","staticTooltipClosed","speedDialActionClasses","staticTooltipLabel","SpeedDialActionStaticTooltipLabel","wordBreak","TooltipClasses","tooltipOpen","tooltipOpenProp","tooltipTitle","setTooltipOpen","transitionStyle","Tooltip","placement","handleTooltipClose","handleTooltipOpen","getStepperUtilityClass","StepperContext","StepContext","getStepConnectorUtilityClass","StepConnectorRoot","alternativeLabel","completed","StepConnectorLine","line","StepConnector","borderTopStyle","borderLeftStyle","borderLeftWidth","StepperRoot","defaultConnector","activeStep","connector","nonLinear","steps","getStepUtilityClass","StepRoot","activeProp","completedProp","newChildren","getStepIconUtilityClass","_circle","StepIconRoot","stepIconClasses","StepIconText","classNameProp","Warning","CheckCircle","cx","cy","textAnchor","dominantBaseline","getStepLabelUtilityClass","StepLabelRoot","stepLabelClasses","StepLabelLabel","StepLabelIconContainer","iconContainer","StepLabelLabelContainer","labelContainer","StepLabel","_slotProps$label","optional","StepIconComponent","StepIconComponentProp","StepIconProps","iconContext","StepIcon","labelSlotProps","getTabUtilityClass","TabRoot","labelIcon","wrapped","iconPosition","tabClasses","iconWrapper","indicator","selectionFollowsFocus","cachedType","detectScrollType","dummy","createElement","appendChild","dir","scrollLeft","removeChild","getNormalizedScrollLeft","scrollWidth","easeInOutSin","time","sin","PI","getTabScrollButtonUtilityClass","TabScrollButtonRoot","tabScrollButtonClasses","_slots$StartScrollBut","_slots$EndScrollButto","StartButtonIcon","StartScrollButtonIcon","KeyboardArrowLeft","EndButtonIcon","EndScrollButtonIcon","KeyboardArrowRight","startButtonIconProps","startScrollButtonIcon","endButtonIconProps","endScrollButtonIcon","getTabsUtilityClass","TabsRoot","tabsClasses","scrollButtons","scrollButtonsHideMobile","down","TabsScroller","scroller","hideScrollbar","scrollableX","scrollableY","scrollbarWidth","FlexContainer","flexContainer","flexContainerVertical","centered","TabsIndicator","indicatorColor","TabsScrollbarSize","scrollbarHeight","setMeasurements","prevHeight","defaultIndicatorStyle","ariaLabelledBy","allowScrollButtonsMobile","ScrollButtonComponent","TabScrollButton","TabIndicatorProps","TabScrollButtonProps","visibleScrollbar","scrollable","scrollStart","clientSize","startScrollButtonIconProps","endScrollButtonIconProps","setMounted","indicatorStyle","setIndicatorStyle","displayStartScroll","setDisplayStartScroll","displayEndScroll","setDisplayEndScroll","updateScrollObserver","setUpdateScrollObserver","scrollerStyle","setScrollerStyle","valueToIndex","tabsRef","tabListRef","getTabsMeta","tabsNode","tabsMeta","tabMeta","scrollLeftNormalized","tab","get","updateIndicatorState","startIndicator","startValue","correction","newIndicatorStyle","dStart","dSize","scroll","scrollValue","animation","to","cb","ease","cancelled","cancel","timestamp","requestAnimationFrame","animate","moveTabsScroll","delta","getScrollSize","containerSize","totalSize","handleStartScrollClick","handleEndScrollClick","handleScrollbarSizeChange","scrollSelectedIntoView","nextScrollStart","updateScrollButtonState","handleMutation","records","record","removedNodes","_resizeObserver","unobserve","addedNodes","_resizeObserver2","win","mutationObserver","MutationObserver","childList","_mutationObserver","_resizeObserver3","tabListChildren","IntersectionObserver","firstTab","lastTab","observerOptions","threshold","firstObserver","isIntersecting","lastObserver","updateIndicator","updateScrollButtons","set","conditionalElements","getConditionalElements","scrollbarSizeListener","showScrollButtons","scrollButtonStart","scrollButtonEnd","previousItemKey","nextItemKey","getAvatarUtilityClass","AvatarRoot","colorDefault","Avatar","AvatarImg","textIndent","AvatarFallback","Person","fallback","alt","imgProps","sizes","src","srcSet","loaded","crossOrigin","referrerPolicy","setLoaded","image","Image","onload","onerror","srcset","useLoaded","hasImg","hasImgNotFailing","ImgSlot","imgSlotProps","getBadgeUtilityClass","BadgeRoot","BadgeBadge","badge","overlap","alignContent","RADIUS_STANDARD","easeInOut","RADIUS_DOT","badgeClasses","_slots$badge","_slotProps$badge","anchorOriginProp","overlapProp","colorProp","invisibleProp","maxProp","badgeContent","badgeContentProp","showZero","invisibleFromHook","displayValue","displayValueFromHook","prevProps","useBadge","BadgeSlot","Badge","badgeSlotProps","badgeProps","ListItemButtonRoot","href","getTableContainerUtilityClass","TableContainerRoot","getTableUtilityClass","TableRoot","stickyHeader","borderCollapse","borderSpacing","captionSide","defaultComponent","table","TableContext","getTableHeadUtilityClass","TableHeadRoot","tablelvl2","Tablelvl2Context","getTableRowUtilityClass","TableRowRoot","head","footer","tableRowClasses","TableRow","getTableCellUtilityClass","TableCellRoot","TableCell","tableCellClasses","paddingCheckbox","paddingProp","scope","scopeProp","sizeProp","sortDirection","isHeadCell","ariaSort","getTableBodyUtilityClass","TableBodyRoot","getAlertUtilityClass","AlertRoot","severity","getColor","getBackgroundColor","colorSeverity","Alert","alertClasses","AlertIcon","AlertMessage","message","AlertAction","defaultIconMapping","success","SuccessOutlinedIcon","warning","ReportProblemOutlinedIcon","ErrorOutlineIcon","info","InfoOutlinedIcon","iconMapping","closeButton","CloseButton","closeIcon","CloseIcon","CloseButtonSlot","closeButtonProps","CloseIconSlot","closeIconProps","getCircularProgressUtilityClass","_templateObject","_templateObject2","_templateObject3","_templateObject4","_t","_t2","_t3","_t4","SIZE","circularRotateKeyframe","keyframes","_taggedTemplateLiteral","circularDashKeyframe","CircularProgressRoot","css","CircularProgressSVG","svg","CircularProgressCircle","disableShrink","circleDisableShrink","stroke","strokeDasharray","strokeDashoffset","CircularProgress","thickness","circleStyle","rootStyle","circumference","strokeWidth","getDialogTitleUtilityClass","DialogTitleRoot","titleId","DialogContext","getDialogContentUtilityClass","DialogContentRoot","dividers","dialogTitleClasses","getDialogActionsUtilityClass","DialogActionsRoot","getDialogUtilityClass","DialogBackdrop","overrides","DialogRoot","DialogContainer","DialogPaper","paperFullWidth","fullScreen","paperFullScreen","dialogClasses","paperScrollBody","ariaLabelledbyProp","backdropClick","dialogContextValue","getDialogContentTextUtilityClass","DialogContentTextRoot","getLinearProgressUtilityClass","_templateObject5","_templateObject6","_t5","_t6","indeterminate1Keyframe","indeterminate2Keyframe","bufferKeyframe","getColorShade","LinearProgress","LinearProgressRoot","LinearProgressDashed","dashed","backgroundSize","backgroundPosition","LinearProgressBar1","bar","bar1Indeterminate","bar1Determinate","bar1Buffer","LinearProgressBar2","bar2Indeterminate","bar2Buffer","valueBuffer","bar1","bar2","inlineStyles","getUnit","toUnitless","getSkeletonUtilityClass","pulseKeyframe","waveKeyframe","SkeletonRoot","hasChildren","fitContent","heightAuto","radiusUnit","radiusValue","Skeleton","mapEventPropToEvent","eventProp","ClickAwayListener","disableReactTree","mouseEvent","onClickAway","movedRef","activatedRef","syntheticEventRef","handleClickAway","insideReactTree","clickedRootScrollbar","insideDOM","composedPath","createHandleSynthetic","handlerName","childrenProps","mappedTouchEvent","mappedMouseEvent","getSnackbarContentUtilityClass","SnackbarContentRoot","emphasis","SnackbarContent","SnackbarContentMessage","SnackbarContentAction","getSnackbarUtilityClass","SnackbarRoot","snackbar","autoHideDuration","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","resumeHideDuration","timerAutoHide","setAutoHideTimer","autoHideDurationParam","handlePause","handleResume","createHandleFocus","onFocusCallback","createMouseEnter","onMouseEnterCallback","createMouseLeave","onMouseLeaveCallback","onBlurCallback","useSnackbar","_e","embeddable","docURL","my","o","md","E","s","Ce","mr","Ie","L","subComponents","R","U","mb","w","Ae","qe","De","S","T","B","Pe","ze","C","I","A","D","P","z","H","G","O","F","N","W","He","Ge","Oe","Fe","j","Q","Ne","We","M","V","X","J","K","Y","Z","je","Qe","Me","Ve","ee","te","ae","Xe","Je","Ke","le","ne","me","ce","ie","oe","Ye","ue","previewLayout","Ee","Ze","$e","se","de","pe","he","be","ge","ve","arrow","ye","Le","xe","Re","Ue","fe","we","ke","Se","Te","Be"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/853.4c6c25ca.chunk.js b/static/js/853.4c6c25ca.chunk.js deleted file mode 100644 index e78db6d..0000000 --- a/static/js/853.4c6c25ca.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[853],{1234:(e,t,n)=>{n.r(t),n.d(t,{UserData:()=>J,default:()=>z,marked:()=>W,saveUserData:()=>B});var s=n(4283),r=n(8857),o=n(8172),l=n(5043),i=n(6213),a=n.n(i),u=n(5745),c=n(5969),h=n(2518),d=n(9796);class p{constructor(){this.id="",this.title="Loading...",this.preProblemDescription="",this.description="",this.tests=[],this.hiddenTests=[],this.displayAbove="",this.displayBelow="",this.solution="",this.solutionCode="",this.codeLang="",this.nextProblemId=""}}class g{constructor(e,t){this.key=void 0,this.value=void 0,this.key=e,this.value=t}}function f(e,t){for(;e.length>0&&(v(e),0!==e.length&&"code"===e[0].type);){let n=e.shift().text.trim(),s=n.split("\n").flatMap((e=>e.trim())),r=s[s.length-1],o=r.indexOf("("),l=-1;for(let e=r.length-1;e>=0;e--)if(")"===r[e]){l=e;break}if(-1===o||-1===l){console.error("Failed to parse function call (Magic Links will not work!): "+r);continue}let i=r.substring(o+1,l).split(",").map((e=>e.trim()));v(e);let a=1,u=r;u.endsWith(";")&&(u=u.substring(0,u.length-1));let c=[];for(let e of i){let t=n.match(new RegExp("let\\s+".concat(e,"\\s*=\\s*")));if(null!==t&&void 0!==t.index){let s=n.substring(t.index+t[0].length).trim(),r=0,o=0,l=0,i=0,a=0;for(let e=0;e0&&"paragraph"===e[0].type;){let t=e.shift().text.trim(),n=t.split("=").map((e=>e.trim()));if(2!==n.length){console.error("Failed to parse metadata: "+t);continue}let s=n[0].toLowerCase(),o=n[1];if("repeat"===s){let e=parseInt(o);isNaN(e)?console.error("Failed to parse repeat value: "+o):a=e}else if("displayas"===s){u=o;let e=r.indexOf("("),t=-1;for(let n=u.length-1;n>=0;n--)if(")"===u[n]){t=n;break}if(-1===e||-1===t){console.error("Failed to parse function for displayAs meta call (Magic Links will not work!): "+u);continue}i=u.substring(e+1,t).split(",").map((e=>e.trim()))}else if(i.includes(n[0])){let t=n[0],s=n[1];0===n[1].length&&(v(e),0===e.length||"code"!==e[0].type?console.error("Found magic link with nothing after the equals sign & no code block following: "+n[0]):s=e.shift().text),m(c,t,s)}else console.error("Unknown metadata key: "+n[0]);v(e)}for(let e=0;e0&&e[0].type!==t;)e.shift()}function v(e){for(;e.length>0&&"space"===e[0].type;)e.shift()}var y=n(579);const w="Requesting help from the AI tutor...",R="NEXT_HELP_TIME";var k=n(3216),E=(n(119),n(6494)),C=n(2561);const j=2;let N=function(e){return e.Passed="Passed",e.Failed="Failed",e.Exception="Exception",e.NotRun="Not run",e}({});class S{constructor(){this.testResults=[],this.returnedResults=[],this.expectedResults=[],this.parseError="",this.errorLine=-1,this.runtimeError="",this.outputs=[],this.ranSuccessfully=!0}}class L{constructor(e,t){this.str=void 0,this.lineNum=void 0,this.str=e,this.lineNum=t}}const P=n(5311).A;function A(e){let t=[],n=1;const s=[" ","(",")","{","}",":",",",";","\n"];let r=0;for(let o=0;o""!==e.str))}function I(e,t,n,s){let r=e.stack;void 0===r&&(r="");let o=r.split("\n");for(let a=0;a:/g;for(let a=0;a=t[e]&&l<=n[e]){u=t[e],c=n[e];break}if(-1!==u&&-1!==c){let t=l-u+1,n=0;for(let e=0;es[e]&&n++;t-=n;let c=parseInt(r[2]),h="".concat(t,":").concat(c);o[a]=e.replace(r[0],h),-1===i&&(i=t)}}}return e.stack=o.join("\n"),i}function T(e){return void 0===e?"undefined":null===e?"null":e.toString()}function F(){return Math.random().toString(36).substring(7)}function M(e){let t=e.solutionCode,n="expectedResults"+F(),s="\nlet ".concat(n," = [] || [];\n \n").concat(t,"\n "),r=e.tests.concat(e.hiddenTests);for(let i=0;iT(e)))}const D=(e,t)=>{if(!e.length)return t.length;if(!t.length)return e.length;const n=[];for(let s=0;s<=t.length;s++){n[s]=[s];for(let r=1;r<=e.length;r++)n[s][r]=0===s?r:Math.min(n[s-1][r]+1,n[s][r-1]+1,n[s-1][r-1]+(e[r-1]===t[s-1]?0:1))}return n[t.length][e.length]};var _=n(1020),H=n(34);o.A.registerAliases([""],{languageName:"javascript"});const U=(0,l.lazy)((()=>Promise.all([n.e(671),n.e(303)]).then(n.bind(n,4303)))),W=new s.Dz((0,r.x)({langPrefix:"hljs language-",highlight(e,t,n){const s=o.A.getLanguage(t)?t:"plaintext";return o.A.highlight(e,{language:s}).value}}));function B(e,t){null!==t.currentCode&&""!==t.currentCode&&void 0!==t.currentCode||console.error("User data is being saved with no code"),localStorage.setItem(O(e.id,(0,u.J3)()),JSON.stringify(t))}function O(e,t){return"problem "+e}function z(){var e,t,n;const[s,r]=(0,l.useState)(null),{"*":i}=(0,k.g)(),[g,m]=(0,l.useState)(null),[j,L]=(0,l.useState)('When you press "I\'m stuck", the AI tutor will respond here.'),[H,z]=(0,l.useState)({anchorEl:null,magicLink:"",highlight:!0});function G(){return function(e,t,n){if(0===t.history.length)t.history.push(t.currentCode);else{t.history[t.history.length-1]!==t.currentCode&&t.history.push(t.currentCode)}t.lastUpdated=new Date;let s=function(e,t){let n,s=e.currentCode;try{n=C.qg(s,{ecmaVersion:"latest",locations:!0})}catch(v){if(v instanceof SyntaxError){let e=v.message;return v.pos===s.length&&(e+="\nUnexpected end of input. Check that you have closed all brackets and parentheses."),{testResults:[],returnedResults:[],expectedResults:M(t),parseError:e,errorLine:v.loc.line,runtimeError:"",outputs:[],ranSuccessfully:!1}}throw v}{let e={returnableError:{testResults:[],returnedResults:[],expectedResults:M(t),parseError:"You need to define a function with the following signature:"+t.solutionCode.split("{")[0],errorLine:1,runtimeError:"",outputs:[],ranSuccessfully:!1},matchedTokens:0,levenshteinDistance:1e5},r=!1;e:for(let o of n.body){let n=s.substring(o.start,o.end).split("{")[0],l=A(n),i=t.solutionCode.split("{")[0],a=A(i);for(let s=0;se.str)).join(" ")+"` but got: `"+l[s].str+"`.";let r=D(l[s].str,a[s].str);(s>e.matchedTokens||r=e.matchedTokens)&&(e={returnableError:{testResults:[],returnedResults:[],expectedResults:M(t),parseError:n,errorLine:l[s].lineNum,runtimeError:"",outputs:[],ranSuccessfully:!1},matchedTokens:s,levenshteinDistance:r});continue e}if(l.length===a.length){r=!0;break}l.length>e.matchedTokens&&(e={returnableError:{testResults:[],returnedResults:[],expectedResults:M(t),parseError:"Function signature does not match the expected signature. Expected: "+i+" but got: "+n,errorLine:l[l.length-1].lineNum,runtimeError:"",outputs:[],ranSuccessfully:!1},matchedTokens:l.length,levenshteinDistance:1e5})}if(!r)return e.returnableError}function r(e,t){let n=1;for(let s=t;s 10000) { throw new Error("Infinite loop detected. Execution stopped."); }\n');s=r+h+n+d+i,o.push(a),o.push(u);let p=h.length+d.length;for(let s=y+1;s=m.length){b.testResults.push(N.NotRun),b.expectedResults.push("Unknown"),b.returnedResults.push("Unknown"),b.outputs.push([]),b.ranSuccessfully=!1;continue}if(y>=f.length){b.testResults.push(N.NotRun),b.expectedResults.push(m[y].toString()),b.returnedResults.push("Unknown"),b.outputs.push([]),b.ranSuccessfully=!1;continue}let e,n=f[y],r=m[y];if(e=y>t.tests.length?[]:x[y],r instanceof Error){b.expectedResults.push("Error"),b.returnedResults.push("Error"),b.testResults.push(N.NotRun),console.error("A test case failed to run the solution: "+r),console.log("Test: "+g[y]),console.log("Solution: "+t.solutionCode),console.log("User code: "+s),b.ranSuccessfully=!1;continue}b.expectedResults.push(T(r));let l=[];for(let t of e){let e="";"log"!==t.function&&(e=t.function+": ");for(let n of t.args)n instanceof Error&&I(n,d,p,o);t.args.length>0?e+=E.format(t.args[0],...t.args.slice(1)):e+="",l.push(e)}b.outputs.push(l),n instanceof Error?(b.returnedResults.push("Error"),b.testResults.push(N.Exception),b.errorLine=I(n,d,p,o),b.runtimeError=n.stack,b.ranSuccessfully=!1):(b.returnedResults.push(T(n)),T(n)!==T(r)?b.testResults.push(N.Failed):b.testResults.push(N.Passed))}return b}(t,e),r=new J(t.history,t.requestHelpHistory,s,new Date,t.currentCode,t.aiRememberResponse);return n(r),B(e,r),r}(s,g,m)}let X=null===i||void 0===i?void 0:i.toLowerCase();if(null===(e=X)||void 0===e||e.trim(),null!==(t=X)&&void 0!==t&&t.startsWith("/")&&(X=X.substring(1)),null!==(n=X)&&void 0!==n&&n.endsWith("/")&&(X=X.substring(0,X.length-1)),(0,l.useEffect)((()=>{void 0!==X&&fetch("/problems/"+X+".md").then((async e=>{let t=await e.text();if(e.ok&&t.startsWith("#"))return t;throw new Error("Failed to fetch problem data")})).then((async e=>{let t=function(e,t){let n=W.lexer(e),s=n.shift().text,r="";if(b(n,"heading"),"Context"===n[0].text)for(n.shift();n.length>0&&("heading"!==n[0].type||n[0].depth>1);)r+=n.shift().raw;x(n,"description");let o="";for(;n.length>0&&("heading"!==n[0].type||n[0].depth>1);)o+=n.shift().raw;x(n,"Problem"),"code"!==n[0].type&&console.error("Problem Parse: No code block found after problem heading. If no template code is needed, please use a code block with no content (with the correct language).");let l=n.shift();l.lang||console.error("Problem Parse: No code language specified for problem "+t);let i,a,u=l.lang?l.lang:"javascript",c=l.text.split("// Your code here");0===c.length||""===c[0].trim()?(console.log("Problem Parse: Code block has no content"),i="",a=""):(i=c[0].trim(),1===c.length?(a="",console.error("Problem Parse: No secondary display content found in problem "+t+". It is unlikely that this is intentional. Ensure that you have a comment with the text '// Your code here' in the problem description.")):a=c[1].trim()),x(n,"Solution"),v(n);let h="",d="";for(;n.length>0&&!("heading"===n[0].type&&n[0].depth<=1);)"code"===n[0].type&&""===d&&(d+=n[0].text),h+=n.shift().raw;x(n,"Test Cases");let p=[];f(n,p),x(n,"Hidden Test Cases");let g,m=[];return f(n,m),x(n,"Next"),0===n.length||"paragraph"!==n[0].type?g="nothing":(g=n.shift().text,g=g.trim(),g.startsWith("/")&&(g=g.substring(1)),g.endsWith("/")&&(g=g.substring(0,g.length-1)),""===g&&(g="nothing")),{id:t,title:s,preProblemDescription:r,description:o,tests:p,hiddenTests:m,displayAbove:i,displayBelow:a,solution:h,solutionCode:d,codeLang:u,nextProblemId:g}}(e,X),n=function(e,t){if(void 0===e)return console.error("No problem id was specified, so no user data could be retrieved."),new J;let n=localStorage.getItem(O(e));null===n&&(n=localStorage.getItem(O(e)),null!==n&&console.log("Got user data without username"));if(null===n)return new J;return JSON.parse(n)}(X,(0,u.J3)());null!==n.currentCode&&""!==n.currentCode&&void 0!==n.currentCode||(console.log("First time loading problem, setting template data"),""!==t.displayAbove&&""!==t.displayBelow&&(n.currentCode=t.displayAbove+"\n\t\n"+t.displayBelow)),void 0!==n.testResults&&null!==n.testResults&&0!==n.testResults.expectedResults.length||(console.log("First time loading problem, getting expected results"),n.testResults=new S,n.testResults.expectedResults=M(t)),r(t),m(n)})).catch((e=>{console.error(e);let t=new p;t.title="Failed to load problem "+X,r(t)}))}),[X]),null===s||null===g)return null!=s&&void 0!==s.title&&s.title.startsWith("Failed to load problem")&&void 0!==X?(0,y.jsxs)("div",{children:["Failed to load problem ",X]}):void 0!==X?(0,y.jsx)("div",{children:"Loading..."}):(0,y.jsx)("div",{children:"A problem wasn't specified"});let K=s.codeLang;""===K&&(K="plaintext");let Q=a().sanitize(W.parse(s.preProblemDescription+"\n\n"+s.description));const Z=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];z({anchorEl:e.currentTarget,magicLink:t,highlight:n})},$=()=>{z({anchorEl:null,magicLink:H.magicLink,highlight:H.highlight})},ee=Boolean(H.anchorEl);let te=[];for(let o=0;o0&&(se=(0,y.jsx)("ul",{className:"",children:te.map(((e,t)=>(0,y.jsx)("li",{children:e},t)))})),0===g.testResults.testResults.length)ne="Hidden tests will be run when you submit your code";else{let e=s.hiddenTests.length,t=0;for(let n=0;n