自动化立体仓库 - WCS系统
#
whycq
2024-07-25 d74e6a44344c40493970a8756930fc1cf32028ac
#
11个文件已添加
1014 ■■■■■ 已修改文件
src/main/java/taskRecord.sql 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/taskRecord/taskRecord.js 242 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/page2024.html 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/taskRecord/taskRecord.html 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/image_font.png 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/image_font.xml.fnt 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/mapData.json 240 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/pixijs.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/vue.min.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/wcsmap.css 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/wcsmap/wcsmap.html 286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/taskRecord.sql
New file
@@ -0,0 +1,18 @@
-- save taskRecord record
-- mysql
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'taskRecord/taskRecord.html', 'taskRecord管理', null , '2', null , '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'taskRecord#view', '查询', '', '3', '0', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'taskRecord#btn-add', '新增', '', '3', '1', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'taskRecord#btn-edit', '编辑', '', '3', '2', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'taskRecord#btn-delete', '删除', '', '3', '3', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'taskRecord#btn-export', '导出', '', '3', '4', '1');
-- sqlserver
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'taskRecord/taskRecord.html', N'taskRecord管理', null, '2', null, '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'taskRecord#view', N'查询', '', '3', '0', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'taskRecord#btn-add', N'新增', '', '3', '1', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'taskRecord#btn-edit', N'编辑', '', '3', '2', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'taskRecord#btn-delete', N'删除', '', '3', '3', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'taskRecord#btn-export', N'导出', '', '3', '4', '1');
src/main/webapp/static/js/taskRecord/taskRecord.js
New file
@@ -0,0 +1,242 @@
var pageCurr;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    // 数据渲染
    tableIns = table.render({
        elem: '#taskRecord',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/taskRecord/list/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-120',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'id', align: 'center',title: ''}
            ,{field: 'taskNo', align: 'center',title: ''}
            ,{field: 'crnNo', align: 'center',title: ''}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        ]],
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'count': res.data.total,
                'data': res.data.records
            }
        },
        response: {
            statusCode: 200
        },
        done: function(res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
        }
    });
    // 监听排序事件
    table.on('sort(taskRecord)', function (obj) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
            searchData[this.name] = this.value;
        });
        searchData['orderByField'] = obj.field;
        searchData['orderByType'] = obj.type;
        tableIns.reload({
            where: searchData,
            page: {curr: 1}
        });
    });
    // 监听头工具栏事件
    table.on('toolbar(taskRecord)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        switch(obj.event) {
            case 'addData':
                showEditModel();
                break;
            case 'deleteData':
               if (checkStatus.length === 0) {
                   layer.msg('请选择要删除的数据', {icon: 2});
                   return;
               }
               del(checkStatus.map(function (d) {
                   return d.id;
               }));
               break;
            case 'exportData':
                admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
                            titles.push(col.title);
                            fields.push(col.field);
                        }
                    });
                    var exportData = {};
                    $.each($('#search-box [name]').serializeArray(), function() {
                        exportData[this.name] = this.value;
                    });
                    var param = {
                        'taskRecord': exportData,
                        'fields': fields
                    };
                    $.ajax({
                        url: baseUrl+"/taskRecord/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2})
                            }
                        }
                    });
                });
                break;
        }
    });
    // 监听行工具事件
    table.on('tool(taskRecord)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'edit':
                showEditModel(data);
                break;
            case "del":
                del([data.id]);
                break;
        }
    });
    /* 弹窗 - 新增、修改 */
    function showEditModel(mData) {
        admin.open({
            type: 1,
            area: '600px',
            title: (mData ? '修改' : '添加') + '订单状态',
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                layDateRender(mData);
                form.val('detail', mData);
                form.on('submit(editSubmit)', function (data) {
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/taskRecord/"+(mData?'update':'add')+"/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                tableReload();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            }else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
                $(layero).children('.layui-layer-content').css('overflow', 'visible');
                layui.form.render('select');
            }
        });
    }
    /* 删除 */
    function del(ids) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/taskRecord/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        tableReload();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 搜索
    form.on('submit(search)', function (data) {
        pageCurr = 1;
        tableReload(false);
    });
    // 重置
    form.on('submit(reset)', function (data) {
        pageCurr = 1;
        clearFormVal($('#search-box'));
        tableReload(false);
    });
    // 时间选择器
    function layDateRender(data) {
        setTimeout(function () {
        }, 300);
    }
    layDateRender();
});
// 关闭动作
$(document).on('click','#data-detail-close', function () {
    parent.layer.closeAll();
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    tableIns.reload({
        where: searchData,
        page: {curr: pageCurr}
     });
}
src/main/webapp/views/page2024.html
New file
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>物流监控平台</title>
    <style>
        body {
            background-color: #002b5c;
            color: white;
            font-family: Arial, sans-serif;
        }
        .conveyor {
            fill: green;
            transition: fill 0.3s;
        }
        #logistics-map {
            border: 1px solid #fff;
            margin: 0 auto;
            display: block;
            background-color: #003366;
        }
        .section {
            fill: none;
            stroke: #00ff00;
            stroke-width: 2;
        }
    </style>
</head>
<body>
<h1 style="text-align:center;">物流监控平台</h1>
<svg id="logistics-map" width="1200" height="600" viewBox="0 0 1200 600">
    <!-- 绘制100节输送线 -->
    <g id="conveyors">
        <rect id="conveyor-1" class="conveyor" x="10" y="10" width="50" height="10"></rect>
        <rect id="conveyor-2" class="conveyor" x="70" y="10" width="50" height="10"></rect>
        <!-- 添加更多输送线 -->
        <!-- 示例添加多条输送线 -->
        <rect id="conveyor-3" class="conveyor" x="130" y="10" width="50" height="10"></rect>
        <rect id="conveyor-4" class="conveyor" x="190" y="10" width="50" height="10"></rect>
        <rect id="conveyor-5" class="conveyor" x="250" y="10" width="50" height="10"></rect>
        <rect id="conveyor-6" class="conveyor" x="310" y="10" width="50" height="10"></rect>
        <rect id="conveyor-7" class="conveyor" x="370" y="10" width="50" height="10"></rect>
        <rect id="conveyor-8" class="conveyor" x="430" y="10" width="50" height="10"></rect>
        <rect id="conveyor-9" class="conveyor" x="490" y="10" width="50" height="10"></rect>
        <rect id="conveyor-10" class="conveyor" x="550" y="10" width="50" height="10"></rect>
        <!-- 为了简化代码,这里只列出10节输送线,请根据需要增加到100节 -->
    </g>
</svg>
<div style="text-align:center; margin-top:20px;">
    <button onclick="updateConveyorColor('red')">变为红色</button>
    <button onclick="updateConveyorColor('blue')">变为蓝色</button>
    <button onclick="updateConveyorColor('green')">变为绿色</button>
</div>
<script>
    function updateConveyorColor(color) {
        var conveyors = document.getElementsByClassName('conveyor');
        for (var i = 0; i < conveyors.length; i++) {
            conveyors[i].style.fill = color;
        }
    }
    // 模拟后台更新颜色
    function simulateBackendUpdate() {
        var colors = ['red', 'blue', 'green', 'yellow'];
        setInterval(function () {
            var randomColor = colors[Math.floor(Math.random() * colors.length)];
            updateConveyorColor(randomColor);
        }, 5000); // 每5秒更新一次颜色
    }
    simulateBackendUpdate(); // 启动模拟后台更新
</script>
</body>
</html>
src/main/webapp/views/taskRecord/taskRecord.html
New file
@@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form toolbar" id="search-box">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">编号:</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-inline">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
                            <i class="layui-icon">&#xe615;</i>搜索
                        </button>
                        <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
                            <i class="layui-icon">&#xe666;</i>重置
                        </button>
                    </div>
                </div>
            </div>
            <table class="layui-hide" id="taskRecord" lay-filter="taskRecord"></table>
        </div>
    </div>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button>
        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button>
    </div>
</script>
<script type="text/html" id="operate">
    <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>
</script>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/taskRecord/taskRecord.js" charset="utf-8"></script>
</body>
<!-- 表单弹窗 -->
<script type="text/html" id="editDialog">
    <form id="detail" lay-filter="detail" class="layui-form admin-form model-form">
        <input name="id" type="hidden">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="id" placeholder="请输入" lay-vertype="tips" lay-verify="required">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="taskNo" placeholder="请输入">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="crnNo" placeholder="请输入">
                    </div>
                </div>
             </div>
        </div>
        <hr class="layui-bg-gray">
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
</html>
src/main/webapp/views/wcsmap/image_font.png
src/main/webapp/views/wcsmap/image_font.xml.fnt
New file
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<font>
  <info face="ChillRoundF" size="128" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/>
  <common lineHeight="128" base="26" scaleW="2657" scaleH="119" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/>
  <pages>
    <page id="0" file="image_font.png"/>
  </pages>
  <chars count="23">
    <char id="31449" x="5" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="28857" x="142" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="32534" x="279" y="0" width="127" height="119" xoffset="-1" yoffset="4.5" xadvance="125" page="0" chnl="15"/>
    <char id="21495" x="411" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="24037" x="548" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="20316" x="685" y="0" width="131" height="119" xoffset="-1" yoffset="4.5" xadvance="129" page="0" chnl="15"/>
    <char id="30446" x="821" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="26631" x="958" y="0" width="131" height="119" xoffset="-1" yoffset="4.5" xadvance="129" page="0" chnl="15"/>
    <char id="36816" x="1094" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="34892" x="1231" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="20013" x="1368" y="0" width="133" height="119" xoffset="-1" yoffset="4.5" xadvance="131" page="0" chnl="15"/>
    <char id="29366" x="1506" y="0" width="132" height="119" xoffset="-1" yoffset="4.5" xadvance="130" page="0" chnl="15"/>
    <char id="24577" x="1643" y="0" width="135" height="119" xoffset="-1" yoffset="4.5" xadvance="133" page="0" chnl="15"/>
    <char id="49" x="1783" y="0" width="86" height="119" xoffset="-1" yoffset="4.5" xadvance="84" page="0" chnl="15"/>
    <char id="50" x="1874" y="0" width="81" height="119" xoffset="-1" yoffset="4.5" xadvance="79" page="0" chnl="15"/>
    <char id="51" x="1960" y="0" width="81" height="119" xoffset="-1" yoffset="4.5" xadvance="79" page="0" chnl="15"/>
    <char id="52" x="2046" y="0" width="81" height="119" xoffset="-1" yoffset="4.5" xadvance="79" page="0" chnl="15"/>
    <char id="53" x="2132" y="0" width="83" height="119" xoffset="-1" yoffset="4.5" xadvance="81" page="0" chnl="15"/>
    <char id="54" x="2220" y="0" width="84" height="119" xoffset="-1" yoffset="4.5" xadvance="82" page="0" chnl="15"/>
    <char id="55" x="2309" y="0" width="83" height="119" xoffset="-1" yoffset="4.5" xadvance="81" page="0" chnl="15"/>
    <char id="56" x="2397" y="0" width="82" height="119" xoffset="-1" yoffset="4.5" xadvance="80" page="0" chnl="15"/>
    <char id="57" x="2484" y="0" width="81" height="119" xoffset="-1" yoffset="4.5" xadvance="79" page="0" chnl="15"/>
    <char id="48" x="2570" y="0" width="82" height="119" xoffset="-1" yoffset="4.5" xadvance="80" page="0" chnl="15"/>
  </chars>
</font>
src/main/webapp/views/wcsmap/mapData.json
New file
@@ -0,0 +1,240 @@
mapData = {
    "plant": [
        {"title": "库存区","width": "1240","height": "480","background": "0x02427f","x": 20,"y":20},
        {"title": "硫化区","width": "1240","height": "360","background": "0x02427f","x": 20,"y":680},
        {"title": "其他","width": "500","height": "240","background": "0x02427f","x": 1400,"y":260}
    ],
    "conveyor": [
        {"id": "1","title": "608","width": 15,"height":40,"background": "0xb8db7c","x": 87,"y":660},
        {"id": "1","title": "609","width": 15,"height":15,"background": "0xb8db7c","x": 87,"y":701},
        {"id": "1","title": "610","width": 38,"height":15,"background": "0xb8db7c","x": 103,"y":701},
        {"id": "1","title": "611","width": 10,"height":10,"background": "0xf2f2f2","x": 128,"y":703},
        {"id": "1","title": "612","width": 15,"height":15,"background": "0xb8db7c","x": 126,"y":717},
        {"id": "1","title": "613","width": 42,"height":15,"background": "0xb8db7c","x": 142,"y":701},
        {"id": "1","title": "614","width": 10,"height":10,"background": "0xf2f2f2","x": 171,"y":703},
        {"id": "1","title": "615","width": 15,"height":15,"background": "0xb8db7c","x": 169,"y":717},
        {"id": "1","title": "616","width": 16,"height":15,"background": "0xb8db7c","x": 185,"y":701},
        {"id": "1","title": "617","width": 41,"height":15,"background": "0xb8db7c","x": 202,"y":701},
        {"id": "1","title": "618","width": 10,"height":10,"background": "0xf2f2f2","x": 230,"y":703},
        {"id": "1","title": "619","width": 15,"height":15,"background": "0xb8db7c","x": 228,"y":717},
        {"id": "1","title": "620","width": 42,"height":15,"background": "0xb8db7c","x": 244,"y":701},
        {"id": "1","title": "621","width": 10,"height":10,"background": "0xf2f2f2","x": 273,"y":703},
        {"id": "1","title": "622","width": 15,"height":15,"background": "0xb8db7c","x": 271,"y":717},
        {"id": "1","title": "643","width": 15,"height":58,"background": "0xb8db7c","x": 60,"y":660},
        {"id": "1","title": "642","width": 15,"height":59,"background": "0xb8db7c","x": 60,"y":719},
        {"id": "1","title": "641","width": 15,"height":59,"background": "0xb8db7c","x": 60,"y":779},
        {"id": "1","title": "640","width": 15,"height":59,"background": "0xb8db7c","x": 60,"y":839},
        {"id": "1","title": "639","width": 15,"height":59,"background": "0xb8db7c","x": 60,"y":899},
        {"id": "1","title": "638","width": 15,"height":46,"background": "0xb8db7c","x": 60,"y":959},
        {"id": "1","title": "637","width": 15,"height":15,"background": "0xb8db7c","x": 60,"y":1006},
        {"id": "1","title": "636","width": 22,"height":15,"background": "0xb8db7c","x": 76,"y":1006},
        {"id": "1","title": "635","width": 42,"height":15,"background": "0xb8db7c","x": 99,"y":1006},
        {"id": "1","title": "634","width": 42,"height":15,"background": "0xb8db7c","x": 142,"y":1006},
        {"id": "1","title": "633","width": 10,"height":10,"background": "0xf2f2f2","x": 171,"y":1008},
        {"id": "1","title": "627","width": 15,"height":15,"background": "0xb8db7c","x": 169,"y":990},
        {"id": "1","title": "632","width": 15,"height":15,"background": "0xb8db7c","x": 185,"y":1006},
        {"id": "1","title": "631","width": 41,"height":15,"background": "0xb8db7c","x": 201,"y":1006},
        {"id": "1","title": "630","width": 42,"height":15,"background": "0xb8db7c","x": 243,"y":1006},
        {"id": "1","title": "629","width": 10,"height":10,"background": "0xf2f2f2","x": 272,"y":1008},
        {"id": "1","title": "628","width": 15,"height":15,"background": "0xb8db7c","x": 270,"y":990},
        // 连廊左侧
        {"id": "1","title": "182","width": 21,"height":5,"background": "0xb8db7c","x": 1373,"y":279},
        {"id": "1","title": "183","width": 21,"height":5,"background": "0xb8db7c","x": 1351,"y":279},
        {"id": "1","title": "184","width": 21,"height":5,"background": "0xb8db7c","x": 1329,"y":279},
        {"id": "1","title": "185","width": 21,"height":5,"background": "0xb8db7c","x": 1307,"y":279},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1285,"y":279},
        {"id": "1","title": "187","width": 21,"height":5,"background": "0xb8db7c","x": 1263,"y":279},
        {"id": "1","title": "188","width": 21,"height":5,"background": "0xb8db7c","x": 1241,"y":279},
        {"id": "1","title": "189","width": 21,"height":5,"background": "0xb8db7c","x": 1219,"y":279},
        {"id": "1","title": "190","width": 21,"height":5,"background": "0xb8db7c","x": 1197,"y":279},
        {"id": "1","title": "191","width": 21,"height":5,"background": "0xb8db7c","x": 1175,"y":279},
        {"id": "1","title": "192","width": 22,"height":5,"background": "0xb8db7c","x": 1152,"y":279},
        {"id": "1","title": "193","width": 5,"height":5,"background": "0xb8db7c","x": 1146,"y":279},
        {"id": "1","title": "113","width": 5,"height":12,"background": "0x45decb","x": 1146,"y":266},
        {"id": "1","title": "136","width": 5,"height":18,"background": "0x45decb","x": 1140,"y":266},
        {"id": "1","title": "114","width": 5,"height":20,"background": "0xb8db7c","x": 1146,"y":245},
        {"id": "1","title": "186","width": 5,"height":20,"background": "0xb8db7c","x": 1140,"y":245},
        {"id": "1","title": "134","width": 24,"height":5,"background": "0xb8db7c","x": 1115,"y":245},
        {"id": "1","title": "133","width": 25,"height":5,"background": "0xb8db7c","x": 1089,"y":245},
        {"id": "1","title": "132","width": 8,"height":21,"background": "0xb8db7c","x": 1080,"y":231},
        {"id": "1","title": "131","width": 8,"height":5,"background": "0xb8db7c","x": 1089,"y":221},
        {"id": "1","title": "130","width": 8,"height":13,"background": "0xb8db7c","x": 1080,"y":217},
        {"id": "1","title": "129","width": 8,"height":10,"background": "0xb8db7c","x": 1080,"y":206},
        {"id": "1","title": "121","width": 8,"height":10,"background": "0xb8db7c","x": 1080,"y":195},
        {"id": "1","title": "122","width": 8,"height":5,"background": "0xb8db7c","x": 1071,"y":195},
        {"id": "1","title": "123","width": 8,"height":10,"background": "0xb8db7c","x": 1062,"y":195},
        {"id": "1","title": "124","width": 8,"height":10,"background": "0xb8db7c","x": 1062,"y":206},
        {"id": "1","title": "125","width": 8,"height":13,"background": "0xb8db7c","x": 1062,"y":217},
        {"id": "1","title": "126","width": 8,"height":5,"background": "0xb8db7c","x": 1053,"y":221},
        {"id": "1","title": "127","width": 8,"height":21,"background": "0xb8db7c","x": 1062,"y":231},
        {"id": "1","title": "128","width": 8,"height":5,"background": "0xb8db7c","x": 1071,"y":245},
        {"id": "1","title": "115","width": 5,"height":10,"background": "0xb8db7c","x": 1146,"y":234},
        {"id": "1","title": "116","width": 5,"height":16,"background": "0xb8db7c","x": 1146,"y":217},
        {"id": "1","title": "117","width": 5,"height":20,"background": "0xb8db7c","x": 1146,"y":196},
        {"id": "1","title": "118","width": 20,"height":5,"background": "0xb8db7c","x": 1125,"y":196},
        {"id": "1","title": "119","width": 20,"height":5,"background": "0xb8db7c","x": 1104,"y":196},
        {"id": "1","title": "120","width": 14,"height":5,"background": "0xb8db7c","x": 1089,"y":196},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1351,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1373,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1329,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1307,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1285,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1263,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1241,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1219,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1197,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1175,"y":285},
        {"id": "1","title": "186","width": 22,"height":5,"background": "0xb8db7c","x": 1152,"y":285},
        {"id": "1","title": "186","width": 5,"height":5,"background": "0xb8db7c","x": 1146,"y":285},
        {"id": "1","title": "186","width": 5,"height":12,"background": "0x45decb","x": 1146,"y":291},
        {"id": "1","title": "186","width": 5,"height":18,"background": "0x45decb","x": 1140,"y":285},
        {"id": "1","title": "313","width": 8,"height":8,"background": "0xb8db7c","x": 1136,"y":141},
        {"id": "1","title": "312","width": 8,"height":16,"background": "0xb8db7c","x": 1145,"y":137},
        {"id": "1","title": "306","width": 8,"height":16,"background": "0xb8db7c","x": 1162,"y":167},
        {"id": "1","title": "226","width": 8,"height":16,"background": "0xb8db7c","x": 1162,"y":150},
        {"id": "1","title": "225","width": 16,"height":8,"background": "0xb8db7c","x": 1154 ,"y":141},
        {"id": "1","title": "224","width": 8,"height":16,"background": "0xb8db7c","x": 1162,"y":124},
        {"id": "1","title": "223","width": 8,"height":16,"background": "0xb8db7c","x": 1162,"y":107},
        {"id": "1","title": "215","width": 28,"height":8,"background": "0xb8db7c","x": 1142,"y":98},
        {"id": "1","title": "216","width": 30,"height":8,"background": "0xb8db7c","x": 1111,"y":98},
        {"id": "1","title": "217","width": 23,"height":8,"background": "0xb8db7c","x": 1087,"y":98},
        {"id": "1","title": "218","width": 16,"height":8,"background": "0xb8db7c","x": 1070,"y":98},
        {"id": "1","title": "311","width": 8,"height":8,"background": "0xb8db7c","x": 1052,"y":141},
        {"id": "1","title": "310","width": 8,"height":16,"background": "0xb8db7c","x": 1061,"y":137},
        {"id": "1","title": "219","width": 8,"height":16,"background": "0xb8db7c","x": 1078,"y":107},
        {"id": "1","title": "220","width": 8,"height":16,"background": "0xb8db7c","x": 1078,"y":124},
        {"id": "1","title": "221","width": 16,"height":8,"background": "0xb8db7c","x": 1070,"y":141},
        {"id": "1","title": "222","width": 8,"height":16,"background": "0xb8db7c","x": 1078,"y":150},
        {"id": "1","title": "305","width": 8,"height":16,"background": "0xb8db7c","x": 1078,"y":167},
        {"id": "1","title": "227","width": 23,"height":8,"background": "0xb8db7c","x": 1054,"y":184},
        {"id": "1","title": "228","width": 8,"height":8,"background": "0xb8db7c","x": 1078,"y":184},
        {"id": "1","title": "229","width": 23,"height":8,"background": "0xb8db7c","x": 1087,"y":184},
        {"id": "1","title": "230","width": 30,"height":8,"background": "0xb8db7c","x": 1111,"y":184},
        {"id": "1","title": "231","width": 19,"height":8,"background": "0xb8db7c","x": 1142,"y":184},
        {"id": "1","title": "233","width": 8,"height":8,"background": "0xb8db7c","x": 1162,"y":184},
        {"id": "1","title": "233","width": 8,"height":8,"background": "0xb8db7c","x": 1162,"y":184},
        {"id": "1","title": "234","width": 8,"height":35,"background": "0xb8db7c","x": 1162,"y":193},
        {"id": "1","title": "235","width": 8,"height":40,"background": "0xb8db7c","x": 1162,"y":229},
        {"id": "1","title": "214","width": 8,"height":25,"background": "0xb8db7c","x": 1171,"y":98},
        {"id": "1","title": "213","width": 8,"height":25,"background": "0xb8db7c","x": 1171,"y":124},
        {"id": "1","title": "212","width": 8,"height":45,"background": "0xb8db7c","x": 1171,"y":150},
        {"id": "1","title": "211","width": 8,"height":45,"background": "0xb8db7c","x": 1171,"y":196},
        {"id": "1","title": "210","width": 8,"height":27,"background": "0xb8db7c","x": 1171,"y":242},
        {"id": "1","title": "259","width": 29,"height":8,"background": "0xb8db7c","x": 1089,"y":270},
        {"id": "1","title": "239","width": 32,"height":8,"background": "0xb8db7c","x": 1119,"y":270},
        {"id": "1","title": "237","width": 18,"height":8,"background": "0xb8db7c","x": 1152,"y":270},
        {"id": "1","title": "240","width": 8,"height":11,"background": "0xf2f2f2","x": 1162,"y":279},
        {"id": "1","title": "208","width": 8,"height":11,"background": "0xf2f2f2","x": 1171,"y":279},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1171,"y":270},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1190,"y":270},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1244,"y":270},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1298,"y":270},
        {"id": "1","title": "186","width": 29,"height":8,"background": "0xff00ff","x": 1089,"y":291},
        {"id": "1","title": "186","width": 32,"height":8,"background": "0xb8db7c","x": 1119,"y":291},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1152,"y":291},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1152,"y":291},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1171,"y":291},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1190,"y":291},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1244,"y":291},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1298,"y":291},
        // 连廊右区
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1352,"y":270},
        {"id": "1","title": "186","width": 29,"height":8,"background": "0xb8db7c","x": 1406,"y":270},
        {"id": "1","title": "186","width": 8,"height":6,"background": "0xf2f2f2","x": 1426,"y":271},
        {"id": "1","title": "174","width": 6,"height":5,"background": "0xb8db7c","x": 1549,"y":279},
        {"id": "1","title": "186","width": 6,"height":5,"background": "0xb8db7c","x": 1549,"y":285},
        {"id": "1","title": "186","width": 6,"height":19,"background": "0xb8db7c","x": 1549,"y":291},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1527,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1505,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1483,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1461,"y":285},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1439,"y":285},
        {"id": "1","title": "175","width": 21,"height":5,"background": "0xb8db7c","x": 1527,"y":279},
        {"id": "1","title": "176","width": 21,"height":5,"background": "0xb8db7c","x": 1505,"y":279},
        {"id": "1","title": "177","width": 21,"height":5,"background": "0xb8db7c","x": 1483,"y":279},
        {"id": "1","title": "178","width": 21,"height":5,"background": "0xb8db7c","x": 1461,"y":279},
        {"id": "1","title": "179","width": 21,"height":5,"background": "0xb8db7c","x": 1439,"y":279},
        {"id": "1","title": "181","width": 21,"height":5,"background": "0xb8db7c","x": 1395,"y":279},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1395,"y":285},
        {"id": "1","title": "186","width": 53,"height":8,"background": "0xb8db7c","x": 1352,"y":291},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1406,"y":291},
        {"id": "1","title": "180","width": 21,"height":5,"background": "0xb8db7c","x": 1417,"y":279},
        {"id": "1","title": "186","width": 21,"height":5,"background": "0xb8db7c","x": 1417,"y":285},
        {"id": "1","title": "297","width": 10,"height":20,"background": "0xff00ff","x": 1425,"y":279},
        {"id": "1","title": "186","width": 10,"height":20,"background": "0xb8db7c","x": 1425,"y":300},
        {"id": "1","title": "186","width": 10,"height":18,"background": "0xb8db7c","x": 1425,"y":321},
        {"id": "1","title": "186","width": 10,"height":13,"background": "0xb8db7c","x": 1425,"y":340},
        {"id": "1","title": "186","width": 15,"height":8,"background": "0xb8db7c","x": 1436,"y":345},
        {"id": "1","title": "186","width": 20,"height":8,"background": "0xb8db7c","x": 1452,"y":345},
        {"id": "1","title": "186","width": 20,"height":8,"background": "0xb8db7c","x": 1473,"y":345},
        {"id": "1","title": "186","width": 10,"height":12,"background": "0xb8db7c","x": 1483,"y":354},
        {"id": "1","title": "186","width": 10,"height":12,"background": "0xb8db7c","x": 1483,"y":367},
        {"id": "1","title": "186","width": 10,"height":18,"background": "0xb8db7c","x": 1483,"y":380},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1494,"y":380},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1505,"y":380},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1516,"y":380},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1535,"y":380},
        {"id": "1","title": "186","width": 10,"height":18,"background": "0xb8db7c","x": 1535,"y":389},
        {"id": "1","title": "186","width": 21,"height":8,"background": "0xb8db7c","x": 1483,"y":399},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1505,"y":399},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1516,"y":399},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1483,"y":408},
        {"id": "1","title": "186","width": 10,"height":12,"background": "0xb8db7c","x": 1483,"y":417},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1494,"y":421},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1505,"y":421},
        {"id": "1","title": "186","width": 18,"height":8,"background": "0xb8db7c","x": 1516,"y":421},
        {"id": "1","title": "186","width": 10,"height":8,"background": "0xb8db7c","x": 1535,"y":421},
        {"id": "1","title": "186","width": 10,"height":18,"background": "0xb8db7c","x": 1535,"y":430},
        {"id": "1","title": "186","width": 10,"height":26,"background": "0xb8db7c","x": 1406,"y":300},
        {"id": "1","title": "186","width": 10,"height":26,"background": "0xb8db7c","x": 1406,"y":327},
        {"id": "1","title": "186","width": 25,"height":8,"background": "0xb8db7c","x": 1406,"y":354},
        {"id": "1","title": "186","width": 16,"height":8,"background": "0xb8db7c","x": 1432,"y":354},
        {"id": "1","title": "186","width": 16,"height":8,"background": "0xb8db7c","x": 1449,"y":354},
        {"id": "1","title": "186","width": 10,"height":12,"background": "0xb8db7c","x": 1466,"y":354},
        {"id": "1","title": "186","width": 10,"height":12,"background": "0xb8db7c","x": 1466,"y":367},
        {"id": "1","title": "186","width": 10,"height":18,"background": "0xb8db7c","x": 1466,"y":380},
        {"id": "1","title": "186","width": 16,"height":8,"background": "0xb8db7c","x": 1466,"y":399},
        {"id": "1","title": "186","width": 10,"height":31,"background": "0xb8db7c","x": 1466,"y":408},
        {"id": "1","title": "186","width": 23,"height":8,"background": "0xb8db7c","x": 1466,"y":440},
        {"id": "1","title": "186","width": 22,"height":8,"background": "0xb8db7c","x": 1490,"y":440},
        {"id": "1","title": "186","width": 12,"height":8,"background": "0xb8db7c","x": 1509,"y":440},
        {"id": "1","title": "186","width": 12,"height":8,"background": "0xb8db7c","x": 1522,"y":440},
    ],
    "shelf1":[
        {"id": 1,"title": "1排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 380},
        {"id": 2,"title": "2排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 384},
        {"id": 2,"title": "2排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 396},
        {"id": 1,"title": "1排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 400},
        {"id": 2,"title": "2排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 410},
        {"id": 2,"title": "2排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 414},
        {"id": 1,"title": "1排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 426},
        {"id": 2,"title": "2排","unitX": 7,"unitY":4,"anfme":44,"x":800,"y": 430}
    ],
    "shelf2":[
        {"id": 1,"title": "1排","unitX": 10,"unitY":6,"anfme":84,"x":250,"y": 271},
        {"id": 2,"title": "2排","unitX": 10,"unitY":6,"anfme":84,"x":250,"y": 292},
        {"id": 2,"title": "2排","unitX": 10,"unitY":6,"anfme":84,"x":250,"y": 304},
        {"id": 1,"title": "1排","unitX": 10,"unitY":6,"anfme":84,"x":250,"y": 326},
        {"id": 2,"title": "2排","unitX": 10,"unitY":6,"anfme":84,"x":250,"y": 2980},
        {"id": 2,"title": "2排","unitX": 10,"unitY":6,"anfme":84,"x":250,"y": 3110}
    ]
}
src/main/webapp/views/wcsmap/pixijs.js
New file
@@ -0,0 +1,9 @@
/*!
 * pixi.js-legacy - v5.3.12
 * Compiled Wed, 23 Mar 2022 18:38:07 UTC
 *
 * pixi.js-legacy is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */
var PIXI=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var i=r(function(t,r){!function(t){var e=t.Promise,i=e&&"resolve"in e&&"reject"in e&&"all"in e&&"race"in e&&function(){var t;return new e(function(e){t=e}),"function"==typeof t}();r?(r.Promise=i?e:T,r.Polyfill=T):i||(t.Promise=T);var n="pending",o="sealed",s="fulfilled",a="rejected",h=function(){};function u(t){return"[object Array]"===Object.prototype.toString.call(t)}var l,c="undefined"!=typeof setImmediate?setImmediate:setTimeout,d=[];function p(){for(var t=0;t<d.length;t++)d[t][0](d[t][1]);d=[],l=!1}function f(t,e){d.push([t,e]),l||(l=!0,c(p,0))}function m(t){var e=t.owner,r=e.state_,i=e.data_,n=t[r],o=t.then;if("function"==typeof n){r=s;try{i=n(i)}catch(t){_(o,t)}}v(o,i)||(r===s&&g(o,i),r===a&&_(o,i))}function v(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var i=e.then;if("function"==typeof i)return i.call(e,function(i){r||(r=!0,e!==i?g(t,i):y(t,i))},function(e){r||(r=!0,_(t,e))}),!0}}catch(e){return r||_(t,e),!0}return!1}function g(t,e){t!==e&&v(t,e)||y(t,e)}function y(t,e){t.state_===n&&(t.state_=o,t.data_=e,f(b,t))}function _(t,e){t.state_===n&&(t.state_=o,t.data_=e,f(E,t))}function x(t){var e=t.then_;t.then_=void 0;for(var r=0;r<e.length;r++)m(e[r])}function b(t){t.state_=s,x(t)}function E(t){t.state_=a,x(t)}function T(t){if("function"!=typeof t)throw new TypeError("Promise constructor takes a function argument");if(this instanceof T==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],function(t,e){function r(t){_(e,t)}try{t(function(t){g(e,t)},r)}catch(t){r(t)}}(t,this)}T.prototype={constructor:T,state_:n,then_:null,data_:void 0,then:function(t,e){var r={owner:this,then:new this.constructor(h),fulfilled:t,rejected:e};return this.state_===s||this.state_===a?f(m,r):this.then_.push(r),r.then},catch:function(t){return this.then(null,t)}},T.all=function(t){if(!u(t))throw new TypeError("You must pass an array to Promise.all().");return new this(function(e,r){var i=[],n=0;function o(t){return n++,function(r){i[t]=r,--n||e(i)}}for(var s,a=0;a<t.length;a++)(s=t[a])&&"function"==typeof s.then?s.then(o(a),r):i[a]=s;n||e(i)})},T.race=function(t){if(!u(t))throw new TypeError("You must pass an array to Promise.race().");return new this(function(e,r){for(var i,n=0;n<t.length;n++)(i=t[n])&&"function"==typeof i.then?i.then(e,r):e(i)})},T.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this(function(e){e(t)})},T.reject=function(t){return new this(function(e,r){r(t)})}}("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:e)}),n=(i.Promise,i.Polyfill),o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var h=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,i,n=arguments,h=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var l in r=Object(n[u]))s.call(r,l)&&(h[l]=r[l]);if(o){i=o(r);for(var c=0;c<i.length;c++)a.call(r,i[c])&&(h[i[c]]=r[i[c]])}}return h};window.Promise||(window.Promise=n),Object.assign||(Object.assign=h);if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!window.performance||!window.performance.now){var u=Date.now();window.performance||(window.performance={}),window.performance.now=function(){return Date.now()-u}}for(var l=Date.now(),c=["ms","moz","webkit","o"],d=0;d<c.length&&!window.requestAnimationFrame;++d){var p=c[d];window.requestAnimationFrame=window[p+"RequestAnimationFrame"],window.cancelAnimationFrame=window[p+"CancelAnimationFrame"]||window[p+"CancelRequestAnimationFrame"]}window.requestAnimationFrame||(window.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),r=16+l-e;return r<0&&(r=0),l=e,window.setTimeout(function(){l=Date.now(),t(performance.now())},r)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){return clearTimeout(t)}),Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var f=/iPhone/i,m=/iPod/i,v=/iPad/i,g=/\biOS-universal(?:.+)Mac\b/i,y=/\bAndroid(?:.+)Mobile\b/i,_=/Android/i,x=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,b=/Silk/i,E=/Windows Phone/i,T=/\bWindows(?:.+)ARM\b/i,S=/BlackBerry/i,w=/BB10/i,P=/Opera Mini/i,I=/\b(CriOS|Chrome)(?:.+)Mobile/i,A=/Mobile(?:.+)Firefox\b/i,O=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};var M=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,i=r.split("[FBAN");void 0!==i[1]&&(r=i[0]),void 0!==(i=r.split("Twitter"))[1]&&(r=i[0]);var n=function(t){return function(e){return e.test(t)}}(r),o={apple:{phone:n(f)&&!n(E),ipod:n(m),tablet:!n(f)&&(n(v)||O(e))&&!n(E),universal:n(g),device:(n(f)||n(m)||n(v)||n(g)||O(e))&&!n(E)},amazon:{phone:n(x),tablet:!n(x)&&n(b),device:n(x)||n(b)},android:{phone:!n(E)&&n(x)||!n(E)&&n(y),tablet:!n(E)&&!n(x)&&!n(y)&&(n(b)||n(_)),device:!n(E)&&(n(x)||n(b)||n(y)||n(_))||n(/\bokhttp\b/i)},windows:{phone:n(E),tablet:n(T),device:n(E)||n(T)},other:{blackberry:n(S),blackberry10:n(w),opera:n(P),firefox:n(A),chrome:n(I),device:n(S)||n(w)||n(P)||n(A)||n(I)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator);var D={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(M.tablet||M.phone){var r;M.apple.device&&(r=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(r[1],10)<11&&(e=!1),M.android.device&&(r=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(r[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:M.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!M.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},C=r(function(t){var e=Object.prototype.hasOwnProperty,r="~";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new n(i,o||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n<o;n++)s[n]=i[n].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,i=this._events[e];return i?i.fn?1:i.length:0},a.prototype.emit=function(t,e,i,n,o,s){var a=arguments,h=r?r+t:t;if(!this._events[h])return!1;var u,l,c=this._events[h],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,i),!0;case 4:return c.fn.call(c.context,e,i,n),!0;case 5:return c.fn.call(c.context,e,i,n,o),!0;case 6:return c.fn.call(c.context,e,i,n,o,s),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=a[l];c.fn.apply(c.context,u)}else{var p,f=c.length;for(l=0;l<f;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,i);break;case 4:c[l].fn.call(c[l].context,e,i,n);break;default:if(!u)for(p=1,u=new Array(d-1);p<d;p++)u[p-1]=a[p];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,i,n){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||s(this,o);else{for(var h=0,u=[],l=a.length;h<l;h++)(a[h].fn!==e||n&&!a[h].once||i&&a[h].context!==i)&&u.push(a[h]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a}),R=N,L=N;function N(t,e,r){r=r||2;var i,n,o,s,a,h,u,l=e&&e.length,c=l?e[0]*r:t.length,d=F(t,0,c,r,!0),p=[];if(!d||d.next===d.prev)return p;if(l&&(d=function(t,e,r,i){var n,o,s,a,h,u=[];for(n=0,o=e.length;n<o;n++)s=e[n]*i,a=n<o-1?e[n+1]*i:t.length,(h=F(t,s,a,i,!1))===h.next&&(h.steiner=!0),u.push(W(h));for(u.sort(G),n=0;n<u.length;n++)r=B(r=Y(u[n],r),r.next);return r}(t,e,d,r)),t.length>80*r){i=o=t[0],n=s=t[1];for(var f=r;f<c;f+=r)(a=t[f])<i&&(i=a),(h=t[f+1])<n&&(n=h),a>o&&(o=a),h>s&&(s=h);u=0!==(u=Math.max(o-i,s-n))?1/u:0}return U(d,p,r,i,n,u),p}function F(t,e,r,i,n){var o,s;if(n===st(t,e,r,i)>0)for(o=e;o<r;o+=i)s=it(o,t[o],t[o+1],s);else for(o=r-i;o>=e;o-=i)s=it(o,t[o],t[o+1],s);return s&&J(s,s.next)&&(nt(s),s=s.next),s}function B(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!J(i,i.next)&&0!==Z(i.prev,i,i.next))i=i.next;else{if(nt(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function U(t,e,r,i,n,o,s){if(t){!s&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=V(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,s,a,h,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,a=0,e=0;e<u&&(a++,i=i.nextZ);e++);for(h=u;a>0||h>0&&i;)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(s>1)}(n)}(t,i,n,o);for(var a,h,u=t;t.prev!==t.next;)if(a=t.prev,h=t.next,o?X(t,i,n,o):k(t))e.push(a.i/r),e.push(t.i/r),e.push(h.i/r),nt(t),t=h.next,u=h.next;else if((t=h)===u){s?1===s?U(t=j(B(t),e,r),e,r,i,n,o,2):2===s&&H(t,e,r,i,n,o):U(B(t),e,r,i,n,o,1);break}}}function k(t){var e=t.prev,r=t,i=t.next;if(Z(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(q(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&Z(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function X(t,e,r,i){var n=t.prev,o=t,s=t.next;if(Z(n,o,s)>=0)return!1;for(var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,l=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=V(a,h,e,r,i),d=V(u,l,e,r,i),p=t.prevZ,f=t.nextZ;p&&p.z>=c&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&Z(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==t.prev&&f!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Z(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&Z(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Z(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function j(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!J(n,o)&&Q(n,i,i.next,o)&&et(n,o)&&et(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),nt(i),nt(i.next),i=t=o),i=i.next}while(i!==t);return B(i)}function H(t,e,r,i,n,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&K(s,a)){var h=rt(s,a);return s=B(s,s.next),h=B(h,h.next),U(s,e,r,i,n,o),void U(h,e,r,i,n,o)}a=a.next}s=s.next}while(s!==t)}function G(t,e){return t.x-e.x}function Y(t,e){var r=function(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===s)return r;var h,u=r,l=r.x,c=r.y,d=1/0;i=r;do{n>=i.x&&i.x>=l&&n!==i.x&&q(o<c?n:s,o,l,c,o<c?s:n,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(n-i.x),et(i,t)&&(h<d||h===d&&(i.x>r.x||i.x===r.x&&z(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}(t,e);if(!r)return e;var i=rt(r,t),n=B(r,r.next);return B(i,i.next),e===r?n:e}function z(t,e){return Z(t.prev,t,e.prev)<0&&Z(e.next,t,t.next)<0}function V(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function W(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function q(t,e,r,i,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function K(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Q(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(et(t,e)&&et(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(Z(t.prev,t,e.prev)||Z(t,e.prev,e))||J(t,e)&&Z(t.prev,t,t.next)>0&&Z(e.prev,e,e.next)>0)}function Z(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function J(t,e){return t.x===e.x&&t.y===e.y}function Q(t,e,r,i){var n=tt(Z(t,e,r)),o=tt(Z(t,e,i)),s=tt(Z(r,i,t)),a=tt(Z(r,i,e));return n!==o&&s!==a||(!(0!==n||!$(t,r,e))||(!(0!==o||!$(t,i,e))||(!(0!==s||!$(r,t,i))||!(0!==a||!$(r,e,i)))))}function $(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function tt(t){return t>0?1:t<0?-1:0}function et(t,e){return Z(t.prev,t,t.next)<0?Z(t,e,t.next)>=0&&Z(t,t.prev,e)>=0:Z(t,e,t.prev)<0||Z(t,t.next,e)<0}function rt(t,e){var r=new ot(t.i,t.x,t.y),i=new ot(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function it(t,e,r,i){var n=new ot(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function nt(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ot(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function st(t,e,r,i){for(var n=0,o=e,s=r-i;o<r;o+=i)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}N.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(st(t,0,o,r));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*r,l=a<h-1?e[a+1]*r:t.length;s-=Math.abs(st(t,u,l,r))}var c=0;for(a=0;a<i.length;a+=3){var d=i[a]*r,p=i[a+1]*r,f=i[a+2]*r;c+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},N.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[n][o][s]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r},R.default=L;var at=r(function(t,r){!function(i){var n=r&&!r.nodeType&&r,o=t&&!t.nodeType&&t,s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self!==s||(i=s);var a,h,u=2147483647,l=36,c=1,d=26,p=38,f=700,m=72,v=128,g="-",y=/^xn--/,_=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=l-c,T=Math.floor,S=String.fromCharCode;function w(t){throw RangeError(b[t])}function P(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function I(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+P((t=t.replace(x,".")).split("."),e).join(".")}function A(t){for(var e,r,i=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function O(t){return P(t,function(t){var e="";return t>65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function M(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,r){var i=0;for(t=r?T(t/f):t>>1,t+=T(t/e);t>E*d>>1;i+=l)t=T(t/E);return T(i+(E+1)*t/(t+p))}function C(t){var e,r,i,n,o,s,a,h,p,f,y,_=[],x=t.length,b=0,E=v,S=m;for((r=t.lastIndexOf(g))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&w("not-basic"),_.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<x;){for(o=b,s=1,a=l;n>=x&&w("invalid-input"),((h=(y=t.charCodeAt(n++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||h>T((u-b)/s))&&w("overflow"),b+=h*s,!(h<(p=a<=S?c:a>=S+d?d:a-S));a+=l)s>T(u/(f=l-p))&&w("overflow"),s*=f;S=D(b-o,e=_.length+1,0==o),T(b/e)>u-E&&w("overflow"),E+=T(b/e),b%=e,_.splice(b++,0,E)}return O(_)}function R(t){var e,r,i,n,o,s,a,h,p,f,y,_,x,b,E,P=[];for(_=(t=A(t)).length,e=v,r=0,o=m,s=0;s<_;++s)(y=t[s])<128&&P.push(S(y));for(i=n=P.length,n&&P.push(g);i<_;){for(a=u,s=0;s<_;++s)(y=t[s])>=e&&y<a&&(a=y);for(a-e>T((u-r)/(x=i+1))&&w("overflow"),r+=(a-e)*x,e=a,s=0;s<_;++s)if((y=t[s])<e&&++r>u&&w("overflow"),y==e){for(h=r,p=l;!(h<(f=p<=o?c:p>=o+d?d:p-o));p+=l)E=h-f,b=l-f,P.push(S(M(f+E%b,0))),h=T(E/b);P.push(S(M(h,0))),o=D(r,x,i==n),r=0,++i}++r,++e}return P.join("")}if(a={version:"1.3.2",ucs2:{decode:A,encode:O},decode:C,encode:R,toASCII:function(t){return I(t,function(t){return _.test(t)?"xn--"+R(t):t})},toUnicode:function(t){return I(t,function(t){return y.test(t)?C(t.slice(4).toLowerCase()):t})}},n&&o)if(t.exports==n)o.exports=a;else for(h in a)a.hasOwnProperty(h)&&(n[h]=a[h]);else i.punycode=a}(e)}),ht={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};ht.isString,ht.isObject,ht.isNull,ht.isNullOrUndefined;function ut(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var lt=function(t,e,r,i){e=e||"&",r=r||"=";var n={};if("string"!=typeof t||0===t.length)return n;var o=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var h=0;h<a;++h){var u,l,c,d,p=t[h].replace(o,"%20"),f=p.indexOf(r);f>=0?(u=p.substr(0,f),l=p.substr(f+1)):(u=p,l=""),c=decodeURIComponent(u),d=decodeURIComponent(l),ut(n,c)?Array.isArray(n[c])?n[c].push(d):n[c]=[n[c],d]:n[c]=d}return n},ct=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},dt=function(t,e,r,i){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(i){var n=encodeURIComponent(ct(i))+r;return Array.isArray(t[i])?t[i].map(function(t){return n+encodeURIComponent(ct(t))}).join(e):n+encodeURIComponent(ct(t[i]))}).join(e):i?encodeURIComponent(ct(i))+r+encodeURIComponent(ct(t)):""},pt=r(function(t,e){e.decode=e.parse=lt,e.encode=e.stringify=dt}),ft=(pt.decode,pt.parse,pt.encode,pt.stringify,Ct),mt=function(t,e){return Ct(t,!1,!0).resolve(e)},vt=function(t,e){if(!t)return e;return Ct(t,!1,!0).resolveObject(e)},gt=function(t){ht.isString(t)&&(t=Ct(t));if(!(t instanceof _t))return _t.prototype.format.call(t);return t.format()},yt=_t;function _t(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var xt=/^([a-z0-9.+-]+:)/i,bt=/:[0-9]*$/,Et=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Tt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),St=["'"].concat(Tt),wt=["%","/","?",";","#"].concat(St),Pt=["/","?","#"],It=/^[+a-z0-9A-Z_-]{0,63}$/,At=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ot={javascript:!0,"javascript:":!0},Mt={javascript:!0,"javascript:":!0},Dt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ct(t,e,r){if(t&&ht.isObject(t)&&t instanceof _t)return t;var i=new _t;return i.parse(t,e,r),i}_t.prototype.parse=function(t,e,r){if(!ht.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=-1!==i&&i<t.indexOf("#")?"?":"#",o=t.split(n);o[0]=o[0].replace(/\\/g,"/");var s=t=o.join(n);if(s=s.trim(),!r&&1===t.split("#").length){var a=Et.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=e?pt.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=xt.exec(s);if(h){var u=(h=h[0]).toLowerCase();this.protocol=u,s=s.substr(h.length)}if(r||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===s.substr(0,2);!l||h&&Mt[h]||(s=s.substr(2),this.slashes=!0)}if(!Mt[h]&&(l||h&&!Dt[h])){for(var c,d,p=-1,f=0;f<Pt.length;f++){-1!==(m=s.indexOf(Pt[f]))&&(-1===p||m<p)&&(p=m)}-1!==(d=-1===p?s.lastIndexOf("@"):s.lastIndexOf("@",p))&&(c=s.slice(0,d),s=s.slice(d+1),this.auth=decodeURIComponent(c)),p=-1;for(f=0;f<wt.length;f++){var m;-1!==(m=s.indexOf(wt[f]))&&(-1===p||m<p)&&(p=m)}-1===p&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var v="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!v)for(var g=this.hostname.split(/\./),y=(f=0,g.length);f<y;f++){var _=g[f];if(_&&!_.match(It)){for(var x="",b=0,E=_.length;b<E;b++)_.charCodeAt(b)>127?x+="x":x+=_[b];if(!x.match(It)){var T=g.slice(0,f),S=g.slice(f+1),w=_.match(At);w&&(T.push(w[1]),S.unshift(w[2])),S.length&&(s="/"+S.join(".")+s),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),v||(this.hostname=at.toASCII(this.hostname));var P=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+P,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Ot[u])for(f=0,y=St.length;f<y;f++){var A=St[f];if(-1!==s.indexOf(A)){var O=encodeURIComponent(A);O===A&&(O=escape(A)),s=s.split(A).join(O)}}var M=s.indexOf("#");-1!==M&&(this.hash=s.substr(M),s=s.slice(0,M));var D=s.indexOf("?");if(-1!==D?(this.search=s.substr(D),this.query=s.substr(D+1),e&&(this.query=pt.parse(this.query)),s=s.slice(0,D)):e&&(this.search="",this.query={}),s&&(this.pathname=s),Dt[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){P=this.pathname||"";var C=this.search||"";this.path=P+C}return this.href=this.format(),this},_t.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=t+this.host:this.hostname&&(n=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&ht.isObject(this.query)&&Object.keys(this.query).length&&(o=pt.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||Dt[e])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),e+n+(r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(s=s.replace("#","%23"))+i},_t.prototype.resolve=function(t){return this.resolveObject(Ct(t,!1,!0)).format()},_t.prototype.resolveObject=function(t){if(ht.isString(t)){var e=new _t;e.parse(t,!1,!0),t=e}for(var r=new _t,i=Object.keys(this),n=0;n<i.length;n++){var o=i[n];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var h=s[a];"protocol"!==h&&(r[h]=t[h])}return Dt[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!Dt[t.protocol]){for(var u=Object.keys(t),l=0;l<u.length;l++){var c=u[l];r[c]=t[c]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||Mt[t.protocol])r.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var p=r.pathname||"",f=r.search||"";r.path=p+f}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),v=t.host||t.pathname&&"/"===t.pathname.charAt(0),g=v||m||r.host&&t.pathname,y=g,_=r.pathname&&r.pathname.split("/")||[],x=(d=t.pathname&&t.pathname.split("/")||[],r.protocol&&!Dt[r.protocol]);if(x&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),g=g&&(""===d[0]||""===_[0])),v)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),r.search=t.search,r.query=t.query;else if(!ht.isNullOrUndefined(t.search)){if(x)r.hostname=r.host=_.shift(),(w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=w.shift(),r.host=r.hostname=w.shift());return r.search=t.search,r.query=t.query,ht.isNull(r.pathname)&&ht.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var b=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&("."===b||".."===b)||""===b,T=0,S=_.length;S>=0;S--)"."===(b=_[S])?_.splice(S,1):".."===b?(_.splice(S,1),T++):T&&(_.splice(S,1),T--);if(!g&&!y)for(;T--;T)_.unshift("..");!g||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),E&&"/"!==_.join("/").substr(-1)&&_.push("");var w,P=""===_[0]||_[0]&&"/"===_[0].charAt(0);x&&(r.hostname=r.host=P?"":_.length?_.shift():"",(w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=w.shift(),r.host=r.hostname=w.shift()));return(g=g||r.host&&_.length)&&!P&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),ht.isNull(r.pathname)&&ht.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},_t.prototype.parseHost=function(){var t=this.host,e=bt.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var Rt={parse:ft,resolve:mt,resolveObject:vt,format:gt,Url:yt};!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(t.ENV||(t.ENV={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(t.RENDERER_TYPE||(t.RENDERER_TYPE={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(t.BUFFER_BITS||(t.BUFFER_BITS={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(t.BLEND_MODES||(t.BLEND_MODES={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(t.DRAW_MODES||(t.DRAW_MODES={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(t.FORMATS||(t.FORMATS={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(t.TARGETS||(t.TARGETS={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(t.TYPES||(t.TYPES={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(t.SCALE_MODES||(t.SCALE_MODES={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(t.WRAP_MODES||(t.WRAP_MODES={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(t.MIPMAP_MODES||(t.MIPMAP_MODES={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(t.ALPHA_MODES||(t.ALPHA_MODES={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(t.CLEAR_MODES||(t.CLEAR_MODES={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(t.GC_MODES||(t.GC_MODES={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(t.PRECISION||(t.PRECISION={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(t.MASK_TYPES||(t.MASK_TYPES={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(t.MSAA_QUALITY||(t.MSAA_QUALITY={})),D.RETINA_PREFIX=/@([0-9\.]+)x/,D.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var Lt,Nt=!1,Ft="5.3.12";function Bt(t){var e;if(!Nt){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+Ft+" - ✰ "+t+" ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,r)}else window.console&&window.console.log("PixiJS "+Ft+" - "+t+" - http://www.pixijs.com/");Nt=!0}}function Ut(){return void 0===Lt&&(Lt=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:D.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(t){return!1}}()),Lt}function kt(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function Xt(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function jt(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function Ht(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var Gt=function(){for(var e=[],r=[],i=0;i<32;i++)e[i]=i,r[i]=i;e[t.BLEND_MODES.NORMAL_NPM]=t.BLEND_MODES.NORMAL,e[t.BLEND_MODES.ADD_NPM]=t.BLEND_MODES.ADD,e[t.BLEND_MODES.SCREEN_NPM]=t.BLEND_MODES.SCREEN,r[t.BLEND_MODES.NORMAL]=t.BLEND_MODES.NORMAL_NPM,r[t.BLEND_MODES.ADD]=t.BLEND_MODES.ADD_NPM,r[t.BLEND_MODES.SCREEN]=t.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(r),n.push(e),n}();function Yt(t,e){return Gt[e?1:0][t]}function zt(t,e,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r}function Vt(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n=n*e+.5|0)}function Wt(t,e,r,i){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function qt(t,e){void 0===e&&(e=null);var r=6*t;if((e=e||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+r);for(var i=0,n=0;i<r;i+=6,n+=4)e[i+0]=n+0,e[i+1]=n+1,e[i+2]=n+2,e[i+3]=n+0,e[i+4]=n+2,e[i+5]=n+3;return e}function Kt(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var Zt={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function Jt(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function Qt(t){return!(t&t-1||!t)}function $t(t){var e=(t>65535?1:0)<<4,r=((t>>>=e)>255?1:0)<<3;return e|=r,e|=r=((t>>>=r)>15?1:0)<<2,(e|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function te(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){var o=n-(r=e+r>n?n-e:r);for(i=e;i<o;++i)t[i]=t[i+r];t.length=o}}function ee(t){return 0===t?0:t<0?-1:1}var re=0;function ie(){return++re}var ne={};function oe(t,e,r){if(void 0===r&&(r=3),!ne[e]){var i=(new Error).stack;void 0===i?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(i=i.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(i))),ne[e]=!0}}var se={},ae=Object.create(null),he=Object.create(null);var ue=function(){function t(t,e,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||D.RESOLUTION,this.resize(t,e)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t},enumerable:!1,configurable:!0}),t}();function le(t){var e,r,i,n=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,n,o).data,h=a.length,u={top:null,left:null,right:null,bottom:null},l=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(r=e/4%n,i=~~(e/4/n),null===u.top&&(u.top=i),null===u.left?u.left=r:r<u.left&&(u.left=r),null===u.right?u.right=r+1:u.right<r&&(u.right=r+1),null===u.bottom?u.bottom=i:u.bottom<i&&(u.bottom=i));return null!==u.top&&(n=u.right-u.left,o=u.bottom-u.top+1,l=s.getImageData(u.left,u.top,n,o)),{height:o,width:n,data:l}}var ce,de=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function pe(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,ce||(ce=document.createElement("a")),ce.href=t;var r=ft(ce.href),i=!r.port&&""===e.port||r.port===e.port;return r.hostname===e.hostname&&i&&r.protocol===e.protocol?"":"anonymous"}function fe(t,e){var r=D.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1}var me,ve={BaseTextureCache:he,CanvasRenderTarget:ue,DATA_URI:de,ProgramCache:se,TextureCache:ae,clearTextureCache:function(){var t;for(t in ae)delete ae[t];for(t in he)delete he[t]},correctBlendMode:Yt,createIndicesForQuads:qt,decomposeDataUri:function(t){var e=de.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}},deprecation:oe,destroyTextureCache:function(){var t;for(t in ae)ae[t].destroy();for(t in he)he[t].destroy()},determineCrossOrigin:pe,getBufferType:Kt,getResolutionOfUrl:fe,hex2rgb:kt,hex2string:Xt,interleaveTypedArrays:function(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;var s=new ArrayBuffer(4*r),a=null,h=0;for(o=0;o<t.length;o++){var u=e[o],l=t[o],c=Kt(l);n[c]||(n[c]=new Zt[c](s)),a=n[c];for(var d=0;d<l.length;d++)a[(d/u|0)*i+h+d%u]=l[d];h+=u}return new Float32Array(s)},isPow2:Qt,isWebGLSupported:Ut,log2:$t,nextPow2:Jt,premultiplyBlendMode:Gt,premultiplyRgba:zt,premultiplyTint:Vt,premultiplyTintToRgba:Wt,removeItems:te,rgb2hex:Ht,sayHello:Bt,sign:ee,skipHello:function(){Nt=!0},string2hex:jt,trimCanvas:le,uid:ie,isMobile:M,EventEmitter:C,earcut:R,url:Rt},ge=2*Math.PI,ye=180/Math.PI,_e=Math.PI/180;(me=t.SHAPES||(t.SHAPES={}))[me.POLY=0]="POLY",me[me.RECT=1]="RECT",me[me.CIRC=2]="CIRC",me[me.ELIP=3]="ELIP",me[me.RREC=4]="RREC";var xe=function(){function e(e,r,i,n){void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=Number(e),this.y=Number(r),this.width=Number(i),this.height=Number(n),this.type=t.SHAPES.RECT}return Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e,"EMPTY",{get:function(){return new e(0,0,0,0)},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},e.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},e.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},e.prototype.pad=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},e.prototype.fit=function(t){var e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=i,this.height=Math.max(n-i,0),this},e.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var r=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=i-this.y,this},e.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=i,this.height=n-i,this},e}(),be=function(){function e(e,r,i){void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=e,this.y=r,this.radius=i,this.type=t.SHAPES.CIRC}return e.prototype.clone=function(){return new e(this.x,this.y,this.radius)},e.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-t,n=this.y-e;return(i*=i)+(n*=n)<=r},e.prototype.getBounds=function(){return new xe(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},e}(),Ee=function(){function e(e,r,i,n){void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=e,this.y=r,this.width=i,this.height=n,this.type=t.SHAPES.ELIP}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return(r*=r)+(i*=i)<=1},e.prototype.getBounds=function(){return new xe(this.x-this.width,this.y-this.height,this.width,this.height)},e}(),Te=function(){function e(){for(var e=arguments,r=[],i=0;i<arguments.length;i++)r[i]=e[i];var n=Array.isArray(r[0])?r[0]:r;if("number"!=typeof n[0]){for(var o=[],s=0,a=n.length;s<a;s++)o.push(n[s].x,n[s].y);n=o}this.points=n,this.type=t.SHAPES.POLY,this.closeStroke=!0}return e.prototype.clone=function(){var t=new e(this.points.slice());return t.closeStroke=this.closeStroke,t},e.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1];a>e!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(r=!r)}return r},e}(),Se=function(){function e(e,r,i,n,o){void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=20),this.x=e,this.y=r,this.width=i,this.height=n,this.radius=o,this.type=t.SHAPES.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},e}(),we=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t}(),Pe=function(){function t(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=e}return t.prototype.clone=function(e,r){return void 0===e&&(e=this.cb),void 0===r&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),Ie=function(){function t(t,e,r,i,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new we;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new we;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,n=this.d,o=-Math.atan2(-i,n),s=Math.atan2(r,e),a=Math.abs(o+s);return a<1e-5||Math.abs(ge-a)<1e-5?(t.rotation=s,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),Ae=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Oe=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Me=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],De=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Ce=[],Re=[],Le=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];Ce.push(e);for(var r=0;r<16;r++)for(var i=Le(Ae[t]*Ae[r]+Me[t]*Oe[r]),n=Le(Oe[t]*Ae[r]+De[t]*Oe[r]),o=Le(Ae[t]*Me[r]+Me[t]*De[r]),s=Le(Oe[t]*Me[r]+De[t]*De[r]),a=0;a<16;a++)if(Ae[a]===i&&Oe[a]===n&&Me[a]===o&&De[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new Ie;h.set(Ae[t],Oe[t],Me[t],De[t],0,0),Re.push(h)}}();var Ne={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return Ae[t]},uY:function(t){return Oe[t]},vX:function(t){return Me[t]},vY:function(t){return De[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return Ce[t][e]},sub:function(t,e){return Ce[t][Ne.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?Ne.S:Ne.N:2*Math.abs(e)<=Math.abs(t)?t>0?Ne.E:Ne.W:e>0?t>0?Ne.SE:Ne.SW:t>0?Ne.NE:Ne.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=Re[Ne.inv(e)];n.tx=r,n.ty=i,t.append(n)}},Fe=function(){function t(){this.worldTransform=new Ie,this.localTransform=new Ie,this.position=new Pe(this.onChange,this,0,0),this.scale=new Pe(this.onChange,this,1,1),this.pivot=new Pe(this.onChange,this,0,0),this.skew=new Pe(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();D.SORTABLE_CHILDREN=!1;var Be=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?xe.EMPTY:((t=t||new xe(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[2])<e?o:e,r=(s=t[3])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[4])<e?o:e,r=(s=t[5])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[6])<e?o:e,r=(s=t[7])<r?s:r,i=o>i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},t.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,l=t.ty,c=this.minX,d=this.minY,p=this.maxX,f=this.maxY,m=o*e+a*r+u,v=s*e+h*r+l;c=m<c?m:c,d=v<d?v:d,p=m>p?m:p,f=v>f?v:f,c=(m=o*i+a*r+u)<c?m:c,d=(v=s*i+h*r+l)<d?v:d,p=m>p?m:p,f=v>f?v:f,c=(m=o*e+a*n+u)<c?m:c,d=(v=s*e+h*n+l)<d?v:d,p=m>p?m:p,f=v>f?v:f,c=(m=o*i+a*n+u)<c?m:c,d=(v=s*i+h*n+l)<d?v:d,p=m>p?m:p,f=v>f?v:f,this.minX=c,this.minY=d,this.maxX=p,this.maxY=f},t.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;a<r;a+=2){var h=t[a],u=t[a+1];i=h<i?h:i,n=u<n?u:n,o=h>o?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},t.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},t.prototype.addVerticesMatrix=function(t,e,r,i,n,o){void 0===n&&(n=0),void 0===o&&(o=n);for(var s=t.a,a=t.b,h=t.c,u=t.d,l=t.tx,c=t.ty,d=this.minX,p=this.minY,f=this.maxX,m=this.maxY,v=r;v<i;v+=2){var g=e[v],y=e[v+1],_=s*g+h*y+l,x=u*y+a*g+c;d=Math.min(d,_-n),f=Math.max(f,_+n),p=Math.min(p,x-o),m=Math.max(m,x+o)}this.minX=d,this.minY=p,this.maxX=f,this.maxY=m},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>i?this.maxY:i},t}(),Ue=function(t,e){return(Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function ke(t,e){function r(){this.constructor=t}Ue(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Xe=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new Fe,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new Be,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return ke(e,t),e.mixin=function(t){for(var r=Object.keys(t),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new xe),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new xe),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Be);var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var i=this._bounds,n=this._boundsID;this._bounds=this._localBounds;var o=this.getBounds(!1,t);return this.parent=r,this.transform=e,this._bounds=i,this._bounds.updateID+=this._boundsID-n,o},e.prototype.toGlobal=function(t,e,r){return void 0===r&&(r=!1),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this._mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new je),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*ye},set:function(t){this.transform.rotation=t*_e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){var e;this._mask&&((e=this._mask.maskObject||this._mask).renderable=!0,e.isMask=!1);(this._mask=t,this._mask)&&((e=this._mask.maskObject||this._mask).renderable=!1,e.isMask=!0)},enumerable:!1,configurable:!0}),e}(C),je=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sortDirty=null,e}return ke(e,t),e}(Xe);function He(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}Xe.prototype.displayObjectUpdateTransform=Xe.prototype.updateTransform;var Ge=function(t){function e(){var e=t.call(this)||this;return e.children=[],e.sortableChildren=D.SORTABLE_CHILDREN,e.sortDirty=!1,e}return ke(e,t),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,e=[],r=0;r<arguments.length;r++)e[r]=t[r];if(e.length>1)for(var i=0;i<e.length;i++)this.addChild(e[i]);else{var n=e[0];n.parent&&n.parent.removeChild(n),n.parent=this,this.sortDirty=!0,n.transform._parentID=-1,this.children.push(n),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",n,this,this.children.length-1),n.emit("added",this)}return e[0]},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);te(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],r=0;r<arguments.length;r++)e[r]=t[r];if(e.length>1)for(var i=0;i<e.length;i++)this.removeChild(e[i]);else{var n=e[0],o=this.children.indexOf(n);if(-1===o)return null;n.parent=null,n.transform._parentID=-1,te(this.children,o,1),this._boundsID++,this.onChildrenChange(o),n.emit("removed",this),this.emit("childRemoved",n,this,o)}return e[0]},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,te(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var r,i=t,n=e-i;if(n>0&&n<=e){r=this.children.splice(i,n);for(var o=0;o<r.length;++o)r[o].parent=null,r[o].transform&&(r[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(o=0;o<r.length;++o)r[o].emit("removed",this),this.emit("childRemoved",r[o],this,o);return r}if(0===n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,r=this.children.length;e<r;++e){var i=this.children[e];i._lastSortedIndex=e,t||0===i.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(He),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var r=e._mask.maskObject||e._mask;r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(e,r){void 0===r&&(r=!1);var i=t.prototype.getLocalBounds.call(this,e);if(!r)for(var n=0,o=this.children.length;n<o;++n){var s=this.children[n];s.visible&&s.updateTransform()}return i},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){t.batch.flush();var e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i]);this._enabledFilters.length&&t.filter.push(this,this._enabledFilters)}r&&t.mask.push(this,this._mask),this._render(t);i=0;for(var n=this.children.length;i<n;i++)this.children[i].render(t);t.batch.flush(),r&&t.mask.pop(this),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var r="boolean"==typeof e?e:e&&e.children,i=this.removeChildren(0,this.children.length);if(r)for(var n=0;n<i.length;++n)i[n].destroy(e)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},enumerable:!1,configurable:!0}),e}(Xe);Ge.prototype.containerUpdateTransform=Ge.prototype.updateTransform;var Ye={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Xe.mixin(Ye);var ze,Ve=100,We=0,qe=0,Ke=2,Ze=function(){function t(t){this._hookDiv=null,(M.tablet||M.phone)&&this.createTouchHook();var e=document.createElement("div");e.style.width=Ve+"px",e.style.height=Ve+"px",e.style.position="absolute",e.style.top=We+"px",e.style.left=qe+"px",e.style.zIndex=Ke.toString(),this.div=e,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=t,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._isActive=!1,this._isMobileAccessibility=!1,this.androidUpdateCount=0,this.androidUpdateFrequency=500,window.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2..toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessability for this content",e.addEventListener("focus",function(){t._isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e},t.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){this._isActive||(this._isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function(){this._isActive&&!this._isMobileAccessibility&&(this._isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible&&t.accessibleChildren){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){var t=performance.now();if(!(M.android.device&&t<this.androidUpdateCount)&&(this.androidUpdateCount=t+this.androidUpdateFrequency,this.renderer.renderingToScreen)){this.renderer._lastObjectRendered&&this.updateAccessibleObjects(this.renderer._lastObjectRendered);var e=this.renderer.view.getBoundingClientRect(),r=this.renderer.resolution,i=e.width/this.renderer.width*r,n=e.height/this.renderer.height*r,o=this.div;o.style.left=e.left+"px",o.style.top=e.top+"px",o.style.width=this.renderer.width+"px",o.style.height=this.renderer.height+"px";for(var s=0;s<this.children.length;s++){var a=this.children[s];if(a.renderId!==this.renderId)a._accessibleActive=!1,te(this.children,s,1),this.div.removeChild(a._accessibleDiv),this.pool.push(a._accessibleDiv),a._accessibleDiv=null,s--;else{o=a._accessibleDiv;var h=a.hitArea,u=a.worldTransform;a.hitArea?(o.style.left=(u.tx+h.x*u.a)*i+"px",o.style.top=(u.ty+h.y*u.d)*n+"px",o.style.width=h.width*u.a*i+"px",o.style.height=h.height*u.d*n+"px"):(h=a.getBounds(),this.capHitArea(h),o.style.left=h.x*i+"px",o.style.top=h.y*n+"px",o.style.width=h.width*i+"px",o.style.height=h.height*n+"px",o.title!==a.accessibleTitle&&null!==a.accessibleTitle&&(o.title=a.accessibleTitle),o.getAttribute("aria-label")!==a.accessibleHint&&null!==a.accessibleHint&&o.setAttribute("aria-label",a.accessibleHint)),a.accessibleTitle===o.title&&a.tabIndex===o.tabIndex||(o.title=a.accessibleTitle,o.tabIndex=a.tabIndex,this.debug&&this.updateDebugHTML(o))}}this.renderId++}},t.prototype.updateDebugHTML=function(t){t.innerHTML="type: "+t.type+"</br> title : "+t.title+"</br> tabIndex: "+t.tabIndex},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width=Ve+"px",e.style.height=Ve+"px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=Ke.toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();D.TARGET_FPMS=.06,(ze=t.UPDATE_PRIORITY||(t.UPDATE_PRIORITY={}))[ze.INTERACTION=50]="INTERACTION",ze[ze.HIGH=25]="HIGH",ze[ze.NORMAL=0]="NORMAL",ze[ze.LOW=-25]="LOW",ze[ze.UTILITY=-50]="UTILITY";var Je=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=0),void 0===i&&(i=!1),this.fn=t,this.context=e,this.priority=r,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),Qe=function(){function e(){var t=this;this._head=new Je(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/D.TARGET_FPMS,this.elapsedMS=1/D.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return e.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,r,i){return void 0===i&&(i=t.UPDATE_PRIORITY.NORMAL),this._addListener(new Je(e,r,i))},e.prototype.addOnce=function(e,r,i){return void 0===i&&(i=t.UPDATE_PRIORITY.NORMAL),this._addListener(new Je(e,r,i,!0))},e.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},e.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var r=t-this._lastFrame|0;if(r<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*D.TARGET_FPMS;for(var i=this._head,n=i.next;n;)n=n.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(e.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,D.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"shared",{get:function(){if(!e._shared){var t=e._shared=new e;t.autoStart=!0,t._protected=!0}return e._shared},enumerable:!1,configurable:!0}),Object.defineProperty(e,"system",{get:function(){if(!e._system){var t=e._system=new e;t.autoStart=!0,t._protected=!0}return e._system},enumerable:!1,configurable:!0}),e}(),$e=function(){function e(){}return e.init=function(e){var r=this;e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set:function(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,t.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}}),this.stop=function(){r._ticker.stop()},this.start=function(){r._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Qe.shared:new Qe,e.autoStart&&this.start()},e.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},e}(),tr=function(){function t(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new we,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(t.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),t.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},t.prototype.copyEvent=function(t){"isPrimary"in t&&t.isPrimary&&(this.isPrimary=!0),this.button="button"in t&&t.button;var e="buttons"in t&&t.buttons;this.buttons=Number.isInteger(e)?e:"which"in t&&t.which,this.width="width"in t&&t.width,this.height="height"in t&&t.height,this.tiltX="tiltX"in t&&t.tiltX,this.tiltY="tiltY"in t&&t.tiltY,this.pointerType="pointerType"in t&&t.pointerType,this.pressure="pressure"in t&&t.pressure,this.rotationAngle="rotationAngle"in t&&t.rotationAngle,this.twist="twist"in t&&t.twist||0,this.tangentialPressure="tangentialPressure"in t&&t.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},t}(),er=function(t,e){return(er=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var rr=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),ir=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return 0!=(this._flags&t.FLAGS.OVER)},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return 0!=(this._flags&t.FLAGS.RIGHT_DOWN)},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return 0!=(this._flags&t.FLAGS.LEFT_DOWN)},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),t}(),nr=function(){function t(){this._tempPoint=new we}return t.prototype.recursiveFindHit=function(t,e,r,i,n){if(!e||!e.visible)return!1;var o=t.data.global,s=!1,a=n=e.interactive||n,h=!0;if(e.hitArea?(i&&(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(i=!1,h=!1)),a=!1):e._mask&&i&&(e._mask.containsPoint&&e._mask.containsPoint(o)||(i=!1)),h&&e.interactiveChildren&&e.children)for(var u=e.children,l=u.length-1;l>=0;l--){var c=u[l],d=this.recursiveFindHit(t,c,r,i,a);if(d){if(!c.parent)continue;a=!1,d&&(t.target&&(i=!1),s=!0)}}return n&&(i&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),r&&r(t,e,!!s))),s},t.prototype.findHit=function(t,e,r,i){this.recursiveFindHit(t,e,r,i,!1)},t}(),or={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Xe.mixin(or);var sr=1,ar={target:null,data:{global:null}},hr=function(e){function r(t,r){var i=e.call(this)||this;return r=r||{},i.renderer=t,i.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,i.interactionFrequency=r.interactionFrequency||10,i.mouse=new tr,i.mouse.identifier=sr,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[sr]=i.mouse,i.interactionDataPool=[],i.eventData=new rr,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!1,i.supportsTouchEvents="ontouchstart"in window,i.supportsPointerEvents=!!window.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new nr,i._tempDisplayObject=new je,i._useSystemTicker=void 0===r.useSystemTicker||r.useSystemTicker,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return function(t,e){function r(){this.constructor=t}er(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),Object.defineProperty(r.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),r.prototype.hitTest=function(t,e){return ar.target=null,ar.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(ar,e,null,!0),ar.target},r.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},r.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(Qe.system.add(this.tickerUpdate,this,t.UPDATE_PRIORITY.INTERACTION),this.tickerAdded=!0)},r.prototype.removeTickerListener=function(){this.tickerAdded&&(Qe.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},r.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},r.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},r.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime<this.interactionFrequency||(this._deltaTime=0,this.update())},r.prototype.update=function(){if(this.interactionDOMElement)if(this._didMove)this._didMove=!1;else{for(var t in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(t)){var e=this.activeInteractionData[t];if(e.originalEvent&&"touch"!==e.pointerType){var r=this.configureInteractionEventForDOMEvent(this.eventData,e.originalEvent,e);this.processInteractive(r,this.lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},r.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(typeof e){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},r.prototype.dispatchEvent=function(t,e,r){r.stopPropagationHint&&t!==r.stopsPropagatingAt||(r.currentTarget=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},r.prototype.delayDispatchEvent=function(t,e,r){this.delayedEvents.push({displayObject:t,eventString:e,eventData:r})},r.prototype.mapPositionToPoint=function(t,e,r){var i;i=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var n=1/this.resolution;t.x=(e-i.left)*(this.interactionDOMElement.width/i.width)*n,t.y=(r-i.top)*(this.interactionDOMElement.height/i.height)*n},r.prototype.processInteractive=function(t,e,r,i){var n=this.search.findHit(t,e,r,i),o=this.delayedEvents;if(!o.length)return n;t.stopPropagationHint=!1;var s=o.length;this.delayedEvents=[];for(var a=0;a<s;a++){var h=o[a],u=h.displayObject,l=h.eventString,c=h.eventData;c.stopsPropagatingAt===u&&(c.stopPropagationHint=!0),this.dispatchEvent(u,l,c)}return n},r.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);if(this.autoPreventDefault&&e[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var r=e.length,i=0;i<r;i++){var n=e[i],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);if(s.data.originalEvent=t,this.processInteractive(s,this.lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",s),"touch"===n.pointerType)this.emit("touchstart",s);else if("mouse"===n.pointerType||"pen"===n.pointerType){var a=2===n.button;this.emit(a?"rightdown":"mousedown",this.eventData)}}}},r.prototype.processPointerDown=function(t,e,r){var i=t.data,n=t.data.identifier;if(r)if(e.trackedPointers[n]||(e.trackedPointers[n]=new ir(n)),this.dispatchEvent(e,"pointerdown",t),"touch"===i.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;o?e.trackedPointers[n].rightDown=!0:e.trackedPointers[n].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},r.prototype.onPointerComplete=function(t,e,r){for(var i=this.normalizeToPointerData(t),n=i.length,o=t.target!==this.interactionDOMElement?"outside":"",s=0;s<n;s++){var a=i[s],h=this.getInteractionDataForPointerId(a),u=this.configureInteractionEventForDOMEvent(this.eventData,a,h);if(u.data.originalEvent=t,this.processInteractive(u,this.lastObjectRendered,r,e||!o),this.emit(e?"pointercancel":"pointerup"+o,u),"mouse"===a.pointerType||"pen"===a.pointerType){var l=2===a.button;this.emit(l?"rightup"+o:"mouseup"+o,u)}else"touch"===a.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,u),this.releaseInteractionDataForPointerId(a.pointerId))}},r.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},r.prototype.processPointerCancel=function(t,e){var r=t.data,i=t.data.identifier;void 0!==e.trackedPointers[i]&&(delete e.trackedPointers[i],this.dispatchEvent(e,"pointercancel",t),"touch"===r.pointerType&&this.dispatchEvent(e,"touchcancel",t))},r.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},r.prototype.processPointerUp=function(t,e,r){var i=t.data,n=t.data.identifier,o=e.trackedPointers[n],s="touch"===i.pointerType,a="mouse"===i.pointerType||"pen"===i.pointerType,h=!1;if(a){var u=2===i.button,l=ir.FLAGS,c=u?l.RIGHT_DOWN:l.LEFT_DOWN,d=void 0!==o&&o.flags&c;r?(this.dispatchEvent(e,u?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,u?"rightclick":"click",t),h=!0)):d&&this.dispatchEvent(e,u?"rightupoutside":"mouseupoutside",t),o&&(u?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(e,"pointerup",t),s&&this.dispatchEvent(e,"touchend",t),o&&(a&&!h||this.dispatchEvent(e,"pointertap",t),s&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),s&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[n]},r.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this._didMove=!0,this.cursor=null);for(var r=e.length,i=0;i<r;i++){var n=e[i],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);s.data.originalEvent=t,this.processInteractive(s,this.lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",s),"touch"===n.pointerType&&this.emit("touchmove",s),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mousemove",s)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},r.prototype.processPointerMove=function(t,e,r){var i=t.data,n="touch"===i.pointerType,o="mouse"===i.pointerType||"pen"===i.pointerType;o&&this.processPointerOverOut(t,e,r),this.moveWhenInside&&!r||(this.dispatchEvent(e,"pointermove",t),n&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},r.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(e),i=this.configureInteractionEventForDOMEvent(this.eventData,e,r);i.data.originalEvent=e,this.processInteractive(i,this.lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",i),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",i):this.releaseInteractionDataForPointerId(r.identifier)}},r.prototype.processPointerOverOut=function(t,e,r){var i=t.data,n=t.data.identifier,o="mouse"===i.pointerType||"pen"===i.pointerType,s=e.trackedPointers[n];r&&!s&&(s=e.trackedPointers[n]=new ir(n)),void 0!==s&&(r&&this.mouseOverRenderer?(s.over||(s.over=!0,this.delayDispatchEvent(e,"pointerover",t),o&&this.delayDispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):s.over&&(s.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),s.none&&delete e.trackedPointers[n]))},r.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],r=this.getInteractionDataForPointerId(e),i=this.configureInteractionEventForDOMEvent(this.eventData,e,r);i.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",i),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",i)},r.prototype.getInteractionDataForPointerId=function(t){var e,r=t.pointerId;return r===sr||"mouse"===t.pointerType?e=this.mouse:this.activeInteractionData[r]?e=this.activeInteractionData[r]:((e=this.interactionDataPool.pop()||new tr).identifier=r,this.activeInteractionData[r]=e),e.copyEvent(t),e},r.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},r.prototype.configureInteractionEventForDOMEvent=function(t,e,r){return t.data=r,this.mapPositionToPoint(r.global,e.clientX,e.clientY),"touch"===e.pointerType&&(e.globalX=r.global.x,e.globalY=r.global.y),r.originalEvent=e,t.reset(),t},r.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var r=0,i=t.changedTouches.length;r<i;r++){var n=t.changedTouches[r];void 0===n.button&&(n.button=t.touches.length?1:0),void 0===n.buttons&&(n.buttons=t.touches.length?1:0),void 0===n.isPrimary&&(n.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===n.width&&(n.width=n.radiusX||1),void 0===n.height&&(n.height=n.radiusY||1),void 0===n.tiltX&&(n.tiltX=0),void 0===n.tiltY&&(n.tiltY=0),void 0===n.pointerType&&(n.pointerType="touch"),void 0===n.pointerId&&(n.pointerId=n.identifier||0),void 0===n.pressure&&(n.pressure=n.force||.5),void 0===n.twist&&(n.twist=0),void 0===n.tangentialPressure&&(n.tangentialPressure=0),void 0===n.layerX&&(n.layerX=n.offsetX=n.clientX),void 0===n.layerY&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,e.push(n)}else if(!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent)e.push(t);else{var o=t;void 0===o.isPrimary&&(o.isPrimary=!0),void 0===o.width&&(o.width=1),void 0===o.height&&(o.height=1),void 0===o.tiltX&&(o.tiltX=0),void 0===o.tiltY&&(o.tiltY=0),void 0===o.pointerType&&(o.pointerType="mouse"),void 0===o.pointerId&&(o.pointerId=sr),void 0===o.pressure&&(o.pressure=.5),void 0===o.twist&&(o.twist=0),void 0===o.tangentialPressure&&(o.tangentialPressure=0),o.isNormalized=!0,e.push(o)}return e},r.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},r}(C),ur=function(){function t(t){this.items=[],this._name=t,this._aliasCount=0}return t.prototype.emit=function(t,e,r,i,n,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var h=this.name,u=this.items;this._aliasCount++;for(var l=0,c=u.length;l<c;l++)u[l][h](t,e,r,i,n,o,s,a);return u===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(ur.prototype,{dispatch:{value:ur.prototype.emit},run:{value:ur.prototype.emit}}),D.PREFER_ENV=M.any?t.ENV.WEBGL:t.ENV.WEBGL2,D.STRICT_TEXTURE_CACHE=!1;var lr=[];function cr(t,e){if(!t)return null;var r="";if("string"==typeof t){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(var n=lr.length-1;n>=0;--n){var o=lr[n];if(o.test&&o.test(t,r))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var dr=function(t,e){return(dr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function pr(t,e){function r(){this.constructor=t}dr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var fr=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new ur("setRealSize"),this.onUpdate=new ur("update"),this.onError=new ur("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,r){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),mr=function(e){function r(t,r){var i=this,n=r||{},o=n.width,s=n.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(i=e.call(this,o,s)||this).data=t,i}return pr(r,e),r.prototype.upload=function(e,r,i){var n=e.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),i.width===r.width&&i.height===r.height?n.texSubImage2D(r.target,0,0,0,r.width,r.height,r.format,r.type,this.data):(i.width=r.width,i.height=r.height,n.texImage2D(r.target,0,i.internalFormat,r.width,r.height,0,r.format,i.type,this.data)),!0},r.prototype.dispose=function(){this.data=null},r.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},r}(fr),vr={scaleMode:t.SCALE_MODES.NEAREST,format:t.FORMATS.RGBA,alphaMode:t.ALPHA_MODES.NPM},gr=function(e){function r(r,i){void 0===r&&(r=null),void 0===i&&(i=null);var n=e.call(this)||this,o=(i=i||{}).alphaMode,s=i.mipmap,a=i.anisotropicLevel,h=i.scaleMode,u=i.width,l=i.height,c=i.wrapMode,d=i.format,p=i.type,f=i.target,m=i.resolution,v=i.resourceOptions;return!r||r instanceof fr||((r=cr(r,v)).internal=!0),n.width=u||0,n.height=l||0,n.resolution=m||D.RESOLUTION,n.mipmap=void 0!==s?s:D.MIPMAP_TEXTURES,n.anisotropicLevel=void 0!==a?a:D.ANISOTROPIC_LEVEL,n.wrapMode=c||D.WRAP_MODE,n.scaleMode=void 0!==h?h:D.SCALE_MODE,n.format=d||t.FORMATS.RGBA,n.type=p||t.TYPES.UNSIGNED_BYTE,n.target=f||t.TARGETS.TEXTURE_2D,n.alphaMode=void 0!==o?o:t.ALPHA_MODES.UNPACK,void 0!==i.premultiplyAlpha&&(n.premultiplyAlpha=i.premultiplyAlpha),n.uid=ie(),n.touched=0,n.isPowerOfTwo=!1,n._refreshPOT(),n._glTextures={},n.dirtyId=0,n.dirtyStyleId=0,n.cacheId=null,n.valid=u>0&&l>0,n.textureCacheIds=[],n.destroyed=!1,n.resource=null,n._batchEnabled=0,n._batchLocation=0,n.parentTextureArray=null,n.setResource(r),n}return pr(r,e),Object.defineProperty(r.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),r.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},r.prototype.setSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},r.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},r.prototype._refreshPOT=function(){this.isPowerOfTwo=Qt(this.realWidth)&&Qt(this.realHeight)},r.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},r.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},r.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},r.prototype.onError=function(t){this.emit("error",this,t)},r.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete he[this.cacheId],delete ae[this.cacheId],this.cacheId=null),this.dispose(),r.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},r.prototype.dispose=function(){this.emit("dispose",this)},r.prototype.castToBaseTexture=function(){return this},r.from=function(t,e,i){void 0===i&&(i=D.STRICT_TEXTURE_CACHE);var n="string"==typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+ie()),o=t._pixiId);var s=he[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return s||((s=new r(t,e)).cacheId=o,r.addToCache(s,o)),s},r.fromBuffer=function(e,i,n,o){e=e||new Float32Array(i*n*4);var s=new mr(e,{width:i,height:n}),a=e instanceof Float32Array?t.TYPES.FLOAT:t.TYPES.UNSIGNED_BYTE;return new r(s,Object.assign(vr,o||{width:i,height:n,type:a}))},r.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),he[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),he[e]=t)},r.removeFromCache=function(t){if("string"==typeof t){var e=he[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete he[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete he[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},r._globalBatch=0,r}(C),yr=function(t){function e(e,r){var i=this,n=r||{},o=n.width,s=n.height;(i=t.call(this,o,s)||this).items=[],i.itemDirtyIds=[];for(var a=0;a<e;a++){var h=new gr;i.items.push(h),i.itemDirtyIds.push(-2)}return i.length=e,i._load=null,i.baseTexture=null,i}return pr(e,t),e.prototype.initFromArray=function(t,e){for(var r=0;r<this.length;r++)t[r]&&(t[r].castToBaseTexture?this.addBaseTextureAt(t[r].castToBaseTexture(),r):t[r]instanceof fr?this.addResourceAt(t[r],r):this.addResourceAt(cr(t[r],e),r))},e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){if(!this.items[e])throw new Error("Index "+e+" is out of bounds");return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){if(null!==this.baseTexture)throw new Error("Only one base texture per TextureArray is allowed");t.prototype.bind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map(function(t){return t.resource}).filter(function(t){return t}).map(function(t){return t.load()});return this._load=Promise.all(e).then(function(){var e=t.items[0],r=e.realWidth,i=e.realHeight;return t.resize(r,i),Promise.resolve(t)}),this._load},e}(fr),_r=function(e){function r(t,r){var i,n,o=this,s=r||{},a=s.width,h=s.height;return Array.isArray(t)?(i=t,n=t.length):n=t,o=e.call(this,n,{width:a,height:h})||this,i&&o.initFromArray(i,r),o}return pr(r,e),r.prototype.addBaseTextureAt=function(t,e){if(!t.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(t.resource,e),this},r.prototype.bind=function(r){e.prototype.bind.call(this,r),r.target=t.TARGETS.TEXTURE_2D_ARRAY},r.prototype.upload=function(t,e,r){var i=this.length,n=this.itemDirtyIds,o=this.items,s=t.gl;r.dirtyId<0&&s.texImage3D(s.TEXTURE_2D_ARRAY,0,e.format,this._width,this._height,i,0,e.format,e.type,null);for(var a=0;a<i;a++){var h=o[a];n[a]<h.dirtyId&&(n[a]=h.dirtyId,h.valid&&s.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,a,h.resource.width,h.resource.height,1,e.format,e.type,h.resource.source))}return!0},r}(yr),xr=function(e){function r(t){var r=this,i=t,n=i.naturalWidth||i.videoWidth||i.width,o=i.naturalHeight||i.videoHeight||i.height;return(r=e.call(this,n,o)||this).source=t,r.noSubImage=!1,r}return pr(r,e),r.crossOrigin=function(t,e,r){void 0===r&&0!==e.indexOf("data:")?t.crossOrigin=pe(e):!1!==r&&(t.crossOrigin="string"==typeof r?r:"anonymous")},r.prototype.upload=function(e,r,i,n){var o=e.gl,s=r.realWidth,a=r.realHeight;return n=n||this.source,o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),this.noSubImage||r.target!==o.TEXTURE_2D||i.width!==s||i.height!==a?(i.width=s,i.height=a,o.texImage2D(r.target,0,r.format,r.format,r.type,n)):o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,r.type,n),!0},r.prototype.update=function(){if(!this.destroyed){var t=this.source,r=t.naturalWidth||t.videoWidth||t.width,i=t.naturalHeight||t.videoHeight||t.height;this.resize(r,i),e.prototype.update.call(this)}},r.prototype.dispose=function(){this.source=null},r}(fr),br=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pr(e,t),e.test=function(t){var e=window.OffscreenCanvas;return!!(e&&t instanceof e)||t instanceof HTMLCanvasElement},e}(xr),Er=function(e){function r(i,n){var o=this,s=n||{},a=s.width,h=s.height,u=s.autoLoad,l=s.linkBaseTexture;if(i&&i.length!==r.SIDES)throw new Error("Invalid length. Got "+i.length+", expected 6");o=e.call(this,6,{width:a,height:h})||this;for(var c=0;c<r.SIDES;c++)o.items[c].target=t.TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+c;return o.linkBaseTexture=!1!==l,i&&o.initFromArray(i,n),!1!==u&&o.load(),o}return pr(r,e),r.prototype.bind=function(r){e.prototype.bind.call(this,r),r.target=t.TARGETS.TEXTURE_CUBE_MAP},r.prototype.addBaseTextureAt=function(e,r,i){if(void 0===i&&(i=this.linkBaseTexture),!this.items[r])throw new Error("Index "+r+" is out of bounds");if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0){if(!e.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(e.resource,r)}else e.target=t.TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+r,e.parentTextureArray=this.baseTexture,this.items[r]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[r]=e,this},r.prototype.upload=function(t,e,i){for(var n=this.itemDirtyIds,o=0;o<r.SIDES;o++){var s=this.items[o];n[o]<s.dirtyId&&(s.valid&&s.resource?(s.resource.upload(t,s,i),n[o]=s.dirtyId):n[o]<-1&&(t.gl.texImage2D(s.target,0,i.internalFormat,e.realWidth,e.realHeight,0,e.format,i.type,null),n[o]=-1))}return!0},r.test=function(t){return Array.isArray(t)&&t.length===r.SIDES},r.SIDES=6,r}(yr),Tr=function(e){function r(t,r){var i=this;if(r=r||{},!(t instanceof HTMLImageElement)){var n=new Image;xr.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}return i=e.call(this,t)||this,!t.complete&&i._width&&i._height&&(i._width=0,i._height=0),i.url=t.src,i._process=null,i.preserveBitmap=!1,i.createBitmap=(void 0!==r.createBitmap?r.createBitmap:D.CREATE_IMAGE_BITMAP)&&!!window.createImageBitmap,i.alphaMode="number"==typeof r.alphaMode?r.alphaMode:null,void 0!==r.premultiplyAlpha&&(i.premultiplyAlpha=r.premultiplyAlpha),i.bitmap=null,i._load=null,!1!==r.autoLoad&&i.load(),i}return pr(r,e),r.prototype.load=function(t){var e=this;return this._load?this._load:(void 0!==t&&(this.createBitmap=t),this._load=new Promise(function(t,r){var i=e.source;e.url=i.src;var n=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?n():(i.onload=n,i.onerror=function(t){r(t),e.onError.emit(t)})}),this._load)},r.prototype.process=function(){var e=this,r=this.source;return null!==this._process?this._process:null===this.bitmap&&window.createImageBitmap?(this._process=window.createImageBitmap(r,0,0,r.width,r.height,{premultiplyAlpha:this.alphaMode===t.ALPHA_MODES.UNPACK?"premultiply":"none"}).then(function(t){return e.destroyed?Promise.reject():(e.bitmap=t,e.update(),e._process=null,Promise.resolve(e))}),this._process):Promise.resolve(this)},r.prototype.upload=function(t,r,i){if("number"==typeof this.alphaMode&&(r.alphaMode=this.alphaMode),!this.createBitmap)return e.prototype.upload.call(this,t,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(e.prototype.upload.call(this,t,r,i,this.bitmap),!this.preserveBitmap){var n=!0,o=r._glTextures;for(var s in o){var a=o[s];if(a!==i&&a.dirtyId!==r.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},r.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,e.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},r.test=function(t){return"string"==typeof t||t instanceof HTMLImageElement},r}(xr),Sr=function(t){function e(e,r){var i=this;return r=r||{},(i=t.call(this,document.createElement("canvas"))||this)._width=0,i._height=0,i.svg=e,i.scale=r.scale||1,i._overrideWidth=r.width,i._overrideHeight=r.height,i._resolve=null,i._crossorigin=r.crossorigin,i._load=null,!1!==r.autoLoad&&i.load(),i}return pr(e,t),e.prototype.load=function(){var t=this;return this._load?this._load:(this._load=new Promise(function(e){if(t._resolve=function(){t.resize(t.source.width,t.source.height),e(t)},/^\<svg/.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t.svg)))}t._loadSvg()}),this._load)},e.prototype._loadSvg=function(){var t=this,e=new Image;xr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=function(r){t._resolve&&(e.onerror=null,t.onError.emit(r))},e.onload=function(){if(t._resolve){var r=e.width,i=e.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var n=r*t.scale,o=i*t.scale;(t._overrideWidth||t._overrideHeight)&&(n=t._overrideWidth||t._overrideHeight/i*r,o=t._overrideHeight||t._overrideWidth/r*i),n=Math.round(n),o=Math.round(o);var s=t.source;s.width=n,s.height=o,s._pixiId="canvas_"+ie(),s.getContext("2d").drawImage(e,0,0,r,i,0,0,n,o),t._resolve(),t._resolve=null}}},e.getSize=function(t){var r=e.SVG_SIZE.exec(t),i={};return r&&(i[r[1]]=Math.round(parseFloat(r[3])),i[r[5]]=Math.round(parseFloat(r[7]))),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,e){return"svg"===e||"string"==typeof t&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(t)||"string"==typeof t&&0===t.indexOf("<svg")},e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(xr),wr=function(t){function e(r,i){var n=this;if(i=i||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof r&&(r=[r]);var s=r[0].src||r[0];xr.crossOrigin(o,s,i.crossorigin);for(var a=0;a<r.length;++a){var h=document.createElement("source"),u=r[a],l=u.src,c=u.mime,d=(l=l||r[a]).split("?").shift().toLowerCase(),p=d.substr(d.lastIndexOf(".")+1);c=c||e.MIME_TYPES[p]||"video/"+p,h.src=l,h.type=c,o.appendChild(h)}r=o}return(n=t.call(this,r)||this).noSubImage=!0,n._autoUpdate=!0,n._isConnectedToTicker=!1,n._updateFPS=i.updateFPS||0,n._msToNextUpdate=0,n.autoPlay=!1!==i.autoPlay,n._load=null,n._resolve=null,n._onCanPlay=n._onCanPlay.bind(n),n._onError=n._onError.bind(n),!1!==i.autoLoad&&n.load(),n}return pr(e,t),e.prototype.update=function(e){if(void 0===e&&(e=0),!this.destroyed){var r=Qe.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(function(r){t.valid?r(t):(t._resolve=r,e.load())}),this._load},e.prototype._onError=function(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)},e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Qe.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&Qe.shared.remove(this.update,this);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Qe.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(xr),Pr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pr(e,t),e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(xr);lr.push(Tr,Pr,br,wr,Sr,mr,Er,_r);var Ir={Resource:fr,BaseImageResource:xr,INSTALLED:lr,autoDetectResource:cr,AbstractMultiResource:yr,ArrayResource:_r,BufferResource:mr,CanvasResource:br,CubeResource:Er,ImageResource:Tr,SVGResource:Sr,VideoResource:wr,ImageBitmapResource:Pr},Ar=function(){function t(t){this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),Or=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return pr(r,e),r.prototype.upload=function(e,r,i){var n=e.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),i.width===r.width&&i.height===r.height?n.texSubImage2D(r.target,0,0,0,r.width,r.height,r.format,r.type,this.data):(i.width=r.width,i.height=r.height,n.texImage2D(r.target,0,1===e.context.webGLVersion?n.DEPTH_COMPONENT:n.DEPTH_COMPONENT16,r.width,r.height,0,r.format,r.type,this.data)),!0},r}(mr),Mr=function(){function e(e,r){this.width=Math.ceil(e||100),this.height=Math.ceil(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ur("disposeFramebuffer"),this.multisample=t.MSAA_QUALITY.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,r){return void 0===e&&(e=0),this.colorTextures[e]=r||new gr(null,{scaleMode:t.SCALE_MODES.NEAREST,resolution:1,mipmap:t.MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new gr(new Or(null,{width:this.width,height:this.height}),{scaleMode:t.SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:t.MIPMAP_MODES.OFF,format:t.FORMATS.DEPTH_COMPONENT,type:t.TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r<this.colorTextures.length;r++){var i=this.colorTextures[r],n=i.resolution;i.setSize(t/n,e/n)}if(this.depthTexture){n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,e/n)}}},e.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},e.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},e}(),Dr=function(t){function e(e){var r=this;"number"==typeof e&&(e={width:arguments[0],height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]});r=t.call(this,null,e)||this;var i=e||{},n=i.width,o=i.height;return r.mipmap=0,r.width=Math.ceil(n)||100,r.height=Math.ceil(o)||100,r.valid=!0,r.clearColor=[0,0,0,0],r.framebuffer=new Mr(r.width*r.resolution,r.height*r.resolution).addColorTexture(0,r),r.maskStack=[],r.filterStack=[{}],r}return pr(e,t),e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),this.framebuffer.resize(t*this.resolution,e*this.resolution)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},e}(gr),Cr=function(){function t(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return t.prototype.set=function(t,e,r){var i=e.width,n=e.height;if(r){var o=t.width/2/i,s=t.height/2/n,a=t.x/i+o,h=t.y/n+s;r=Ne.add(r,Ne.NW),this.x0=a+o*Ne.uX(r),this.y0=h+s*Ne.uY(r),r=Ne.add(r,2),this.x1=a+o*Ne.uX(r),this.y1=h+s*Ne.uY(r),r=Ne.add(r,2),this.x2=a+o*Ne.uX(r),this.y2=h+s*Ne.uY(r),r=Ne.add(r,2),this.x3=a+o*Ne.uX(r),this.y3=h+s*Ne.uY(r)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},t}(),Rr=new Cr,Lr=function(t){function e(r,i,n,o,s,a){var h=t.call(this)||this;if(h.noFrame=!1,i||(h.noFrame=!0,i=new xe(0,0,1,1)),r instanceof e&&(r=r.baseTexture),h.baseTexture=r,h._frame=i,h.trim=o,h.valid=!1,h._uvs=Rr,h.uvMatrix=null,h.orig=n||i,h._rotate=Number(s||0),!0===s)h._rotate=2;else if(h._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return h.defaultAnchor=a?new we(a.x,a.y):new we(0,0),h._updateID=0,h.textureCacheIds=[],r.valid?h.noFrame?r.valid&&h.onBaseTextureUpdated(r):h.frame=i:r.once("loaded",h.onBaseTextureUpdated,h),h.noFrame&&r.on("update",h.onBaseTextureUpdated,h),h}return pr(e,t),e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var r=this.baseTexture;r&&r.url&&ae[r.url]&&e.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame.clone(),this.orig.clone(),this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor)},e.prototype.updateUvs=function(){this._uvs===Rr&&(this._uvs=new Cr),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,r,i){void 0===r&&(r={}),void 0===i&&(i=D.STRICT_TEXTURE_CACHE);var n="string"==typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+ie()),o=t._pixiId);var s=ae[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in TextureCache.');return s||(r.resolution||(r.resolution=fe(t)),(s=new e(new gr(t,r))).baseTexture.cacheId=o,gr.addToCache(s.baseTexture,o),e.addToCache(s,o)),s},e.fromURL=function(t,r){var i=Object.assign({autoLoad:!1},null==r?void 0:r.resourceOptions),n=e.from(t,Object.assign({resourceOptions:i},r),!1),o=n.baseTexture.resource;return n.baseTexture.valid?Promise.resolve(n):o.load().then(function(){return Promise.resolve(n)})},e.fromBuffer=function(t,r,i,n){return new e(gr.fromBuffer(t,r,i,n))},e.fromLoader=function(t,r,i){var n=new Tr(t);n.url=r;var o=new e(new gr(n,{scaleMode:D.SCALE_MODE,resolution:fe(r)}));return i||(i=r),gr.addToCache(o.baseTexture,i),e.addToCache(o,i),i!==r&&(gr.addToCache(o.baseTexture,r),e.addToCache(o,r)),o},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),ae[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),ae[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=ae[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete ae[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)ae[t.textureCacheIds[i]]===t&&delete ae[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},Object.defineProperty(e.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,i=t.width,n=t.height,o=e+i>this.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(C);function Nr(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}Lr.EMPTY=new Lr(new gr),Nr(Lr.EMPTY),Nr(Lr.EMPTY.baseTexture),Lr.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new Lr(new gr(new br(t)))}(),Nr(Lr.WHITE),Nr(Lr.WHITE.baseTexture);var Fr=function(t){function e(e,r){var i=this,n=null;if(!(e instanceof Dr)){var o=arguments[1],s=arguments[2],a=arguments[3],h=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+s+") instead of the ctor directly."),n=arguments[0],r=null,e=new Dr({width:o,height:s,scaleMode:a,resolution:h})}return(i=t.call(this,e,r)||this).legacyRenderer=n,i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return pr(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,r){void 0===r&&(r=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new Dr(t))},e}(Lr),Br=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e){var r=new Dr(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Fr(r)},t.prototype.getOptimalTexture=function(e,r,i){void 0===i&&(i=1);var n=t.SCREEN_KEY;e*=i,r*=i,this.enableFullScreen&&e===this._pixelsWidth&&r===this._pixelsHeight||(n=(65535&(e=Jt(e)))<<16|65535&(r=Jt(r))),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(e,r)),o.filterPoolKey=n,o.setResolution(i),o},t.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0)}this.texturePool={}},t.prototype.setScreenSize=function(e){if(e.width!==this._pixelsWidth||e.height!==this._pixelsHeight){var r=t.SCREEN_KEY,i=this.texturePool[r];if(this.enableFullScreen=e.width>0&&e.height>0,i)for(var n=0;n<i.length;n++)i[n].destroy(!0);this.texturePool[r]=[],this._pixelsWidth=e.width,this._pixelsHeight=e.height}},t.SCREEN_KEY="screen",t}(),Ur=function(){function t(t,e,r,i,n,o,s){void 0===e&&(e=0),void 0===r&&(r=!1),void 0===i&&(i=5126),this.buffer=t,this.size=e,this.normalized=r,this.type=i,this.stride=n,this.start=o,this.instance=s}return t.prototype.destroy=function(){this.buffer=null},t.from=function(e,r,i,n,o){return new t(e,r,i,n,o)},t}(),kr=0,Xr=function(){function t(t,e,r){void 0===e&&(e=!0),void 0===r&&(r=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=r,this.static=e,this.id=kr++,this.disposeRunner=new ur("disposeBuffer")}return t.prototype.update=function(t){this.data=t||this.data,this._updateID++},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.data=null},t.from=function(e){return e instanceof Array&&(e=new Float32Array(e)),new t(e)},t}();function jr(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var Hr={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var Gr={5126:4,5123:2,5121:1},Yr=0,zr={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array},Vr=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=Yr++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new ur("disposeGeometry"),this.refCount=0}return t.prototype.addAttribute=function(t,e,r,i,n,o,s,a){if(void 0===r&&(r=0),void 0===i&&(i=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e instanceof Xr||(e instanceof Array&&(e=new Float32Array(e)),e=new Xr(e));var h=t.split("|");if(h.length>1){for(var u=0;u<h.length;u++)this.addAttribute(h[u],e,r,i,n);return this}var l=this.buffers.indexOf(e);return-1===l&&(this.buffers.push(e),l=this.buffers.length-1),this.attributes[t]=new Ur(l,r,i,n,o,s,a),this.instanced=this.instanced||a,this},t.prototype.getAttribute=function(t){return this.attributes[t]},t.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},t.prototype.addIndex=function(t){return t instanceof Xr||(t instanceof Array&&(t=new Uint16Array(t)),t=new Xr(t)),t.index=!0,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},t.prototype.getIndex=function(){return this.indexBuffer},t.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],r=[],i=new Xr;for(t in this.attributes){var n=this.attributes[t],o=this.buffers[n.buffer];e.push(o.data),r.push(n.size*Gr[n.type]/4),n.buffer=0}for(i.data=function(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;var s=new ArrayBuffer(4*r),a=null,h=0;for(o=0;o<t.length;o++){var u=e[o],l=t[o],c=jr(l);n[c]||(n[c]=new Hr[c](s)),a=n[c];for(var d=0;d<l.length;d++)a[(d/u|0)*i+h+d%u]=l[d];h+=u}return new Float32Array(s)}(e,r),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},t.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t];return this.buffers[e.buffer].data.length/(e.stride/4||e.size)}return 0},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},t.prototype.clone=function(){for(var e=new t,r=0;r<this.buffers.length;r++)e.buffers[r]=new Xr(this.buffers[r].data.slice(0));for(var r in this.attributes){var i=this.attributes[r];e.attributes[r]=new Ur(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.index=!0),e},t.merge=function(e){for(var r,i=new t,n=[],o=[],s=[],a=0;a<e.length;a++){r=e[a];for(var h=0;h<r.buffers.length;h++)o[h]=o[h]||0,o[h]+=r.buffers[h].data.length,s[h]=0}for(a=0;a<r.buffers.length;a++)n[a]=new(zr[jr(r.buffers[a].data)])(o[a]),i.buffers[a]=new Xr(n[a]);for(a=0;a<e.length;a++){r=e[a];for(h=0;h<r.buffers.length;h++)n[h].set(r.buffers[h].data,s[h]),s[h]+=r.buffers[h].data.length}if(i.attributes=r.attributes,r.indexBuffer){i.indexBuffer=i.buffers[r.buffers.indexOf(r.indexBuffer)],i.indexBuffer.index=!0;var u=0,l=0,c=0,d=0;for(a=0;a<r.buffers.length;a++)if(r.buffers[a]!==r.indexBuffer){d=a;break}for(var a in r.attributes){var p=r.attributes[a];(0|p.buffer)===d&&(l+=p.size*Gr[p.type]/4)}for(a=0;a<e.length;a++){var f=e[a].indexBuffer.data;for(h=0;h<f.length;h++)i.indexBuffer.data[h+c]+=u;u+=r.buffers[d].data.length/l,c+=f.length}}return i},t}(),Wr=function(t){function e(){var e=t.call(this)||this;return e.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),e}return pr(e,t),e}(Vr),qr=function(t){function e(){var e=t.call(this)||this;return e.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.uvs=new Float32Array([0,0,1,0,1,1,0,1]),e.vertexBuffer=new Xr(e.vertices),e.uvBuffer=new Xr(e.uvs),e.addAttribute("aVertexPosition",e.vertexBuffer).addAttribute("aTextureCoord",e.uvBuffer).addIndex([0,1,2,0,2,3]),e}return pr(e,t),e.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(Vr),Kr=0,Zr=function(){function t(t,e){this.uniforms=t,this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Kr++,this.static=!!e}return t.prototype.update=function(){this.dirtyId++},t.prototype.add=function(e,r,i){this.uniforms[e]=new t(r,i)},t.from=function(e,r){return new t(e,r)},t}(),Jr=function(){function t(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.sourceFrame=new xe,this.destinationFrame=new xe,this.filters=[]}return t.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},t}(),Qr=function(e){function r(t){var r=e.call(this,t)||this;return r.defaultFilterStack=[{}],r.texturePool=new Br,r.texturePool.setScreenSize(t.view),r.statePool=[],r.quad=new Wr,r.quadUv=new qr,r.tempRect=new xe,r.activeState={},r.globalUniforms=new Zr({outputFrame:r.tempRect,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),r.forceClear=!1,r.useMaxPadding=!1,r}return pr(r,e),r.prototype.push=function(t,e){for(var r=this.renderer,i=this.defaultFilterStack,n=this.statePool.pop()||new Jr,o=e[0].resolution,s=e[0].padding,a=e[0].autoFit,h=e[0].legacy,u=1;u<e.length;u++){var l=e[u];o=Math.min(o,l.resolution),s=this.useMaxPadding?Math.max(s,l.padding):s+l.padding,a=a&&l.autoFit,h=h||l.legacy}1===i.length&&(this.defaultFilterStack[0].renderTexture=r.renderTexture.current),i.push(n),n.resolution=o,n.legacy=h,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(s),a&&n.sourceFrame.fit(this.renderer.renderTexture.sourceFrame),n.sourceFrame.ceil(o),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,o),n.filters=e,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height;var c=this.tempRect;c.width=n.sourceFrame.width,c.height=n.sourceFrame.height,n.renderTexture.filterFrame=n.sourceFrame,r.renderTexture.bind(n.renderTexture,n.sourceFrame,c),r.renderTexture.clear()},r.prototype.pop=function(){var e=this.defaultFilterStack,r=e.pop(),i=r.filters;this.activeState=r;var n=this.globalUniforms.uniforms;n.outputFrame=r.sourceFrame,n.resolution=r.resolution;var o=n.inputSize,s=n.inputPixel,a=n.inputClamp;if(o[0]=r.destinationFrame.width,o[1]=r.destinationFrame.height,o[2]=1/o[0],o[3]=1/o[1],s[0]=o[0]*r.resolution,s[1]=o[1]*r.resolution,s[2]=1/s[0],s[3]=1/s[1],a[0]=.5*s[2],a[1]=.5*s[3],a[2]=r.sourceFrame.width*o[2]-.5*s[2],a[3]=r.sourceFrame.height*o[3]-.5*s[3],r.legacy){var h=n.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,n.filterClamp=n.inputClamp}this.globalUniforms.update();var u=e[e.length-1];if(r.renderTexture.framebuffer.multisample>1&&this.renderer.framebuffer.blit(),1===i.length)i[0].apply(this,r.renderTexture,u.renderTexture,t.CLEAR_MODES.BLEND,r),this.returnFilterTexture(r.renderTexture);else{var l=r.renderTexture,c=this.getOptimalFilterTexture(l.width,l.height,r.resolution);c.filterFrame=l.filterFrame;var d=0;for(d=0;d<i.length-1;++d){i[d].apply(this,l,c,t.CLEAR_MODES.CLEAR,r);var p=l;l=c,c=p}i[d].apply(this,l,u.renderTexture,t.CLEAR_MODES.BLEND,r),this.returnFilterTexture(l),this.returnFilterTexture(c)}r.clear(),this.statePool.push(r)},r.prototype.bindAndClear=function(e,r){if(void 0===r&&(r=t.CLEAR_MODES.CLEAR),e&&e.filterFrame){var i=this.tempRect;i.width=e.filterFrame.width,i.height=e.filterFrame.height,this.renderer.renderTexture.bind(e,e.filterFrame,i)}else this.renderer.renderTexture.bind(e);"boolean"==typeof r&&(r=r?t.CLEAR_MODES.CLEAR:t.CLEAR_MODES.BLEND,oe("5.2.1","Use CLEAR_MODES when using clear applyFilter option")),(r===t.CLEAR_MODES.CLEAR||r===t.CLEAR_MODES.BLIT&&this.forceClear)&&this.renderer.renderTexture.clear()},r.prototype.applyFilter=function(e,r,i,n){var o=this.renderer;this.bindAndClear(i,n),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,o.state.set(e.state),o.shader.bind(e),e.legacy?(this.quadUv.map(r._frame,r.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(t.DRAW_MODES.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(t.DRAW_MODES.TRIANGLE_STRIP))},r.prototype.calculateSpriteMatrix=function(t,e){var r=this.activeState,i=r.sourceFrame,n=r.destinationFrame,o=e._texture.orig,s=t.set(n.width,0,0,n.height,i.x,i.y),a=e.worldTransform.copyTo(Ie.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(e.anchor.x,e.anchor.y),s},r.prototype.destroy=function(){this.texturePool.clear(!1)},r.prototype.getOptimalFilterTexture=function(t,e,r){return void 0===r&&(r=1),this.texturePool.getOptimalTexture(t,e,r)},r.prototype.getFilterTexture=function(t,e){if("number"==typeof t){var r=t;t=e,e=r}t=t||this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution);return i.filterFrame=t.filterFrame,i},r.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},r.prototype.emptyPool=function(){this.texturePool.clear(!0)},r.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},r}(Ar),$r=function(){function t(t){this.renderer=t}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(t){},t}(),ti=function(t){function e(e){var r=t.call(this,e)||this;return r.emptyRenderer=new $r(e),r.currentRenderer=r.emptyRenderer,r}return pr(e,t),e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(t,e){for(var r=this.renderer.texture.boundTextures,i=e-1;i>=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h<s;h++){var u=n[h],l=u._batchLocation;if(l>=0&&l<i&&e[l]===u)o[h]=l;else for(;a<i;){var c=e[a];if(!c||c._batchEnabled!==r||c._batchLocation!==a){o[h]=a,u._batchLocation=a,e[a]=u;break}a++}}},e}(Ar),ei=0,ri=function(e){function r(t){var r=e.call(this,t)||this;return r.webGLVersion=1,r.extensions={},r.supports={uint32Indices:!1},r.handleContextLost=r.handleContextLost.bind(r),r.handleContextRestored=r.handleContextRestored.bind(r),t.view.addEventListener("webglcontextlost",r.handleContextLost,!1),t.view.addEventListener("webglcontextrestored",r.handleContextRestored,!1),r}return pr(r,e),Object.defineProperty(r.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),r.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=ei++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},r.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=ei++,this.renderer.runners.contextChange.emit(t)},r.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},r.prototype.createContext=function(e,r){var i;if(D.PREFER_ENV>=t.ENV.WEBGL2&&(i=e.getContext("webgl2",r)),i)this.webGLVersion=2;else if(this.webGLVersion=1,!(i=e.getContext("webgl",r)||e.getContext("experimental-webgl",r)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl},r.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},r.prototype.handleContextLost=function(t){t.preventDefault()},r.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},r.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},r.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},r.prototype.validateContext=function(t){var e=t.getContextAttributes(),r="WebGL2RenderingContext"in window&&t instanceof window.WebGL2RenderingContext;r&&(this.webGLVersion=2),e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},r}(Ar),ii=function(){return function(e){this.framebuffer=e,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=t.MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null}}(),ni=new xe,oi=function(e){function r(t){var r=e.call(this,t)||this;return r.managedFramebuffers=[],r.unknownFramebuffer=new Mr(10,10),r.msaaSamples=null,r}return pr(r,e),r.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new xe,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var r=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;D.PREFER_ENV===t.ENV.WEBGL_LEGACY&&(r=null,i=null),r?e.drawBuffers=function(t){return r.drawBuffersWEBGL(t)}:(this.hasMRT=!1,e.drawBuffers=function(){}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},r.prototype.bind=function(t,e){var r=this.gl;if(t){var i=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.dirtyId!==t.dirtyId&&(i.dirtyId=t.dirtyId,i.dirtyFormat!==t.dirtyFormat?(i.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):i.dirtySize!==t.dirtySize&&(i.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n<t.colorTextures.length;n++){var o=t.colorTextures[n];this.renderer.texture.unbind(o.parentTextureArray||o)}t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,t.width,t.height)}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},r.prototype.setViewport=function(t,e,r,i){var n=this.viewport;n.width===r&&n.height===i&&n.x===t&&n.y===e||(n.x=t,n.y=e,n.width=r,n.height=i,this.gl.viewport(t,e,r,i))},Object.defineProperty(r.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),r.prototype.clear=function(e,r,i,n,o){void 0===o&&(o=t.BUFFER_BITS.COLOR|t.BUFFER_BITS.DEPTH);var s=this.gl;s.clearColor(e,r,i,n),s.clear(o)},r.prototype.initFramebuffer=function(t){var e=this.gl,r=new ii(e.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r},r.prototype.resizeFramebuffer=function(t){var e=this.gl,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));for(var i=t.colorTextures,n=0;n<i.length;n++)this.renderer.texture.bind(i[n],0);t.depthTexture&&this.renderer.texture.bind(t.depthTexture,0)},r.prototype.updateFramebuffer=function(t){var e=this.gl,r=t.glFramebuffers[this.CONTEXT_UID],i=t.colorTextures.length;e.drawBuffers||(i=Math.min(i,1)),r.multisample>1&&(r.msaaBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.RGBA8,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,r.msaaBuffer));for(var n=[],o=0;o<i;o++)if(!(0===o&&r.multisample>1)){var s=t.colorTextures[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,s.target,a._glTextures[this.CONTEXT_UID].texture,0),n.push(e.COLOR_ATTACHMENT0+o)}if((n.length>1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var h=t.depthTexture;this.renderer.texture.bind(h,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,0)}r.stencil||!t.stencil&&!t.depth||(r.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,r.stencil))},r.prototype.detectSamples=function(e){var r=this.msaaSamples,i=t.MSAA_QUALITY.NONE;if(e<=1||null===r)return i;for(var n=0;n<r.length;n++)if(r[n]<=e){i=r[n];break}return 1===i&&(i=t.MSAA_QUALITY.NONE),i},r.prototype.blit=function(t,e,r){var i=this.current,n=this.renderer,o=this.gl,s=this.CONTEXT_UID;if(2===n.context.webGLVersion&&i){var a=i.glFramebuffers[s];if(a){if(!t){if(a.multisample<=1)return;a.blitFramebuffer||(a.blitFramebuffer=new Mr(i.width,i.height),a.blitFramebuffer.addColorTexture(0,i.colorTextures[0])),(t=a.blitFramebuffer).width=i.width,t.height=i.height}e||((e=ni).width=i.width,e.height=i.height),r||(r=e);var h=e.width===r.width&&e.height===r.height;this.bind(t),o.bindFramebuffer(o.READ_FRAMEBUFFER,a.framebuffer),o.blitFramebuffer(e.x,e.y,e.width,e.height,r.x,r.y,r.width,r.height,o.COLOR_BUFFER_BIT,h?o.NEAREST:o.LINEAR)}}},r.prototype.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},r.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r<e.length;r++)this.disposeFramebuffer(e[r],t)},r.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.enableStencil();var r=t.width,i=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,r,i),e.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}}},r.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new xe},r}(Ar),si=function(){return function(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}(),ai={5126:4,5123:2,5121:1},hi=function(e){function r(t){var r=e.call(this,t)||this;return r._activeGeometry=null,r._activeVao=null,r.hasVao=!0,r.hasInstance=!0,r.canUseUInt32ElementIndex=!1,r.managedGeometries={},r.managedBuffers={},r}return pr(r,e),r.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,2!==r.webGLVersion){var i=this.renderer.context.extensions.vertexArrayObject;D.PREFER_ENV===t.ENV.WEBGL_LEGACY&&(i=null),i?(e.createVertexArray=function(){return i.createVertexArrayOES()},e.bindVertexArray=function(t){return i.bindVertexArrayOES(t)},e.deleteVertexArray=function(t){return i.deleteVertexArrayOES(t)}):(this.hasVao=!1,e.createVertexArray=function(){return null},e.bindVertexArray=function(){return null},e.deleteVertexArray=function(){return null})}if(2!==r.webGLVersion){var n=e.getExtension("ANGLE_instanced_arrays");n?(e.vertexAttribDivisor=function(t,e){return n.vertexAttribDivisorANGLE(t,e)},e.drawElementsInstanced=function(t,e,r,i,o){return n.drawElementsInstancedANGLE(t,e,r,i,o)},e.drawArraysInstanced=function(t,e,r,i){return n.drawArraysInstancedANGLE(t,e,r,i)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===r.webGLVersion||!!r.extensions.uint32ElementIndex},r.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var r=this.gl,i=t.glVertexArrayObjects[this.CONTEXT_UID],n=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},n=!0);var o=i[e.program.id]||this.initGeometryVao(t,e.program,n);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?r.bindVertexArray(o):this.activateVao(t,e.program)),this.updateBuffers()},r.prototype.reset=function(){this.unbind()},r.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this.gl,r=0;r<t.buffers.length;r++){var i=t.buffers[r],n=i._glBuffers[this.CONTEXT_UID];if(i._updateID!==n.updateID){n.updateID=i._updateID;var o=i.index?e.ELEMENT_ARRAY_BUFFER:e.ARRAY_BUFFER;if(e.bindBuffer(o,n.buffer),this._boundBuffer=n,n.byteLength>=i.data.byteLength)e.bufferSubData(o,0,i.data);else{var s=i.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=i.data.byteLength,e.bufferData(o,i.data,s)}}}},r.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},r.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},r.prototype.initGeometryVao=function(t,e,r){void 0===r&&(r=!0),this.checkCompatibility(t,e);var i=this.gl,n=this.CONTEXT_UID,o=this.getSignature(t,e),s=t.glVertexArrayObjects[this.CONTEXT_UID],a=s[o];if(a)return s[e.id]=a,a;var h=t.buffers,u=t.attributes,l={},c={};for(var d in h)l[d]=0,c[d]=0;for(var d in u)!u[d].size&&e.attributeData[d]?u[d].size=e.attributeData[d].size:u[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[u[d].buffer]+=u[d].size*ai[u[d].type];for(var d in u){var p=u[d],f=p.size;void 0===p.stride&&(l[p.buffer]===f*ai[p.type]?p.stride=0:p.stride=l[p.buffer]),void 0===p.start&&(p.start=c[p.buffer],c[p.buffer]+=f*ai[p.type])}a=i.createVertexArray(),i.bindVertexArray(a);for(var m=0;m<h.length;m++){var v=h[m];v._glBuffers[n]||(v._glBuffers[n]=new si(i.createBuffer()),this.managedBuffers[v.id]=v,v.disposeRunner.add(this)),r&&v._glBuffers[n].refCount++}return this.activateVao(t,e),this._activeVao=a,s[e.id]=a,s[o]=a,a},r.prototype.disposeBuffer=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(e||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}},r.prototype.disposeGeometry=function(t,e){if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var r=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,n=t.buffers;if(t.disposeRunner.remove(this),r){for(var o=0;o<n.length;o++){var s=n[o]._glBuffers[this.CONTEXT_UID];s.refCount--,0!==s.refCount||e||this.disposeBuffer(n[o],e)}if(!e)for(var a in r)if("g"===a[0]){var h=r[a];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},r.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),r=0;r<e.length;r++)this.disposeGeometry(this.managedGeometries[e[r]],t);e=Object.keys(this.managedBuffers);for(r=0;r<e.length;r++)this.disposeBuffer(this.managedBuffers[e[r]],t)},r.prototype.activateVao=function(t,e){var r=this.gl,i=this.CONTEXT_UID,n=t.buffers,o=t.attributes;t.indexBuffer&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.indexBuffer._glBuffers[i].buffer);var s=null;for(var a in o){var h=o[a],u=n[h.buffer]._glBuffers[i];if(e.attributeData[a]){s!==u&&(r.bindBuffer(r.ARRAY_BUFFER,u.buffer),s=u);var l=e.attributeData[a].location;if(r.enableVertexAttribArray(l),r.vertexAttribPointer(l,h.size,h.type||r.FLOAT,h.normalized,h.stride,h.start),h.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");r.vertexAttribDivisor(l,1)}}}},r.prototype.draw=function(t,e,r,i){var n=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,a=2===s?n.UNSIGNED_SHORT:n.UNSIGNED_INT;2===s||4===s&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(t,e||o.indexBuffer.data.length,a,(r||0)*s,i||1):n.drawElements(t,e||o.indexBuffer.data.length,a,(r||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(t,r,e||o.getSize(),i||1):n.drawArrays(t,r,e||o.getSize());return this},r.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},r}(Ar),ui=function(){function e(e){void 0===e&&(e=null),this.type=t.MASK_TYPES.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._target=null}return e.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=t.MASK_TYPES.NONE,this.autoDetect=!0),this._target=null},e.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},e}();function li(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),i}function ci(t,e,r,i){var n=li(t,t.VERTEX_SHADER,e),o=li(t,t.FRAGMENT_SHADER,r),s=t.createProgram();if(t.attachShader(s,n),t.attachShader(s,o),i)for(var a in i)t.bindAttribLocation(s,i[a],a);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(t.getShaderParameter(n,t.COMPILE_STATUS)||(console.warn(e),console.error(t.getShaderInfoLog(n))),t.getShaderParameter(o,t.COMPILE_STATUS)||(console.warn(r),console.error(t.getShaderInfoLog(o))),console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(n),t.deleteShader(o),s}function di(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e}function pi(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return di(2*e);case"bvec3":return di(3*e);case"bvec4":return di(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var fi,mi={},vi=mi;function gi(){if(vi===mi||vi&&vi.isContextLost()){var e=document.createElement("canvas"),r=void 0;D.PREFER_ENV>=t.ENV.WEBGL2&&(r=e.getContext("webgl2",{})),r||((r=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?r.getExtension("WEBGL_draw_buffers"):r=null),vi=r}return vi}function yi(e,r,i){if("precision"!==e.substring(0,9)){var n=r;return r===t.PRECISION.HIGH&&i!==t.PRECISION.HIGH&&(n=t.PRECISION.MEDIUM),"precision "+n+" float;\n"+e}return i!==t.PRECISION.HIGH&&"precision highp"===e.substring(0,15)?e.replace("precision highp","precision mediump"):e}var _i={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function xi(t){return _i[t]}var bi=null,Ei={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Ti(t,e){if(!bi){var r=Object.keys(Ei);bi={};for(var i=0;i<r.length;++i){var n=r[i];bi[t[n]]=Ei[n]}}return bi[e]}var Si=[{test:function(t){return"float"===t.type&&1===t.size},code:function(t){return'\n            if(uv["'+t+'"] !== ud["'+t+'"].value)\n            {\n                ud["'+t+'"].value = uv["'+t+'"]\n                gl.uniform1f(ud["'+t+'"].location, uv["'+t+'"])\n            }\n            '}},{test:function(t){return("sampler2D"===t.type||"samplerCube"===t.type||"sampler2DArray"===t.type)&&1===t.size&&!t.isArray},code:function(t){return't = syncData.textureCount++;\n\n            renderer.texture.bind(uv["'+t+'"], t);\n\n            if(ud["'+t+'"].value !== t)\n            {\n                ud["'+t+'"].value = t;\n                gl.uniform1i(ud["'+t+'"].location, t);\n; // eslint-disable-line max-len\n            }'}},{test:function(t,e){return"mat3"===t.type&&1===t.size&&void 0!==e.a},code:function(t){return'\n            gl.uniformMatrix3fv(ud["'+t+'"].location, false, uv["'+t+'"].toArray(true));\n            '}},{test:function(t,e){return"vec2"===t.type&&1===t.size&&void 0!==e.x},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud["'+t+'"].location, v.x, v.y);\n                }'}},{test:function(t){return"vec2"===t.type&&1===t.size},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud["'+t+'"].location, v[0], v[1]);\n                }\n            '}},{test:function(t,e){return"vec4"===t.type&&1===t.size&&void 0!==e.width},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud["'+t+'"].location, v.x, v.y, v.width, v.height)\n                }'}},{test:function(t){return"vec4"===t.type&&1===t.size},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud["'+t+'"].location, v[0], v[1], v[2], v[3])\n                }'}}],wi={float:"\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }",vec2:"\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }",vec3:"\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }",vec4:"gl.uniform4f(location, v[0], v[1], v[2], v[3])",int:"gl.uniform1i(location, v)",ivec2:"gl.uniform2i(location, v[0], v[1])",ivec3:"gl.uniform3i(location, v[0], v[1], v[2])",ivec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",bool:"gl.uniform1i(location, v)",bvec2:"gl.uniform2i(location, v[0], v[1])",bvec3:"gl.uniform3i(location, v[0], v[1], v[2])",bvec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},Pi={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};var Ii,Ai=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function Oi(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}function Mi(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var r=e.createShader(e.FRAGMENT_SHADER);;){var i=Ai.replace(/%forloop%/gi,Oi(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))break;t=t/2|0}return t}var Di=0,Ci={},Ri=function(){function e(r,i,n){void 0===n&&(n="pixi-shader"),this.id=Di++,this.vertexSrc=r||e.defaultVertexSrc,this.fragmentSrc=i||e.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(n=n.replace(/\s+/g,"-"),Ci[n]?(Ci[n]++,n+="-"+Ci[n]):Ci[n]=1,this.vertexSrc="#define SHADER_NAME "+n+"\n"+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+n+"\n"+this.fragmentSrc,this.vertexSrc=yi(this.vertexSrc,D.PRECISION_VERTEX,t.PRECISION.HIGH),this.fragmentSrc=yi(this.fragmentSrc,D.PRECISION_FRAGMENT,function(){if(!fi){fi=t.PRECISION.MEDIUM;var e=gi();if(e&&e.getShaderPrecisionFormat){var r=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);fi=r.precision?t.PRECISION.HIGH:t.PRECISION.MEDIUM}}return fi}())),this.extractData(this.vertexSrc,this.fragmentSrc),this.glPrograms={},this.syncUniforms=null}return e.prototype.extractData=function(t,e){var r=gi();if(r){var i=ci(r,t,e);this.attributeData=this.getAttributeData(i,r),this.uniformData=this.getUniformData(i,r),r.deleteProgram(i)}else this.uniformData={},this.attributeData={}},e.prototype.getAttributeData=function(t,e){for(var r={},i=[],n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<n;o++){var s=e.getActiveAttrib(t,o),a=Ti(e,s.type),h={type:a,name:s.name,size:xi(a),location:0};r[s.name]=h,i.push(h)}i.sort(function(t,e){return t.name>e.name?1:-1});for(o=0;o<i.length;o++)i[o].location=o;return r},e.prototype.getUniformData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<i;n++){var o=e.getActiveUniform(t,n),s=o.name.replace(/\[.*?\]$/,""),a=o.name.match(/\[.*?\]$/),h=Ti(e,o.type);r[s]={type:h,size:o.size,isArray:a,value:pi(h,o.size)}}return r},Object.defineProperty(e,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"},enumerable:!1,configurable:!0}),e.from=function(t,r,i){var n=t+r,o=se[n];return o||(se[n]=o=new e(t,r,i)),o},e}(),Li=function(){function t(t,e){for(var r in this.program=t,this.uniformGroup=e?e instanceof Zr?e:new Zr(e):new Zr({}),t.uniformData)this.uniformGroup.uniforms[r]instanceof Array&&(this.uniformGroup.uniforms[r]=new Float32Array(this.uniformGroup.uniforms[r]))}return t.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var r in e.uniforms){var i=e.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},t.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(t.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),t.from=function(e,r,i){return new t(Ri.from(e,r),i)},t}(),Ni=function(){function e(){this.data=0,this.blendMode=t.BLEND_MODES.NORMAL,this.polygonOffset=0,this.blend=!0}return Object.defineProperty(e.prototype,"blend",{get:function(){return!!(1&this.data)},set:function(t){!!(1&this.data)!==t&&(this.data^=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return!!(2&this.data)},set:function(t){!!(2&this.data)!==t&&(this.data^=2)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"culling",{get:function(){return!!(4&this.data)},set:function(t){!!(4&this.data)!==t&&(this.data^=4)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthTest",{get:function(){return!!(8&this.data)},set:function(t){!!(8&this.data)!==t&&(this.data^=8)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwiseFrontFace",{get:function(){return!!(16&this.data)},set:function(t){!!(16&this.data)!==t&&(this.data^=16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(e){this.blend=e!==t.BLEND_MODES.NONE,this._blendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),e.for2d=function(){var t=new e;return t.depthTest=!1,t.blend=!0,t},e}(),Fi=function(t){function e(r,i,n){var o=this,s=Ri.from(r||e.defaultVertexSrc,i||e.defaultFragmentSrc);return(o=t.call(this,s,n)||this).padding=0,o.resolution=D.FILTER_RESOLUTION,o.enabled=!0,o.autoFit=!0,o.legacy=!!o.program.attributeData.aTextureCoord,o.state=new Ni,o}return pr(e,t),e.prototype.apply=function(t,e,r,i,n){t.applyFilter(this,e,r,i)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"},enumerable:!1,configurable:!0}),e}(Li),Bi="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n",Ui="varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n    float clip = step(3.5,\n        step(maskClamp.x, vMaskCoord.x) +\n        step(maskClamp.y, vMaskCoord.y) +\n        step(vMaskCoord.x, maskClamp.z) +\n        step(vMaskCoord.y, maskClamp.w));\n\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n",ki=new Ie,Xi=function(){function t(t,e){this._texture=t,this.mapCoord=new Ie,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=void 0===e?.5:e,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var n=t[i],o=t[i+1];e[i]=n*r.a+o*r.c+r.tx,e[i+1]=n*r.b+o*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._textureID===e._updateID)return!1;this._textureID=e._updateID,this._updateID++;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=e.orig,n=e.trim;n&&(ki.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(ki));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+a+h)/o.width,s[1]=(e._frame.y+a+h)/o.height,s[2]=(e._frame.x+e._frame.width-a+h)/o.width,s[3]=(e._frame.y+e._frame.height-a+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},t}(),ji=function(t){function e(e){var r=this,i=new Ie;return r=t.call(this,Bi,Ui)||this,e.renderable=!1,r.maskSprite=e,r.maskMatrix=i,r}return pr(e,t),e.prototype.apply=function(t,e,r,i){var n=this.maskSprite,o=n._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new Xi(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,t.applyFilter(this,e,r,i))},e}(Fi),Hi=function(e){function r(t){var r=e.call(this,t)||this;return r.enableScissor=!1,r.alphaMaskPool=[],r.maskDataPool=[],r.maskStack=[],r.alphaMaskIndex=0,r}return pr(r,e),r.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},r.prototype.push=function(e,r){var i=r;if(!i.isMaskData){var n=this.maskDataPool.pop()||new ui;n.pooled=!0,n.maskObject=r,i=n}switch(i.autoDetect&&this.detect(i),i.copyCountersOrReset(this.maskStack[this.maskStack.length-1]),i._target=e,i.type){case t.MASK_TYPES.SCISSOR:this.maskStack.push(i),this.renderer.scissor.push(i);break;case t.MASK_TYPES.STENCIL:this.maskStack.push(i),this.renderer.stencil.push(i);break;case t.MASK_TYPES.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i),this.maskStack.push(i)}},r.prototype.pop=function(e){var r=this.maskStack.pop();if(r&&r._target===e){switch(r.type){case t.MASK_TYPES.SCISSOR:this.renderer.scissor.pop();break;case t.MASK_TYPES.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case t.MASK_TYPES.SPRITE:this.popSpriteMask()}r.reset(),r.pooled&&this.maskDataPool.push(r)}},r.prototype.detect=function(e){var r=e.maskObject;if(r.isSprite)e.type=t.MASK_TYPES.SPRITE;else if(e.type=t.MASK_TYPES.STENCIL,this.enableScissor&&r.isFastRect&&r.isFastRect()){var i=r.worldTransform,n=Math.atan2(i.b,i.a),o=Math.atan2(i.d,i.c);n=Math.round(n*(180/Math.PI)*100),o=((o=Math.round(o*(180/Math.PI)*100)-n)%18e3+18e3)%18e3,0===(n=(n%9e3+9e3)%9e3)&&9e3===o&&(e.type=t.MASK_TYPES.SCISSOR)}},r.prototype.pushSpriteMask=function(t){var e=t.maskObject,r=t._target,i=this.alphaMaskPool[this.alphaMaskIndex];i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new ji(e)]),i[0].resolution=this.renderer.resolution,i[0].maskSprite=e;var n=r.filterArea;r.filterArea=e.getBounds(!0),this.renderer.filter.push(r,i),r.filterArea=n,this.alphaMaskIndex++},r.prototype.popSpriteMask=function(){this.renderer.filter.pop(),this.alphaMaskIndex--},r}(Ar),Gi=function(t){function e(e){var r=t.call(this,e)||this;return r.maskStack=[],r.glConst=0,r}return pr(e,t),e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(t){var e=this.renderer.gl,r=this.getStackLength();this.maskStack=t;var i=this.getStackLength();i!==r&&(0===i?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.maskStack=null},e}(Ar),Yi=function(t){function e(e){var r=t.call(this,e)||this;return r.glConst=WebGLRenderingContext.SCISSOR_TEST,r}return pr(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.push=function(t){var e=t.maskObject;e.renderable=!0;var r=t._scissorRect,i=e.getBounds(!0),n=this.renderer.gl;e.renderable=!1,r?i.fit(r):n.enable(n.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=i,this._useCurrent()},e.prototype.pop=function(){var t=this.renderer.gl;this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*s+o.x,h=(t.y-n.y)*s+o.y,u=t.width*s,l=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(Gi),zi=function(t){function e(e){var r=t.call(this,e)||this;return r.glConst=WebGLRenderingContext.STENCIL_TEST,r}return pr(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,this._getBitwiseMask()),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.getStackLength())-1},e}(Gi),Vi=function(t){function e(e){var r=t.call(this,e)||this;return r.destinationFrame=null,r.sourceFrame=null,r.defaultFrame=null,r.projectionMatrix=new Ie,r.transform=null,r}return pr(e,t),e.prototype.update=function(t,e,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(t,e,r,i){var n=this.projectionMatrix,o=i?-1:1;n.identity(),n.a=1/e.width*2,n.d=o*(1/e.height*2),n.tx=-1-e.x*n.a,n.ty=-o-e.y*n.d},e.prototype.setTransform=function(t){},e}(Ar),Wi=new xe,qi=new xe,Ki=new xe,Zi=function(t){function e(e){var r=t.call(this,e)||this;return r.clearColor=e._backgroundColorRgba,r.defaultMaskStack=[],r.current=null,r.sourceFrame=new xe,r.destinationFrame=new xe,r}return pr(e,t),e.prototype.bind=function(t,e,r){void 0===t&&(t=null);var i,n,o,s=this.renderer;this.current=t,t?(o=(i=t.baseTexture).resolution,e||(Wi.width=t.frame.width,Wi.height=t.frame.height,e=Wi),r||(qi.x=t.frame.x,qi.y=t.frame.y,qi.width=e.width,qi.height=e.height,r=qi),n=i.framebuffer):(o=s.resolution,e||(Wi.width=s.screen.width,Wi.height=s.screen.height,e=Wi),r||((r=Wi).width=e.width,r.height=e.height)),Ki.x=r.x*o,Ki.y=r.y*o,Ki.width=r.width*o,Ki.height=r.height*o,this.renderer.framebuffer.bind(n,Ki),this.renderer.projection.update(r,e,o,!n),t?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(e),this.destinationFrame.copyFrom(r)},e.prototype.clear=function(t,e){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor,this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3],e)},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e}(Ar),Ji=function(){return function(){}}(),Qi=function(){function t(t,e){this.program=t,this.uniformData=e,this.uniformGroups={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.program=null},t}(),$i=0,tn={textureCount:0},en=function(t){function e(e){var r=t.call(this,e)||this;return r.destroyed=!1,r.systemCheck(),r.gl=null,r.shader=null,r.program=null,r.cache={},r.id=$i++,r}return pr(e,t),e.prototype.systemCheck=function(){if(!function(){if("boolean"==typeof Ii)return Ii;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");Ii=!0===t({a:"b"},"a","b")}catch(t){Ii=!1}return Ii}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},e.prototype.contextChange=function(t){this.gl=t,this.reset()},e.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateShader(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),e||(tn.textureCount=0,this.syncUniformGroup(t.uniformGroup,tn)),i},e.prototype.setUniforms=function(t){var e=this.shader.program,r=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(r.uniformData,t,this.renderer)},e.prototype.syncUniformGroup=function(t,e){var r=this.getglProgram();t.static&&t.dirtyId===r.uniformGroups[t.id]||(r.uniformGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,e))},e.prototype.syncUniforms=function(t,e,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,r)},e.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData);return this.cache[e]||(this.cache[e]=function(t,e){var r=["\n        var v = null;\n        var cv = null\n        var t = 0;\n        var gl = renderer.gl\n    "];for(var i in t.uniforms){var n=e[i];if(n){for(var o=t.uniforms[i],s=!1,a=0;a<Si.length;a++)if(Si[a].test(n,o)){r.push(Si[a].code(i,o)),s=!0;break}if(!s){var h=(1===n.size?wi:Pi)[n.type].replace("location",'ud["'+i+'"].location');r.push('\n            cv = ud["'+i+'"].value;\n            v = uv["'+i+'"];\n            '+h+";")}}else t.uniforms[i].group&&r.push('\n                    renderer.shader.syncUniformGroup(uv["'+i+'"], syncData);\n                ')}return new Function("ud","uv","renderer","syncData",r.join("\n"))}(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},e.prototype.getSignature=function(t,e){var r=t.uniforms,i=[];for(var n in r)i.push(n),e[n]&&i.push(e[n].type);return i.join("-")},e.prototype.getglProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},e.prototype.generateShader=function(t){var e=this.gl,r=t.program,i={};for(var n in r.attributeData)i[n]=r.attributeData[n].location;var o=ci(e,r.vertexSrc,r.fragmentSrc,i),s={};for(var n in r.uniformData){var a=r.uniformData[n];s[n]={location:e.getUniformLocation(o,n),value:pi(a.type,a.size)}}var h=new Qi(o,s);return r.glPrograms[this.renderer.CONTEXT_UID]=h,h},e.prototype.reset=function(){this.program=null,this.shader=null},e.prototype.destroy=function(){this.destroyed=!0},e}(Ar);var rn=0,nn=1,on=2,sn=3,an=4,hn=function(e){function r(r){var i=e.call(this,r)||this;return i.gl=null,i.stateId=0,i.polygonOffset=0,i.blendMode=t.BLEND_MODES.NONE,i._blendEq=!1,i.map=[],i.map[rn]=i.setBlend,i.map[nn]=i.setOffset,i.map[on]=i.setCullFace,i.map[sn]=i.setDepthTest,i.map[an]=i.setFrontFace,i.checks=[],i.defaultState=new Ni,i.defaultState.blend=!0,i}return pr(r,e),r.prototype.contextChange=function(e){this.gl=e,this.blendModes=function(e,r){return void 0===r&&(r=[]),r[t.BLEND_MODES.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.ADD]=[e.ONE,e.ONE],r[t.BLEND_MODES.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.NONE]=[0,0],r[t.BLEND_MODES.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],r[t.BLEND_MODES.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.SRC_IN]=[e.DST_ALPHA,e.ZERO],r[t.BLEND_MODES.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],r[t.BLEND_MODES.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],r[t.BLEND_MODES.DST_IN]=[e.ZERO,e.SRC_ALPHA],r[t.BLEND_MODES.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],r[t.BLEND_MODES.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],r[t.BLEND_MODES.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],r}(e),this.set(this.defaultState),this.reset()},r.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var e=this.stateId^t.data,r=0;e;)1&e&&this.map[r].call(this,!!(t.data&1<<r)),e>>=1,r++;this.stateId=t.data}for(r=0;r<this.checks.length;r++)this.checks[r](this,t)},r.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data},r.prototype.setBlend=function(t){this.updateCheck(r.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)},r.prototype.setOffset=function(t){this.updateCheck(r.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},r.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},r.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},r.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},r.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],r=this.gl;2===e.length?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}},r.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},r.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},r.prototype.updateCheck=function(t,e){var r=this.checks.indexOf(t);e&&-1===r?this.checks.push(t):e||-1===r||this.checks.splice(r,1)},r.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},r.checkPolygonOffset=function(t,e){t.setPolygonOffset(1,e.polygonOffset)},r}(Ar),un=function(e){function r(t){var r=e.call(this,t)||this;return r.count=0,r.checkCount=0,r.maxIdle=D.GC_MAX_IDLE,r.checkCountMax=D.GC_MAX_CHECK_COUNT,r.mode=D.GC_MODE,r}return pr(r,e),r.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==t.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},r.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){var o=0;for(i=0;i<e.length;i++)null!==e[i]&&(e[o++]=e[i]);e.length=o}},r.prototype.unload=function(t){var e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])},r}(Ar),ln=function(){return function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121}}(),cn=function(e){function r(t){var r=e.call(this,t)||this;return r.boundTextures=[],r.currentLocation=-1,r.managedTextures=[],r._unknownBoundTextures=!1,r.unknownTexture=new gr,r}return pr(r,e),r.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r<e;r++)this.boundTextures[r]=null;this.emptyTextures={};var i=new ln(t.createTexture());t.bindTexture(t.TEXTURE_2D,i.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=i,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new ln(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(r=0;r<6;r++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(r=0;r<this.boundTextures.length;r++)this.bind(null,r)},r.prototype.bind=function(t,e){void 0===e&&(e=0);var r=this.gl;if(t){if((t=t.castToBaseTexture()).parentTextureArray)return;if(t.valid){t.touched=this.renderer.textureGC.count;var i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[e]!==t&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),this.updateTexture(t)),this.boundTextures[e]=t}}else this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(r.TEXTURE_2D,this.emptyTextures[r.TEXTURE_2D].texture),this.boundTextures[e]=null},r.prototype.reset=function(){this._unknownBoundTextures=!0,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},r.prototype.unbind=function(t){var e=this.gl,r=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var i=0;i<r.length;i++)r[i]===this.unknownTexture&&this.bind(null,i)}for(i=0;i<r.length;i++)r[i]===t&&(this.currentLocation!==i&&(e.activeTexture(e.TEXTURE0+i),this.currentLocation=i),e.bindTexture(t.target,this.emptyTextures[t.target].texture),r[i]=null)},r.prototype.initTexture=function(t){var e=new ln(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},r.prototype.initTextureType=function(e,r){if(r.internalFormat=e.format,r.type=e.type,2===this.webGLVersion){var i=this.renderer.gl;e.type===i.FLOAT&&e.format===i.RGBA&&(r.internalFormat=i.RGBA32F),e.type===t.TYPES.HALF_FLOAT&&(r.type=i.HALF_FLOAT),r.type===i.HALF_FLOAT&&e.format===i.RGBA&&(r.internalFormat=i.RGBA16F)}},r.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var r=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(r,t,e));else{var i=t.realWidth,n=t.realHeight,o=r.gl;(e.width!==i||e.height!==n||e.dirtyId<0)&&(e.width=i,e.height=n,o.texImage2D(t.target,0,e.internalFormat,i,n,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},r.prototype.destroyTexture=function(t,e){var r=this.gl;if((t=t.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var i=this.managedTextures.indexOf(t);-1!==i&&te(this.managedTextures,i,1)}},r.prototype.updateTextureStyle=function(e){var r=e._glTextures[this.CONTEXT_UID];r&&(e.mipmap!==t.MIPMAP_MODES.POW2&&2===this.webGLVersion||e.isPowerOfTwo?r.mipmap=e.mipmap>=1:r.mipmap=!1,2===this.webGLVersion||e.isPowerOfTwo?r.wrapMode=e.wrapMode:r.wrapMode=t.WRAP_MODES.CLAMP,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},r.prototype.setStyle=function(e,r){var i=this.gl;if(r.mipmap&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,r.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===t.SCALE_MODES.LINEAR){var o=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST)},r}(Ar),dn={FilterSystem:Qr,BatchSystem:ti,ContextSystem:ri,FramebufferSystem:oi,GeometrySystem:hi,MaskSystem:Hi,ScissorSystem:Yi,StencilSystem:zi,ProjectionSystem:Vi,RenderTextureSystem:Zi,ShaderSystem:en,StateSystem:hn,TextureGCSystem:un,TextureSystem:cn},pn=new Ie,fn=function(e){function r(r,i){void 0===r&&(r=t.RENDERER_TYPE.UNKNOWN);var n=e.call(this)||this;return(i=Object.assign({},D.RENDER_OPTIONS,i)).roundPixels&&(D.ROUND_PIXELS=i.roundPixels,oe("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),n.options=i,n.type=r,n.screen=new xe(0,0,i.width,i.height),n.view=i.view||document.createElement("canvas"),n.resolution=i.resolution||D.RESOLUTION,n.transparent=i.transparent,n.autoDensity=i.autoDensity||i.autoResize||!1,n.preserveDrawingBuffer=i.preserveDrawingBuffer,n.clearBeforeRender=i.clearBeforeRender,n._backgroundColor=0,n._backgroundColorRgba=[0,0,0,0],n._backgroundColorString="#000000",n.backgroundColor=i.backgroundColor||n._backgroundColor,n._lastObjectRendered=null,n.plugins={},n}return pr(r,e),r.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(r.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),r.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px"),this.emit("resize",t,e)},r.prototype.generateTexture=function(t,e,r,i){0===(i=i||t.getLocalBounds(null,!0)).width&&(i.width=1),0===i.height&&(i.height=1);var n=Fr.create({width:0|i.width,height:0|i.height,scaleMode:e,resolution:r});return pn.tx=-i.x,pn.ty=-i.y,this.render(t,n,!1,pn,!!t.parent),n},r.prototype.destroy=function(e){for(var r in this.plugins)this.plugins[r].destroy(),this.plugins[r]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);this.plugins=null,this.type=t.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this._tempDisplayObjectParent=null,this.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(r.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=Xt(t),kt(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),r}(C),mn=function(e){function r(i){var n=e.call(this,t.RENDERER_TYPE.WEBGL,i)||this;return i=n.options,n.gl=null,n.CONTEXT_UID=0,n.runners={destroy:new ur("destroy"),contextChange:new ur("contextChange"),reset:new ur("reset"),update:new ur("update"),postrender:new ur("postrender"),prerender:new ur("prerender"),resize:new ur("resize")},n.globalUniforms=new Zr({projectionMatrix:new Ie},!0),n.addSystem(Hi,"mask").addSystem(ri,"context").addSystem(hn,"state").addSystem(en,"shader").addSystem(cn,"texture").addSystem(hi,"geometry").addSystem(oi,"framebuffer").addSystem(Yi,"scissor").addSystem(zi,"stencil").addSystem(Vi,"projection").addSystem(un,"textureGC").addSystem(Qr,"filter").addSystem(Zi,"renderTexture").addSystem(ti,"batch"),n.initPlugins(r.__plugins),i.context?n.context.initFromContext(i.context):n.context.initFromOptions({alpha:!!n.transparent,antialias:i.antialias,premultipliedAlpha:n.transparent&&"notMultiplied"!==n.transparent,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer,powerPreference:n.options.powerPreference}),n.renderingToScreen=!0,Bt(2===n.context.webGLVersion?"WebGL 2":"WebGL 1"),n.resize(n.options.width,n.options.height),n}return pr(r,e),r.create=function(t){if(Ut())return new r(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},r.prototype.addSystem=function(t,e){e||(e=t.name);var r=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},r.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.enableTempParent();t.updateTransform(),t.disableTempParent(o)}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},r.prototype.resize=function(t,r){e.prototype.resize.call(this,t,r),this.runners.resize.emit(t,r)},r.prototype.reset=function(){return this.runners.reset.emit(),this},r.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},r.prototype.destroy=function(t){for(var r in this.runners.destroy.emit(),this.runners)this.runners[r].destroy();e.prototype.destroy.call(this,t),this.gl=null},r.registerPlugin=function(t,e){r.__plugins=r.__plugins||{},r.__plugins[t]=e},r}(fn);function vn(t){return mn.create(t)}var gn="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}",yn="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n",_n=function(){return function(){this.texArray=null,this.blend=0,this.type=t.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null}}(),xn=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0},t}(),bn=function(){function t(t){this.rawBinaryData=new ArrayBuffer(t),this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(t.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),t.prototype.view=function(t){return this[t+"View"]},t.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},t.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(t+" isn't a valid view type")}},t}(),En=function(e){function r(t){var r=e.call(this,t)||this;return r.shaderGenerator=null,r.geometryClass=null,r.vertexSize=null,r.state=Ni.for2d(),r.size=4*D.SPRITE_BATCH_SIZE,r._vertexCount=0,r._indexCount=0,r._bufferedElements=[],r._bufferedTextures=[],r._bufferSize=0,r._shader=null,r._packedGeometries=[],r._packedGeometryPoolSize=2,r._flushId=0,r._aBuffers={},r._iBuffers={},r.MAX_TEXTURES=1,r.renderer.on("prerender",r.onPrerender,r),t.runners.contextChange.add(r),r._dcIndex=0,r._aIndex=0,r._iIndex=0,r._attributeBuffer=null,r._indexBuffer=null,r._tempBoundTextures=[],r}return pr(r,e),r.prototype.contextChange=function(){var e=this.renderer.gl;D.PREFER_ENV===t.ENV.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),D.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=Mi(this.MAX_TEXTURES,e)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var r=0;r<this._packedGeometryPoolSize;r++)this._packedGeometries[r]=new this.geometryClass;this.initFlushBuffers()},r.prototype.initFlushBuffers=function(){for(var t=r._drawCallPool,e=r._textureArrayPool,i=this.size/4,n=Math.floor(i/this.MAX_TEXTURES)+1;t.length<i;)t.push(new _n);for(;e.length<n;)e.push(new xn);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},r.prototype.onPrerender=function(){this._flushId=0},r.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},r.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,e=this.MAX_TEXTURES,i=r._textureArrayPool,n=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++gr._globalBatch,h=0,u=i[0],l=0;n.copyBoundTextures(o,e);for(var c=0;c<this._bufferSize;++c){var d=t[c];t[c]=null,d._batchEnabled!==a&&(u.count>=e&&(n.boundArray(u,o,a,e),this.buildDrawCalls(u,l,c),l=c,u=i[++h],++a),d._batchEnabled=a,d.touched=s,u.elements[u.count++]=d)}u.count>0&&(n.boundArray(u,o,a,e),this.buildDrawCalls(u,l,this._bufferSize),++h,++a);for(c=0;c<o.length;c++)o[c]=null;gr._globalBatch=a},r.prototype.buildDrawCalls=function(t,e,i){var n=this._bufferedElements,o=this._attributeBuffer,s=this._indexBuffer,a=this.vertexSize,h=r._drawCallPool,u=this._dcIndex,l=this._aIndex,c=this._iIndex,d=h[u];d.start=this._iIndex,d.texArray=t;for(var p=e;p<i;++p){var f=n[p],m=f._texture.baseTexture,v=Gt[m.alphaMode?1:0][f.blendMode];n[p]=null,e<p&&d.blend!==v&&(d.size=c-d.start,e=p,(d=h[++u]).texArray=t,d.start=c),this.packInterleavedGeometry(f,o,s,l,c),l+=f.vertexData.length/2*a,c+=f.indices.length,d.blend=v}e<i&&(d.size=c-d.start,++u),this._dcIndex=u,this._aIndex=l,this._iIndex=c},r.prototype.bindAndClearTexArray=function(t){for(var e=this.renderer.texture,r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0},r.prototype.updateGeometry=function(){var t=this._packedGeometries,e=this._attributeBuffer,r=this._indexBuffer;D.CAN_UPLOAD_SAME_BUFFER?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},r.prototype.drawBatches=function(){for(var t=this._dcIndex,e=this.renderer,i=e.gl,n=e.state,o=r._drawCallPool,s=null,a=0;a<t;a++){var h=o[a],u=h.texArray,l=h.type,c=h.size,d=h.start,p=h.blend;s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=p,n.set(this.state),i.drawElements(l,c,i.UNSIGNED_SHORT,2*d)}},r.prototype.flush=function(){0!==this._vertexCount&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},r.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.shader.bind(this._shader),D.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},r.prototype.stop=function(){this.flush()},r.prototype.destroy=function(){for(var t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]&&this._packedGeometries[t].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),e.prototype.destroy.call(this)},r.prototype.getAttributeBuffer=function(t){var e=Jt(Math.ceil(t/8)),r=$t(e),i=8*e;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._aBuffers[i];return n||(this._aBuffers[i]=n=new bn(i*this.vertexSize*4)),n},r.prototype.getIndexBuffer=function(t){var e=Jt(Math.ceil(t/12)),r=$t(e),i=12*e;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._iBuffers[r];return n||(this._iBuffers[r]=n=new Uint16Array(i)),n},r.prototype.packInterleavedGeometry=function(t,e,r,i,n){for(var o=e.uint32View,s=e.float32View,a=i/this.vertexSize,h=t.uvs,u=t.indices,l=t.vertexData,c=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),p=d<1&&t._texture.baseTexture.alphaMode?Vt(t._tintRGB,d):t._tintRGB+(255*d<<24),f=0;f<l.length;f+=2)s[i++]=l[f],s[i++]=l[f+1],s[i++]=h[f],s[i++]=h[f+1],o[i++]=p,s[i++]=c;for(f=0;f<u.length;f++)r[n++]=a+u[f]},r._drawCallPool=[],r._textureArrayPool=[],r}($r),Tn=function(){function t(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return t.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),r=0;r<t;r++)e[r]=r;this.defaultGroupCache[t]=Zr.from({uSamplers:e},!0);var i=this.fragTemplate;i=(i=i.replace(/%count%/gi,""+t)).replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Ri(this.vertexSrc,i)}var n={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ie,default:this.defaultGroupCache[t]};return new Li(this.programCache[t],n)},t.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(vTextureId < "+r+".5)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"},t}(),Sn=function(e){function r(r){void 0===r&&(r=!1);var i=e.call(this)||this;return i._buffer=new Xr(null,r,!1),i._indexBuffer=new Xr(null,r,!0),i.addAttribute("aVertexPosition",i._buffer,2,!1,t.TYPES.FLOAT).addAttribute("aTextureCoord",i._buffer,2,!1,t.TYPES.FLOAT).addAttribute("aColor",i._buffer,4,!0,t.TYPES.UNSIGNED_BYTE).addAttribute("aTextureId",i._buffer,1,!0,t.TYPES.FLOAT).addIndex(i._indexBuffer),i}return pr(r,e),r}(Vr),wn="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n",Pn="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n",In=function(){function t(){}return t.create=function(t){var e=Object.assign({vertex:wn,fragment:Pn,geometryClass:Sn,vertexSize:6},t),r=e.vertex,i=e.fragment,n=e.vertexSize,o=e.geometryClass;return function(t){function e(e){var s=t.call(this,e)||this;return s.shaderGenerator=new Tn(r,i),s.geometryClass=o,s.vertexSize=n,s}return pr(e,t),e}(En)},Object.defineProperty(t,"defaultVertexSrc",{get:function(){return wn},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentTemplate",{get:function(){return Pn},enumerable:!1,configurable:!0}),t}(),An=In.create(),On=function(){function t(e){var r=this;e=Object.assign({forceCanvas:!1},e),this.renderer=vn(e),this.stage=new Ge,t._plugins.forEach(function(t){t.init.call(r,e)})}return t.registerPlugin=function(e){t._plugins.push(e)},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,r){var i=this,n=t._plugins.slice(0);n.reverse(),n.forEach(function(t){t.destroy.call(i)}),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null},t}();On._plugins=[];var Mn=function(){function t(){}return t.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){window.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(window.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){e._resizeTo&&(e.cancelResize(),e._resizeId=requestAnimationFrame(function(){return e.resize()}))},this.cancelResize=function(){e._resizeId&&(cancelAnimationFrame(e._resizeId),e._resizeId=null)},this.resize=function(){if(e._resizeTo){var t,r;if(e.cancelResize(),e._resizeTo===window)t=window.innerWidth,r=window.innerHeight;else{var i=e._resizeTo;t=i.clientWidth,r=i.clientHeight}e.renderer.resize(t,r)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},t.destroy=function(){window.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t}();On.registerPlugin(Mn);var Dn=new xe,Cn=function(){function t(t){this.renderer=t,t.extract=this}return t.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},t.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},t.prototype.canvas=function(e){var r,i,n,o=this.renderer,s=!1,a=!1;e&&(e instanceof Fr?n=e:(n=this.renderer.generateTexture(e),a=!0)),n?(r=n.baseTexture.resolution,i=n.frame,s=!1,o.renderTexture.bind(n)):(r=this.renderer.resolution,s=!0,(i=Dn).width=this.renderer.width,i.height=this.renderer.height,o.renderTexture.bind(null));var h=Math.floor(i.width*r+1e-4),u=Math.floor(i.height*r+1e-4),l=new ue(h,u,1),c=new Uint8Array(4*h*u),d=o.gl;d.readPixels(i.x*r,i.y*r,h,u,d.RGBA,d.UNSIGNED_BYTE,c);var p=l.context.getImageData(0,0,h,u);if(t.arrayPostDivide(c,p.data),l.context.putImageData(p,0,0),s){var f=new ue(l.width,l.height,1);f.context.scale(1,-1),f.context.drawImage(l.canvas,0,-u),l.destroy(),l=f}return a&&n.destroy(!0),l.canvas},t.prototype.pixels=function(e){var r,i,n,o=this.renderer,s=!1;e&&(e instanceof Fr?n=e:(n=this.renderer.generateTexture(e),s=!0)),n?(r=n.baseTexture.resolution,i=n.frame,o.renderTexture.bind(n)):(r=o.resolution,(i=Dn).width=o.width,i.height=o.height,o.renderTexture.bind(null));var a=i.width*r,h=i.height*r,u=new Uint8Array(4*a*h),l=o.gl;return l.readPixels(i.x*r,i.y*r,a,h,l.RGBA,l.UNSIGNED_BYTE,u),s&&n.destroy(!0),t.arrayPostDivide(u,u),u},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t.arrayPostDivide=function(t,e){for(var r=0;r<t.length;r+=4){var i=e[r+3]=t[r+3];0!==i?(e[r]=Math.round(Math.min(255*t[r]/i,255)),e[r+1]=Math.round(Math.min(255*t[r+1]/i,255)),e[r+2]=Math.round(Math.min(255*t[r+2]/i,255))):(e[r]=t[r],e[r+1]=t[r+1],e[r+2]=t[r+2])}},t}(),Rn=function(t,e){if(void 0===e&&(e={}),t){for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=r.parser[e.strictMode?"strict":"loose"].exec(t),n={},o=14;o--;)n[r.key[o]]=i[o]||"";return n[r.q.name]={},n[r.key[12]].replace(r.q.parser,function(t,e,i){e&&(n[r.q.name][e]=i)}),n}},Ln=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(r(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}();function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(e,r,n){void 0===r&&(r=!1),i(this,t),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return r(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function o(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var s=function(){function t(){i(this,t),this._head=this._tail=void 0}return r(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof n))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=arguments,e=this._head;if(!e)return!1;for(;e;)e._once&&this.detach(e),e._fn.apply(e._thisArg,t),e=e._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return o(this,new n(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return o(this,new n(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof n))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();s.MiniSignalBinding=n,e.default=s,t.exports=e.default}));function Nn(){}function Fn(t,e,r,i){var n=0,o=t.length;!function s(a){a||n===o?r&&r(a):i?setTimeout(function(){e(t[n++],s)},1):e(t[n++],s)}()}function Bn(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function Un(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,i={_tasks:[],concurrency:e,saturated:Nn,unsaturated:Nn,buffer:e/4,empty:Nn,drain:Nn,error:Nn,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function(){r=0,i.drain=Nn,i.started=!1,i._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function(){for(;!i.paused&&r<i.concurrency&&i._tasks.length;){var e=i._tasks.shift();0===i._tasks.length&&i.empty(),(r+=1)===i.concurrency&&i.saturated(),t(e.data,Bn(o(e)))}},length:function(){return i._tasks.length},running:function(){return r},idle:function(){return i._tasks.length+r===0},pause:function(){!0!==i.paused&&(i.paused=!0)},resume:function(){if(!1!==i.paused){i.paused=!1;for(var t=1;t<=i.concurrency;t++)i.process()}}};function n(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(i.started=!0,null==t&&i.idle())setTimeout(function(){return i.drain()},1);else{var n={data:t,callback:"function"==typeof r?r:Nn};e?i._tasks.unshift(n):i._tasks.push(n),setTimeout(function(){return i.process()},1)}}function o(t){return function(){r-=1,t.callback.apply(t,arguments),null!=arguments[0]&&i.error(arguments[0],t.data),r<=i.concurrency-i.buffer&&i.unsaturated(),i.idle()&&i.drain(),i.process()}}return i}var kn={};function Xn(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function jn(t,e,r){return e&&Xn(t.prototype,e),r&&Xn(t,r),t}var Hn=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),Gn=null;function Yn(){}var zn=function(){function t(e,r,i){if("string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.timeout=i.timeout||0,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=Yn,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new Ln,this.onProgress=new Ln,this.onComplete=new Ln,this.onAfterMiddleware=new Ln}t.setExtensionLoadType=function(e,r){Vn(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){Vn(t._xhrTypeMap,e,r)};var e=t.prototype;return e.complete=function(){this._clearEvents(),this._finish()},e.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},e.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout(function(){return e(r)},1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:Hn&&this.crossOrigin?this._loadXdr():this._loadXhr()}},e._hasFlag=function(t){return 0!=(this._flags&t)},e._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},e._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},e._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},e._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},e._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var i=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(i)?i[0]:i))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},e._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},e._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){return t.send()},1)},e._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var i=document.createElement("source");return i.src=e,i.type=r,i},e._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},e._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},e._onTimeout=function(){this.abort("Load timed out.")},e._xhrOnError=function(){var t=this.xhr;this.abort(Wn(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},e._xhrOnTimeout=function(){var t=this.xhr;this.abort(Wn(t)+" Request timed out.")},e._xhrOnAbort=function(){var t=this.xhr;this.abort(Wn(t)+" Request was aborted by the user.")},e._xhrOnLoad=function(){var e=this.xhr,r="",i=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===i&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=200:1223===i&&(i=204),2===(i/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,Gn||(Gn=document.createElement("a")),Gn.href=t;var r=!(t=Rn(Gn.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&i===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(i>-1?i:t.length,n>-1?n:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},jn(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function Vn(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function Wn(t){return t.toString().replace("object ","")}zn.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},zn.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},zn.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},zn.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},zn._loadTypeMap={gif:zn.LOAD_TYPE.IMAGE,png:zn.LOAD_TYPE.IMAGE,bmp:zn.LOAD_TYPE.IMAGE,jpg:zn.LOAD_TYPE.IMAGE,jpeg:zn.LOAD_TYPE.IMAGE,tif:zn.LOAD_TYPE.IMAGE,tiff:zn.LOAD_TYPE.IMAGE,webp:zn.LOAD_TYPE.IMAGE,tga:zn.LOAD_TYPE.IMAGE,svg:zn.LOAD_TYPE.IMAGE,"svg+xml":zn.LOAD_TYPE.IMAGE,mp3:zn.LOAD_TYPE.AUDIO,ogg:zn.LOAD_TYPE.AUDIO,wav:zn.LOAD_TYPE.AUDIO,mp4:zn.LOAD_TYPE.VIDEO,webm:zn.LOAD_TYPE.VIDEO},zn._xhrTypeMap={xhtml:zn.XHR_RESPONSE_TYPE.DOCUMENT,html:zn.XHR_RESPONSE_TYPE.DOCUMENT,htm:zn.XHR_RESPONSE_TYPE.DOCUMENT,xml:zn.XHR_RESPONSE_TYPE.DOCUMENT,tmx:zn.XHR_RESPONSE_TYPE.DOCUMENT,svg:zn.XHR_RESPONSE_TYPE.DOCUMENT,tsx:zn.XHR_RESPONSE_TYPE.DOCUMENT,gif:zn.XHR_RESPONSE_TYPE.BLOB,png:zn.XHR_RESPONSE_TYPE.BLOB,bmp:zn.XHR_RESPONSE_TYPE.BLOB,jpg:zn.XHR_RESPONSE_TYPE.BLOB,jpeg:zn.XHR_RESPONSE_TYPE.BLOB,tif:zn.XHR_RESPONSE_TYPE.BLOB,tiff:zn.XHR_RESPONSE_TYPE.BLOB,webp:zn.XHR_RESPONSE_TYPE.BLOB,tga:zn.XHR_RESPONSE_TYPE.BLOB,json:zn.XHR_RESPONSE_TYPE.JSON,text:zn.XHR_RESPONSE_TYPE.TEXT,txt:zn.XHR_RESPONSE_TYPE.TEXT,ttf:zn.XHR_RESPONSE_TYPE.BUFFER,otf:zn.XHR_RESPONSE_TYPE.BUFFER},zn.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var Kn=window.URL||window.webkitURL;var Zn={caching:function(t,e){var r=this;kn[t.url]?(t.data=kn[t.url],t.complete()):t.onComplete.once(function(){return kn[r.url]=r.data}),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===zn.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=Kn.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=zn.TYPE.IMAGE,void(t.data.onload=function(){Kn.revokeObjectURL(r),t.data.onload=null,e()})}}else{var i=t.xhr.getResponseHeader("content-type");if(i&&0===i.indexOf("image"))return t.data=new Image,t.data.src="data:"+i+";base64,"+function(t){for(var e="",r=0;r<t.length;){for(var i=[0,0,0],n=[0,0,0,0],o=0;o<i.length;++o)r<t.length?i[o]=255&t.charCodeAt(r++):i[o]=0;switch(n[0]=i[0]>>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2],r-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var s=0;s<n.length;++s)e+=qn.charAt(n[s])}return e}(t.xhr.responseText),t.type=zn.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}},Jn=/(#[\w-]+)?$/,Qn=function(){function t(e,r){var i=this;void 0===e&&(e=""),void 0===r&&(r=10),this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this._queue=Un(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new Ln,this.onError=new Ln,this.onLoad=new Ln,this.onStart=new Ln,this.onComplete=new Ln;for(var n=0;n<t._defaultBeforeMiddleware.length;++n)this.pre(t._defaultBeforeMiddleware[n]);for(var o=0;o<t._defaultAfterMiddleware.length;++o)this.use(t._defaultAfterMiddleware[o])}var e=t.prototype;return e.add=function(t,e,r,i){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new zn(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var o=r.parentResource,s=[],a=0;a<o.children.length;++a)o.children[a].isComplete||s.push(o.children[a]);var h=o.progressChunk*(s.length+1)/(s.length+2);o.children.push(this.resources[t]),o.progressChunk=h;for(var u=0;u<s.length;++u)s[u].progressChunk=h;this.resources[t].progressChunk=h}return this._queue.push(this.resources[t]),this},e.pre=function(t){return this._beforeMiddleware.push(t),this},e.use=function(t){return this._afterMiddleware.push(t),this},e.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},e.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},e._prepareUrl=function(t){var e,r=Rn(t,{strictMode:!0});if(e=r.protocol||!r.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var i=Jn.exec(e)[0];-1!==(e=e.substr(0,e.length-i.length)).indexOf("?")?e+="&"+this.defaultQueryString:e+="?"+this.defaultQueryString,e+=i}return e},e._loadResource=function(t,e){var r=this;t._dequeue=e,Fn(this._beforeMiddleware,function(e,i){e.call(r,t,function(){i(t.isComplete?{}:null)})},function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())},!0)},e._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},e._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},e._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),Fn(this._afterMiddleware,function(r,i){r.call(e,t,i)},function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()},!0)},jn(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();Qn._defaultBeforeMiddleware=[],Qn._defaultAfterMiddleware=[],Qn.pre=function(t){return Qn._defaultBeforeMiddleware.push(t),Qn},Qn.use=function(t){return Qn._defaultAfterMiddleware.push(t),Qn};var $n=zn,to=function(t,e){return(to=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var eo=function(){function t(){}return t.use=function(t,e){t.data&&t.type===zn.TYPE.IMAGE&&(t.texture=Lr.fromLoader(t.data,t.url,t.name)),e()},t}(),ro=function(t){function e(r,i){for(var n=t.call(this,r,i)||this,o=0;o<e._plugins.length;++o){var s=e._plugins[o],a=s.pre,h=s.use;a&&n.pre(a),h&&n.use(h)}return n._protected=!1,n}return function(t,e){function r(){this.constructor=t}to(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.destroy=function(){this._protected||this.reset()},Object.defineProperty(e,"shared",{get:function(){var t=e._shared;return t||((t=new e)._protected=!0,e._shared=t),t},enumerable:!1,configurable:!0}),e.registerPlugin=function(t){return e._plugins.push(t),t.add&&t.add(),e},e._plugins=[],e}(Qn);ro.registerPlugin({use:Zn.parsing}),ro.registerPlugin(eo);var io=function(){function t(){}return t.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?ro.shared:new ro},t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t}(),no=function(t,e){return(no=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function oo(t,e){function r(){this.constructor=t}no(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var so,ao,ho=function(e){function r(r,i,n,o){void 0===r&&(r=1500),void 0===n&&(n=16384),void 0===o&&(o=!1);var s=e.call(this)||this;return n>16384&&(n=16384),s._properties=[!1,!0,!1,!1,!1],s._maxSize=r,s._batchSize=n,s._buffers=null,s._bufferUpdateIDs=[],s._updateID=0,s.interactiveChildren=!1,s.blendMode=t.BLEND_MODES.NORMAL,s.autoResize=o,s.roundPixels=!0,s.baseTexture=null,s.setProperties(i),s._tint=0,s.tintRgb=new Float32Array(4),s.tint=16777215,s}return oo(r,e),r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(r.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,kt(t,this.tintRgb)},enumerable:!1,configurable:!0}),r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},r.prototype.dispose=function(){if(this._buffers){for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}},r.prototype.destroy=function(t){e.prototype.destroy.call(this,t),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},r}(Ge),uo=function(){function e(e,r,i){this.geometry=new Vr,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var n=0;n<e.length;++n){var o=e[n];o={attributeName:o.attributeName,size:o.size,uploadFunction:o.uploadFunction,type:o.type||t.TYPES.FLOAT,offset:o.offset},r[n]?this.dynamicProperties.push(o):this.staticProperties.push(o)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}return e.prototype.initBuffers=function(){var e=this.geometry,r=0;this.indexBuffer=new Xr(qt(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(var i=0;i<this.dynamicProperties.length;++i){(a=this.dynamicProperties[i]).offset=r,r+=a.size,this.dynamicStride+=a.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new Xr(this.dynamicData,!1,!1);var o=0;this.staticStride=0;for(i=0;i<this.staticProperties.length;++i){(a=this.staticProperties[i]).offset=o,o+=a.size,this.staticStride+=a.size}var s=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(s),this.staticDataUint32=new Uint32Array(s),this.staticBuffer=new Xr(this.staticData,!0,!1);for(i=0;i<this.dynamicProperties.length;++i){var a=this.dynamicProperties[i];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===t.TYPES.UNSIGNED_BYTE,a.type,4*this.dynamicStride,4*a.offset)}for(i=0;i<this.staticProperties.length;++i){a=this.staticProperties[i];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===t.TYPES.UNSIGNED_BYTE,a.type,4*this.staticStride,4*a.offset)}},e.prototype.uploadDynamic=function(e,r,i){for(var n=0;n<this.dynamicProperties.length;n++){var o=this.dynamicProperties[n];o.uploadFunction(e,r,i,o.type===t.TYPES.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,o.offset)}this.dynamicBuffer._updateID++},e.prototype.uploadStatic=function(e,r,i){for(var n=0;n<this.staticProperties.length;n++){var o=this.staticProperties[n];o.uploadFunction(e,r,i,o.type===t.TYPES.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,o.offset)}this.staticBuffer._updateID++},e.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()},e}(),lo="varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}",co="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n",po=function(e){function r(r){var i=e.call(this,r)||this;return i.shader=null,i.properties=null,i.tempMatrix=new Ie,i.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:i.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:i.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:i.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:i.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:t.TYPES.UNSIGNED_BYTE,uploadFunction:i.uploadTint,offset:0}],i.shader=Li.from(co,lo,{}),i.state=Ni.for2d(),i}return oo(r,e),r.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,n=this.renderer,o=e.length;if(0!==o){o>r&&!t.autoResize&&(o=r);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.state.blendMode=Yt(t.blendMode,a.alphaMode),n.state.set(this.state);var h=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=zt(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,a.alphaMode),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,d=0;c<o;c+=i,d+=1){var p=o-c;p>i&&(p=i),d>=s.length&&s.push(this._generateOneMoreBuffer(t));var f=s[d];f.uploadDynamic(e,c,p);var m=t._bufferUpdateIDs[d]||0;(l=l||f._updateID<m)&&(f._updateID=t._updateID,f.uploadStatic(e,c,p)),n.geometry.bind(f.geometry),h.drawElements(h.TRIANGLES,6*p,h.UNSIGNED_SHORT,0)}}},r.prototype.generateBuffers=function(t){for(var e=[],r=t._maxSize,i=t._batchSize,n=t._properties,o=0;o<r;o+=i)e.push(new uo(this.properties,n,i));return e},r.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,r=t._properties;return new uo(this.properties,r,e)},r.prototype.uploadVertices=function(t,e,r,i,n,o){for(var s=0,a=0,h=0,u=0,l=0;l<r;++l){var c=t[e+l],d=c._texture,p=c.scale.x,f=c.scale.y,m=d.trim,v=d.orig;m?(s=(a=m.x-c.anchor.x*v.width)+m.width,h=(u=m.y-c.anchor.y*v.height)+m.height):(s=v.width*(1-c.anchor.x),a=v.width*-c.anchor.x,h=v.height*(1-c.anchor.y),u=v.height*-c.anchor.y),i[o]=a*p,i[o+1]=u*f,i[o+n]=s*p,i[o+n+1]=u*f,i[o+2*n]=s*p,i[o+2*n+1]=h*f,i[o+3*n]=a*p,i[o+3*n+1]=h*f,o+=4*n}},r.prototype.uploadPosition=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].position;i[o]=a.x,i[o+1]=a.y,i[o+n]=a.x,i[o+n+1]=a.y,i[o+2*n]=a.x,i[o+2*n+1]=a.y,i[o+3*n]=a.x,i[o+3*n+1]=a.y,o+=4*n}},r.prototype.uploadRotation=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].rotation;i[o]=a,i[o+n]=a,i[o+2*n]=a,i[o+3*n]=a,o+=4*n}},r.prototype.uploadUvs=function(t,e,r,i,n,o){for(var s=0;s<r;++s){var a=t[e+s]._texture._uvs;a?(i[o]=a.x0,i[o+1]=a.y0,i[o+n]=a.x1,i[o+n+1]=a.y1,i[o+2*n]=a.x2,i[o+2*n+1]=a.y2,i[o+3*n]=a.x3,i[o+3*n+1]=a.y3,o+=4*n):(i[o]=0,i[o+1]=0,i[o+n]=0,i[o+n+1]=0,i[o+2*n]=0,i[o+2*n+1]=0,i[o+3*n]=0,i[o+3*n+1]=0,o+=4*n)}},r.prototype.uploadTint=function(t,e,r,i,n,o){for(var s=0;s<r;++s){var a=t[e+s],h=a._texture.baseTexture.alphaMode>0,u=a.alpha,l=u<1&&h?Vt(a._tintRGB,u):a._tintRGB+(255*u<<24);i[o]=l,i[o+n]=l,i[o+2*n]=l,i[o+3*n]=l,o+=4*n}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},r}($r);(so=t.LINE_JOIN||(t.LINE_JOIN={})).MITER="miter",so.BEVEL="bevel",so.ROUND="round",(ao=t.LINE_CAP||(t.LINE_CAP={})).BUTT="butt",ao.ROUND="round",ao.SQUARE="square";var fo={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}},mo=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Lr.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Lr.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),vo=function(t,e){return(vo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function go(t,e){function r(){this.constructor=t}vo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var yo={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,i=t.holes,n=e.points,o=e.indices;if(r.length>=6){for(var s=[],a=0;a<i.length;a++){var h=i[a];s.push(r.length/2),r=r.concat(h.points)}var u=R(r,s,2);if(!u)return;var l=n.length/2;for(a=0;a<u.length;a+=3)o.push(u[a]+l),o.push(u[a+1]+l),o.push(u[a+2]+l);for(a=0;a<r.length;a++)n.push(r[a])}}},_o={build:function(e){var r,i,n=e.shape,o=e.points,s=n.x,a=n.y;if(o.length=0,e.type===t.SHAPES.CIRC)r=n.radius,i=n.radius;else{var h=e.shape;r=h.width,i=h.height}if(0!==r&&0!==i){var u=Math.floor(30*Math.sqrt(n.radius))||Math.floor(15*Math.sqrt(r+i));u/=2.3;for(var l=2*Math.PI/u,c=0;c<u-.5;c++)o.push(s+Math.sin(-l*c)*r,a+Math.cos(-l*c)*i);o.push(o[0],o[1])}},triangulate:function(t,e){var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=o,a=t.shape,h=t.matrix,u=a.x,l=a.y;i.push(t.matrix?h.a*u+h.c*l+h.tx:u,t.matrix?h.b*u+h.d*l+h.ty:l);for(var c=0;c<r.length;c+=2)i.push(r[c],r[c+1]),n.push(o++,s,o)}},xo={build:function(t){var e=t.shape,r=e.x,i=e.y,n=e.width,o=e.height,s=t.points;s.length=0,s.push(r,i,r+n,i,r+n,i+o,r,i+o)},triangulate:function(t,e){var r=t.points,i=e.points,n=i.length/2;i.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}};function bo(t,e,r){return t+(e-t)*r}function Eo(t,e,r,i,n,o,s){void 0===s&&(s=[]);for(var a=s,h=0,u=0,l=0,c=0,d=0,p=0,f=0,m=0;f<=20;++f)h=bo(t,r,m=f/20),u=bo(e,i,m),l=bo(r,n,m),c=bo(i,o,m),d=bo(h,l,m),p=bo(u,c,m),a.push(d,p);return a}var To={build:function(t){var e=t.shape,r=t.points,i=e.x,n=e.y,o=e.width,s=e.height,a=Math.max(0,Math.min(e.radius,Math.min(o,s)/2));r.length=0,a?(Eo(i,n+a,i,n,i+a,n,r),Eo(i+o-a,n,i+o,n,i+o,n+a,r),Eo(i+o,n+s-a,i+o,n+s,i+o-a,n+s,r),Eo(i+a,n+s,i,n+s,i,n+s-a,r)):r.push(i,n,i+o,n,i+o,n+s,i,n+s)},triangulate:function(t,e){for(var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=R(r,null,2),a=0,h=s.length;a<h;a+=3)n.push(s[a]+o),n.push(s[a+1]+o),n.push(s[a+2]+o);for(a=0,h=r.length;a<h;a++)i.push(r[a],r[++a])}};function So(t,e,r,i,n,o,s,a){var h,u;s?(h=i,u=-r):(h=-i,u=r);var l=t-r*n+h,c=e-i*n+u,d=t+r*o+h,p=e+i*o+u;return a.push(l,c),a.push(d,p),2}function wo(t,e,r,i,n,o,s,a){var h=r-t,u=i-e,l=Math.atan2(h,u),c=Math.atan2(n-t,o-e);a&&l<c?l+=2*Math.PI:!a&&l>c&&(c+=2*Math.PI);var d=l,p=c-l,f=Math.abs(p),m=Math.sqrt(h*h+u*u),v=1+(15*f*Math.sqrt(m)/Math.PI>>0),g=p/v;if(d+=g,a){s.push(t,e),s.push(r,i);for(var y=1,_=d;y<v;y++,_+=g)s.push(t,e),s.push(t+Math.sin(_)*m,e+Math.cos(_)*m);s.push(t,e),s.push(n,o)}else{s.push(r,i),s.push(t,e);for(y=1,_=d;y<v;y++,_+=g)s.push(t+Math.sin(_)*m,e+Math.cos(_)*m),s.push(t,e);s.push(n,o),s.push(t,e)}return 2*v}function Po(e,r){e.lineStyle.native?function(e,r){var i=0,n=e.shape,o=e.points||n.points,s=n.type!==t.SHAPES.POLY||n.closeStroke;if(0!==o.length){var a=r.points,h=r.indices,u=o.length/2,l=a.length/2,c=l;for(a.push(o[0],o[1]),i=1;i<u;i++)a.push(o[2*i],o[2*i+1]),h.push(c,c+1),c++;s&&h.push(c,l)}}(e,r):function(e,r){var i=e.shape,n=e.points||i.points.slice(),o=r.closePointEps;if(0!==n.length){var s=e.lineStyle,a=new we(n[0],n[1]),h=new we(n[n.length-2],n[n.length-1]),u=i.type!==t.SHAPES.POLY||i.closeStroke,l=Math.abs(a.x-h.x)<o&&Math.abs(a.y-h.y)<o;if(u){n=n.slice(),l&&(n.pop(),n.pop(),h.set(n[n.length-2],n[n.length-1]));var c=.5*(a.x+h.x),d=.5*(h.y+a.y);n.unshift(c,d),n.push(c,d)}var p=r.points,f=n.length/2,m=n.length,v=p.length/2,g=s.width/2,y=g*g,_=s.miterLimit*s.miterLimit,x=n[0],b=n[1],E=n[2],T=n[3],S=0,w=0,P=-(b-T),I=x-E,A=0,O=0,M=Math.sqrt(P*P+I*I);P/=M,I/=M,P*=g,I*=g;var D=s.alignment,C=2*(1-D),R=2*D;u||(s.cap===t.LINE_CAP.ROUND?m+=wo(x-P*(C-R)*.5,b-I*(C-R)*.5,x-P*C,b-I*C,x+P*R,b+I*R,p,!0)+2:s.cap===t.LINE_CAP.SQUARE&&(m+=So(x,b,P,I,C,R,!0,p))),p.push(x-P*C,b-I*C),p.push(x+P*R,b+I*R);for(var L=1;L<f-1;++L){x=n[2*(L-1)],b=n[2*(L-1)+1],E=n[2*L],T=n[2*L+1],S=n[2*(L+1)],w=n[2*(L+1)+1],P=-(b-T),I=x-E,P/=M=Math.sqrt(P*P+I*I),I/=M,P*=g,I*=g,A=-(T-w),O=E-S,A/=M=Math.sqrt(A*A+O*O),O/=M,A*=g,O*=g;var N=E-x,F=b-T,B=E-S,U=w-T,k=F*B-U*N,X=k<0;if(Math.abs(k)<.1)p.push(E-P*C,T-I*C),p.push(E+P*R,T+I*R);else{var j=(-P+x)*(-I+T)-(-P+E)*(-I+b),H=(-A+S)*(-O+T)-(-A+E)*(-O+w),G=(N*H-B*j)/k,Y=(U*j-F*H)/k,z=(G-E)*(G-E)+(Y-T)*(Y-T),V=E+(G-E)*C,W=T+(Y-T)*C,q=E-(G-E)*R,K=T-(Y-T)*R,Z=X?C:R;z<=Math.min(N*N+F*F,B*B+U*U)+Z*Z*y?s.join===t.LINE_JOIN.BEVEL||z/y>_?(X?(p.push(V,W),p.push(E+P*R,T+I*R),p.push(V,W),p.push(E+A*R,T+O*R)):(p.push(E-P*C,T-I*C),p.push(q,K),p.push(E-A*C,T-O*C),p.push(q,K)),m+=2):s.join===t.LINE_JOIN.ROUND?X?(p.push(V,W),p.push(E+P*R,T+I*R),m+=wo(E,T,E+P*R,T+I*R,E+A*R,T+O*R,p,!0)+4,p.push(V,W),p.push(E+A*R,T+O*R)):(p.push(E-P*C,T-I*C),p.push(q,K),m+=wo(E,T,E-P*C,T-I*C,E-A*C,T-O*C,p,!1)+4,p.push(E-A*C,T-O*C),p.push(q,K)):(p.push(V,W),p.push(q,K)):(p.push(E-P*C,T-I*C),p.push(E+P*R,T+I*R),s.join===t.LINE_JOIN.BEVEL||z/y>_||(s.join===t.LINE_JOIN.ROUND?m+=X?wo(E,T,E+P*R,T+I*R,E+A*R,T+O*R,p,!0)+2:wo(E,T,E-P*C,T-I*C,E-A*C,T-O*C,p,!1)+2:(X?(p.push(q,K),p.push(q,K)):(p.push(V,W),p.push(V,W)),m+=2)),p.push(E-A*C,T-O*C),p.push(E+A*R,T+O*R),m+=2)}}x=n[2*(f-2)],b=n[2*(f-2)+1],E=n[2*(f-1)],P=-(b-(T=n[2*(f-1)+1])),I=x-E,P/=M=Math.sqrt(P*P+I*I),I/=M,P*=g,I*=g,p.push(E-P*C,T-I*C),p.push(E+P*R,T+I*R),u||(s.cap===t.LINE_CAP.ROUND?m+=wo(E-P*(C-R)*.5,T-I*(C-R)*.5,E-P*C,T-I*C,E+P*R,T+I*R,p,!1)+2:s.cap===t.LINE_CAP.SQUARE&&(m+=So(E,T,P,I,C,R,!1,p)));var J=r.indices,Q=fo.epsilon*fo.epsilon;for(L=v;L<m+v-2;++L)x=p[2*L],b=p[2*L+1],E=p[2*(L+1)],T=p[2*(L+1)+1],S=p[2*(L+2)],w=p[2*(L+2)+1],Math.abs(x*(T-w)+E*(w-b)+S*(b-T))<Q||J.push(L,L+1,L+2)}}(e,r)}var Io,Ao=function(t){function e(e,r,i,n,o,s){void 0===s&&(s=0);o=o||n/2;for(var a=-1*Math.PI/2+s,h=2*i,u=ge/h,l=[],c=0;c<h;c++){var d=c%2?o:n,p=c*u+a;l.push(e+d*Math.cos(p),r+d*Math.sin(p))}return t.call(this,l)||this}return go(e,t),e}(Te),Oo=function(){function t(){}return t.curveTo=function(t,e,r,i,n,o){var s=o[o.length-2],a=o[o.length-1]-e,h=s-t,u=i-e,l=r-t,c=Math.abs(a*l-h*u);if(c<1e-8||0===n)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var d=a*a+h*h,p=u*u+l*l,f=a*u+h*l,m=n*Math.sqrt(d)/c,v=n*Math.sqrt(p)/c,g=m*f/d,y=v*f/p,_=m*l+v*h,x=m*u+v*a,b=h*(v+g),E=a*(v+g),T=l*(m+y),S=u*(m+y);return{cx:_+t,cy:x+e,radius:n,startAngle:Math.atan2(E-x,b-_),endAngle:Math.atan2(S-x,T-_),anticlockwise:h*u>l*a}},t.arc=function(t,e,r,i,n,o,s,a,h){for(var u=s-o,l=fo._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/ge)),c=u/(2*l),d=2*c,p=Math.cos(c),f=Math.sin(c),m=l-1,v=m%1/m,g=0;g<=m;++g){var y=c+o+d*(g+v*g),_=Math.cos(y),x=-Math.sin(y);h.push((p*_+f*x)*n+r,(p*-x+f*_)*n+i)}},t}(),Mo=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o,s,a){for(var h=0,u=0,l=0,c=0,d=0,p=0,f=0,m=0,v=0,g=0,y=0,_=t,x=e,b=1;b<=10;++b)g=_-(m=(f=(p=(d=1-(u=b/10))*d)*d)*t+3*p*u*r+3*d*(l=u*u)*n+(c=l*u)*s),y=x-(v=f*e+3*p*u*i+3*d*l*o+c*a),_=m,x=v,h+=Math.sqrt(g*g+y*y);return h},t.curveTo=function(e,r,i,n,o,s,a){var h=a[a.length-2],u=a[a.length-1];a.length-=2;var l=fo._segmentsCount(t.curveLength(h,u,e,r,i,n,o,s)),c=0,d=0,p=0,f=0,m=0;a.push(h,u);for(var v=1,g=0;v<=l;++v)p=(d=(c=1-(g=v/l))*c)*c,m=(f=g*g)*g,a.push(p*h+3*d*g*e+3*c*f*i+m*o,p*u+3*d*g*r+3*c*f*n+m*s)},t}(),Do=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o){var s=t-2*r+n,a=e-2*i+o,h=2*r-2*t,u=2*i-2*e,l=4*(s*s+a*a),c=4*(s*h+a*u),d=h*h+u*u,p=2*Math.sqrt(l+c+d),f=Math.sqrt(l),m=2*l*f,v=2*Math.sqrt(d),g=c/f;return(m*p+f*c*(p-v)+(4*d*l-c*c)*Math.log((2*f+g+p)/(g+v)))/(4*m)},t.curveTo=function(e,r,i,n,o){for(var s=o[o.length-2],a=o[o.length-1],h=fo._segmentsCount(t.curveLength(s,a,e,r,i,n)),u=0,l=0,c=1;c<=h;++c){var d=c/h;u=s+(e-s)*d,l=a+(r-a)*d,o.push(u+(e+(i-e)*d-u)*d,l+(r+(n-r)*d-l)*d)}},t}(),Co=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),Ro=((Io={})[t.SHAPES.POLY]=yo,Io[t.SHAPES.CIRC]=_o,Io[t.SHAPES.ELIP]=_o,Io[t.SHAPES.RECT]=xo,Io[t.SHAPES.RREC]=To,Io),Lo=[],No=[],Fo={buildPoly:yo,buildCircle:_o,buildRectangle:xo,buildRoundedRectangle:To,FILL_COMMANDS:Ro,BATCH_POOL:Lo,DRAW_CALL_POOL:No,buildLine:Po,Star:Ao,ArcUtils:Oo,BezierUtils:Mo,QuadraticUtils:Do,BatchPart:Co},Bo=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.shape=t,this.lineStyle=r,this.fillStyle=e,this.matrix=i,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Uo=new we,ko=new Be,Xo=function(e){function r(){var t=e.call(this)||this;return t.uvsFloat32=null,t.indicesUint16=null,t.points=[],t.colors=[],t.uvs=[],t.indices=[],t.textureIds=[],t.graphicsData=[],t.dirty=0,t.batchDirty=-1,t.cacheDirty=-1,t.clearDirty=0,t.drawCalls=[],t.batches=[],t.shapeIndex=0,t._bounds=new Be,t.boundsDirty=-1,t.boundsPadding=0,t.batchable=!1,t.indicesUint16=null,t.uvsFloat32=null,t.closePointEps=1e-4,t}return go(r,e),Object.defineProperty(r.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),r.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),No.push(this.drawCalls[t]);this.drawCalls.length=0;for(t=0;t<this.batches.length;t++){var e=this.batches[t];e.reset(),Lo.push(e)}this.batches.length=0},r.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},r.prototype.drawShape=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null);var n=new Bo(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},r.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var r=new Bo(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this},r.prototype.destroy=function(){e.prototype.destroy.call(this);for(var t=0;t<this.graphicsData.length;++t)this.graphicsData[t].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},r.prototype.containsPoint=function(t){for(var e=this.graphicsData,r=0;r<e.length;++r){var i=e[r];if(i.fillStyle.visible&&(i.shape&&(i.matrix?i.matrix.applyInverse(t,Uo):Uo.copyFrom(t),i.shape.contains(Uo.x,Uo.y)))){var n=!1;if(i.holes)for(var o=0;o<i.holes.length;o++){if(i.holes[o].shape.contains(Uo.x,Uo.y)){n=!0;break}}if(!n)return!0}}return!1},r.prototype.updateBatches=function(e){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var r=this.uvs,i=this.graphicsData,n=null,o=null;this.batches.length>0&&(o=(n=this.batches[this.batches.length-1]).style);for(var s=this.shapeIndex;s<i.length;s++){this.shapeIndex++;var a=i[s],h=a.fillStyle,u=a.lineStyle;Ro[a.type].build(a),a.matrix&&this.transformPoints(a.points,a.matrix);for(var l=0;l<2;l++){var c=0===l?h:u;if(c.visible){var d=c.texture.baseTexture,p=this.indices.length,f=this.points.length/2;d.wrapMode=t.WRAP_MODES.REPEAT,0===l?this.processFill(a):this.processLine(a);var m=this.points.length/2-f;0!==m&&(n&&!this._compareStyles(o,c)&&(n.end(p,f),n=null),n||((n=Lo.pop()||new Co).begin(c,p,f),this.batches.push(n),o=c),this.addUvs(this.points,r,c.texture,f,m,c.matrix))}}}var v=this.indices.length,g=this.points.length/2;if(n&&n.end(v,g),0!==this.batches.length){if(this.indicesUint16&&this.indices.length===this.indicesUint16.length)this.indicesUint16.set(this.indices);else{var y=g>65535&&e;this.indicesUint16=y?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},r.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},r.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t<e;t++){var r=this.graphicsData[t],i=r.fillStyle,n=r.lineStyle;if(i&&!i.texture.baseTexture.valid)return!1;if(n&&!n.texture.baseTexture.valid)return!1}return!0},r.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var t=this.batches,e=0,r=t.length;e<r;e++)for(var i=t[e],n=0;n<i.size;n++){var o=i.start+n;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}},r.prototype.isBatchable=function(){if(this.points.length>131070)return!1;for(var t=this.batches,e=0;e<t.length;e++)if(t[e].style.native)return!1;return this.points.length<2*r.BATCHABLE_SIZE},r.prototype.buildDrawCalls=function(){for(var e=++gr._globalBatch,r=0;r<this.drawCalls.length;r++)this.drawCalls[r].texArray.clear(),No.push(this.drawCalls[r]);this.drawCalls.length=0;var i=this.colors,n=this.textureIds,o=No.pop();o||((o=new _n).texArray=new xn),o.texArray.count=0,o.start=0,o.size=0,o.type=t.DRAW_MODES.TRIANGLES;var s=0,a=null,h=0,u=!1,l=t.DRAW_MODES.TRIANGLES,c=0;this.drawCalls.push(o);for(r=0;r<this.batches.length;r++){var d=this.batches[r],p=d.style,f=p.texture.baseTexture;u!==!!p.native&&(l=(u=!!p.native)?t.DRAW_MODES.LINES:t.DRAW_MODES.TRIANGLES,a=null,s=8,e++),a!==f&&(a=f,f._batchEnabled!==e&&(8===s&&(e++,s=0,o.size>0&&((o=No.pop())||((o=new _n).texArray=new xn),this.drawCalls.push(o)),o.start=c,o.size=0,o.texArray.count=0,o.type=l),f.touched=1,f._batchEnabled=e,f._batchLocation=s,f.wrapMode=10497,o.texArray.elements[o.texArray.count++]=f,s++)),o.size+=d.size,c+=d.size,h=f._batchLocation,this.addColors(i,p.color,p.alpha,d.attribSize,d.attribStart),this.addTextureIds(n,h,d.attribSize,d.attribStart)}gr._globalBatch=e,this.packAttributes()},r.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(3*t.length*4),o=new Float32Array(n),s=new Uint32Array(n),a=0,h=0;h<t.length/2;h++)o[a++]=t[2*h],o[a++]=t[2*h+1],o[a++]=e[2*h],o[a++]=e[2*h+1],s[a++]=r[h],o[a++]=i[h];this._buffer.update(n),this._indexBuffer.update(this.indicesUint16)},r.prototype.processFill=function(t){t.holes.length?(this.processHoles(t.holes),yo.triangulate(t,this)):Ro[t.type].triangulate(t,this)},r.prototype.processLine=function(t){Po(t,this);for(var e=0;e<t.holes.length;e++)Po(t.holes[e],this)},r.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var r=t[e];Ro[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}},r.prototype.calculateBounds=function(){var e=this._bounds,r=ko,i=Ie.IDENTITY;this._bounds.clear(),r.clear();for(var n=0;n<this.graphicsData.length;n++){var o=this.graphicsData[n],s=o.shape,a=o.type,h=o.lineStyle,u=o.matrix||Ie.IDENTITY,l=0;if(h&&h.visible){var c=h.alignment;l=h.width,a===t.SHAPES.POLY?l*=.5+Math.abs(.5-c):l*=Math.max(0,c)}if(i!==u&&(r.isEmpty()||(e.addBoundsMatrix(r,i),r.clear()),i=u),a===t.SHAPES.RECT||a===t.SHAPES.RREC){var d=s;r.addFramePad(d.x,d.y,d.x+d.width,d.y+d.height,l,l)}else if(a===t.SHAPES.CIRC){var p=s;r.addFramePad(p.x,p.y,p.x,p.y,p.radius+l,p.radius+l)}else if(a===t.SHAPES.ELIP){var f=s;r.addFramePad(f.x,f.y,f.x,f.y,f.width+l,f.height+l)}else{var m=s;e.addVerticesMatrix(i,m.points,0,m.points.length,l,l)}}r.isEmpty()||e.addBoundsMatrix(r,i),e.pad(this.boundsPadding,this.boundsPadding)},r.prototype.transformPoints=function(t,e){for(var r=0;r<t.length/2;r++){var i=t[2*r],n=t[2*r+1];t[2*r]=e.a*i+e.c*n+e.tx,t[2*r+1]=e.b*i+e.d*n+e.ty}},r.prototype.addColors=function(t,e,r,i,n){void 0===n&&(n=0);var o=Vt((e>>16)+(65280&e)+((255&e)<<16),r);t.length=Math.max(t.length,n+i);for(var s=0;s<i;s++)t[n+s]=o},r.prototype.addTextureIds=function(t,e,r,i){void 0===i&&(i=0),t.length=Math.max(t.length,i+r);for(var n=0;n<r;n++)t[i+n]=e},r.prototype.addUvs=function(t,e,r,i,n,o){void 0===o&&(o=null);for(var s=0,a=e.length,h=r.frame;s<n;){var u=t[2*(i+s)],l=t[2*(i+s)+1];if(o){var c=o.a*u+o.c*l+o.tx;l=o.b*u+o.d*l+o.ty,u=c}s++,e.push(u/h.width,l/h.height)}var d=r.baseTexture;(h.width<d.width||h.height<d.height)&&this.adjustUvs(e,r,a,n)},r.prototype.adjustUvs=function(t,e,r,i){for(var n=e.baseTexture,o=r+2*i,s=e.frame,a=s.width/n.width,h=s.height/n.height,u=s.x/s.width,l=s.y/s.height,c=Math.floor(t[r]+1e-6),d=Math.floor(t[r+1]+1e-6),p=r+2;p<o;p+=2)c=Math.min(c,Math.floor(t[p]+1e-6)),d=Math.min(d,Math.floor(t[p+1]+1e-6));u-=c,l-=d;for(p=r;p<o;p+=2)t[p]=(t[p]+u)*a,t[p+1]=(t[p+1]+l)*h},r.BATCHABLE_SIZE=100,r}(Sn),jo=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.width=0,r.alignment=.5,r.native=!1,r.cap=t.LINE_CAP.BUTT,r.join=t.LINE_JOIN.MITER,r.miterLimit=10,r}return go(r,e),r.prototype.clone=function(){var t=new r;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t},r.prototype.reset=function(){e.prototype.reset.call(this),this.color=0,this.alignment=.5,this.width=0,this.native=!1},r}(mo),Ho=new Float32Array(3),Go={},Yo=function(e){function r(r){void 0===r&&(r=null);var i=e.call(this)||this;return i._geometry=r||new Xo,i._geometry.refCount++,i.shader=null,i.state=Ni.for2d(),i._fillStyle=new mo,i._lineStyle=new jo,i._matrix=null,i._holeMode=!1,i.currentPath=null,i.batches=[],i.batchTint=-1,i.batchDirty=-1,i.vertexData=null,i.pluginName="batch",i._transformID=-1,i.tint=16777215,i.blendMode=t.BLEND_MODES.NORMAL,i}return go(r,e),Object.defineProperty(r.prototype,"geometry",{get:function(){return this._geometry},enumerable:!1,configurable:!0}),r.prototype.clone=function(){return this.finishPoly(),new r(this._geometry)},Object.defineProperty(r.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fill",{get:function(){return this._fillStyle},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"line",{get:function(){return this._lineStyle},enumerable:!1,configurable:!0}),r.prototype.lineStyle=function(t){if(void 0===t&&(t=null),"number"==typeof t){var e=arguments;t={width:e[0]||0,color:e[1]||0,alpha:void 0!==e[2]?e[2]:1,alignment:void 0!==e[3]?e[3]:.5,native:!!e[4]}}return this.lineTextureStyle(t)},r.prototype.lineTextureStyle=function(e){if("number"==typeof e){oe("v5.2.0","Please use object-based options for Graphics#lineTextureStyle");var r=arguments,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],h=r[5],u=r[6];e={width:i,texture:n,color:o,alpha:s,matrix:a,alignment:h,native:u},Object.keys(e).forEach(function(t){return void 0===e[t]&&delete e[t]})}e=Object.assign({width:0,texture:Lr.WHITE,color:e&&e.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1,cap:t.LINE_CAP.BUTT,join:t.LINE_JOIN.MITER,miterLimit:10},e),this.currentPath&&this.startPoly();var l=e.width>0&&e.alpha>0;return l?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:l},e)):this._lineStyle.reset(),this},r.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Te,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Te,this.currentPath.closeStroke=!1},r.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},r.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},r.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return i===t&&n===e||r.push(t,e),this},r.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},r.prototype.quadraticCurveTo=function(t,e,r,i){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),Do.curveTo(t,e,r,i,n),this},r.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),Mo.curveTo(t,e,r,i,n,o,this.currentPath.points),this},r.prototype.arcTo=function(t,e,r,i,n){this._initCurve(t,e);var o=this.currentPath.points,s=Oo.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,l=s.startAngle,c=s.endAngle,d=s.anticlockwise;this.arc(a,h,u,l,c,d)}return this},r.prototype.arc=function(t,e,r,i,n,o){if(void 0===o&&(o=!1),i===n)return this;if(!o&&n<=i?n+=ge:o&&i<=n&&(i+=ge),0===n-i)return this;var s=t+Math.cos(i)*r,a=e+Math.sin(i)*r,h=this._geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var l=Math.abs(u[u.length-2]-s),c=Math.abs(u[u.length-1]-a);l<h&&c<h||u.push(s,a)}else this.moveTo(s,a),u=this.currentPath.points;return Oo.arc(s,a,t,e,r,i,n,o,u),this},r.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill({texture:Lr.WHITE,color:t,alpha:e})},r.prototype.beginTextureFill=function(t){if(t instanceof Lr){oe("v5.2.0","Please use object-based options for Graphics#beginTextureFill");var e=arguments,r=e[0],i=e[1],n=e[2],o=e[3];t={texture:r,color:i,alpha:n,matrix:o},Object.keys(t).forEach(function(e){return void 0===t[e]&&delete t[e]})}t=Object.assign({texture:Lr.WHITE,color:16777215,alpha:1,matrix:null},t),this.currentPath&&this.startPoly();var s=t.alpha>0;return s?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:s},t)):this._fillStyle.reset(),this},r.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},r.prototype.drawRect=function(t,e,r,i){return this.drawShape(new xe(t,e,r,i))},r.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new Se(t,e,r,i,n))},r.prototype.drawCircle=function(t,e,r){return this.drawShape(new be(t,e,r))},r.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new Ee(t,e,r,i))},r.prototype.drawPolygon=function(){for(var t,e=arguments,r=[],i=0;i<arguments.length;i++)r[i]=e[i];var n=!0,o=r[0];o.points?(n=o.closeStroke,t=o.points):t=Array.isArray(r[0])?r[0]:r;var s=new Te(t);return s.closeStroke=n,this.drawShape(s),this},r.prototype.drawShape=function(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},r.prototype.drawStar=function(t,e,r,i,n,o){return void 0===o&&(o=0),this.drawPolygon(new Ao(t,e,r,i,n,o))},r.prototype.clear=function(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this},r.prototype.isFastRect=function(){var e=this._geometry.graphicsData;return 1===e.length&&e[0].shape.type===t.SHAPES.RECT&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)},r.prototype._render=function(t){this.finishPoly();var e=this._geometry,r=t.context.supports.uint32Indices;e.updateBatches(r),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},r.prototype._populateBatches=function(){var t=this._geometry,e=this.blendMode,r=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(t.points);for(var i=0;i<r;i++){var n=t.batches[i],o=n.style.color,s=new Float32Array(this.vertexData.buffer,4*n.attribStart*2,2*n.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*n.attribStart*2,2*n.attribSize),h={vertexData:s,blendMode:e,indices:new Uint16Array(t.indicesUint16.buffer,2*n.start,n.size),uvs:a,_batchRGB:kt(o),_tintRGB:o,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[i]=h}},r.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,r=this.batches.length;e<r;e++){var i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,t.plugins[this.pluginName].render(i)}}},r.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),r=this._geometry,i=this.tint,n=this.worldAlpha,o=e.uniforms,s=r.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[0]=(i>>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(var a=0,h=s.length;a<h;a++)this._renderDrawCallDirect(t,r.drawCalls[a])},r.prototype._renderDrawCallDirect=function(t,e){for(var r=e.texArray,i=e.type,n=e.size,o=e.start,s=r.count,a=0;a<s;a++)t.texture.bind(r.elements[a],a);t.geometry.draw(i,n,o)},r.prototype._resolveDirectShader=function(t){var e=this.shader,r=this.pluginName;if(!e){if(!Go[r]){for(var i=t.plugins.batch.MAX_TEXTURES,n=new Int32Array(i),o=0;o<i;o++)n[o]=o;var s={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ie,default:Zr.from({uSamplers:n},!0)},a=t.plugins[r]._shader.program;Go[r]=new Li(a,s)}e=Go[r]}return e},r.prototype._calculateBounds=function(){this.finishPoly();var t=this._geometry;if(t.graphicsData.length){var e=t.bounds,r=e.minX,i=e.minY,n=e.maxX,o=e.maxY;this._bounds.addFrame(this.transform,r,i,n,o)}},r.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,r._TEMP_POINT),this._geometry.containsPoint(r._TEMP_POINT)},r.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=kt(this.tint,Ho),e=0;e<this.batches.length;e++){var r=this.batches[e],i=r._batchRGB,n=(t[0]*i[0]*255<<16)+(t[1]*i[1]*255<<8)+(0|t[2]*i[2]*255);r._tintRGB=(n>>16)+(65280&n)+((255&n)<<16)}}},r.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this._geometry.points,u=this.vertexData,l=0,c=0;c<h.length;c+=2){var d=h[c],p=h[c+1];u[l++]=r*d+n*p+s,u[l++]=o*p+i*d+a}}},r.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0),this},r.prototype.setMatrix=function(t){return this._matrix=t,this},r.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},r.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},r.prototype.destroy=function(t){this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,e.prototype.destroy.call(this,t)},r._TEMP_POINT=new we,r}(Ge),zo=function(t,e){return(zo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Vo,Wo=new we,qo=new Uint16Array([0,1,2,0,2,3]),Ko=function(e){function r(r){var i=e.call(this)||this;return i._anchor=new Pe(i._onAnchorUpdate,i,r?r.defaultAnchor.x:0,r?r.defaultAnchor.y:0),i._texture=null,i._width=0,i._height=0,i._tint=null,i._tintRGB=null,i.tint=16777215,i.blendMode=t.BLEND_MODES.NORMAL,i._cachedTint=16777215,i.uvs=null,i.texture=r||Lr.EMPTY,i.vertexData=new Float32Array(8),i.vertexTrimmedData=null,i._transformID=-1,i._textureID=-1,i._transformTrimmedID=-1,i._textureTrimmedID=-1,i.indices=qo,i.pluginName="batch",i.isSprite=!0,i._roundPixels=D.ROUND_PIXELS,i}return function(t,e){function r(){this.constructor=t}zo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),r.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=ee(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=ee(this.scale.y)*this._height/this._texture.orig.height)},r.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},r.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this.vertexData,u=t.trim,l=t.orig,c=this._anchor,d=0,p=0,f=0,m=0;if(u?(d=(p=u.x-c._x*l.width)+u.width,f=(m=u.y-c._y*l.height)+u.height):(d=(p=-c._x*l.width)+l.width,f=(m=-c._y*l.height)+l.height),h[0]=r*p+n*m+s,h[1]=o*m+i*p+a,h[2]=r*d+n*m+s,h[3]=o*m+i*d+a,h[4]=r*d+n*f+s,h[5]=o*f+i*d+a,h[6]=r*p+n*f+s,h[7]=o*f+i*p+a,this._roundPixels)for(var v=D.RESOLUTION,g=0;g<h.length;++g)h[g]=Math.round((h[g]*v|0)/v)}},r.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this._anchor,n=this.transform.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=-i._x*r.width,d=c+r.width,p=-i._y*r.height,f=p+r.height;e[0]=o*c+a*p+u,e[1]=h*p+s*c+l,e[2]=o*d+a*p+u,e[3]=h*p+s*d+l,e[4]=o*d+a*f+u,e[5]=h*f+s*d+l,e[6]=o*c+a*f+u,e[7]=h*f+s*c+l},r.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},r.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},r.prototype.getLocalBounds=function(t){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new xe),t=this._localBoundsRect),this._bounds.getRectangle(t)):e.prototype.getLocalBounds.call(this,t)},r.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,Wo);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=0;return Wo.x>=i&&Wo.x<i+e&&(n=-r*this.anchor.y,Wo.y>=n&&Wo.y<n+r)},r.prototype.destroy=function(t){if(e.prototype.destroy.call(this,t),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof t?t:t&&t.texture){var r="boolean"==typeof t?t:t&&t.baseTexture;this._texture.destroy(!!r)}this._texture=null},r.from=function(t,e){return new r(t instanceof Lr?t:Lr.from(t,e))},Object.defineProperty(r.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=ee(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=ee(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"anchor",{get:function(){return this._anchor},set:function(t){this._anchor.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||Lr.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),r}(Ge),Zo=function(t,e){return(Zo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};(Vo=t.TEXT_GRADIENT||(t.TEXT_GRADIENT={}))[Vo.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",Vo[Vo.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL";var Jo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:t.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},Qo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],$o=function(){function t(t){this.styleID=0,this.reset(),rs(this,t,t)}return t.prototype.clone=function(){var e={};return rs(e,this,Jo),new t(e)},t.prototype.reset=function(){rs(this,Jo,Jo)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=es(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=es(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(t){var e=es(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&Qo.indexOf(i)<0&&(i='"'+i+'"'),e[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function ts(t){return"number"==typeof t?Xt(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function es(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=ts(t[e]);return t}return ts(t)}function rs(t,e,r){for(var i in r)Array.isArray(e[i])?t[i]=e[i].slice():t[i]=e[i]}var is=function(){function t(t,e,r,i,n,o,s,a,h){this.text=t,this.style=e,this.width=r,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h}return t.measureText=function(e,r,i,n){void 0===n&&(n=t._canvas),i=null==i?r.wordWrap:i;var o=r.toFontString(),s=t.measureFont(o);0===s.fontSize&&(s.fontSize=r.fontSize,s.ascent=r.fontSize);var a=n.getContext("2d");a.font=o;for(var h=(i?t.wordWrap(e,r,n):e).split(/(?:\r\n|\r|\n)/),u=new Array(h.length),l=0,c=0;c<h.length;c++){var d=a.measureText(h[c]).width+(h[c].length-1)*r.letterSpacing;u[c]=d,l=Math.max(l,d)}var p=l+r.strokeThickness;r.dropShadow&&(p+=r.dropShadowDistance);var f=r.lineHeight||s.fontSize+r.strokeThickness,m=Math.max(f,s.fontSize+r.strokeThickness)+(h.length-1)*(f+r.leading);return r.dropShadow&&(m+=r.dropShadowDistance),new t(e,r,p,m,h,u,f+r.leading,l,s)},t.wordWrap=function(e,r,i){void 0===i&&(i=t._canvas);for(var n=i.getContext("2d"),o=0,s="",a="",h=Object.create(null),u=r.letterSpacing,l=r.whiteSpace,c=t.collapseSpaces(l),d=t.collapseNewlines(l),p=!c,f=r.wordWrapWidth+u,m=t.tokenize(e),v=0;v<m.length;v++){var g=m[v];if(t.isNewline(g)){if(!d){a+=t.addLine(s),p=!c,s="",o=0;continue}g=" "}if(c){var y=t.isBreakingSpace(g),_=t.isBreakingSpace(s[s.length-1]);if(y&&_)continue}var x=t.getFromCache(g,u,h,n);if(x>f)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(g,r.breakWords))for(var b=t.wordWrapSplit(g),E=0;E<b.length;E++){for(var T=b[E],S=1;b[E+S];){var w=b[E+S],P=T[T.length-1];if(t.canBreakChars(P,w,g,E,r.breakWords))break;T+=w,S++}E+=T.length-1;var I=t.getFromCache(T,u,h,n);I+o>f&&(a+=t.addLine(s),p=!1,s="",o=0),s+=T,o+=I}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var A=v===m.length-1;a+=t.addLine(g,!A),p=!1,s="",o=0}else x+o>f&&(p=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(g)||p)&&(s+=g,o+=x)}return a+=t.addLine(s,!1)},t.addLine=function(e,r){return void 0===r&&(r=!0),e=t.trimRight(e),e=r?e+"\n":e},t.getFromCache=function(t,e,r,i){var n=r[t];if("number"!=typeof n){var o=t.length*e;n=i.measureText(t).width+o,r[t]=n}return n},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var i=e[r];if(!t.isBreakingSpace(i))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],i="";if("string"!=typeof e)return r;for(var n=0;n<e.length;n++){var o=e[n];t.isBreakingSpace(o)||t.isNewline(o)?(""!==i&&(r.push(i),i=""),r.push(o)):i+=o}return""!==i&&r.push(i),r},t.canBreakWords=function(t,e){return e},t.canBreakChars=function(t,e,r,i,n){return!0},t.wordWrapSplit=function(t){return t.split("")},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={ascent:0,descent:0,fontSize:0},i=t._canvas,n=t._context;n.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,s=Math.ceil(n.measureText(o).width),a=Math.ceil(n.measureText(t.BASELINE_SYMBOL).width),h=2*a;a=a*t.BASELINE_MULTIPLIER|0,i.width=s,i.height=h,n.fillStyle="#f00",n.fillRect(0,0,s,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(o,0,a);var u=n.getImageData(0,0,s,h).data,l=u.length,c=4*s,d=0,p=0,f=!1;for(d=0;d<a;++d){for(var m=0;m<c;m+=4)if(255!==u[p+m]){f=!0;break}if(f)break;p+=c}for(r.ascent=a-d,p=l-c,f=!1,d=h;d>a;--d){for(m=0;m<c;m+=4)if(255!==u[p+m]){f=!0;break}if(f)break;p-=c}return r.descent=d-a,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t.clearMetrics=function(e){void 0===e&&(e=""),e?delete t._fonts[e]:t._fonts={}},t}(),ns=function(){try{var t=new OffscreenCanvas(0,0),e=t.getContext("2d");return e&&e.measureText?t:document.createElement("canvas")}catch(t){return document.createElement("canvas")}}();ns.width=ns.height=10,is._canvas=ns,is._context=ns.getContext("2d"),is._fonts={},is.METRICS_STRING="|ÉqÅ",is.BASELINE_SYMBOL="M",is.BASELINE_MULTIPLIER=1.4,is._newlines=[10,13],is._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var os={texture:!0,children:!1,baseTexture:!0},ss=function(e){function r(t,r,i){var n=this,o=!1;i||(i=document.createElement("canvas"),o=!0),i.width=3,i.height=3;var s=Lr.from(i);return s.orig=new xe,s.trim=new xe,(n=e.call(this,s)||this)._ownCanvas=o,n.canvas=i,n.context=n.canvas.getContext("2d"),n._resolution=D.RESOLUTION,n._autoResolution=!0,n._text=null,n._style=null,n._styleListener=null,n._font="",n.text=t,n.style=r,n.localStyleID=-1,n}return function(t,e){function r(){this.constructor=t}Zo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),r.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r,i,n=this.context,o=is.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=o.width,a=o.height,h=o.lines,u=o.lineHeight,l=o.lineWidths,c=o.maxLineWidth,d=o.fontProperties;this.canvas.width=Math.ceil((Math.max(1,s)+2*e.padding)*this._resolution),this.canvas.height=Math.ceil((Math.max(1,a)+2*e.padding)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=e.strokeThickness,n.textBaseline=e.textBaseline,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit;for(var p=e.dropShadow?2:1,f=0;f<p;++f){var m=e.dropShadow&&0===f,v=m?Math.ceil(Math.max(1,a)+2*e.padding):0,g=v*this._resolution;if(m){n.fillStyle="black",n.strokeStyle="black";var y=e.dropShadowColor,_=kt("number"==typeof y?y:jt(y)),x=e.dropShadowBlur*this._resolution,b=e.dropShadowDistance*this._resolution;n.shadowColor="rgba("+255*_[0]+","+255*_[1]+","+255*_[2]+","+e.dropShadowAlpha+")",n.shadowBlur=x,n.shadowOffsetX=Math.cos(e.dropShadowAngle)*b,n.shadowOffsetY=Math.sin(e.dropShadowAngle)*b+g}else n.fillStyle=this._generateFillStyle(e,h,o),n.strokeStyle=e.stroke,n.shadowColor="black",n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;for(var E=0;E<h.length;E++)r=e.strokeThickness/2,i=e.strokeThickness/2+E*u+d.ascent,"right"===e.align?r+=c-l[E]:"center"===e.align&&(r+=(c-l[E])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(h[E],r+e.padding,i+e.padding-v,!0),e.fill&&this.drawLetterSpacing(h[E],r+e.padding,i+e.padding-v)}this.updateTexture()}},r.prototype.drawLetterSpacing=function(t,e,r,i){void 0===i&&(i=!1);var n=this._style.letterSpacing;if(0!==n)for(var o=e,s=Array.from?Array.from(t):t.split(""),a=this.context.measureText(t).width,h=0,u=0;u<s.length;++u){var l=s[u];i?this.context.strokeText(l,o,r):this.context.fillText(l,o,r),o+=a-(h=this.context.measureText(t.substring(u+1)).width)+n,a=h}else i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},r.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=le(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var r=this._texture,i=this._style,n=i.trim?0:i.padding,o=r.baseTexture;r.trim.width=r._frame.width=Math.ceil(t.width/this._resolution),r.trim.height=r._frame.height=Math.ceil(t.height/this._resolution),r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,this._onTextureUpdate(),o.setRealSize(t.width,t.height,this._resolution),this._recursivePostUpdateTransform(),this.dirty=!1},r.prototype._render=function(t){this._autoResolution&&this._resolution!==t.resolution&&(this._resolution=t.resolution,this.dirty=!0),this.updateText(!0),e.prototype._render.call(this,t)},r.prototype.getLocalBounds=function(t){return this.updateText(!0),e.prototype.getLocalBounds.call(this,t)},r.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},r.prototype._generateFillStyle=function(e,r,i){var n,o=e.fill;if(!Array.isArray(o))return o;if(1===o.length)return o[0];var s=e.dropShadow?e.dropShadowDistance:0,a=e.padding||0,h=Math.ceil(this.canvas.width/this._resolution)-s-2*a,u=Math.ceil(this.canvas.height/this._resolution)-s-2*a,l=o.slice(),c=e.fillGradientStops.slice();if(!c.length)for(var d=l.length+1,p=1;p<d;++p)c.push(p/d);if(l.unshift(o[0]),c.unshift(0),l.push(o[o.length-1]),c.push(1),e.fillGradientType===t.TEXT_GRADIENT.LINEAR_VERTICAL){n=this.context.createLinearGradient(h/2,a,h/2,u+a);var f=0,m=(i.fontProperties.fontSize+e.strokeThickness)/u;for(p=0;p<r.length;p++)for(var v=i.lineHeight*p,g=0;g<l.length;g++){var y=v/u+("number"==typeof c[g]?c[g]:g/l.length)*m,_=Math.max(f,y);_=Math.min(_,1),n.addColorStop(_,l[g]),f=_}}else{n=this.context.createLinearGradient(a,u/2,h+a,u/2);var x=l.length+1,b=1;for(p=0;p<l.length;p++){var E=void 0;E="number"==typeof c[p]?c[p]:b/x,n.addColorStop(E,l[p]),b++}}return n},r.prototype.destroy=function(t){"boolean"==typeof t&&(t={children:t}),t=Object.assign({},os,t),e.prototype.destroy.call(this,t),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},Object.defineProperty(r.prototype,"width",{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=ee(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=ee(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"style",{get:function(){return this._style},set:function(t){t=t||{},this._style=t instanceof $o?t:new $o(t),this.localStyleID=-1,this.dirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"text",{get:function(){return this._text},set:function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},enumerable:!1,configurable:!0}),r}(Ko);D.UPLOADS_PER_FRAME=4;var as=function(t,e){return(as=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var hs=function(){function t(t){this.maxItemsPerFrame=t,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();function us(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i<t._textures.length;i++)if(t._textures[i]instanceof Lr){var n=t._textures[i].baseTexture;-1===e.indexOf(n)&&(e.push(n),r=!0)}return r}function ls(t,e){if(t.baseTexture instanceof gr){var r=t.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function cs(t,e){if(t._texture&&t._texture instanceof Lr){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function ds(t,e){return e instanceof ss&&(e.updateText(!0),!0)}function ps(t,e){if(e instanceof $o){var r=e.toFontString();return is.measureFont(r),!0}return!1}function fs(t,e){if(t instanceof ss){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function ms(t,e){return t instanceof $o&&(-1===e.indexOf(t)&&e.push(t),!0)}var vs=function(){function e(t){var e=this;this.limiter=new hs(D.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(fs),this.registerFindHook(ms),this.registerFindHook(us),this.registerFindHook(ls),this.registerFindHook(cs),this.registerUploadHook(ds),this.registerUploadHook(ps)}return e.prototype.upload=function(e,r){"function"==typeof e&&(r=e,e=null),e&&this.add(e),this.queue.length?(r&&this.completes.push(r),this.ticking||(this.ticking=!0,Qe.system.addOnce(this.tick,this,t.UPDATE_PRIORITY.UTILITY))):r&&r()},e.prototype.tick=function(){setTimeout(this.delayedTick,0)},e.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var e=this.queue[0],r=!1;if(e&&!e._destroyed)for(var i=0,n=this.uploadHooks.length;i<n;i++)if(this.uploadHooks[i](this.uploadHookHelper,e)){this.queue.shift(),r=!0;break}r||this.queue.shift()}if(this.queue.length)Qe.system.addOnce(this.tick,this,t.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;var o=this.completes.slice(0);this.completes.length=0;for(i=0,n=o.length;i<n;i++)o[i]()}},e.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},e.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},e.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof Ge)for(e=t.children.length-1;e>=0;e--)this.add(t.children[e]);return this},e.prototype.destroy=function(){this.ticking&&Qe.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},e}();function gs(t,e){return e instanceof gr&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function ys(t,e){if(!(e instanceof Yo))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n<i.length;n++){var o=i[n].style.texture;o&&gs(t,o.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function _s(t,e){return t instanceof Yo&&(e.push(t),!0)}var xs=function(t){function e(e){var r=t.call(this,e)||this;return r.uploadHookHelper=r.renderer,r.registerFindHook(_s),r.registerUploadHook(gs),r.registerUploadHook(ys),r}return function(t,e){function r(){this.constructor=t}as(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e}(vs),bs=function(){function t(t){this.maxMilliseconds=t,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}(),Es=function(){function t(t,e,r){void 0===r&&(r=null),this._texture=t instanceof Lr?t:null,this.baseTexture=t instanceof gr?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;var i=this.baseTexture.resource;this.resolution=this._updateResolution(r||(i?i.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return t.prototype._updateResolution=function(t){void 0===t&&(t=null);var e=this.data.meta.scale,r=fe(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&this.baseTexture.setResolution(r),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,i=t.BATCH_SIZE;r-e<i&&r<this._frameKeys.length;){var n=this._frameKeys[r],o=this._frames[n],s=o.frame;if(s){var a=null,h=null,u=!1!==o.trimmed&&o.sourceSize?o.sourceSize:o.frame,l=new xe(0,0,Math.floor(u.w)/this.resolution,Math.floor(u.h)/this.resolution);a=o.rotated?new xe(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.h)/this.resolution,Math.floor(s.w)/this.resolution):new xe(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution),!1!==o.trimmed&&o.spriteSourceSize&&(h=new xe(Math.floor(o.spriteSourceSize.x)/this.resolution,Math.floor(o.spriteSourceSize.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution)),this.textures[n]=new Lr(this.baseTexture,a,l,h,o.rotated?2:0,o.anchor),Lr.addToCache(this.textures[n],n)}r++}},t.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var r=0;r<t[e].length;r++){var i=t[e][r];this.animations[e].push(this.textures[i])}}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())},0)},t.prototype.destroy=function(t){var e;for(var r in void 0===t&&(t=!1),this.textures)this.textures[r].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(null===(e=this._texture)||void 0===e||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},t.BATCH_SIZE=1e3,t}(),Ts=function(){function t(){}return t.use=function(e,r){var i=e.name+"_image";if(e.data&&e.type===$n.TYPE.JSON&&e.data.frames&&!this.resources[i]){var n={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},o=t.getResourcePath(e,this.baseUrl);this.add(i,o,n,function(t){if(t.error)r(t.error);else{var i=new Es(t.texture,e.data,e.url);i.parse(function(){e.spritesheet=i,e.textures=i.textures,r()})}})}else r()},t.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:Rt.resolve(t.url.replace(e,""),t.data.meta.image)},t}(),Ss=function(t,e){return(Ss=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function ws(t,e){function r(){this.constructor=t}Ss(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Ps=new we,Is=function(t){function e(e,r,i){void 0===r&&(r=100),void 0===i&&(i=100);var n=t.call(this,e)||this;return n.tileTransform=new Fe,n._width=r,n._height=i,n.uvMatrix=n.texture.uvMatrix||new Xi(e),n.pluginName="tilingSprite",n.uvRespectAnchor=!1,n}return ws(e,t),Object.defineProperty(e.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,i)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new xe),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,Ps);var e=this._width,r=this._height,i=-e*this.anchor._x;if(Ps.x>=i&&Ps.x<i+e){var n=-r*this.anchor._y;if(Ps.y>=n&&Ps.y<n+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvMatrix=null},e.from=function(t,r){return"number"==typeof r&&(oe("5.3.0","TilingSprite.from use options instead of width and height args"),r={width:r,height:arguments[2]}),new e(Lr.from(t,r),r.width,r.height)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),e}(Ko),As="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n",Os="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 texSample = texture2D(uSampler, coord);\n    gl_FragColor = texSample * uColor;\n}\n",Ms="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 texSample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = texSample * uColor;\n}\n",Ds=new Ie,Cs=function(e){function r(t){var r=e.call(this,t)||this,i={globals:r.renderer.globalUniforms};return r.shader=Li.from(As,Os,i),r.simpleShader=Li.from(As,Ms,i),r.quad=new qr,r.state=Ni.for2d(),r}return ws(r,e),r.prototype.render=function(e){var r=this.renderer,i=this.quad,n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y),e.uvRespectAnchor&&((n=i.uvs)[0]=n[6]=-e.anchor.x,n[1]=n[3]=-e.anchor.y,n[2]=n[4]=1-e.anchor.x,n[5]=n[7]=1-e.anchor.y),i.invalidate();var o=e._texture,s=o.baseTexture,a=e.tileTransform.localTransform,h=e.uvMatrix,u=s.isPowerOfTwo&&o.frame.width===s.width&&o.frame.height===s.height;u&&(s._glTextures[r.CONTEXT_UID]?u=s.wrapMode!==t.WRAP_MODES.CLAMP:s.wrapMode===t.WRAP_MODES.CLAMP&&(s.wrapMode=t.WRAP_MODES.REPEAT));var l=u?this.simpleShader:this.shader,c=o.width,d=o.height,p=e._width,f=e._height;Ds.set(a.a*c/p,a.b*c/f,a.c*d/p,a.d*d/f,a.tx/p,a.ty/f),Ds.invert(),u?Ds.prepend(h.mapCoord):(l.uniforms.uMapCoord=h.mapCoord.toArray(!0),l.uniforms.uClampFrame=h.uClampFrame,l.uniforms.uClampOffset=h.uClampOffset),l.uniforms.uTransform=Ds.toArray(!0),l.uniforms.uColor=Wt(e.tint,e.worldAlpha,l.uniforms.uColor,s.alphaMode),l.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),l.uniforms.uSampler=o,r.shader.bind(l),r.geometry.bind(i),this.state.blendMode=Yt(e.blendMode,s.alphaMode),r.state.set(this.state),r.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},r}($r),Rs=function(t,e){return(Rs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function Ls(t,e){function r(){this.constructor=t}Rs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Ns=function(){function t(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}},t}(),Fs=new we,Bs=new Te,Us=function(e){function r(r,i,n,o){void 0===o&&(o=t.DRAW_MODES.TRIANGLES);var s=e.call(this)||this;return s.geometry=r,r.refCount++,s.shader=i,s.state=n||Ni.for2d(),s.drawMode=o,s.start=0,s.size=0,s.uvs=null,s.indices=null,s.vertexData=new Float32Array(1),s.vertexDirty=0,s._transformID=-1,s._roundPixels=D.ROUND_PIXELS,s.batchUvs=null,s}return Ls(r,e),Object.defineProperty(r.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"material",{get:function(){return this.shader},set:function(t){this.shader=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tint",{get:function(){return this.shader.tint},set:function(t){this.shader.tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture=t},enumerable:!1,configurable:!0}),r.prototype._render=function(e){var i=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===t.DRAW_MODES.TRIANGLES&&i.length<2*r.BATCHABLE_SIZE?this._renderToBatch(e):this._renderDefault(e)},r.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.program.uniformData.translationMatrix&&(e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0)),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},r.prototype._renderToBatch=function(t){var e=this.geometry;this.shader.uvMatrix&&(this.shader.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=this.shader._tintRGB,this._texture=this.shader.texture;var r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)},r.prototype.calculateVertices=function(){var t=this.geometry,e=t.buffers[0].data;if(t.vertexDirtyId!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var r=this.transform.worldTransform,i=r.a,n=r.b,o=r.c,s=r.d,a=r.tx,h=r.ty,u=this.vertexData,l=0;l<u.length/2;l++){var c=e[2*l],d=e[2*l+1];u[2*l]=i*c+o*d+a,u[2*l+1]=n*c+s*d+h}if(this._roundPixels){var p=D.RESOLUTION;for(l=0;l<u.length;++l)u[l]=Math.round((u[l]*p|0)/p)}this.vertexDirty=t.vertexDirtyId}},r.prototype.calculateUvs=function(){var t=this.geometry.buffers[1];this.shader.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new Ns(t,this.shader.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},r.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},r.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,Fs);for(var e=this.geometry.getBuffer("aVertexPosition").data,r=Bs.points,i=this.geometry.getIndex().data,n=i.length,o=4===this.drawMode?3:1,s=0;s+2<n;s+=o){var a=2*i[s],h=2*i[s+1],u=2*i[s+2];if(r[0]=e[a],r[1]=e[a+1],r[2]=e[h],r[3]=e[h+1],r[4]=e[u],r[5]=e[u+1],Bs.contains(Fs.x,Fs.y))return!0}return!1},r.prototype.destroy=function(t){e.prototype.destroy.call(this,t),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},r.BATCHABLE_SIZE=100,r}(Ge),ks="varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n",Xs="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n",js=function(t){function e(e,r){var i=this,n={uSampler:e,alpha:1,uTextureMatrix:Ie.IDENTITY,uColor:new Float32Array([1,1,1,1])};return(r=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},r)).uniforms&&Object.assign(n,r.uniforms),(i=t.call(this,r.program||Ri.from(Xs,ks),n)||this)._colorDirty=!1,i.uvMatrix=new Xi(e),i.batchable=void 0===r.program,i.pluginName=r.pluginName,i.tint=r.tint,i.alpha=r.alpha,i}return Ls(e,t),Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(t){this.uniforms.uSampler!==t&&(this.uniforms.uSampler=t,this.uvMatrix.texture=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){t!==this._tint&&(this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;Wt(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Li),Hs=function(e){function r(r,i,n){var o=e.call(this)||this,s=new Xr(r),a=new Xr(i,!0),h=new Xr(n,!0,!0);return o.addAttribute("aVertexPosition",s,2,!1,t.TYPES.FLOAT).addAttribute("aTextureCoord",a,2,!1,t.TYPES.FLOAT).addIndex(h),o._updateId=-1,o}return Ls(r,e),Object.defineProperty(r.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),r}(Vr),Gs=function(t,e){return(Gs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ys=function(){return function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]}}(),zs=function(){function t(){}return t.test=function(t){return"string"==typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[]};for(var i in e){var n=e[i].match(/^[a-z]+/gm)[0],o=e[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var a in o){var h=o[a].split("="),u=h[0],l=h[1].replace(/"/gm,""),c=parseFloat(l),d=isNaN(c)?l:c;s[u]=d}r[n].push(s)}var p=new Ys;return r.info.forEach(function(t){return p.info.push({face:t.face,size:parseInt(t.size,10)})}),r.common.forEach(function(t){return p.common.push({lineHeight:parseInt(t.lineHeight,10)})}),r.page.forEach(function(t){return p.page.push({id:parseInt(t.id,10),file:t.file})}),r.char.forEach(function(t){return p.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})}),r.kerning.forEach(function(t){return p.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})}),p},t}(),Vs=function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new Ys,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),n=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),s=t.getElementsByTagName("kerning"),a=0;a<r.length;a++)e.info.push({face:r[a].getAttribute("face"),size:parseInt(r[a].getAttribute("size"),10)});for(a=0;a<i.length;a++)e.common.push({lineHeight:parseInt(i[a].getAttribute("lineHeight"),10)});for(a=0;a<n.length;a++)e.page.push({id:parseInt(n[a].getAttribute("id"),10)||0,file:n[a].getAttribute("file")});for(a=0;a<o.length;a++){var h=o[a];e.char.push({id:parseInt(h.getAttribute("id"),10),page:parseInt(h.getAttribute("page"),10)||0,x:parseInt(h.getAttribute("x"),10),y:parseInt(h.getAttribute("y"),10),width:parseInt(h.getAttribute("width"),10),height:parseInt(h.getAttribute("height"),10),xoffset:parseInt(h.getAttribute("xoffset"),10),yoffset:parseInt(h.getAttribute("yoffset"),10),xadvance:parseInt(h.getAttribute("xadvance"),10)})}for(a=0;a<s.length;a++)e.kerning.push({first:parseInt(s[a].getAttribute("first"),10),second:parseInt(s[a].getAttribute("second"),10),amount:parseInt(s[a].getAttribute("amount"),10)});return e},t}(),Ws=function(){function t(){}return t.test=function(t){if("string"==typeof t&&t.indexOf("<font>")>-1){var e=(new self.DOMParser).parseFromString(t,"text/xml");return Vs.test(e)}return!1},t.parse=function(t){var e=(new window.DOMParser).parseFromString(t,"text/xml");return Vs.parse(e)},t}(),qs=[zs,Vs,Ws];function Ks(t){for(var e=0;e<qs.length;e++)if(qs[e].test(t))return qs[e];return null}function Zs(e,r,i,n,o,s,a){var h=i.text,u=i.fontProperties;r.translate(n,o),r.scale(s,s);var l=a.strokeThickness/2,c=-a.strokeThickness/2;if(r.font=a.toFontString(),r.lineWidth=a.strokeThickness,r.textBaseline=a.textBaseline,r.lineJoin=a.lineJoin,r.miterLimit=a.miterLimit,r.fillStyle=function(e,r,i,n,o,s){var a,h=i.fill;if(!Array.isArray(h))return h;if(1===h.length)return h[0];var u=i.dropShadow?i.dropShadowDistance:0,l=i.padding||0,c=Math.ceil(e.width/n)-u-2*l,d=Math.ceil(e.height/n)-u-2*l,p=h.slice(),f=i.fillGradientStops.slice();if(!f.length)for(var m=p.length+1,v=1;v<m;++v)f.push(v/m);if(p.unshift(h[0]),f.unshift(0),p.push(h[h.length-1]),f.push(1),i.fillGradientType===t.TEXT_GRADIENT.LINEAR_VERTICAL){a=r.createLinearGradient(c/2,l,c/2,d+l);var g=0,y=(s.fontProperties.fontSize+i.strokeThickness)/d;for(v=0;v<o.length;v++)for(var _=s.lineHeight*v,x=0;x<p.length;x++){var b=_/d+("number"==typeof f[x]?f[x]:x/p.length)*y,E=Math.max(g,b);E=Math.min(E,1),a.addColorStop(E,p[x]),g=E}}else{a=r.createLinearGradient(l,d/2,c+l,d/2);var T=p.length+1,S=1;for(v=0;v<p.length;v++){var w=void 0;w="number"==typeof f[v]?f[v]:S/T,a.addColorStop(w,p[v]),S++}}return a}(e,r,a,s,[h],i),r.strokeStyle=a.stroke,a.dropShadow){var d=a.dropShadowColor,p=kt("number"==typeof d?d:jt(d)),f=a.dropShadowBlur*s,m=a.dropShadowDistance*s;r.shadowColor="rgba("+255*p[0]+","+255*p[1]+","+255*p[2]+","+a.dropShadowAlpha+")",r.shadowBlur=f,r.shadowOffsetX=Math.cos(a.dropShadowAngle)*m,r.shadowOffsetY=Math.sin(a.dropShadowAngle)*m}else r.shadowColor="black",r.shadowBlur=0,r.shadowOffsetX=0,r.shadowOffsetY=0;a.stroke&&a.strokeThickness&&r.strokeText(h,l,c+i.lineHeight-u.descent),a.fill&&r.fillText(h,l,c+i.lineHeight-u.descent),r.setTransform(1,0,0,1,0,0),r.fillStyle="rgba(0, 0, 0, 0)"}var Js=function(){function t(t,e,r){var i=t.info[0],n=t.common[0],o=fe(t.page[0].file),s={};this._ownsTextures=r,this.font=i.face,this.size=i.size,this.lineHeight=n.lineHeight/o,this.chars={},this.pageTextures=s;for(var a=0;a<t.page.length;a++){var h=t.page[a],u=h.id,l=h.file;s[u]=e instanceof Array?e[a]:e[l]}for(a=0;a<t.char.length;a++){var c=t.char[a],d=(u=c.id,c.page),p=t.char[a],f=p.x,m=p.y,v=p.width,g=p.height,y=p.xoffset,_=p.yoffset,x=p.xadvance;m/=o,v/=o,g/=o,y/=o,_/=o,x/=o;var b=new xe((f/=o)+s[d].frame.x/o,m+s[d].frame.y/o,v,g);this.chars[u]={xOffset:y,yOffset:_,xAdvance:x,kerning:{},texture:new Lr(s[d].baseTexture,b),page:d}}for(a=0;a<t.kerning.length;a++){var E=t.kerning[a],T=E.first,S=E.second,w=E.amount;T/=o,S/=o,w/=o,this.chars[S]&&(this.chars[S].kerning[T]=w)}}return t.prototype.destroy=function(){for(var t in this.chars)this.chars[t].texture.destroy(),this.chars[t].texture=null;for(var t in this.pageTextures)this._ownsTextures&&this.pageTextures[t].destroy(!0),this.pageTextures[t]=null;this.chars=null,this.pageTextures=null},t.install=function(e,r,i){var n;if(e instanceof Ys)n=e;else{var o=Ks(e);if(!o)throw new Error("Unrecognized data format for font.");n=o.parse(e)}r instanceof Lr&&(r=[r]);var s=new t(n,r,i);return t.available[s.font]=s,s},t.uninstall=function(e){var r=t.available[e];if(!r)throw new Error("No font found named '"+e+"'");r.destroy(),delete t.available[e]},t.from=function(e,r,i){if(!e)throw new Error("[BitmapFont] Property `name` is required.");var n=Object.assign({},t.defaultOptions,i),o=n.chars,s=n.padding,a=n.resolution,h=n.textureWidth,u=n.textureHeight,l=function(t){"string"==typeof t&&(t=[t]);for(var e=[],r=0,i=t.length;r<i;r++){var n=t[r];if(Array.isArray(n)){if(2!==n.length)throw new Error("[BitmapFont]: Invalid character range length, expecting 2 got "+n.length+".");var o=n[0].charCodeAt(0),s=n[1].charCodeAt(0);if(s<o)throw new Error("[BitmapFont]: Invalid character range.");for(var a=o,h=s;a<=h;a++)e.push(String.fromCharCode(a))}else e.push.apply(e,n.split(""))}if(0===e.length)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}(o),c=r instanceof $o?r:new $o(r),d=h,p=new Ys;p.info[0]={face:c.fontFamily,size:c.fontSize},p.common[0]={lineHeight:c.fontSize};for(var f,m,v,g=0,y=0,_=0,x=[],b=0;b<l.length;b++){f||((f=document.createElement("canvas")).width=h,f.height=u,m=f.getContext("2d"),v=new gr(f,{resolution:a}),x.push(new Lr(v)),p.page.push({id:x.length-1,file:""}));var E=is.measureText(l[b],c,!1,f),T=E.width,S=Math.ceil(E.height),w=Math.ceil(("italic"===c.fontStyle?2:1)*T);if(y>=u-S*a){if(0===y)throw new Error("[BitmapFont] textureHeight "+u+"px is too small for "+c.fontSize+"px fonts");--b,f=null,m=null,v=null,y=0,g=0,_=0}else if(_=Math.max(S+E.fontProperties.descent,_),w*a+g>=d)--b,y+=_*a,y=Math.ceil(y),g=0,_=0;else{Zs(f,m,E,g,y,a,c);var P=E.text.charCodeAt(0);p.char.push({id:P,page:x.length-1,x:g/a,y:y/a,width:w,height:S,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(c.dropShadow?c.dropShadowDistance:0)-(c.stroke?c.strokeThickness:0))}),g+=(w+2*s)*a,g=Math.ceil(g)}}var I=new t(p,x,!0);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=I,I},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),Qs=[],$s=[],ta=function(t){function e(r,i){void 0===i&&(i={});var n=t.call(this)||this;n._tint=16777215,i.font&&(oe("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),n._upgradeStyle(i));var o=Object.assign({},e.styleDefaults,i),s=o.align,a=o.tint,h=o.maxWidth,u=o.letterSpacing,l=o.fontName,c=o.fontSize;if(!Js.available[l])throw new Error('Missing BitmapFont "'+l+'"');return n._activePagesMeshData=[],n._textWidth=0,n._textHeight=0,n._align=s,n._tint=a,n._fontName=l,n._fontSize=c||Js.available[l].size,n._text=r,n._maxWidth=h,n._maxLineHeight=0,n._letterSpacing=u,n._anchor=new Pe(function(){n.dirty=!0},n,0,0),n._roundPixels=D.ROUND_PIXELS,n.dirty=!0,n._textureCache={},n}return function(t,e){function r(){this.constructor=t}Gs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.updateText=function(){for(var t,e=Js.available[this._fontName],r=this._fontSize/e.size,i=new we,n=[],o=[],s=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",a=s.length,h=this._maxWidth*e.size/this._fontSize,u=null,l=0,c=0,d=0,p=-1,f=0,m=0,v=0,g=0;g<a;g++){var y=s.charCodeAt(g),_=s.charAt(g);if(/(?:\s)/.test(_)&&(p=g,f=l),"\r"!==_&&"\n"!==_){var x=e.chars[y];if(x){u&&x.kerning[u]&&(i.x+=x.kerning[u]);var b=$s.pop()||{texture:Lr.EMPTY,line:0,charCode:0,position:new we};b.texture=x.texture,b.line=d,b.charCode=y,b.position.x=i.x+x.xOffset+this._letterSpacing/2,b.position.y=i.y+x.yOffset,n.push(b),i.x+=x.xAdvance+this._letterSpacing,l=i.x,v=Math.max(v,x.yOffset+x.texture.height),u=y,-1!==p&&h>0&&i.x>h&&(te(n,1+p-++m,1+g-p),g=p,p=-1,o.push(f),c=Math.max(c,f),d++,i.x=0,i.y+=e.lineHeight,u=null)}}else o.push(l),c=Math.max(c,l),++d,++m,i.x=0,i.y+=e.lineHeight,u=null}var E=s.charAt(s.length-1);"\r"!==E&&"\n"!==E&&(/(?:\s)/.test(E)&&(l=f),o.push(l),c=Math.max(c,l));var T=[];for(g=0;g<=d;g++){var S=0;"right"===this._align?S=c-o[g]:"center"===this._align&&(S=(c-o[g])/2),T.push(S)}var w=n.length,P={},I=[],A=this._activePagesMeshData;for(g=0;g<A.length;g++)Qs.push(A[g]);for(g=0;g<w;g++){var O=(U=n[g].texture).baseTexture.uid;if(!P[O]){if(!(z=Qs.pop())){var M=new Hs,D=new js(Lr.EMPTY);z={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:new Us(M,D),vertices:null,uvs:null,indices:null}}z.index=0,z.indexCount=0,z.vertexCount=0,z.uvsCount=0,z.total=0;var C=this._textureCache;C[O]=C[O]||new Lr(U.baseTexture),z.mesh.texture=C[O],z.mesh.tint=this._tint,I.push(z),P[O]=z}P[O].total++}for(g=0;g<A.length;g++)-1===I.indexOf(A[g])&&this.removeChild(A[g].mesh);for(g=0;g<I.length;g++)I[g].mesh.parent!==this&&this.addChild(I[g].mesh);for(var g in this._activePagesMeshData=I,P){var R=(z=P[g]).total;if(!((null===(t=z.indices)||void 0===t?void 0:t.length)>6*R)||z.vertices.length<2*Us.BATCHABLE_SIZE)z.vertices=new Float32Array(8*R),z.uvs=new Float32Array(8*R),z.indices=new Uint16Array(6*R);else for(var L=z.total,N=z.vertices,F=4*L*2;F<N.length;F++)N[F]=0;z.mesh.size=6*R}for(g=0;g<w;g++){var B=(_=n[g]).position.x+T[_.line];this._roundPixels&&(B=Math.round(B));var U,k=B*r,X=_.position.y*r,j=P[(U=_.texture).baseTexture.uid],H=U.frame,G=U._uvs,Y=j.index++;j.indices[6*Y+0]=0+4*Y,j.indices[6*Y+1]=1+4*Y,j.indices[6*Y+2]=2+4*Y,j.indices[6*Y+3]=0+4*Y,j.indices[6*Y+4]=2+4*Y,j.indices[6*Y+5]=3+4*Y,j.vertices[8*Y+0]=k,j.vertices[8*Y+1]=X,j.vertices[8*Y+2]=k+H.width*r,j.vertices[8*Y+3]=X,j.vertices[8*Y+4]=k+H.width*r,j.vertices[8*Y+5]=X+H.height*r,j.vertices[8*Y+6]=k,j.vertices[8*Y+7]=X+H.height*r,j.uvs[8*Y+0]=G.x0,j.uvs[8*Y+1]=G.y0,j.uvs[8*Y+2]=G.x1,j.uvs[8*Y+3]=G.y1,j.uvs[8*Y+4]=G.x2,j.uvs[8*Y+5]=G.y2,j.uvs[8*Y+6]=G.x3,j.uvs[8*Y+7]=G.y3}for(var g in this._textWidth=c*r,this._textHeight=(i.y+e.lineHeight)*r,P){var z=P[g];if(0!==this.anchor.x||0!==this.anchor.y)for(var V=0,W=this._textWidth*this.anchor.x,q=this._textHeight*this.anchor.y,K=0;K<z.total;K++)z.vertices[V++]-=W,z.vertices[V++]-=q,z.vertices[V++]-=W,z.vertices[V++]-=q,z.vertices[V++]-=W,z.vertices[V++]-=q,z.vertices[V++]-=W,z.vertices[V++]-=q;this._maxLineHeight=v*r;var Z=z.mesh.geometry.getBuffer("aVertexPosition"),J=z.mesh.geometry.getBuffer("aTextureCoord"),Q=z.mesh.geometry.getIndex();Z.data=z.vertices,J.data=z.uvs,Q.data=z.indices,Z.update(),J.update(),Q.update()}for(g=0;g<n.length;g++)$s.push(n[g])},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){if(this._tint!==t){this._tint=t;for(var e=0;e<this._activePagesMeshData.length;e++)this._activePagesMeshData[e].mesh.tint=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},set:function(t){if(!Js.available[t])throw new Error('Missing BitmapFont "'+t+'"');this._fontName!==t&&(this._fontName=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLineHeight",{get:function(){return this.validate(),this._maxLineHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this.validate(),this._textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){t!==this._roundPixels&&(this._roundPixels=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this.validate(),this._textHeight},enumerable:!1,configurable:!0}),e.prototype._upgradeStyle=function(t){if("string"==typeof t.font){var e=t.font.split(" ");t.fontName=1===e.length?e[0]:e.slice(1).join(" "),e.length>=2&&(t.fontSize=parseInt(e[0],10))}else t.fontName=t.font.name,t.fontSize="number"==typeof t.font.size?t.font.size:parseInt(t.font.size,10)},e.prototype.destroy=function(e){var r=this._textureCache;for(var i in r){r[i].destroy(),delete r[i]}this._textureCache=null,t.prototype.destroy.call(this,e)},e.registerFont=function(t,e){return oe("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),Js.install(t,e)},Object.defineProperty(e,"fonts",{get:function(){return oe("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),Js.available},enumerable:!1,configurable:!0}),e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e}(Ge),ea=function(){function t(){}return t.add=function(){$n.setExtensionXhrType("fnt",$n.XHR_RESPONSE_TYPE.TEXT)},t.use=function(e,r){var i=Ks(e.data);if(i)for(var n=t.getBaseUrl(this,e),o=i.parse(e.data),s={},a=function(t){s[t.metadata.pageFile]=t.texture,Object.keys(s).length===o.page.length&&(e.bitmapFont=Js.install(o,s,!0),r())},h=0;h<o.page.length;++h){var u=o.page[h].file,l=n+u,c=!1;for(var d in this.resources){var p=this.resources[d];if(p.url===l){p.metadata.pageFile=u,p.texture?a(p):p.onAfterMiddleware.add(a),c=!0;break}}if(!c){var f={crossOrigin:e.crossOrigin,loadType:$n.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:u},e.metadata.imageMetadata),parentResource:e};this.add(l,f,a)}}else r()},t.getBaseUrl=function(e,r){var i=r.isDataUrl?"":t.dirname(r.url);return r.isDataUrl&&("."===i&&(i=""),e.baseUrl&&i&&"/"===e.baseUrl.charAt(e.baseUrl.length-1)&&(i+="/")),(i=i.replace(e.baseUrl,""))&&"/"!==i.charAt(i.length-1)&&(i+="/"),i},t.dirname=function(t){var e=t.replace(/\\/g,"/").replace(/\/$/,"").replace(/\/[^\/]*$/,"");return e===t?".":""===e?"/":e},t}(),ra=function(t,e){return(ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var ia="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",na=function(t){function e(e){void 0===e&&(e=1);var r=t.call(this,gn,ia,{uAlpha:1})||this;return r.alpha=e,r}return function(t,e){function r(){this.constructor=t}ra(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(Fi),oa=function(t,e){return(oa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function sa(t,e){function r(){this.constructor=t}oa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var aa="\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n\n    vec4 filterVertexPosition( void )\n    {\n        vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n        return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n    }\n\n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }";var ha,ua,la,ca,da,pa,fa,ma,va,ga,ya,_a,xa,ba,Ea,Ta,Sa,wa={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},Pa=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n");!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(ha||(ha={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(ua||(ua={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(la||(la={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(ca||(ca={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(da||(da={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(pa||(pa={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(fa||(fa={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(ma||(ma={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(va||(va={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(ga||(ga={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(ya||(ya={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(_a||(_a={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(xa||(xa={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(ba||(ba={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(Ea||(Ea={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(Ta||(Ta={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(Sa||(Sa={}));var Ia=function(t){function e(e,r,i,n,o){void 0===r&&(r=8),void 0===i&&(i=4),void 0===n&&(n=D.FILTER_RESOLUTION),void 0===o&&(o=5);var s=this,a=function(t,e){var r,i=Math.ceil(t/2),n=aa,o="";r=e?"vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var a=r.replace("%index%",s.toString());o+=a=a.replace("%sampleIndex%",s-(i-1)+".0"),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o,e),h=function(t){for(var e,r=wa[t],i=r.length,n=Pa,o="",s=0;s<t;s++){var a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",s.toString());e=s,s>=i&&(e=t-s-1),o+=a=a.replace("%value%",r[e].toString()),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(s=t.call(this,a,h)||this).horizontal=e,s.resolution=n,s._quality=0,s.quality=i,s.blur=r,s}return sa(e,t),e.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),o=t.renderer,s=e,a=n;this.state.blend=!1,t.applyFilter(this,s,a,xa.CLEAR);for(var h=1;h<this.passes-1;h++){t.bindAndClear(s,xa.BLIT),this.uniforms.uSampler=a;var u=a;a=s,s=u,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,a,r,i),t.returnFilterTexture(n)}},Object.defineProperty(e.prototype,"blur",{get:function(){return this.strength},set:function(t){this.padding=1+2*Math.abs(t),this.strength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t},enumerable:!1,configurable:!0}),e}(Fi),Aa=function(t){function e(e,r,i,n){void 0===e&&(e=8),void 0===r&&(r=4),void 0===i&&(i=D.FILTER_RESOLUTION),void 0===n&&(n=5);var o=t.call(this)||this;return o.blurXFilter=new Ia(!0,e,r,i,n),o.blurYFilter=new Ia(!1,e,r,i,n),o.resolution=i,o.quality=r,o.blur=e,o.repeatEdgePixels=!1,o}return sa(e,t),e.prototype.apply=function(t,e,r,i){var n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){var s=t.getFilterTexture();this.blurXFilter.apply(t,e,s,xa.CLEAR),this.blurYFilter.apply(t,s,r,i),t.returnFilterTexture(s)}else o?this.blurYFilter.apply(t,e,r,i):this.blurXFilter.apply(t,e,r,i)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.blurYFilter.blendMode},set:function(t){this.blurYFilter.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"repeatEdgePixels",{get:function(){return this._repeatEdgePixels},set:function(t){this._repeatEdgePixels=t,this.updatePadding()},enumerable:!1,configurable:!0}),e}(Fi),Oa=function(t,e){return(Oa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ma="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n",Da=function(t){function e(){var e=this,r={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};return(e=t.call(this,yn,Ma,r)||this).alpha=1,e}return function(t,e){function r(){this.constructor=t}Oa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),i=Math.sin(t),n=1/3,o=(0,Math.sqrt)(n),s=[r+(1-r)*n,n*(1-r)-o*i,n*(1-r)+o*i,0,0,n*(1-r)+o*i,r+n*(1-r),n*(1-r)-o*i,0,0,n*(1-r)-o*i,n*(1-r)+o*i,r+n*(1-r),0,0,0,0,0,1,0];this._loadMatrix(s,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,i=-.5*(r-1),n=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var r=2*t/3+1,i=-.5*(r-1),n=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,r,i,n){var o=((r=r||16770432)>>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=((i=i||3375104)>>16&255)/255,u=(i>>8&255)/255,l=(255&i)/255,c=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,h,u,l,e=e||.15,0,o-h,s-u,a-l,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(Fi);Da.prototype.grayscale=Da.prototype.greyscale;var Ca=function(t,e){return(Ca=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ra="varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n  vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n  map -= 0.5;\n  map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n  gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",La="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0)  ).xy;\n}\n",Na=function(t){function e(e,r){var i=this,n=new Ie;return e.renderable=!1,(i=t.call(this,La,Ra,{mapSampler:e._texture,filterMatrix:n,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,i.maskMatrix=n,null==r&&(r=20),i.scale=new we(r,r),i}return function(t,e){function r(){this.constructor=t}Ca(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.apply=function(t,e,r,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),s=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==s&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/s,this.uniforms.rotation[3]=n.d/s),t.applyFilter(this,e,r,i)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(Fi),Fa=function(t,e){return(Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ba="\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = filterVertexPosition();\n\n   vFragCoord = aVertexPosition * outputFrame.zw;\n\n   texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",Ua='varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n\n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n      vec4 color;\n\n      color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n',ka=function(t){function e(){return t.call(this,Ba,Ua)||this}return function(t,e){function r(){this.constructor=t}Fa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e}(Fi),Xa=function(t,e){return(Xa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var ja="precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n",Ha=function(t){function e(e,r){void 0===e&&(e=.5),void 0===r&&(r=Math.random());var i=t.call(this,yn,ja,{uNoise:0,uSeed:0})||this;return i.noise=e,i.seed=r,i}return function(t,e){function r(){this.constructor=t}Xa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(Fi),Ga=new Ie;Xe.prototype._cacheAsBitmap=!1,Xe.prototype._cacheData=null;var Ya=function(){return function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}();Object.defineProperties(Xe.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new Ya),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),Xe.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},Xe.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var r=this.getLocalBounds(null,!0).clone();if(this.filters){var i=this.filters[0].padding;r.pad(i)}r.ceil(D.RESOLUTION);var n=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),s=t.renderTexture.destinationFrame.clone(),a=t.projection.transform,h=Fr.create({width:r.width,height:r.height}),u="cacheAsBitmap_"+ie();this._cacheData.textureCacheId=u,gr.addToCache(h.baseTexture,u),Lr.addToCache(h,u);var l=this.transform.localTransform.copyTo(Ga).invert().translate(-r.x,-r.y);this.render=this._cacheData.originalRender,t.render(this,h,!0,l,!1),t.projection.transform=a,t.renderTexture.bind(n,o,s),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new Ko(h);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-r.x/r.width,c.anchor.y=-r.y/r.height,c.alpha=e,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=c.containsPoint.bind(c)}},Xe.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},Xe.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),r=this.alpha;this.alpha=1;var i=t.context,n=t._projTransform;e.ceil(D.RESOLUTION);var o=Fr.create({width:e.width,height:e.height}),s="cacheAsBitmap_"+ie();this._cacheData.textureCacheId=s,gr.addToCache(o.baseTexture,s),Lr.addToCache(o,s);var a=Ga;this.transform.localTransform.copyTo(a),a.invert(),a.tx-=e.x,a.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,o,!0,a,!1),t.context=i,t._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var h=new Ko(o);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-e.x/e.width,h.anchor.y=-e.y/e.height,h.alpha=r,h._bounds=this._bounds,this._cacheData.sprite=h,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=h.containsPoint.bind(h)}},Xe.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},Xe.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},Xe.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,gr.removeFromCache(this._cacheData.textureCacheId),Lr.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Xe.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},Xe.prototype.name=null,Ge.prototype.getChildByName=function(t,e){for(var r=0,i=this.children.length;r<i;r++)if(this.children[r].name===t)return this.children[r];if(e)for(r=0,i=this.children.length;r<i;r++){if(this.children[r].getChildByName){var n=this.children[r].getChildByName(t,!0);if(n)return n}}return null},Xe.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new we),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var za=function(t,e){return(za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function Va(t,e){function r(){this.constructor=t}za(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Wa=function(t){function e(e,r,i,n){void 0===e&&(e=100),void 0===r&&(r=100),void 0===i&&(i=10),void 0===n&&(n=10);var o=t.call(this)||this;return o.segWidth=i,o.segHeight=n,o.width=e,o.height=r,o.build(),o}return Va(e,t),e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],r=[],i=[],n=this.segWidth-1,o=this.segHeight-1,s=this.width/n,a=this.height/o,h=0;h<t;h++){var u=h%this.segWidth,l=h/this.segWidth|0;e.push(u*s,l*a),r.push(u/n,l/o)}var c=n*o;for(h=0;h<c;h++){var d=h%n,p=h/n|0,f=p*this.segWidth+d,m=p*this.segWidth+d+1,v=(p+1)*this.segWidth+d,g=(p+1)*this.segWidth+d+1;i.push(f,m,v,m,g,v)}this.buffers[0].data=new Float32Array(e),this.buffers[1].data=new Float32Array(r),this.indexBuffer.data=new Uint16Array(i),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(Hs),qa=function(t){function e(e,r,i){void 0===e&&(e=200),void 0===i&&(i=0);var n=t.call(this,new Float32Array(4*r.length),new Float32Array(4*r.length),new Uint16Array(6*(r.length-1)))||this;return n.points=r,n._width=e,n.textureScale=i,n.build(),n}return Va(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),e.prototype.build=function(){var t=this.points;if(t){var e=this.getBuffer("aVertexPosition"),r=this.getBuffer("aTextureCoord"),i=this.getIndex();if(!(t.length<1)){e.data.length/4!==t.length&&(e.data=new Float32Array(4*t.length),r.data=new Float32Array(4*t.length),i.data=new Uint16Array(6*(t.length-1)));var n=r.data,o=i.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;for(var s=0,a=t[0],h=this._width*this.textureScale,u=t.length,l=0;l<u;l++){var c=4*l;if(this.textureScale>0){var d=a.x-t[l].x,p=a.y-t[l].y,f=Math.sqrt(d*d+p*p);a=t[l],s+=f/h}else s=l/(u-1);n[c]=s,n[c+1]=0,n[c+2]=s,n[c+3]=1}var m=0;for(l=0;l<u-1;l++){c=2*l;o[m++]=c,o[m++]=c+1,o[m++]=c+2,o[m++]=c+2,o[m++]=c+1,o[m++]=c+3}r.update(),i.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var t=this.points;if(!(t.length<1)){for(var e,r=t[0],i=0,n=0,o=this.buffers[0].data,s=t.length,a=0;a<s;a++){var h=t[a],u=4*a;n=-((e=a<t.length-1?t[a+1]:h).x-r.x),i=e.y-r.y;var l=Math.sqrt(i*i+n*n),c=this.textureScale>0?this.textureScale*this._width/2:this._width/2;i/=l,n/=l,i*=c,n*=c,o[u]=h.x+i,o[u+1]=h.y+n,o[u+2]=h.x-i,o[u+3]=h.y-n,r=h}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Hs),Ka=function(e){function r(r,i,n){void 0===n&&(n=0);var o=this,s=new qa(r.height,i,n),a=new js(r);return n>0&&(r.baseTexture.wrapMode=t.WRAP_MODES.REPEAT),(o=e.call(this,s,a)||this).autoUpdate=!0,o}return Va(r,e),r.prototype._render=function(t){var r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),e.prototype._render.call(this,t)},r}(Us),Za=function(t){function e(e,r,i){var n=this,o=new Wa(e.width,e.height,r,i),s=new js(Lr.WHITE);return(n=t.call(this,o,s)||this).texture=e,n}return Va(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e.prototype.destroy=function(e){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,e)},e}(Us),Ja=function(t){function e(e,r,i,n,o){void 0===e&&(e=Lr.EMPTY);var s=this,a=new Hs(r,i,n);a.getBuffer("aVertexPosition").static=!1;var h=new js(e);return(s=t.call(this,a,h,null,o)||this).autoUpdate=!0,s}return Va(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(Us),Qa=10,$a=function(t){function e(e,r,i,n,o){void 0===r&&(r=Qa),void 0===i&&(i=Qa),void 0===n&&(n=Qa),void 0===o&&(o=Qa);var s=t.call(this,Lr.WHITE,4,4)||this;return s._origWidth=e.orig.width,s._origHeight=e.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=r,s._rightWidth=n,s._topHeight=i,s._bottomHeight=o,s.texture=e,s}return Va(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,r=this._topHeight+this._bottomHeight,i=this._height>r?1:this._height/r;return Math.min(e,i)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(Za),th=function(t,e){return(th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var eh=function(e){function r(t,r){void 0===r&&(r=!0);var i=e.call(this,t[0]instanceof Lr?t[0]:t[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=r,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=t,i}return function(t,e){function r(){this.constructor=t}th(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),r.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1))},r.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Qe.shared.add(this.update,this,t.UPDATE_PRIORITY.HIGH),this._isConnectedToTicker=!0))},r.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},r.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},r.prototype.update=function(t){if(this._playing){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&this.onLoop()),this.updateTexture())}},r.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},r.prototype.destroy=function(t){this.stop(),e.prototype.destroy.call(this,t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},r.fromFrames=function(t){for(var e=[],i=0;i<t.length;++i)e.push(Lr.from(t[i]));return new r(e)},r.fromImages=function(t){for(var e=[],i=0;i<t.length;++i)e.push(Lr.from(t[i]));return new r(e)},Object.defineProperty(r.prototype,"totalFrames",{get:function(){return this._textures.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textures",{get:function(){return this._textures},set:function(t){if(t[0]instanceof Lr)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentFrame",{get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"playing",{get:function(){return this._playing},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Qe.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),r}(Ko),rh=function(t,e){return(rh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function ih(t,e){function r(){this.constructor=t}rh(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var nh="5.0.0";mn.registerPlugin("accessibility",Ze),mn.registerPlugin("extract",Cn),mn.registerPlugin("interaction",hr),mn.registerPlugin("particle",po),mn.registerPlugin("prepare",xs),mn.registerPlugin("batch",An),mn.registerPlugin("tilingSprite",Cs),ro.registerPlugin(ea),ro.registerPlugin(Ts),On.registerPlugin($e),On.registerPlugin(io);var oh={AlphaFilter:na,BlurFilter:Aa,BlurFilterPass:Ia,ColorMatrixFilter:Da,DisplacementFilter:Na,FXAAFilter:ka,NoiseFilter:Ha},sh=function(t,e){return(sh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var ah=function(){function e(t){this.renderer=t,this._foundShapes=[]}return e.prototype.pushMask=function(t){var e=this.renderer,r=t.maskObject||t;e.context.save();var i=this._foundShapes;if(this.recursiveFindShapes(r,i),i.length>0){var n=e.context;n.beginPath();for(var o=0;o<i.length;o++){var s=i[o],a=s.transform.worldTransform;this.renderer.setContextTransform(a),this.renderGraphicsShape(s)}i.length=0,n.clip()}},e.prototype.recursiveFindShapes=function(t,e){t.geometry&&t.geometry.graphicsData&&e.push(t);var r=t.children;if(r)for(var i=0;i<r.length;i++)this.recursiveFindShapes(r[i],e)},e.prototype.renderGraphicsShape=function(e){e.finishPoly();var r=this.renderer.context,i=e.geometry.graphicsData,n=i.length;if(0!==n)for(var o=0;o<n;o++){var s=i[o].shape;if(s.type===t.SHAPES.POLY){var a=s.points;r.moveTo(a[0],a[1]);for(var h=1;h<a.length/2;h++)r.lineTo(a[2*h],a[2*h+1]);a[0]===a[a.length-2]&&a[1]===a[a.length-1]&&r.closePath()}else if(s.type===t.SHAPES.RECT)r.rect(s.x,s.y,s.width,s.height),r.closePath();else if(s.type===t.SHAPES.CIRC)r.arc(s.x,s.y,s.radius,0,2*Math.PI),r.closePath();else if(s.type===t.SHAPES.ELIP){var u=2*s.width,l=2*s.height,c=s.x-u/2,d=s.y-l/2,p=u/2*.5522848,f=l/2*.5522848,m=c+u,v=d+l,g=c+u/2,y=d+l/2;r.moveTo(c,y),r.bezierCurveTo(c,y-f,g-p,d,g,d),r.bezierCurveTo(g+p,d,m,y-f,m,y),r.bezierCurveTo(m,y+f,g+p,v,g,v),r.bezierCurveTo(g-p,v,c,y+f,c,y),r.closePath()}else if(s.type===t.SHAPES.RREC){var _=s.x,x=s.y,b=s.width,E=s.height,T=s.radius,S=Math.min(b,E)/2|0;T=T>S?S:T,r.moveTo(_,x+T),r.lineTo(_,x+E-T),r.quadraticCurveTo(_,x+E,_+T,x+E),r.lineTo(_+b-T,x+E),r.quadraticCurveTo(_+b,x+E,_+b,x+E-T),r.lineTo(_+b,x+T),r.quadraticCurveTo(_+b,x,_+b-T,x),r.lineTo(_+T,x),r.quadraticCurveTo(_,x,_,x+T),r.closePath()}}},e.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},e.prototype.destroy=function(){},e}();function hh(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e}function uh(){if("undefined"==typeof document)return!1;var t=hh("#ff00ff"),e=hh("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var i=r.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var n=i.getImageData(2,0,1,1);if(!n)return!1;var o=n.data;return 255===o[0]&&0===o[1]&&0===o[2]}var lh=new Ie,ch=function(e){function r(i){var n,o=e.call(this,t.RENDERER_TYPE.CANVAS,i)||this;if(o.rootContext=o.view.getContext("2d",{alpha:o.transparent}),o.context=o.rootContext,o.refresh=!0,o.maskManager=new ah(o),o.smoothProperty="imageSmoothingEnabled",!o.rootContext.imageSmoothingEnabled){var s=o.rootContext;s.webkitImageSmoothingEnabled?o.smoothProperty="webkitImageSmoothingEnabled":s.mozImageSmoothingEnabled?o.smoothProperty="mozImageSmoothingEnabled":s.oImageSmoothingEnabled?o.smoothProperty="oImageSmoothingEnabled":s.msImageSmoothingEnabled&&(o.smoothProperty="msImageSmoothingEnabled")}return o.initPlugins(r.__plugins),o.blendModes=(void 0===n&&(n=[]),uh()?(n[t.BLEND_MODES.NORMAL]="source-over",n[t.BLEND_MODES.ADD]="lighter",n[t.BLEND_MODES.MULTIPLY]="multiply",n[t.BLEND_MODES.SCREEN]="screen",n[t.BLEND_MODES.OVERLAY]="overlay",n[t.BLEND_MODES.DARKEN]="darken",n[t.BLEND_MODES.LIGHTEN]="lighten",n[t.BLEND_MODES.COLOR_DODGE]="color-dodge",n[t.BLEND_MODES.COLOR_BURN]="color-burn",n[t.BLEND_MODES.HARD_LIGHT]="hard-light",n[t.BLEND_MODES.SOFT_LIGHT]="soft-light",n[t.BLEND_MODES.DIFFERENCE]="difference",n[t.BLEND_MODES.EXCLUSION]="exclusion",n[t.BLEND_MODES.HUE]="hue",n[t.BLEND_MODES.SATURATION]="saturate",n[t.BLEND_MODES.COLOR]="color",n[t.BLEND_MODES.LUMINOSITY]="luminosity"):(n[t.BLEND_MODES.NORMAL]="source-over",n[t.BLEND_MODES.ADD]="lighter",n[t.BLEND_MODES.MULTIPLY]="source-over",n[t.BLEND_MODES.SCREEN]="source-over",n[t.BLEND_MODES.OVERLAY]="source-over",n[t.BLEND_MODES.DARKEN]="source-over",n[t.BLEND_MODES.LIGHTEN]="source-over",n[t.BLEND_MODES.COLOR_DODGE]="source-over",n[t.BLEND_MODES.COLOR_BURN]="source-over",n[t.BLEND_MODES.HARD_LIGHT]="source-over",n[t.BLEND_MODES.SOFT_LIGHT]="source-over",n[t.BLEND_MODES.DIFFERENCE]="source-over",n[t.BLEND_MODES.EXCLUSION]="source-over",n[t.BLEND_MODES.HUE]="source-over",n[t.BLEND_MODES.SATURATION]="source-over",n[t.BLEND_MODES.COLOR]="source-over",n[t.BLEND_MODES.LUMINOSITY]="source-over"),n[t.BLEND_MODES.NORMAL_NPM]=n[t.BLEND_MODES.NORMAL],n[t.BLEND_MODES.ADD_NPM]=n[t.BLEND_MODES.ADD],n[t.BLEND_MODES.SCREEN_NPM]=n[t.BLEND_MODES.SCREEN],n[t.BLEND_MODES.SRC_IN]="source-in",n[t.BLEND_MODES.SRC_OUT]="source-out",n[t.BLEND_MODES.SRC_ATOP]="source-atop",n[t.BLEND_MODES.DST_OVER]="destination-over",n[t.BLEND_MODES.DST_IN]="destination-in",n[t.BLEND_MODES.DST_OUT]="destination-out",n[t.BLEND_MODES.DST_ATOP]="destination-atop",n[t.BLEND_MODES.XOR]="xor",n[t.BLEND_MODES.SUBTRACT]="source-over",n),o._activeBlendMode=null,o._outerBlend=!1,o._projTransform=null,o.renderingToScreen=!1,Bt("Canvas"),o.resize(o.options.width,o.options.height),o}return function(t,e){function r(){this.constructor=t}sh(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),r.prototype.render=function(e,r,i,n,o){if(this.view){this.renderingToScreen=!r,this.emit("prerender");var s=this.resolution;r?((r=r.castToBaseTexture())._canvasRenderTarget||(r._canvasRenderTarget=new ue(r.width,r.height,r.resolution),r.resource=new Ir.CanvasResource(r._canvasRenderTarget.canvas),r.valid=!0),this.context=r._canvasRenderTarget.context,this.resolution=r._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(this._projTransform=n||null,r||(this._lastObjectRendered=e),!o){var h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}if(a.save(),a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,this._activeBlendMode=t.BLEND_MODES.NORMAL,this._outerBlend=!1,a.globalCompositeOperation=this.blendModes[t.BLEND_MODES.NORMAL],void 0!==i?i:this.clearBeforeRender)if(this.renderingToScreen)this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height));else{(r=r)._canvasRenderTarget.clear();var u=r.clearColor;u[3]>0&&(a.fillStyle=Xt(Ht(u)),a.fillRect(0,0,r.realWidth,r.realHeight))}var l=this.context;this.context=a,e.renderCanvas(this),this.context=l,a.restore(),this.resolution=s,this._projTransform=null,this.emit("postrender")}},r.prototype.setContextTransform=function(t,e,r){var i=t,n=this._projTransform,o=this.resolution;r=r||o,n&&((i=lh).copyFrom(t),i.prepend(n)),e?this.context.setTransform(i.a*r,i.b*r,i.c*r,i.d*r,i.tx*o|0,i.ty*o|0):this.context.setTransform(i.a*r,i.b*r,i.c*r,i.d*r,i.tx*o,i.ty*o)},r.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},r.prototype.setBlendMode=function(e,r){var i=e===t.BLEND_MODES.SRC_IN||e===t.BLEND_MODES.SRC_OUT||e===t.BLEND_MODES.DST_IN||e===t.BLEND_MODES.DST_ATOP;!r&&i&&(e=t.BLEND_MODES.NORMAL),this._activeBlendMode!==e&&(this._activeBlendMode=e,this._outerBlend=i,this.context.globalCompositeOperation=this.blendModes[e])},r.prototype.destroy=function(t){e.prototype.destroy.call(this,t),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},r.prototype.resize=function(r,i){e.prototype.resize.call(this,r,i),this.smoothProperty&&(this.rootContext[this.smoothProperty]=D.SCALE_MODE===t.SCALE_MODES.LINEAR)},r.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},r.registerPlugin=function(t,e){r.__plugins=r.__plugins||{},r.__plugins[t]=e},r}(fn),dh={canvas:null,getTintedCanvas:function(t,e){var r=t.texture,i="#"+("00000"+(0|(e=dh.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var n,o=r.tintCache[i];if(o){if(o.tintId===r._updateID)return r.tintCache[i];n=r.tintCache[i]}else n=document.createElement("canvas");if(dh.tintMethod(r,e,n),n.tintId=r._updateID,dh.convertTintToImage){var s=new Image;s.src=n.toDataURL(),r.tintCache[i]=s}else r.tintCache[i]=n;return n},getTintedPattern:function(t,e){var r="#"+("00000"+(0|(e=dh.roundColor(e))).toString(16)).substr(-6);t.patternCache=t.patternCache||{};var i=t.patternCache[r];return i&&i.tintId===t._updateID?i:(dh.canvas||(dh.canvas=document.createElement("canvas")),dh.tintMethod(t,e,dh.canvas),(i=dh.canvas.getContext("2d").createPattern(dh.canvas,"repeat")).tintId=t._updateID,t.patternCache[r]=i,i)},tintWithMultiply:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply";var s=t.baseTexture.getDrawableSource();i.drawImage(s,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(s,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithOverlay:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.getDrawableSource(),n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithPerPixel:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.getDrawableSource(),n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore();for(var s=kt(e),a=s[0],h=s[1],u=s[2],l=i.getImageData(0,0,n.width,n.height),c=l.data,d=0;d<c.length;d+=4)c[d+0]*=a,c[d+1]*=h,c[d+2]*=u;i.putImageData(l,0,0)},roundColor:function(t){var e=dh.cacheStepsPerColorChannel,r=kt(t);return r[0]=Math.min(255,r[0]/e*e),r[1]=Math.min(255,r[1]/e*e),r[2]=Math.min(255,r[2]/e*e),Ht(r)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:uh(),tintMethod:null};dh.tintMethod=dh.canUseMultiply?dh.tintWithMultiply:dh.tintWithPerPixel;var ph=mn.create;mn.create=function(t){if(!(t&&t.forceCanvas))try{return ph(t)}catch(t){}return new ch(t)},gr.prototype.getDrawableSource=function(){var t=this.resource;return t?t.bitmap||t.source:null},Dr.prototype._canvasRenderTarget=null,Lr.prototype.patternCache=null,Lr.prototype.tintCache=null;var fh=function(){function e(t){this.renderer=t}return e.prototype.render=function(e){var r=this.renderer,i=e.worldTransform;r.context.globalAlpha=e.worldAlpha,r.setBlendMode(e.blendMode),r.setContextTransform(i,e.roundPixels),e.drawMode!==t.DRAW_MODES.TRIANGLES?this._renderTriangleMesh(e):this._renderTriangles(e)},e.prototype._renderTriangleMesh=function(t){for(var e=t.geometry.buffers[0].data.length,r=0;r<e-2;r++){var i=2*r;this._renderDrawTriangle(t,i,i+2,i+4)}},e.prototype._renderTriangles=function(t){for(var e=t.geometry.getIndex().data,r=e.length,i=0;i<r;i+=3){var n=2*e[i],o=2*e[i+1],s=2*e[i+2];this._renderDrawTriangle(t,n,o,s)}},e.prototype._renderDrawTriangle=function(t,e,r,i){var n=this.renderer.context,o=t.geometry.buffers[0].data,s=t.uvs,a=t.texture;if(a.valid){var h=16777215!==t.tint,u=a.baseTexture,l=u.width,c=u.height;h&&t._cachedTint!==t.tint&&(t._cachedTint=t.tint,t._tintedCanvas=dh.getTintedCanvas(t,t.tint));var d=h?t._tintedCanvas:u.getDrawableSource(),p=s[e]*u.width,f=s[r]*u.width,m=s[i]*u.width,v=s[e+1]*u.height,g=s[r+1]*u.height,y=s[i+1]*u.height,_=o[e],x=o[r],b=o[i],E=o[e+1],T=o[r+1],S=o[i+1],w=t.canvasPadding/this.renderer.resolution;if(w>0){var P=w/Math.abs(t.worldTransform.a),I=w/Math.abs(t.worldTransform.d),A=(_+x+b)/3,O=(E+T+S)/3,M=_-A,D=E-O,C=Math.sqrt(M*M+D*D);_=A+M/C*(C+P),E=O+D/C*(C+I),D=T-O,x=A+(M=x-A)/(C=Math.sqrt(M*M+D*D))*(C+P),T=O+D/C*(C+I),D=S-O,b=A+(M=b-A)/(C=Math.sqrt(M*M+D*D))*(C+P),S=O+D/C*(C+I)}n.save(),n.beginPath(),n.moveTo(_,E),n.lineTo(x,T),n.lineTo(b,S),n.closePath(),n.clip();var R=p*g+v*m+f*y-g*m-v*f-p*y,L=_*g+v*b+x*y-g*b-v*x-_*y,N=p*x+_*m+f*b-x*m-_*f-p*b,F=p*g*b+v*x*m+_*f*y-_*g*m-v*f*b-p*x*y,B=E*g+v*S+T*y-g*S-v*T-E*y,U=p*T+E*m+f*S-T*m-E*f-p*S,k=p*g*S+v*T*m+E*f*y-E*g*m-v*f*S-p*T*y;n.transform(L/R,B/R,N/R,U/R,F/R,k/R),n.drawImage(d,0,0,l*u.resolution,c*u.resolution,0,0,l,c),n.restore(),this.renderer.invalidateBlendMode()}},e.prototype.renderMeshFlat=function(t){var e=this.renderer.context,r=t.geometry.getBuffer("aVertexPosition").data,i=r.length/2;e.beginPath();for(var n=1;n<i-2;++n){var o=2*n,s=r[o],a=r[o+1],h=r[o+2],u=r[o+3],l=r[o+4],c=r[o+5];e.moveTo(s,a),e.lineTo(h,u),e.lineTo(l,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},e.prototype.destroy=function(){this.renderer=null},e}();D.MESH_CANVAS_PADDING=0,js.prototype._renderCanvas=function(t,e){t.plugins.mesh.render(e)},$a.prototype._cachedTint=16777215,$a.prototype._tintedCanvas=null,$a.prototype._canvasUvs=null,$a.prototype._renderCanvas=function(t){var e=t.context,r=this.worldTransform,i=16777215!==this.tint,n=this.texture;if(n.valid){i&&this._cachedTint!==this.tint&&(this._cachedTint=this.tint,this._tintedCanvas=dh.getTintedCanvas(this,this.tint));var o=i?this._tintedCanvas:n.baseTexture.getDrawableSource();this._canvasUvs||(this._canvasUvs=[0,0,0,0,0,0,0,0]);var s=this.vertices,a=this._canvasUvs,h=i?0:n.frame.x,u=i?0:n.frame.y,l=h+n.frame.width,c=u+n.frame.height;a[0]=h,a[1]=h+this._leftWidth,a[2]=l-this._rightWidth,a[3]=l,a[4]=u,a[5]=u+this._topHeight,a[6]=c-this._bottomHeight,a[7]=c;for(var d=0;d<8;d++)a[d]*=n.baseTexture.resolution;e.globalAlpha=this.worldAlpha,t.setBlendMode(this.blendMode),t.setContextTransform(r,this.roundPixels);for(var p=0;p<3;p++)for(var f=0;f<3;f++){var m=2*f+8*p,v=Math.max(1,a[f+1]-a[f]),g=Math.max(1,a[p+5]-a[p+4]),y=Math.max(1,s[m+10]-s[m]),_=Math.max(1,s[m+11]-s[m+1]);e.drawImage(o,a[f],a[p+4],v,g,s[m],s[m+1],y,_)}}};var mh=!1;Us.prototype._cachedTint=16777215,Us.prototype._tintedCanvas=null,Us.prototype._renderCanvas=function(t){this.shader.uvMatrix&&(this.shader.uvMatrix.update(),this.calculateUvs()),this.material._renderCanvas?this.material._renderCanvas(t,this):mh||(mh=!0,window.console&&console.warn("Mesh with custom shaders are not supported in CanvasRenderer."))},Us.prototype._canvasPadding=null,Object.defineProperty(Us.prototype,"canvasPadding",{get:function(){return null!==this._canvasPadding?this._canvasPadding:D.MESH_CANVAS_PADDING},set:function(t){this._canvasPadding=t}}),Ja.prototype._renderCanvas=function(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),this.shader.update&&this.shader.update(),this.calculateUvs(),this.material._renderCanvas(t,this)},Ka.prototype._renderCanvas=function(t){(this.autoUpdate||this.geometry._width!==this.shader.texture.height)&&(this.geometry._width=this.shader.texture.height,this.geometry.update()),this.shader.update&&this.shader.update(),this.calculateUvs(),this.material._renderCanvas(t,this)};var vh,gh=function(){function e(t){this.renderer=t,this._svgMatrix=null,this._tempMatrix=new Ie}return e.prototype._calcCanvasStyle=function(t,e){var r;return t.texture&&t.texture.baseTexture!==Lr.WHITE.baseTexture?t.texture.valid?(r=dh.getTintedPattern(t.texture,e),this.setPatternTransform(r,t.matrix||Ie.IDENTITY)):r="#808080":r="#"+("00000"+(0|e).toString(16)).substr(-6),r},e.prototype.render=function(e){var r=this.renderer,i=r.context,n=e.worldAlpha,o=e.transform.worldTransform;r.setContextTransform(o),r.setBlendMode(e.blendMode);for(var s,a,h=e.geometry.graphicsData,u=(e.tint>>16&255)/255,l=(e.tint>>8&255)/255,c=(255&e.tint)/255,d=0;d<h.length;d++){var p=h[d],f=p.shape,m=p.fillStyle,v=p.lineStyle,g=0|p.fillStyle.color,y=0|p.lineStyle.color;if(p.matrix&&r.setContextTransform(o.copyTo(this._tempMatrix).append(p.matrix)),m.visible){var _=((g>>16&255)/255*u*255<<16)+((g>>8&255)/255*l*255<<8)+(255&g)/255*c*255;s=this._calcCanvasStyle(m,_)}if(v.visible){var x=((y>>16&255)/255*u*255<<16)+((y>>8&255)/255*l*255<<8)+(255&y)/255*c*255;a=this._calcCanvasStyle(v,x)}if(i.lineWidth=v.width,i.lineCap=v.cap,i.lineJoin=v.join,i.miterLimit=v.miterLimit,p.type===t.SHAPES.POLY){i.beginPath();var b=(O=f).points,E=p.holes,T=void 0,S=void 0,w=void 0,P=void 0;i.moveTo(b[0],b[1]);for(var I=2;I<b.length;I+=2)i.lineTo(b[I],b[I+1]);if(O.closeStroke&&i.closePath(),E.length>0){T=0,w=b[0],P=b[1];for(I=2;I+2<b.length;I+=2)T+=(b[I]-w)*(b[I+3]-P)-(b[I+2]-w)*(b[I+1]-P);for(var A=0;A<E.length;A++)if(b=E[A].shape.points){S=0,w=b[0],P=b[1];for(I=2;I+2<b.length;I+=2)S+=(b[I]-w)*(b[I+3]-P)-(b[I+2]-w)*(b[I+1]-P);if(S*T<0){i.moveTo(b[0],b[1]);for(I=2;I<b.length;I+=2)i.lineTo(b[I],b[I+1])}else{i.moveTo(b[b.length-2],b[b.length-1]);for(I=b.length-4;I>=0;I-=2)i.lineTo(b[I],b[I+1])}E[A].shape.closeStroke&&i.closePath()}}m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}else if(p.type===t.SHAPES.RECT){var O=f;m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fillRect(O.x,O.y,O.width,O.height)),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.strokeRect(O.x,O.y,O.width,O.height))}else if(p.type===t.SHAPES.CIRC){O=f;i.beginPath(),i.arc(O.x,O.y,O.radius,0,2*Math.PI),i.closePath(),m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}else if(p.type===t.SHAPES.ELIP){var M=2*(O=f).width,D=2*O.height,C=O.x-M/2,R=O.y-D/2;i.beginPath();var L=M/2*.5522848,N=D/2*.5522848,F=C+M,B=R+D,U=C+M/2,k=R+D/2;i.moveTo(C,k),i.bezierCurveTo(C,k-N,U-L,R,U,R),i.bezierCurveTo(U+L,R,F,k-N,F,k),i.bezierCurveTo(F,k+N,U+L,B,U,B),i.bezierCurveTo(U-L,B,C,k+N,C,k),i.closePath(),m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}else if(p.type===t.SHAPES.RREC){var X=(O=f).x,j=O.y,H=O.width,G=O.height,Y=O.radius,z=Math.min(H,G)/2|0;Y=Y>z?z:Y,i.beginPath(),i.moveTo(X,j+Y),i.lineTo(X,j+G-Y),i.quadraticCurveTo(X,j+G,X+Y,j+G),i.lineTo(X+H-Y,j+G),i.quadraticCurveTo(X+H,j+G,X+H,j+G-Y),i.lineTo(X+H,j+Y),i.quadraticCurveTo(X+H,j,X+H-Y,j),i.lineTo(X+Y,j),i.quadraticCurveTo(X,j,X,j+Y),i.closePath(),m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}}},e.prototype.setPatternTransform=function(t,e){if(!1!==this._svgMatrix){if(!this._svgMatrix){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r&&r.createSVGMatrix&&(this._svgMatrix=r.createSVGMatrix()),!this._svgMatrix||!t.setTransform)return void(this._svgMatrix=!1)}this._svgMatrix.a=e.a,this._svgMatrix.b=e.b,this._svgMatrix.c=e.c,this._svgMatrix.d=e.d,this._svgMatrix.e=e.tx,this._svgMatrix.f=e.ty,t.setTransform(this._svgMatrix.inverse())}},e.prototype.destroy=function(){this.renderer=null,this._svgMatrix=null,this._tempMatrix=null},e}(),yh=new Ie;Yo.prototype.generateCanvasTexture=function(t,e){void 0===e&&(e=1);var r=this.getLocalBounds(),i=Fr.create({width:r.width,height:r.height,scaleMode:t,resolution:e});vh||(vh=new ch),this.transform.updateLocalTransform(),this.transform.localTransform.copyTo(yh),yh.invert(),yh.tx-=r.x,yh.ty-=r.y,vh.render(this,i,!0,yh);var n=Lr.from(i.baseTexture._canvasRenderTarget.canvas,{scaleMode:t});return n.baseTexture.setResolution(e),n},Yo.prototype.cachedGraphicsData=[],Yo.prototype._renderCanvas=function(t){!0!==this.isMask&&(this.finishPoly(),t.plugins.graphics.render(this))};var _h=new Ie,xh=function(){function e(t){this.renderer=t}return e.prototype.render=function(e){var r=e._texture,i=this.renderer,n=i.context,o=r._frame.width,s=r._frame.height,a=e.transform.worldTransform,h=0,u=0,l=r.baseTexture.getDrawableSource();if(!(r.orig.width<=0||r.orig.height<=0)&&r.valid&&l&&r.valid){i.setBlendMode(e.blendMode,!0),i.context.globalAlpha=e.worldAlpha;var c=r.baseTexture.scaleMode===t.SCALE_MODES.LINEAR;i.smoothProperty&&i.context[i.smoothProperty]!==c&&(n[i.smoothProperty]=c),r.trim?(h=r.trim.width/2+r.trim.x-e.anchor.x*r.orig.width,u=r.trim.height/2+r.trim.y-e.anchor.y*r.orig.height):(h=(.5-e.anchor.x)*r.orig.width,u=(.5-e.anchor.y)*r.orig.height),r.rotate&&(a.copyTo(_h),a=_h,Ne.matrixAppendRotationInv(a,r.rotate,h,u),h=0,u=0),h-=o/2,u-=s/2,i.setContextTransform(a,e.roundPixels,1),e.roundPixels&&(h|=0,u|=0);var d=r.baseTexture.resolution,p=i._outerBlend;p&&(n.save(),n.beginPath(),n.rect(h*i.resolution,u*i.resolution,o*i.resolution,s*i.resolution),n.clip()),16777215!==e.tint?(e._cachedTint===e.tint&&e._tintedCanvas.tintId===e._texture._updateID||(e._cachedTint=e.tint,e._tintedCanvas=dh.getTintedCanvas(e,e.tint)),n.drawImage(e._tintedCanvas,0,0,Math.floor(o*d),Math.floor(s*d),Math.floor(h*i.resolution),Math.floor(u*i.resolution),Math.floor(o*i.resolution),Math.floor(s*i.resolution))):n.drawImage(l,r._frame.x*d,r._frame.y*d,Math.floor(o*d),Math.floor(s*d),Math.floor(h*i.resolution),Math.floor(u*i.resolution),Math.floor(o*i.resolution),Math.floor(s*i.resolution)),p&&n.restore(),i.setBlendMode(t.BLEND_MODES.NORMAL)}},e.prototype.destroy=function(){this.renderer=null},e}();Ko.prototype._tintedCanvas=null,Ko.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)};var bh=new xe,Eh=function(){function t(t){this.renderer=t}return t.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},t.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},t.prototype.canvas=function(t){var e,r,i,n,o=this.renderer;t&&(n=t instanceof Fr?t:o.generateTexture(t)),n?(e=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,i=n.frame):(e=o.rootContext,r=o.resolution,(i=bh).width=this.renderer.width,i.height=this.renderer.height);var s=Math.floor(i.width*r+1e-4),a=Math.floor(i.height*r+1e-4),h=new ue(s,a,1),u=e.getImageData(i.x*r,i.y*r,s,a);return h.context.putImageData(u,0,0),h.canvas},t.prototype.pixels=function(t){var e,r,i,n,o=this.renderer;return t&&(n=t instanceof Fr?t:o.generateTexture(t)),n?(e=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,i=n.frame):(e=o.rootContext,(i=bh).width=o.width,i.height=o.height),e.getImageData(0,0,i.width*r,i.height*r).data},t.prototype.destroy=function(){this.renderer=null},t}();Object.defineProperty(ch.prototype,"extract",{get:function(){return oe("v5.3.0","CanvasRenderer#extract is deprecated, use CanvasRenderer#plugins.extract"),this.plugins.extract}});var Th=function(t,e){return(Th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Sh=16;function wh(t,e){var r=t;if(e instanceof gr){var i=e.source,n=0===i.width?r.canvas.width:Math.min(r.canvas.width,i.width),o=0===i.height?r.canvas.height:Math.min(r.canvas.height,i.height);return r.ctx.drawImage(i,0,0,n,o,0,0,r.canvas.width,r.canvas.height),!0}return!1}var Ph=function(t){function e(e){var r=t.call(this,e)||this;return r.uploadHookHelper=r,r.canvas=document.createElement("canvas"),r.canvas.width=Sh,r.canvas.height=Sh,r.ctx=r.canvas.getContext("2d"),r.registerUploadHook(wh),r}return function(t,e){function r(){this.constructor=t}Th(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(vs);return Is.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.valid){var r=t.context,i=this.worldTransform,n=e.baseTexture,o=n.getDrawableSource(),s=n.resolution,a=this.tilePosition.x/this.tileScale.x%e._frame.width*s,h=this.tilePosition.y/this.tileScale.y%e._frame.height*s;if(this._textureID!==this._texture._updateID||this._cachedTint!==this.tint){this._textureID=this._texture._updateID;var u=new ue(e._frame.width,e._frame.height,s);16777215!==this.tint?(this._tintedCanvas=dh.getTintedCanvas(this,this.tint),u.context.drawImage(this._tintedCanvas,0,0)):u.context.drawImage(o,-e._frame.x*s,-e._frame.y*s),this._cachedTint=this.tint,this._canvasPattern=u.context.createPattern(u.canvas,"repeat")}r.globalAlpha=this.worldAlpha,t.setBlendMode(this.blendMode),t.setContextTransform(i),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/s,this.tileScale.y/s);var l=this.anchor.x*-this._width,c=this.anchor.y*-this._height;this.uvRespectAnchor?(r.translate(a,h),r.fillRect(-a+l,-h+c,this._width/this.tileScale.x*s,this._height/this.tileScale.y*s)):(r.translate(a+l,h+c),r.fillRect(-a,-h,this._width/this.tileScale.x*s,this._height/this.tileScale.y*s))}},ho.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,i=!0,n=0,o=0,s=0,a=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var h=0;h<this.children.length;++h){var u=this.children[h];if(u.visible&&u._texture.valid){var l=u._texture.frame;if(e.globalAlpha=this.worldAlpha*u.alpha,u.rotation%(2*Math.PI)==0)i&&(t.setContextTransform(r,!1,1),i=!1),n=u.anchor.x*(-l.width*u.scale.x)+u.position.x+.5,o=u.anchor.y*(-l.height*u.scale.y)+u.position.y+.5,s=l.width*u.scale.x,a=l.height*u.scale.y;else{i||(i=!0),u.displayObjectUpdateTransform();var c=u.worldTransform;t.setContextTransform(c,this.roundPixels,1),n=u.anchor.x*-l.width+.5,o=u.anchor.y*-l.height+.5,s=l.width,a=l.height}var d=u._texture.baseTexture.resolution;e.drawImage(u._texture.baseTexture.getDrawableSource(),l.x*d,l.y*d,l.width*d,l.height*d,n*t.resolution,o*t.resolution,s*t.resolution,a*t.resolution)}}}},Ge.prototype._renderCanvas=function(t){},Ge.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},Xe.prototype.renderCanvas=function(t){},ss.prototype._renderCanvas=function(t){this._autoResolution&&this._resolution!==t.resolution&&(this._resolution=t.resolution,this.dirty=!0),this.updateText(!0),Ko.prototype._renderCanvas.call(this,t)},ch.registerPlugin("accessibility",Ze),ch.registerPlugin("extract",Eh),ch.registerPlugin("graphics",gh),ch.registerPlugin("interaction",hr),ch.registerPlugin("mesh",fh),ch.registerPlugin("prepare",Ph),ch.registerPlugin("sprite",xh),t.AbstractBatchRenderer=En,t.AbstractRenderer=fn,t.AccessibilityManager=Ze,t.AnimatedSprite=eh,t.AppLoaderPlugin=io,t.Application=On,t.Attribute=Ur,t.BasePrepare=vs,t.BaseRenderTexture=Dr,t.BaseTexture=gr,t.BatchDrawCall=_n,t.BatchGeometry=Sn,t.BatchPluginFactory=In,t.BatchRenderer=An,t.BatchShaderGenerator=Tn,t.BatchTextureArray=xn,t.BitmapFont=Js,t.BitmapFontData=Ys,t.BitmapFontLoader=ea,t.BitmapText=ta,t.Bounds=Be,t.Buffer=Xr,t.CanvasExtract=Eh,t.CanvasGraphicsRenderer=gh,t.CanvasMeshRenderer=fh,t.CanvasPrepare=Ph,t.CanvasRenderer=ch,t.CanvasSpriteRenderer=xh,t.Circle=be,t.Container=Ge,t.CountLimiter=hs,t.DEG_TO_RAD=_e,t.DisplayObject=Xe,t.Ellipse=Ee,t.Extract=Cn,t.FillStyle=mo,t.Filter=Fi,t.FilterState=Jr,t.Framebuffer=Mr,t.GLFramebuffer=ii,t.GLProgram=Qi,t.GLTexture=ln,t.GRAPHICS_CURVES=fo,t.Geometry=Vr,t.Graphics=Yo,t.GraphicsData=Bo,t.GraphicsGeometry=Xo,t.IGLUniformData=Ji,t.InteractionData=tr,t.InteractionEvent=rr,t.InteractionManager=hr,t.InteractionTrackingData=ir,t.LineStyle=jo,t.Loader=ro,t.LoaderResource=$n,t.MaskData=ui,t.Matrix=Ie,t.Mesh=Us,t.MeshBatchUvs=Ns,t.MeshGeometry=Hs,t.MeshMaterial=js,t.NineSlicePlane=$a,t.ObjectRenderer=$r,t.ObservablePoint=Pe,t.PI_2=ge,t.ParticleContainer=ho,t.ParticleRenderer=po,t.PlaneGeometry=Wa,t.Point=we,t.Polygon=Te,t.Prepare=xs,t.Program=Ri,t.Quad=Wr,t.QuadUv=qr,t.RAD_TO_DEG=ye,t.Rectangle=xe,t.RenderTexture=Fr,t.RenderTexturePool=Br,t.Renderer=mn,t.RopeGeometry=qa,t.RoundedRectangle=Se,t.Runner=ur,t.Shader=Li,t.SimpleMesh=Ja,t.SimplePlane=Za,t.SimpleRope=Ka,t.Sprite=Ko,t.SpriteMaskFilter=ji,t.Spritesheet=Es,t.SpritesheetLoader=Ts,t.State=Ni,t.System=Ar,t.TemporaryDisplayObject=je,t.Text=ss,t.TextMetrics=is,t.TextStyle=$o,t.Texture=Lr,t.TextureLoader=eo,t.TextureMatrix=Xi,t.TextureUvs=Cr,t.Ticker=Qe,t.TickerPlugin=$e,t.TilingSprite=Is,t.TilingSpriteRenderer=Cs,t.TimeLimiter=bs,t.Transform=Fe,t.UniformGroup=Zr,t.VERSION="5.3.12",t.ViewableBuffer=bn,t.accessibleTarget=Ye,t.autoDetectRenderer=vn,t.canvasUtils=dh,t.checkMaxIfStatementsInShader=Mi,t.defaultFilterVertex=yn,t.defaultVertex=gn,t.filters=oh,t.graphicsUtils=Fo,t.groupD8=Ne,t.interactiveTarget=or,t.isMobile=M,t.resources=Ir,t.settings=D,t.systems=dn,t.uniformParsers=Si,t.useDeprecated=function(){var t=this;Object.defineProperties(t,{SVG_SIZE:{get:function(){return oe(nh,"PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE"),t.SVGResource.SVG_SIZE}},TransformStatic:{get:function(){return oe(nh,"PIXI.TransformStatic class has been removed, use PIXI.Transform"),t.Transform}},TransformBase:{get:function(){return oe(nh,"PIXI.TransformBase class has been removed, use PIXI.Transform"),t.Transform}},TRANSFORM_MODE:{get:function(){return oe(nh,"PIXI.TRANSFORM_MODE property has been removed"),{STATIC:0,DYNAMIC:1}}},WebGLRenderer:{get:function(){return oe(nh,"PIXI.WebGLRenderer class has moved to PIXI.Renderer"),t.Renderer}},CanvasRenderTarget:{get:function(){return oe(nh,"PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget"),t.utils.CanvasRenderTarget}},loader:{get:function(){return oe(nh,"PIXI.loader instance has moved to PIXI.Loader.shared"),t.Loader.shared}},FilterManager:{get:function(){return oe(nh,"PIXI.FilterManager class has moved to PIXI.systems.FilterSystem"),t.systems.FilterSystem}},CanvasTinter:{get:function(){return oe("5.2.0","PIXI.CanvasTinter namespace has moved to PIXI.canvasUtils"),t.canvasUtils}},GroupD8:{get:function(){return oe("5.2.0","PIXI.GroupD8 namespace has moved to PIXI.groupD8"),t.groupD8}}}),t.accessibility={},Object.defineProperties(t.accessibility,{AccessibilityManager:{get:function(){return oe("5.3.0","PIXI.accessibility.AccessibilityManager moved to PIXI.AccessibilityManager"),t.AccessibilityManager}}}),t.interaction={},Object.defineProperties(t.interaction,{InteractionManager:{get:function(){return oe("5.3.0","PIXI.interaction.InteractionManager moved to PIXI.InteractionManager"),t.InteractionManager}},InteractionData:{get:function(){return oe("5.3.0","PIXI.interaction.InteractionData moved to PIXI.InteractionData"),t.InteractionData}},InteractionEvent:{get:function(){return oe("5.3.0","PIXI.interaction.InteractionEvent moved to PIXI.InteractionEvent"),t.InteractionEvent}}}),t.prepare={},Object.defineProperties(t.prepare,{BasePrepare:{get:function(){return oe("5.2.1","PIXI.prepare.BasePrepare moved to PIXI.BasePrepare"),t.BasePrepare}},Prepare:{get:function(){return oe("5.2.1","PIXI.prepare.Prepare moved to PIXI.Prepare"),t.Prepare}},CanvasPrepare:{get:function(){return oe("5.2.1","PIXI.prepare.CanvasPrepare moved to PIXI.CanvasPrepare"),t.CanvasPrepare}}}),t.extract={},Object.defineProperties(t.extract,{Extract:{get:function(){return oe("5.2.1","PIXI.extract.Extract moved to PIXI.Extract"),t.Extract}},CanvasExtract:{get:function(){return oe("5.2.1","PIXI.extract.CanvasExtract moved to PIXI.CanvasExtract"),t.CanvasExtract}}}),t.extras={},Object.defineProperties(t.extras,{TilingSprite:{get:function(){return oe(nh,"PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite"),t.TilingSprite}},TilingSpriteRenderer:{get:function(){return oe(nh,"PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer"),t.TilingSpriteRenderer}},AnimatedSprite:{get:function(){return oe(nh,"PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite"),t.AnimatedSprite}},BitmapText:{get:function(){return oe(nh,"PIXI.extras.BitmapText class has moved to PIXI.BitmapText"),t.BitmapText}}}),t.TilingSprite.fromFrame=function(e,r,i){return oe("5.3.0","TilingSprite.fromFrame is deprecated, use TilingSprite.from"),t.TilingSprite.from(e,{width:r,height:i})},t.TilingSprite.fromImage=function(e,r,i,n){return void 0===n&&(n={}),oe("5.3.0","TilingSprite.fromImage is deprecated, use TilingSprite.from"),n&&"object"!=typeof n&&(n={scaleMode:arguments[4],resourceOptions:{crossorigin:arguments[3]}}),n.width=r,n.height=i,t.TilingSprite.from(e,n)},Object.defineProperties(t.utils,{getSvgSize:{get:function(){return oe(nh,"PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize"),t.resources.SVGResource.getSize}}}),t.mesh={},Object.defineProperties(t.mesh,{Mesh:{get:function(){return oe(nh,"PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh"),t.SimpleMesh}},NineSlicePlane:{get:function(){return oe(nh,"PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane"),t.NineSlicePlane}},Plane:{get:function(){return oe(nh,"PIXI.mesh.Plane class has moved to PIXI.SimplePlane"),t.SimplePlane}},Rope:{get:function(){return oe(nh,"PIXI.mesh.Rope class has moved to PIXI.SimpleRope"),t.SimpleRope}},RawMesh:{get:function(){return oe(nh,"PIXI.mesh.RawMesh class has moved to PIXI.Mesh"),t.Mesh}},CanvasMeshRenderer:{get:function(){return oe(nh,"PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer"),t.CanvasMeshRenderer}},MeshRenderer:{get:function(){return oe(nh,"PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer"),t.MeshRenderer}}}),t.particles={},Object.defineProperties(t.particles,{ParticleContainer:{get:function(){return oe(nh,"PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer"),t.ParticleContainer}},ParticleRenderer:{get:function(){return oe(nh,"PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer"),t.ParticleRenderer}}}),t.ticker={},Object.defineProperties(t.ticker,{Ticker:{get:function(){return oe(nh,"PIXI.ticker.Ticker class has moved to PIXI.Ticker"),t.Ticker}},shared:{get:function(){return oe(nh,"PIXI.ticker.shared instance has moved to PIXI.Ticker.shared"),t.Ticker.shared}}}),t.loaders={},Object.defineProperties(t.loaders,{Loader:{get:function(){return oe(nh,"PIXI.loaders.Loader class has moved to PIXI.Loader"),t.Loader}},Resource:{get:function(){return oe(nh,"PIXI.loaders.Resource class has moved to PIXI.LoaderResource"),t.LoaderResource}},bitmapFontParser:{get:function(){return oe(nh,"PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use"),t.BitmapFontLoader.use}},parseBitmapFontData:{get:function(){oe(nh,"PIXI.loaders.parseBitmapFontData function has removed")}},spritesheetParser:{get:function(){return oe(nh,"PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use"),t.SpritesheetLoader.use}},getResourcePath:{get:function(){return oe(nh,"PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath"),t.SpritesheetLoader.getResourcePath}}}),t.Loader.addPixiMiddleware=function(e){return oe(nh,"PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin"),t.loaders.Loader.registerPlugin({use:e()})};var e=function(t){return"on"+t.charAt(0).toUpperCase()+t.slice(1)};Object.assign(t.Loader.prototype,{on:function(t){var r=e(t);oe(nh,"PIXI.Loader#on is completely deprecated, use PIXI.Loader#"+r+".add")},once:function(t){var r=e(t);oe(nh,"PIXI.Loader#once is completely deprecated, use PIXI.Loader#"+r+".once")},off:function(t){var r=e(t);oe(nh,"PIXI.Loader#off is completely deprecated, use PIXI.Loader#"+r+".detach")}}),Object.defineProperty(t.extract,"WebGLExtract",{get:function(){return oe(nh,"PIXI.extract.WebGLExtract method has moved to PIXI.Extract"),t.Extract}}),Object.defineProperty(t.prepare,"WebGLPrepare",{get:function(){return oe(nh,"PIXI.prepare.WebGLPrepare class has moved to PIXI.Prepare"),t.Prepare}}),t.Container.prototype._renderWebGL=function(t){oe(nh,"PIXI.Container._renderWebGL method has moved to PIXI.Container._render"),this._render(t)},t.Container.prototype.renderWebGL=function(t){oe(nh,"PIXI.Container.renderWebGL method has moved to PIXI.Container.render"),this.render(t)},t.DisplayObject.prototype.renderWebGL=function(t){oe(nh,"PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render"),this.render(t)},t.Container.prototype.renderAdvancedWebGL=function(t){oe(nh,"PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced"),this.renderAdvanced(t)},Object.defineProperties(t.settings,{TRANSFORM_MODE:{get:function(){return oe(nh,"PIXI.settings.TRANSFORM_MODE property has been removed"),0},set:function(){oe(nh,"PIXI.settings.TRANSFORM_MODE property has been removed")}}});var r=t.BaseTexture;r.prototype.loadSource=function(e){oe(nh,"PIXI.BaseTexture.loadSource method has been deprecated");var r=t.resources.autoDetectResource(e);r.internal=!0,this.setResource(r),this.update()};var i=!1;Object.defineProperties(r.prototype,{hasLoaded:{get:function(){return oe(nh,"PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid"),this.valid}},imageUrl:{get:function(){var t;return oe(nh,"PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"),null===(t=this.resource)||void 0===t?void 0:t.url},set:function(t){oe(nh,"PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"),this.resource&&(this.resource.url=t)}},source:{get:function(){return oe(nh,"PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`"),this.resource.source},set:function(t){oe(nh,"PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture."),this.resource&&(this.resource.source=t)}},premultiplyAlpha:{get:function(){return oe("5.2.0","PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),0!==this.alphaMode},set:function(t){oe("5.2.0","PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),this.alphaMode=Number(t)}},_id:{get:function(){return i||(oe("5.2.0","PIXI.BaseTexture._id batch local field has been changed to `_batchLocation`"),i=!0),this._batchLocation},set:function(t){this._batchLocation=t}}}),r.fromImage=function(t,e,i,n){oe(nh,"PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from");var o={scale:n,crossorigin:e};return r.from(t,{scaleMode:i,resourceOptions:o})},r.fromCanvas=function(t,e){return oe(nh,"PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from"),r.from(t,{scaleMode:e})},r.fromSVG=function(t,e,i,n){oe(nh,"PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from");var o={scale:n,crossorigin:e};return r.from(t,{scaleMode:i,resourceOptions:o})},Object.defineProperties(t.resources.ImageResource.prototype,{premultiplyAlpha:{get:function(){return oe("5.2.0","PIXI.resources.ImageResource.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),0!==this.alphaMode},set:function(t){oe("5.2.0","PIXI.resources.ImageResource.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),this.alphaMode=Number(t)}}}),t.Point.prototype.copy=function(t){return oe(nh,"PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom"),this.copyFrom(t)},t.ObservablePoint.prototype.copy=function(t){return oe(nh,"PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom"),this.copyFrom(t)},t.Rectangle.prototype.copy=function(t){return oe(nh,"PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom"),this.copyFrom(t)},t.Matrix.prototype.copy=function(t){return oe(nh,"PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo"),this.copyTo(t)},t.systems.StateSystem.prototype.setState=function(t){return oe("v5.1.0","StateSystem.setState has been renamed to StateSystem.set"),this.set(t)},Object.assign(t.systems.FilterSystem.prototype,{getRenderTarget:function(t,e){return oe(nh,"PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture"),this.getFilterTexture(null,e)},returnRenderTarget:function(t){oe(nh,"PIXI.FilterManager.returnRenderTarget method has been replaced with PIXI.systems.FilterSystem.returnFilterTexture"),this.returnFilterTexture(t)},calculateScreenSpaceMatrix:function(t){oe(nh,"PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead");var e=t.identity(),r=this.activeState,i=r.sourceFrame,n=r.destinationFrame;return e.translate(i.x/n.width,i.y/n.height),e.scale(n.width,n.height),e},calculateNormalizedScreenSpaceMatrix:function(t){oe(nh,"PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.");var e=this.activeState,r=e.sourceFrame,i=e.destinationFrame,n=t.identity();n.translate(r.x/i.width,r.y/i.height);var o=i.width/r.width,s=i.height/r.height;return n.scale(o,s),n}}),Object.defineProperties(t.RenderTexture.prototype,{sourceFrame:{get:function(){return oe(nh,"PIXI.RenderTexture.sourceFrame property has been removed"),this.filterFrame}},size:{get:function(){return oe(nh,"PIXI.RenderTexture.size property has been removed"),this._frame}}});var n=function(t){function e(e,r,i,n){return oe(nh,"PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass"),t.call(this,!0,e,r,i,n)||this}return ih(e,t),e}(t.filters.BlurFilterPass),o=function(t){function e(e,r,i,n){return oe(nh,"PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass"),t.call(this,!1,e,r,i,n)||this}return ih(e,t),e}(t.filters.BlurFilterPass);Object.assign(t.filters,{BlurXFilter:n,BlurYFilter:o});var s=t.Sprite,a=t.Texture,h=t.Graphics;function u(t,e,r,i){return oe(nh,"PIXI.Sprite."+t+" method is deprecated, use PIXI.Sprite.from"),s.from(e,{resourceOptions:{scale:i,crossorigin:r}})}function l(t,e,r,i){return oe(nh,"PIXI.Texture."+t+" method is deprecated, use PIXI.Texture.from"),a.from(e,{resourceOptions:{scale:i,crossorigin:r}})}h.prototype.generateCanvasTexture||(h.prototype.generateCanvasTexture=function(){oe(nh,'PIXI.Graphics.generateCanvasTexture method is only available in "pixi.js-legacy"')}),Object.defineProperty(h.prototype,"graphicsData",{get:function(){return oe(nh,"PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData"),this.geometry.graphicsData}}),s.fromImage=u.bind(null,"fromImage"),s.fromSVG=u.bind(null,"fromSVG"),s.fromCanvas=u.bind(null,"fromCanvas"),s.fromVideo=u.bind(null,"fromVideo"),s.fromFrame=u.bind(null,"fromFrame"),a.fromImage=l.bind(null,"fromImage"),a.fromSVG=l.bind(null,"fromSVG"),a.fromCanvas=l.bind(null,"fromCanvas"),a.fromVideo=l.bind(null,"fromVideo"),a.fromFrame=l.bind(null,"fromFrame"),Object.defineProperty(t.AbstractRenderer.prototype,"autoResize",{get:function(){return oe(nh,"PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"),this.autoDensity},set:function(t){oe(nh,"PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"),this.autoDensity=t}}),Object.defineProperty(t.Renderer.prototype,"textureManager",{get:function(){return oe(nh,"PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture"),this.texture}}),t.utils.mixins={mixin:function(){oe(nh,"PIXI.utils.mixins.mixin function is no longer available")},delayMixin:function(){oe(nh,"PIXI.utils.mixins.delayMixin function is no longer available")},performMixins:function(){oe(nh,"PIXI.utils.mixins.performMixins function is no longer available")}},Object.defineProperty(t.BitmapText.prototype,"font",{get:function(){return oe("5.3.0","PIXI.BitmapText.font property is deprecated, use fontName, fontSize, tint or align properties"),{name:this._fontName,size:this._fontSize,tint:this._tint,align:this._align}},set:function(e){if(oe("5.3.0","PIXI.BitmapText.font property is deprecated, use fontName, fontSize, tint or align properties"),e){var r={font:e};this._upgradeStyle(r),r.fontSize=r.fontSize||t.BitmapFont.available[r.fontName].size,this._fontName=r.fontName,this._fontSize=r.fontSize,this.dirty=!0}}})},t.utils=ve,t}({});PIXI.useDeprecated();
//# sourceMappingURL=pixi-legacy.min.js.map
src/main/webapp/views/wcsmap/vue.min.js
New file
@@ -0,0 +1,11 @@
/*!
 * Vue.js v2.7.14
 * (c) 2014-2022 Evan You
 * Released under the MIT License.
 */
/*!
 * Vue.js v2.7.14
 * (c) 2014-2022 Evan You
 * Released under the MIT License.
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vue=e()}(this,(function(){"use strict";var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function i(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return"function"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,null,2):String(t)}function p(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var h=v("slot,component",!0),m=v("key,ref,slot,slot-scope,is");function g(t,e){var n=t.length;if(n){if(e===t[n-1])return void(t.length=n-1);var r=t.indexOf(e);if(r>-1)return t.splice(r,1)}}var y=Object.prototype.hasOwnProperty;function _(t,e){return y.call(t,e)}function b(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var $=/-(\w)/g,w=b((function(t){return t.replace($,(function(t,e){return e?e.toUpperCase():""}))})),x=b((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,k=b((function(t){return t.replace(C,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function A(t){for(var e={},n=0;n<t.length;n++)t[n]&&T(e,t[n]);return e}function j(t,e,n){}var E=function(t,e,n){return!1},N=function(t){return t};function P(t,e){if(t===e)return!0;var n=s(t),r=s(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return P(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),c=Object.keys(e);return a.length===c.length&&a.every((function(n){return P(t[n],e[n])}))}catch(t){return!1}}function D(t,e){for(var n=0;n<t.length;n++)if(P(t[n],e))return n;return-1}function M(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function I(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}var L="data-server-rendered",R=["component","directive","filter"],F=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],H={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:E,isReservedAttr:E,isUnknownElement:E,getTagNamespace:j,parsePlatformTagName:N,mustUseProp:E,async:!0,_lifecycleHooks:F},B=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function U(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function z(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var V=new RegExp("[^".concat(B.source,".$_\\d]"));var K="__proto__"in{},J="undefined"!=typeof window,q=J&&window.navigator.userAgent.toLowerCase(),W=q&&/msie|trident/.test(q),Z=q&&q.indexOf("msie 9.0")>0,G=q&&q.indexOf("edge/")>0;q&&q.indexOf("android");var X=q&&/iphone|ipad|ipod|ios/.test(q);q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q);var Y,Q=q&&q.match(/firefox\/(\d+)/),tt={}.watch,et=!1;if(J)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===Y&&(Y=!J&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Y},ot=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,st="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);at="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ct=null;function ut(t){void 0===t&&(t=null),t||ct&&ct._scope.off(),ct=t,t&&t._scope.on()}var lt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),ft=function(t){void 0===t&&(t="");var e=new lt;return e.text=t,e.isComment=!0,e};function dt(t){return new lt(void 0,void 0,void 0,String(t))}function pt(t){var e=new lt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var vt=0,ht=[],mt=function(){function t(){this._pending=!1,this.id=vt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,ht.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.filter((function(t){return t})),n=0,r=e.length;n<r;n++){e[n].update()}},t}();mt.target=null;var gt=[];function yt(t){gt.push(t),mt.target=t}function _t(){gt.pop(),mt.target=gt[gt.length-1]}var bt=Array.prototype,$t=Object.create(bt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=bt[t];z($t,t,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i}))}));var wt=Object.getOwnPropertyNames($t),xt={},Ct=!0;function kt(t){Ct=t}var St={notify:j,depend:j,addSub:j,removeSub:j},Ot=function(){function t(t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.value=t,this.shallow=n,this.mock=r,this.dep=r?St:new mt,this.vmCount=0,z(t,"__ob__",this),e(t)){if(!r)if(K)t.__proto__=$t;else for(var o=0,i=wt.length;o<i;o++){z(t,s=wt[o],$t[s])}n||this.observeArray(t)}else{var a=Object.keys(t);for(o=0;o<a.length;o++){var s;At(t,s=a[o],xt,void 0,n,r)}}}return t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Tt(t[e],!1,this.mock)},t}();function Tt(t,n,r){return t&&_(t,"__ob__")&&t.__ob__ instanceof Ot?t.__ob__:!Ct||!r&&rt()||!e(t)&&!u(t)||!Object.isExtensible(t)||t.__v_skip||Ft(t)||t instanceof lt?void 0:new Ot(t,n,r)}function At(t,n,r,o,i,a){var s=new mt,c=Object.getOwnPropertyDescriptor(t,n);if(!c||!1!==c.configurable){var u=c&&c.get,l=c&&c.set;u&&!l||r!==xt&&2!==arguments.length||(r=t[n]);var f=!i&&Tt(r,!1,a);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var n=u?u.call(t):r;return mt.target&&(s.depend(),f&&(f.dep.depend(),e(n)&&Nt(n))),Ft(n)&&!i?n.value:n},set:function(e){var n=u?u.call(t):r;if(I(n,e)){if(l)l.call(t,e);else{if(u)return;if(!i&&Ft(n)&&!Ft(e))return void(n.value=e);r=e}f=!i&&Tt(e,!1,a),s.notify()}}}),s}}function jt(t,n,r){if(!Lt(t)){var o=t.__ob__;return e(t)&&l(n)?(t.length=Math.max(t.length,n),t.splice(n,1,r),o&&!o.shallow&&o.mock&&Tt(r,!1,!0),r):n in t&&!(n in Object.prototype)?(t[n]=r,r):t._isVue||o&&o.vmCount?r:o?(At(o.value,n,r,void 0,o.shallow,o.mock),o.dep.notify(),r):(t[n]=r,r)}}function Et(t,n){if(e(t)&&l(n))t.splice(n,1);else{var r=t.__ob__;t._isVue||r&&r.vmCount||Lt(t)||_(t,n)&&(delete t[n],r&&r.dep.notify())}}function Nt(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&Nt(n)}function Pt(t){return Dt(t,!0),z(t,"__v_isShallow",!0),t}function Dt(t,e){Lt(t)||Tt(t,e,rt())}function Mt(t){return Lt(t)?Mt(t.__v_raw):!(!t||!t.__ob__)}function It(t){return!(!t||!t.__v_isShallow)}function Lt(t){return!(!t||!t.__v_isReadonly)}var Rt="__v_isRef";function Ft(t){return!(!t||!0!==t.__v_isRef)}function Ht(t,e){if(Ft(t))return t;var n={};return z(n,Rt,!0),z(n,"__v_isShallow",e),z(n,"dep",At(n,"value",t,null,e,rt())),n}function Bt(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];if(Ft(t))return t.value;var r=t&&t.__ob__;return r&&r.dep.depend(),t},set:function(t){var r=e[n];Ft(r)&&!Ft(t)?r.value=t:e[n]=t}})}function Ut(t,e,n){var r=t[e];if(Ft(r))return r;var o={get value(){var r=t[e];return void 0===r?n:r},set value(n){t[e]=n}};return z(o,Rt,!0),o}function zt(t){return Vt(t,!1)}function Vt(t,e){if(!u(t))return t;if(Lt(t))return t;var n=e?"__v_rawToShallowReadonly":"__v_rawToReadonly",r=t[n];if(r)return r;var o=Object.create(Object.getPrototypeOf(t));z(t,n,o),z(o,"__v_isReadonly",!0),z(o,"__v_raw",t),Ft(t)&&z(o,Rt,!0),(e||It(t))&&z(o,"__v_isShallow",!0);for(var i=Object.keys(t),a=0;a<i.length;a++)Kt(o,t,i[a],e);return o}function Kt(t,e,n,r){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];return r||!u(t)?t:zt(t)},set:function(){}})}var Jt=b((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function qt(t,n){function r(){var t=r.fns;if(!e(t))return dn(t,null,arguments,n,"v-on handler");for(var o=t.slice(),i=0;i<o.length;i++)dn(o[i],null,arguments,n,"v-on handler")}return r.fns=t,r}function Wt(t,e,r,i,a,s){var c,u,l,f;for(c in t)u=t[c],l=e[c],f=Jt(c),n(u)||(n(l)?(n(u.fns)&&(u=t[c]=qt(u,s)),o(f.once)&&(u=t[c]=a(f.name,u,f.capture)),r(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)n(t[c])&&i((f=Jt(c)).name,e[c],f.capture)}function Zt(t,e,i){var a;t instanceof lt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){i.apply(this,arguments),g(a.fns,c)}n(s)?a=qt([c]):r(s.fns)&&o(s.merged)?(a=s).fns.push(c):a=qt([s,c]),a.merged=!0,t[e]=a}function Gt(t,e,n,o,i){if(r(e)){if(_(e,n))return t[n]=e[n],i||delete e[n],!0;if(_(e,o))return t[n]=e[o],i||delete e[o],!0}return!1}function Xt(t){return i(t)?[dt(t)]:e(t)?Qt(t):void 0}function Yt(t){return r(t)&&r(t.text)&&!1===t.isComment}function Qt(t,a){var s,c,u,l,f=[];for(s=0;s<t.length;s++)n(c=t[s])||"boolean"==typeof c||(l=f[u=f.length-1],e(c)?c.length>0&&(Yt((c=Qt(c,"".concat(a||"","_").concat(s)))[0])&&Yt(l)&&(f[u]=dt(l.text+c[0].text),c.shift()),f.push.apply(f,c)):i(c)?Yt(l)?f[u]=dt(l.text+c):""!==c&&f.push(dt(c)):Yt(c)&&Yt(l)?f[u]=dt(l.text+c.text):(o(t._isVList)&&r(c.tag)&&n(c.key)&&r(a)&&(c.key="__vlist".concat(a,"_").concat(s,"__")),f.push(c)));return f}function te(t,n,c,u,l,f){return(e(c)||i(c))&&(l=u,u=c,c=void 0),o(f)&&(l=2),function(t,n,o,i,c){if(r(o)&&r(o.__ob__))return ft();r(o)&&r(o.is)&&(n=o.is);if(!n)return ft();e(i)&&a(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);2===c?i=Xt(i):1===c&&(i=function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(i));var u,l;if("string"==typeof n){var f=void 0;l=t.$vnode&&t.$vnode.ns||H.getTagNamespace(n),u=H.isReservedTag(n)?new lt(H.parsePlatformTagName(n),o,i,void 0,void 0,t):o&&o.pre||!r(f=yr(t.$options,"components",n))?new lt(n,o,i,void 0,void 0,t):cr(f,o,t,i,n)}else u=cr(n,o,t,i);return e(u)?u:r(u)?(r(l)&&ee(u,l),r(o)&&function(t){s(t.style)&&Bn(t.style);s(t.class)&&Bn(t.class)}(o),u):ft()}(t,n,c,u,l)}function ee(t,e,i){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,i=!0),r(t.children))for(var a=0,s=t.children.length;a<s;a++){var c=t.children[a];r(c.tag)&&(n(c.ns)||o(i)&&"svg"!==c.tag)&&ee(c,e,i)}}function ne(t,n){var o,i,a,c,u=null;if(e(t)||"string"==typeof t)for(u=new Array(t.length),o=0,i=t.length;o<i;o++)u[o]=n(t[o],o);else if("number"==typeof t)for(u=new Array(t),o=0;o<t;o++)u[o]=n(o+1,o);else if(s(t))if(st&&t[Symbol.iterator]){u=[];for(var l=t[Symbol.iterator](),f=l.next();!f.done;)u.push(n(f.value,u.length)),f=l.next()}else for(a=Object.keys(t),u=new Array(a.length),o=0,i=a.length;o<i;o++)c=a[o],u[o]=n(t[c],c,o);return r(u)||(u=[]),u._isVList=!0,u}function re(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=T(T({},r),n)),o=i(n)||(a(e)?e():e)):o=this.$slots[t]||(a(e)?e():e);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function oe(t){return yr(this.$options,"filters",t)||N}function ie(t,n){return e(t)?-1===t.indexOf(n):t!==n}function ae(t,e,n,r,o){var i=H.keyCodes[e]||n;return o&&r&&!H.keyCodes[e]?ie(o,r):i?ie(i,t):r?k(r)!==e:void 0===t}function se(t,n,r,o,i){if(r)if(s(r)){e(r)&&(r=A(r));var a=void 0,c=function(e){if("class"===e||"style"===e||m(e))a=t;else{var s=t.attrs&&t.attrs.type;a=o||H.mustUseProp(n,s,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=w(e),u=k(e);c in a||u in a||(a[e]=r[e],i&&((t.on||(t.on={}))["update:".concat(e)]=function(t){r[e]=t}))};for(var u in r)c(u)}else;return t}function ce(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||le(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),"__static__".concat(t),!1),r}function ue(t,e,n){return le(t,"__once__".concat(e).concat(n?"_".concat(n):""),!0),t}function le(t,n,r){if(e(t))for(var o=0;o<t.length;o++)t[o]&&"string"!=typeof t[o]&&fe(t[o],"".concat(n,"_").concat(o),r);else fe(t,n,r)}function fe(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function de(t,e){if(e)if(u(e)){var n=t.on=t.on?T({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function pe(t,n,r,o){n=n||{$stable:!r};for(var i=0;i<t.length;i++){var a=t[i];e(a)?pe(a,n,r):a&&(a.proxy&&(a.fn.proxy=!0),n[a.key]=a.fn)}return o&&(n.$key=o),n}function ve(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function he(t,e){return"string"==typeof t?e+t:t}function me(t){t._o=ue,t._n=p,t._s=d,t._l=ne,t._t=re,t._q=P,t._i=D,t._m=ce,t._f=oe,t._k=ae,t._b=se,t._v=dt,t._e=ft,t._u=pe,t._g=de,t._d=ve,t._p=he}function ge(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==e&&i.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(ye)&&delete n[u];return n}function ye(t){return t.isComment&&!t.asyncFactory||" "===t.text}function _e(t){return t.isComment&&t.asyncFactory}function be(e,n,r,o){var i,a=Object.keys(r).length>0,s=n?!!n.$stable:!a,c=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(s&&o&&o!==t&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},n)n[u]&&"$"!==u[0]&&(i[u]=$e(e,r,u,n[u]))}else i={};for(var l in r)l in i||(i[l]=we(r,l));return n&&Object.isExtensible(n)&&(n._normalized=i),z(i,"$stable",s),z(i,"$key",c),z(i,"$hasNormal",a),i}function $e(t,n,r,o){var i=function(){var n=ct;ut(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:Xt(r))&&r[0];return ut(n),r&&(!i||1===r.length&&i.isComment&&!_e(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function we(t,e){return function(){return t[e]}}function xe(e){return{get attrs(){if(!e._attrsProxy){var n=e._attrsProxy={};z(n,"_v_attr_proxy",!0),Ce(n,e.$attrs,t,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||Ce(e._listenersProxy={},e.$listeners,t,e,"$listeners");return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Se(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:S(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return Bt(e,t,n)}))}}}function Ce(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,ke(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function ke(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function Se(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function Oe(){var t=ct;return t._setupContext||(t._setupContext=xe(t))}var Te,Ae=null;function je(t,e){return(t.__esModule||st&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function Ee(t){if(e(t))for(var n=0;n<t.length;n++){var o=t[n];if(r(o)&&(r(o.componentOptions)||_e(o)))return o}}function Ne(t,e){Te.$on(t,e)}function Pe(t,e){Te.$off(t,e)}function De(t,e){var n=Te;return function r(){var o=e.apply(null,arguments);null!==o&&n.$off(t,r)}}function Me(t,e,n){Te=t,Wt(e,n||{},Ne,Pe,De,t),Te=void 0}var Ie=null;function Le(t){var e=Ie;return Ie=t,function(){Ie=e}}function Re(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Fe(t,e){if(e){if(t._directInactive=!1,Re(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Fe(t.$children[n]);Be(t,"activated")}}function He(t,e){if(!(e&&(t._directInactive=!0,Re(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)He(t.$children[n]);Be(t,"deactivated")}}function Be(t,e,n,r){void 0===r&&(r=!0),yt();var o=ct;r&&ut(t);var i=t.$options[e],a="".concat(e," hook");if(i)for(var s=0,c=i.length;s<c;s++)dn(i[s],t,n||null,t,a);t._hasHookEvent&&t.$emit("hook:"+e),r&&ut(o),_t()}var Ue=[],ze=[],Ve={},Ke=!1,Je=!1,qe=0;var We=0,Ze=Date.now;if(J&&!W){var Ge=window.performance;Ge&&"function"==typeof Ge.now&&Ze()>document.createEvent("Event").timeStamp&&(Ze=function(){return Ge.now()})}var Xe=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Ye(){var t,e;for(We=Ze(),Je=!0,Ue.sort(Xe),qe=0;qe<Ue.length;qe++)(t=Ue[qe]).before&&t.before(),e=t.id,Ve[e]=null,t.run();var n=ze.slice(),r=Ue.slice();qe=Ue.length=ze.length=0,Ve={},Ke=Je=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Fe(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Be(r,"updated")}}(r),function(){for(var t=0;t<ht.length;t++){var e=ht[t];e.subs=e.subs.filter((function(t){return t})),e._pending=!1}ht.length=0}(),ot&&H.devtools&&ot.emit("flush")}function Qe(t){var e=t.id;if(null==Ve[e]&&(t!==mt.target||!t.noRecurse)){if(Ve[e]=!0,Je){for(var n=Ue.length-1;n>qe&&Ue[n].id>t.id;)n--;Ue.splice(n+1,0,t)}else Ue.push(t);Ke||(Ke=!0,Cn(Ye))}}var tn="watcher",en="".concat(tn," callback"),nn="".concat(tn," getter"),rn="".concat(tn," cleanup");function on(t,e){return cn(t,null,{flush:"post"})}var an,sn={};function cn(n,r,o){var i=void 0===o?t:o,s=i.immediate,c=i.deep,u=i.flush,l=void 0===u?"pre":u;i.onTrack,i.onTrigger;var f,d,p=ct,v=function(t,e,n){return void 0===n&&(n=null),dn(t,null,n,p,e)},h=!1,m=!1;if(Ft(n)?(f=function(){return n.value},h=It(n)):Mt(n)?(f=function(){return n.__ob__.dep.depend(),n},c=!0):e(n)?(m=!0,h=n.some((function(t){return Mt(t)||It(t)})),f=function(){return n.map((function(t){return Ft(t)?t.value:Mt(t)?Bn(t):a(t)?v(t,nn):void 0}))}):f=a(n)?r?function(){return v(n,nn)}:function(){if(!p||!p._isDestroyed)return d&&d(),v(n,tn,[y])}:j,r&&c){var g=f;f=function(){return Bn(g())}}var y=function(t){d=_.onStop=function(){v(t,rn)}};if(rt())return y=j,r?s&&v(r,en,[f(),m?[]:void 0,y]):f(),j;var _=new Vn(ct,f,j,{lazy:!0});_.noRecurse=!r;var b=m?[]:sn;return _.run=function(){if(_.active)if(r){var t=_.get();(c||h||(m?t.some((function(t,e){return I(t,b[e])})):I(t,b)))&&(d&&d(),v(r,en,[t,b===sn?void 0:b,y]),b=t)}else _.get()},"sync"===l?_.update=_.run:"post"===l?(_.post=!0,_.update=function(){return Qe(_)}):_.update=function(){if(p&&p===ct&&!p._isMounted){var t=p._preWatchers||(p._preWatchers=[]);t.indexOf(_)<0&&t.push(_)}else Qe(_)},r?s?_.run():b=_.get():"post"===l&&p?p.$once("hook:mounted",(function(){return _.get()})):_.get(),function(){_.teardown()}}var un=function(){function t(t){void 0===t&&(t=!1),this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=an,!t&&an&&(this.index=(an.scopes||(an.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=an;try{return an=this,t()}finally{an=e}}},t.prototype.on=function(){an=this},t.prototype.off=function(){an=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this.active=!1}},t}();function ln(t){var e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}function fn(t,e,n){yt();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,t,e,n))return}catch(t){pn(t,r,"errorCaptured hook")}}pn(t,e,n)}finally{_t()}}function dn(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue&&f(i)&&!i._handled&&(i.catch((function(t){return fn(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(t){fn(t,r,o)}return i}function pn(t,e,n){if(H.errorHandler)try{return H.errorHandler.call(null,t,e,n)}catch(e){e!==t&&vn(e)}vn(t)}function vn(t,e,n){if(!J||"undefined"==typeof console)throw t;console.error(t)}var hn,mn=!1,gn=[],yn=!1;function _n(){yn=!1;var t=gn.slice(0);gn.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&it(Promise)){var bn=Promise.resolve();hn=function(){bn.then(_n),X&&setTimeout(j)},mn=!0}else if(W||"undefined"==typeof MutationObserver||!it(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())hn="undefined"!=typeof setImmediate&&it(setImmediate)?function(){setImmediate(_n)}:function(){setTimeout(_n,0)};else{var $n=1,wn=new MutationObserver(_n),xn=document.createTextNode(String($n));wn.observe(xn,{characterData:!0}),hn=function(){$n=($n+1)%2,xn.data=String($n)},mn=!0}function Cn(t,e){var n;if(gn.push((function(){if(t)try{t.call(e)}catch(t){fn(t,e,"nextTick")}else n&&n(e)})),yn||(yn=!0,hn()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}function kn(t){return function(e,n){if(void 0===n&&(n=ct),n)return function(t,e,n){var r=t.$options;r[e]=vr(r[e],n)}(n,t,e)}}var Sn=kn("beforeMount"),On=kn("mounted"),Tn=kn("beforeUpdate"),An=kn("updated"),jn=kn("beforeDestroy"),En=kn("destroyed"),Nn=kn("activated"),Pn=kn("deactivated"),Dn=kn("serverPrefetch"),Mn=kn("renderTracked"),In=kn("renderTriggered"),Ln=kn("errorCaptured");var Rn="2.7.14";var Fn=Object.freeze({__proto__:null,version:Rn,defineComponent:function(t){return t},ref:function(t){return Ht(t,!1)},shallowRef:function(t){return Ht(t,!0)},isRef:Ft,toRef:Ut,toRefs:function(t){var n=e(t)?new Array(t.length):{};for(var r in t)n[r]=Ut(t,r);return n},unref:function(t){return Ft(t)?t.value:t},proxyRefs:function(t){if(Mt(t))return t;for(var e={},n=Object.keys(t),r=0;r<n.length;r++)Bt(e,t,n[r]);return e},customRef:function(t){var e=new mt,n=t((function(){e.depend()}),(function(){e.notify()})),r=n.get,o=n.set,i={get value(){return r()},set value(t){o(t)}};return z(i,Rt,!0),i},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return Dt(t,!1),t},isReactive:Mt,isReadonly:Lt,isShallow:It,isProxy:function(t){return Mt(t)||Lt(t)},shallowReactive:Pt,markRaw:function(t){return Object.isExtensible(t)&&z(t,"__v_skip",!0),t},toRaw:function t(e){var n=e&&e.__v_raw;return n?t(n):e},readonly:zt,shallowReadonly:function(t){return Vt(t,!0)},computed:function(t,e){var n,r,o=a(t);o?(n=t,r=j):(n=t.get,r=t.set);var i=rt()?null:new Vn(ct,n,j,{lazy:!0}),s={effect:i,get value(){return i?(i.dirty&&i.evaluate(),mt.target&&i.depend(),i.value):n()},set value(t){r(t)}};return z(s,Rt,!0),z(s,"__v_isReadonly",o),s},watch:function(t,e,n){return cn(t,e,n)},watchEffect:function(t,e){return cn(t,null,e)},watchPostEffect:on,watchSyncEffect:function(t,e){return cn(t,null,{flush:"sync"})},EffectScope:un,effectScope:function(t){return new un(t)},onScopeDispose:function(t){an&&an.cleanups.push(t)},getCurrentScope:function(){return an},provide:function(t,e){ct&&(ln(ct)[t]=e)},inject:function(t,e,n){void 0===n&&(n=!1);var r=ct;if(r){var o=r.$parent&&r.$parent._provided;if(o&&t in o)return o[t];if(arguments.length>1)return n&&a(e)?e.call(r):e}},h:function(t,e,n){return te(ct,t,e,n,2,!0)},getCurrentInstance:function(){return ct&&{proxy:ct}},useSlots:function(){return Oe().slots},useAttrs:function(){return Oe().attrs},useListeners:function(){return Oe().listeners},mergeDefaults:function(t,n){var r=e(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var o in n){var i=r[o];i?e(i)||a(i)?r[o]={type:i,default:n[o]}:i.default=n[o]:null===i&&(r[o]={default:n[o]})}return r},nextTick:Cn,set:jt,del:Et,useCssModule:function(e){return t},useCssVars:function(t){if(J){var e=ct;e&&on((function(){var n=e.$el,r=t(e,e._setupProxy);if(n&&1===n.nodeType){var o=n.style;for(var i in r)o.setProperty("--".concat(i),r[i])}}))}},defineAsyncComponent:function(t){a(t)&&(t={loader:t});var e=t.loader,n=t.loadingComponent,r=t.errorComponent,o=t.delay,i=void 0===o?200:o,s=t.timeout;t.suspensible;var c=t.onError,u=null,l=0,f=function(){var t;return u||(t=u=e().catch((function(t){if(t=t instanceof Error?t:new Error(String(t)),c)return new Promise((function(e,n){c(t,(function(){return e((l++,u=null,f()))}),(function(){return n(t)}),l+1)}));throw t})).then((function(e){return t!==u&&u?u:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e)})))};return function(){return{component:f(),delay:i,timeout:s,error:r,loading:n}}},onBeforeMount:Sn,onMounted:On,onBeforeUpdate:Tn,onUpdated:An,onBeforeUnmount:jn,onUnmounted:En,onActivated:Nn,onDeactivated:Pn,onServerPrefetch:Dn,onRenderTracked:Mn,onRenderTriggered:In,onErrorCaptured:function(t,e){void 0===e&&(e=ct),Ln(t,e)}}),Hn=new at;function Bn(t){return Un(t,Hn),Hn.clear(),t}function Un(t,n){var r,o,i=e(t);if(!(!i&&!s(t)||t.__v_skip||Object.isFrozen(t)||t instanceof lt)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)Un(t[r],n);else if(Ft(t))Un(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)Un(t[o[r]],n)}}var zn=0,Vn=function(){function t(t,e,n,r,o){!function(t,e){void 0===e&&(e=an),e&&e.active&&e.effects.push(t)}(this,an&&!an._vm?an:t?t._scope:void 0),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++zn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new at,this.newDepIds=new at,this.expression="",a(e)?this.getter=e:(this.getter=function(t){if(!V.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=j)),this.value=this.lazy?void 0:this.get()}return t.prototype.get=function(){var t;yt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;fn(t,e,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&Bn(t),_t(),this.cleanupDeps()}return t},t.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},t.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},t.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Qe(this)},t.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'.concat(this.expression,'"');dn(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},t.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},t.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&g(this.vm._scope.effects,this),this.active){for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},t}(),Kn={enumerable:!0,configurable:!0,get:j,set:j};function Jn(t,e,n){Kn.get=function(){return this[e][n]},Kn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Kn)}function qn(t){var n=t.$options;if(n.props&&function(t,e){var n=t.$options.propsData||{},r=t._props=Pt({}),o=t.$options._propKeys=[];t.$parent&&kt(!1);var i=function(i){o.push(i);var a=_r(i,e,n,t);At(r,i,a),i in t||Jn(t,"_props",i)};for(var a in e)i(a);kt(!0)}(t,n.props),function(t){var e=t.$options,n=e.setup;if(n){var r=t._setupContext=xe(t);ut(t),yt();var o=dn(n,null,[t._props||Pt({}),r],t,"setup");if(_t(),ut(),a(o))e.render=o;else if(s(o))if(t._setupState=o,o.__sfc){var i=t._setupProxy={};for(var c in o)"__sfc"!==c&&Bt(i,o,c)}else for(var c in o)U(c)||Bt(t,o,c)}}(t),n.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?j:S(e[n],t)}(t,n.methods),n.data)!function(t){var e=t.$options.data;u(e=t._data=a(e)?function(t,e){yt();try{return t.call(e,e)}catch(t){return fn(t,e,"data()"),{}}finally{_t()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&_(r,i)||U(i)||Jn(t,"_data",i)}var s=Tt(e);s&&s.vmCount++}(t);else{var r=Tt(t._data={});r&&r.vmCount++}n.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=rt();for(var o in e){var i=e[o],s=a(i)?i:i.get;r||(n[o]=new Vn(t,s||j,j,Wn)),o in t||Zn(t,o,i)}}(t,n.computed),n.watch&&n.watch!==tt&&function(t,n){for(var r in n){var o=n[r];if(e(o))for(var i=0;i<o.length;i++)Yn(t,r,o[i]);else Yn(t,r,o)}}(t,n.watch)}var Wn={lazy:!0};function Zn(t,e,n){var r=!rt();a(n)?(Kn.get=r?Gn(e):Xn(n),Kn.set=j):(Kn.get=n.get?r&&!1!==n.cache?Gn(e):Xn(n.get):j,Kn.set=n.set||j),Object.defineProperty(t,e,Kn)}function Gn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),mt.target&&e.depend(),e.value}}function Xn(t){return function(){return t.call(this,this)}}function Yn(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function Qn(t,e){if(t){for(var n=Object.create(null),r=st?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=t[i].from;if(s in e._provided)n[i]=e._provided[s];else if("default"in t[i]){var c=t[i].default;n[i]=a(c)?c.call(e):c}}}return n}}var tr=0;function er(t){var e=t.options;if(t.super){var n=er(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}(t);r&&T(t.extendOptions,r),(e=t.options=gr(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function nr(n,r,i,a,s){var c,u=this,l=s.options;_(a,"_uid")?(c=Object.create(a))._original=a:(c=a,a=a._original);var f=o(l._compiled),d=!f;this.data=n,this.props=r,this.children=i,this.parent=a,this.listeners=n.on||t,this.injections=Qn(l.inject,a),this.slots=function(){return u.$slots||be(a,n.scopedSlots,u.$slots=ge(i,a)),u.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return be(a,n.scopedSlots,this.slots())}}),f&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=be(a,n.scopedSlots,this.$slots)),l._scopeId?this._c=function(t,n,r,o){var i=te(c,t,n,r,o,d);return i&&!e(i)&&(i.fnScopeId=l._scopeId,i.fnContext=a),i}:this._c=function(t,e,n,r){return te(c,t,e,n,r,d)}}function rr(t,e,n,r,o){var i=pt(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function or(t,e){for(var n in e)t[w(n)]=e[n]}function ir(t){return t.name||t.__name||t._componentTag}me(nr.prototype);var ar={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;ar.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},o=t.data.inlineTemplate;r(o)&&(n.render=o.render,n.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Ie)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,o,i){var a=o.data.scopedSlots,s=e.$scopedSlots,c=!!(a&&!a.$stable||s!==t&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key||!a&&e.$scopedSlots.$key),u=!!(i||e.$options._renderChildren||c),l=e.$vnode;e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o),e.$options._renderChildren=i;var f=o.data.attrs||t;e._attrsProxy&&Ce(e._attrsProxy,f,l.data&&l.data.attrs||t,e,"$attrs")&&(u=!0),e.$attrs=f,r=r||t;var d=e.$options._parentListeners;if(e._listenersProxy&&Ce(e._listenersProxy,r,d||t,e,"$listeners"),e.$listeners=e.$options._parentListeners=r,Me(e,r,d),n&&e.$options.props){kt(!1);for(var p=e._props,v=e.$options._propKeys||[],h=0;h<v.length;h++){var m=v[h],g=e.$options.props;p[m]=_r(m,g,n,e)}kt(!0),e.$options.propsData=n}u&&(e.$slots=ge(i,o.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Be(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,ze.push(e)):Fe(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?He(e,!0):e.$destroy())}},sr=Object.keys(ar);function cr(i,a,c,u,l){if(!n(i)){var d=c.$options._base;if(s(i)&&(i=d.extend(i)),"function"==typeof i){var p;if(n(i.cid)&&(i=function(t,e){if(o(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;var i=Ae;if(i&&r(t.owners)&&-1===t.owners.indexOf(i)&&t.owners.push(i),o(t.loading)&&r(t.loadingComp))return t.loadingComp;if(i&&!r(t.owners)){var a=t.owners=[i],c=!0,u=null,l=null;i.$on("hook:destroyed",(function(){return g(a,i)}));var d=function(t){for(var e=0,n=a.length;e<n;e++)a[e].$forceUpdate();t&&(a.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},p=M((function(n){t.resolved=je(n,e),c?a.length=0:d(!0)})),v=M((function(e){r(t.errorComp)&&(t.error=!0,d(!0))})),h=t(p,v);return s(h)&&(f(h)?n(t.resolved)&&h.then(p,v):f(h.component)&&(h.component.then(p,v),r(h.error)&&(t.errorComp=je(h.error,e)),r(h.loading)&&(t.loadingComp=je(h.loading,e),0===h.delay?t.loading=!0:u=setTimeout((function(){u=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,d(!1))}),h.delay||200)),r(h.timeout)&&(l=setTimeout((function(){l=null,n(t.resolved)&&v(null)}),h.timeout)))),c=!1,t.loading?t.loadingComp:t.resolved}}(p=i,d),void 0===i))return function(t,e,n,r,o){var i=ft();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}(p,a,c,u,l);a=a||{},er(i),r(a.model)&&function(t,n){var o=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[o]=n.model.value;var a=n.on||(n.on={}),s=a[i],c=n.model.callback;r(s)?(e(s)?-1===s.indexOf(c):s!==c)&&(a[i]=[c].concat(s)):a[i]=c}(i.options,a);var v=function(t,e,o){var i=e.options.props;if(!n(i)){var a={},s=t.attrs,c=t.props;if(r(s)||r(c))for(var u in i){var l=k(u);Gt(a,c,u,l,!0)||Gt(a,s,u,l,!1)}return a}}(a,i);if(o(i.options.functional))return function(n,o,i,a,s){var c=n.options,u={},l=c.props;if(r(l))for(var f in l)u[f]=_r(f,l,o||t);else r(i.attrs)&&or(u,i.attrs),r(i.props)&&or(u,i.props);var d=new nr(i,u,s,a,n),p=c.render.call(null,d._c,d);if(p instanceof lt)return rr(p,i,d.parent,c);if(e(p)){for(var v=Xt(p)||[],h=new Array(v.length),m=0;m<v.length;m++)h[m]=rr(v[m],i,d.parent,c);return h}}(i,v,a,c,u);var h=a.on;if(a.on=a.nativeOn,o(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<sr.length;n++){var r=sr[n],o=e[r],i=ar[r];o===i||o&&o._merged||(e[r]=o?ur(i,o):i)}}(a);var y=ir(i.options)||l;return new lt("vue-component-".concat(i.cid).concat(y?"-".concat(y):""),a,void 0,void 0,void 0,c,{Ctor:i,propsData:v,listeners:h,tag:l,children:u},p)}}}function ur(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var lr=j,fr=H.optionMergeStrategies;function dr(t,e,n){if(void 0===n&&(n=!0),!e)return t;for(var r,o,i,a=st?Reflect.ownKeys(e):Object.keys(e),s=0;s<a.length;s++)"__ob__"!==(r=a[s])&&(o=t[r],i=e[r],n&&_(t,r)?o!==i&&u(o)&&u(i)&&dr(o,i):jt(t,r,i));return t}function pr(t,e,n){return n?function(){var r=a(e)?e.call(n,n):e,o=a(t)?t.call(n,n):t;return r?dr(r,o):o}:e?t?function(){return dr(a(e)?e.call(this,this):e,a(t)?t.call(this,this):t)}:e:t}function vr(t,n){var r=n?t?t.concat(n):e(n)?n:[n]:t;return r?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r):r}function hr(t,e,n,r){var o=Object.create(t||null);return e?T(o,e):o}fr.data=function(t,e,n){return n?pr(t,e,n):e&&"function"!=typeof e?t:pr(t,e)},F.forEach((function(t){fr[t]=vr})),R.forEach((function(t){fr[t+"s"]=hr})),fr.watch=function(t,n,r,o){if(t===tt&&(t=void 0),n===tt&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;var i={};for(var a in T(i,t),n){var s=i[a],c=n[a];s&&!e(s)&&(s=[s]),i[a]=s?s.concat(c):e(c)?c:[c]}return i},fr.props=fr.methods=fr.inject=fr.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return T(o,t),e&&T(o,e),o},fr.provide=function(t,e){return t?function(){var n=Object.create(null);return dr(n,a(t)?t.call(this):t),e&&dr(n,a(e)?e.call(this):e,!1),n}:e};var mr=function(t,e){return void 0===e?t:e};function gr(t,n,r){if(a(n)&&(n=n.options),function(t,n){var r=t.props;if(r){var o,i,a={};if(e(r))for(o=r.length;o--;)"string"==typeof(i=r[o])&&(a[w(i)]={type:null});else if(u(r))for(var s in r)i=r[s],a[w(s)]=u(i)?i:{type:i};t.props=a}}(n),function(t,n){var r=t.inject;if(r){var o=t.inject={};if(e(r))for(var i=0;i<r.length;i++)o[r[i]]={from:r[i]};else if(u(r))for(var a in r){var s=r[a];o[a]=u(s)?T({from:a},s):{from:s}}}}(n),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];a(r)&&(e[n]={bind:r,update:r})}}(n),!n._base&&(n.extends&&(t=gr(t,n.extends,r)),n.mixins))for(var o=0,i=n.mixins.length;o<i;o++)t=gr(t,n.mixins[o],r);var s,c={};for(s in t)l(s);for(s in n)_(t,s)||l(s);function l(e){var o=fr[e]||mr;c[e]=o(t[e],n[e],r,e)}return c}function yr(t,e,n,r){if("string"==typeof n){var o=t[e];if(_(o,n))return o[n];var i=w(n);if(_(o,i))return o[i];var a=x(i);return _(o,a)?o[a]:o[n]||o[i]||o[a]}}function _r(t,e,n,r){var o=e[t],i=!_(n,t),s=n[t],c=xr(Boolean,o.type);if(c>-1)if(i&&!_(o,"default"))s=!1;else if(""===s||s===k(t)){var u=xr(String,o.type);(u<0||c<u)&&(s=!0)}if(void 0===s){s=function(t,e,n){if(!_(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return a(r)&&"Function"!==$r(e.type)?r.call(t):r}(r,o,t);var l=Ct;kt(!0),Tt(s),kt(l)}return s}var br=/^\s*function (\w+)/;function $r(t){var e=t&&t.toString().match(br);return e?e[1]:""}function wr(t,e){return $r(t)===$r(e)}function xr(t,n){if(!e(n))return wr(n,t)?0:-1;for(var r=0,o=n.length;r<o;r++)if(wr(n[r],t))return r;return-1}function Cr(t){this._init(t)}function kr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=ir(t)||ir(n.options),a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=gr(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)Jn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)Zn(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,R.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=T({},a.options),o[r]=a,a}}function Sr(t){return t&&(ir(t.Ctor.options)||t.tag)}function Or(t,n){return e(t)?t.indexOf(n)>-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===c.call(r)&&t.test(n));var r}function Tr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Ar(n,i,r,o)}}}function Ar(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,g(n,e)}!function(e){e.prototype._init=function(e){var n=this;n._uid=tr++,n._isVue=!0,n.__v_skip=!0,n._scope=new un(!0),n._scope._vm=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=gr(er(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Me(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=ge(n._renderChildren,o),e.$scopedSlots=r?be(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,o){return te(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return te(e,t,n,r,o,!0)};var i=r&&r.data;At(e,"$attrs",i&&i.attrs||t,null,!0),At(e,"$listeners",n._parentListeners||t,null,!0)}(n),Be(n,"beforeCreate",void 0,!1),function(t){var e=Qn(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach((function(n){At(t,n,e[n])})),kt(!0))}(n),qn(n),function(t){var e=t.$options.provide;if(e){var n=a(e)?e.call(t):e;if(!s(n))return;for(var r=ln(t),o=st?Reflect.ownKeys(n):Object.keys(n),i=0;i<o.length;i++){var c=o[i];Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(n,c))}}}(n),Be(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(Cr),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=jt,t.prototype.$delete=Et,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return Yn(r,t,e,n);(n=n||{}).user=!0;var o=new Vn(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');yt(),dn(e,r,[o.value],r,i),_t()}return function(){o.teardown()}}}(Cr),function(t){var n=/^hook:/;t.prototype.$on=function(t,r){var o=this;if(e(t))for(var i=0,a=t.length;i<a;i++)o.$on(t[i],r);else(o._events[t]||(o._events[t]=[])).push(r),n.test(t)&&(o._hasHookEvent=!0);return o},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,n){var r=this;if(!arguments.length)return r._events=Object.create(null),r;if(e(t)){for(var o=0,i=t.length;o<i;o++)r.$off(t[o],n);return r}var a,s=r._events[t];if(!s)return r;if(!n)return r._events[t]=null,r;for(var c=s.length;c--;)if((a=s[c])===n||a.fn===n){s.splice(c,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?O(n):n;for(var r=O(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;i<a;i++)dn(n[i],e,r,e,o)}return e}}(Cr),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Le(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var a=n;a&&a.$vnode&&a.$parent&&a.$vnode===a.$parent._vnode;)a.$parent.$el=a.$el,a=a.$parent},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Be(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||g(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Be(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Cr),function(t){me(t.prototype),t.prototype.$nextTick=function(t){return Cn(t,this)},t.prototype._render=function(){var t,n=this,r=n.$options,o=r.render,i=r._parentVnode;i&&n._isMounted&&(n.$scopedSlots=be(n.$parent,i.data.scopedSlots,n.$slots,n.$scopedSlots),n._slotsProxy&&Se(n._slotsProxy,n.$scopedSlots)),n.$vnode=i;try{ut(n),Ae=n,t=o.call(n._renderProxy,n.$createElement)}catch(e){fn(e,n,"render"),t=n._vnode}finally{Ae=null,ut()}return e(t)&&1===t.length&&(t=t[0]),t instanceof lt||(t=ft()),t.parent=i,t}}(Cr);var jr=[String,RegExp,Array],Er={name:"keep-alive",abstract:!0,props:{include:jr,exclude:jr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:Sr(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&Ar(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ar(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Tr(t,(function(t){return Or(e,t)}))})),this.$watch("exclude",(function(e){Tr(t,(function(t){return!Or(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Ee(t),n=e&&e.componentOptions;if(n){var r=Sr(n),o=this.include,i=this.exclude;if(o&&(!r||!Or(o,r))||i&&r&&Or(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,g(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Nr={KeepAlive:Er};!function(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:lr,extend:T,mergeOptions:gr,defineReactive:At},t.set=jt,t.delete=Et,t.nextTick=Cn,t.observable=function(t){return Tt(t),t},t.options=Object.create(null),R.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,T(t.options.components,Nr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),a(t.install)?t.install.apply(t,n):a(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=gr(this.options,t),this}}(t),kr(t),function(t){R.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&a(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Cr),Object.defineProperty(Cr.prototype,"$isServer",{get:rt}),Object.defineProperty(Cr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cr,"FunctionalRenderContext",{value:nr}),Cr.version=Rn;var Pr=v("style,class"),Dr=v("input,textarea,option,select,progress"),Mr=function(t,e,n){return"value"===n&&Dr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Ir=v("contenteditable,draggable,spellcheck"),Lr=v("events,caret,typing,plaintext-only"),Rr=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Fr="http://www.w3.org/1999/xlink",Hr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Br=function(t){return Hr(t)?t.slice(6,t.length):""},Ur=function(t){return null==t||!1===t};function zr(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Vr(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Vr(e,n.data));return function(t,e){if(r(t)||r(e))return Kr(t,Jr(e));return""}(e.staticClass,e.class)}function Vr(t,e){return{staticClass:Kr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Kr(t,e){return t?e?t+" "+e:t:e||""}function Jr(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o<i;o++)r(e=Jr(t[o]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):s(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var qr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Wr=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Zr=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Gr=function(t){return Wr(t)||Zr(t)};function Xr(t){return Zr(t)?"svg":"math"===t?"math":void 0}var Yr=Object.create(null);var Qr=v("text,number,password,search,email,tel,url");function to(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var eo=Object.freeze({__proto__:null,createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(qr[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),no={create:function(t,e){ro(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ro(t,!0),ro(e))},destroy:function(t){ro(t,!0)}};function ro(t,n){var o=t.data.ref;if(r(o)){var i=t.context,s=t.componentInstance||t.elm,c=n?null:s,u=n?void 0:s;if(a(o))dn(o,i,[c],i,"template ref function");else{var l=t.data.refInFor,f="string"==typeof o||"number"==typeof o,d=Ft(o),p=i.$refs;if(f||d)if(l){var v=f?p[o]:o.value;n?e(v)&&g(v,s):e(v)?v.includes(s)||v.push(s):f?(p[o]=[s],oo(i,o,p[o])):o.value=[s]}else if(f){if(n&&p[o]!==s)return;p[o]=u,oo(i,o,c)}else if(d){if(n&&o.value!==s)return;o.value=c}}}}function oo(t,e,n){var r=t._setupState;r&&_(r,e)&&(Ft(r[e])?r[e].value=n:r[e]=n)}var io=new lt("",{},[]),ao=["create","activate","update","remove","destroy"];function so(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,o=r(n=t.data)&&r(n=n.attrs)&&n.type,i=r(n=e.data)&&r(n=n.attrs)&&n.type;return o===i||Qr(o)&&Qr(i)}(t,e)||o(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function co(t,e,n){var o,i,a={};for(o=e;o<=n;++o)r(i=t[o].key)&&(a[i]=o);return a}var uo={create:lo,update:lo,destroy:function(t){lo(t,io)}};function lo(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,o,i=t===io,a=e===io,s=po(t.data.directives,t.context),c=po(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,ho(o,"update",e,t),o.def&&o.def.componentUpdated&&l.push(o)):(ho(o,"bind",e,t),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n<u.length;n++)ho(u[n],"inserted",e,t)};i?Zt(e,"insert",f):f()}l.length&&Zt(e,"postpatch",(function(){for(var n=0;n<l.length;n++)ho(l[n],"componentUpdated",e,t)}));if(!i)for(n in s)c[n]||ho(s[n],"unbind",t,t,a)}(t,e)}var fo=Object.create(null);function po(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++){if((r=t[n]).modifiers||(r.modifiers=fo),o[vo(r)]=r,e._setupState&&e._setupState.__sfc){var i=r.def||yr(e,"_setupState","v-"+r.name);r.def="function"==typeof i?{bind:i,update:i}:i}r.def=r.def||yr(e.$options,"directives",r.name)}return o}function vo(t){return t.rawName||"".concat(t.name,".").concat(Object.keys(t.modifiers||{}).join("."))}function ho(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(r){fn(r,n.context,"directive ".concat(t.name," ").concat(e," hook"))}}var mo=[no,uo];function go(t,e){var i=e.componentOptions;if(!(r(i)&&!1===i.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var a,s,c=e.elm,u=t.data.attrs||{},l=e.data.attrs||{};for(a in(r(l.__ob__)||o(l._v_attr_proxy))&&(l=e.data.attrs=T({},l)),l)s=l[a],u[a]!==s&&yo(c,a,s,e.data.pre);for(a in(W||G)&&l.value!==u.value&&yo(c,"value",l.value),u)n(l[a])&&(Hr(a)?c.removeAttributeNS(Fr,Br(a)):Ir(a)||c.removeAttribute(a))}}function yo(t,e,n,r){r||t.tagName.indexOf("-")>-1?_o(t,e,n):Rr(e)?Ur(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Ir(e)?t.setAttribute(e,function(t,e){return Ur(e)||"false"===e?"false":"contenteditable"===t&&Lr(e)?e:"true"}(e,n)):Hr(e)?Ur(n)?t.removeAttributeNS(Fr,Br(e)):t.setAttributeNS(Fr,e,n):_o(t,e,n)}function _o(t,e,n){if(Ur(n))t.removeAttribute(e);else{if(W&&!Z&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var bo={create:go,update:go};function $o(t,e){var o=e.elm,i=e.data,a=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=zr(e),c=o._transitionClasses;r(c)&&(s=Kr(s,Jr(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var wo,xo,Co,ko,So,Oo,To={create:$o,update:$o},Ao=/[\w).+\-_$\]]/;function jo(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),a)39===e&&92!==n&&(a=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(u)47===e&&92!==n&&(u=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||l||f||d){switch(e){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===e){for(var v=r-1,h=void 0;v>=0&&" "===(h=t.charAt(v));v--);h&&Ao.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==p&&m(),i)for(r=0;r<i.length;r++)o=Eo(o,i[r]);return o}function Eo(t,e){var n=e.indexOf("(");if(n<0)return'_f("'.concat(e,'")(').concat(t,")");var r=e.slice(0,n),o=e.slice(n+1);return'_f("'.concat(r,'")(').concat(t).concat(")"!==o?","+o:o)}function No(t,e){console.error("[Vue compiler]: ".concat(t))}function Po(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Do(t,e,n,r,o){(t.props||(t.props=[])).push(zo({name:e,value:n,dynamic:o},r)),t.plain=!1}function Mo(t,e,n,r,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(zo({name:e,value:n,dynamic:o},r)),t.plain=!1}function Io(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(zo({name:e,value:n},r))}function Lo(t,e,n,r,o,i,a,s){(t.directives||(t.directives=[])).push(zo({name:e,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),t.plain=!1}function Ro(t,e,n){return n?"_p(".concat(e,',"').concat(t,'")'):t+e}function Fo(e,n,r,o,i,a,s,c){var u;(o=o||t).right?c?n="(".concat(n,")==='click'?'contextmenu':(").concat(n,")"):"click"===n&&(n="contextmenu",delete o.right):o.middle&&(c?n="(".concat(n,")==='click'?'mouseup':(").concat(n,")"):"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=Ro("!",n,c)),o.once&&(delete o.once,n=Ro("~",n,c)),o.passive&&(delete o.passive,n=Ro("&",n,c)),o.native?(delete o.native,u=e.nativeEvents||(e.nativeEvents={})):u=e.events||(e.events={});var l=zo({value:r.trim(),dynamic:c},s);o!==t&&(l.modifiers=o);var f=u[n];Array.isArray(f)?i?f.unshift(l):f.push(l):u[n]=f?i?[l,f]:[f,l]:l,e.plain=!1}function Ho(t,e,n){var r=Bo(t,":"+e)||Bo(t,"v-bind:"+e);if(null!=r)return jo(r);if(!1!==n){var o=Bo(t,e);if(null!=o)return JSON.stringify(o)}}function Bo(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var o=t.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===e){o.splice(i,1);break}return n&&delete t.attrsMap[e],r}function Uo(t,e){for(var n=t.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(e.test(i.name))return n.splice(r,1),i}}function zo(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Vo(t,e,n){var r=n||{},o=r.number,i="$$v",a=i;r.trim&&(a="(typeof ".concat(i," === 'string'")+"? ".concat(i,".trim()")+": ".concat(i,")")),o&&(a="_n(".concat(a,")"));var s=Ko(e,a);t.model={value:"(".concat(e,")"),expression:JSON.stringify(e),callback:"function (".concat(i,") {").concat(s,"}")}}function Ko(t,e){var n=function(t){if(t=t.trim(),wo=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<wo-1)return(ko=t.lastIndexOf("."))>-1?{exp:t.slice(0,ko),key:'"'+t.slice(ko+1)+'"'}:{exp:t,key:null};xo=t,ko=So=Oo=0;for(;!qo();)Wo(Co=Jo())?Go(Co):91===Co&&Zo(Co);return{exp:t.slice(0,So),key:t.slice(So+1,Oo)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function Jo(){return xo.charCodeAt(++ko)}function qo(){return ko>=wo}function Wo(t){return 34===t||39===t}function Zo(t){var e=1;for(So=ko;!qo();)if(Wo(t=Jo()))Go(t);else if(91===t&&e++,93===t&&e--,0===e){Oo=ko;break}}function Go(t){for(var e=t;!qo()&&(t=Jo())!==e;);}var Xo,Yo="__r";function Qo(t,e,n){var r=Xo;return function o(){var i=e.apply(null,arguments);null!==i&&ni(t,o,n,r)}}var ti=mn&&!(Q&&Number(Q[1])<=53);function ei(t,e,n,r){if(ti){var o=We,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Xo.addEventListener(t,e,et?{capture:n,passive:r}:n)}function ni(t,e,n,r){(r||Xo).removeEventListener(t,e._wrapper||e,n)}function ri(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};Xo=e.elm||t.elm,function(t){if(r(t.__r)){var e=W?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}r(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),Wt(o,i,ei,ni,Qo,e.context),Xo=void 0}}var oi,ii={create:ri,update:ri,destroy:function(t){return ri(t,io)}};function ai(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,a,s=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(i in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.domProps=T({},u)),c)i in u||(s[i]="");for(i in u){if(a=u[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),a===c[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=a;var l=n(a)?"":String(a);si(s,l)&&(s.value=l)}else if("innerHTML"===i&&Zr(s.tagName)&&n(s.innerHTML)){(oi=oi||document.createElement("div")).innerHTML="<svg>".concat(a,"</svg>");for(var f=oi.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}else if(a!==c[i])try{s[i]=a}catch(t){}}}}function si(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return p(n)!==p(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var ci={create:ai,update:ai},ui=b((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function li(t){var e=fi(t.style);return t.staticStyle?T(t.staticStyle,e):e}function fi(t){return Array.isArray(t)?A(t):"string"==typeof t?ui(t):t}var di,pi=/^--/,vi=/\s*!important$/,hi=function(t,e,n){if(pi.test(e))t.style.setProperty(e,n);else if(vi.test(n))t.style.setProperty(k(e),n.replace(vi,""),"important");else{var r=gi(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},mi=["Webkit","Moz","ms"],gi=b((function(t){if(di=di||document.createElement("div").style,"filter"!==(t=w(t))&&t in di)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<mi.length;n++){var r=mi[n]+e;if(r in di)return r}}));function yi(t,e){var o=e.data,i=t.data;if(!(n(o.staticStyle)&&n(o.style)&&n(i.staticStyle)&&n(i.style))){var a,s,c=e.elm,u=i.staticStyle,l=i.normalizedStyle||i.style||{},f=u||l,d=fi(e.data.style)||{};e.data.normalizedStyle=r(d.__ob__)?T({},d):d;var p=function(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=li(o.data))&&T(r,n);(n=li(t.data))&&T(r,n);for(var i=t;i=i.parent;)i.data&&(n=li(i.data))&&T(r,n);return r}(e,!0);for(s in f)n(p[s])&&hi(c,s,"");for(s in p)(a=p[s])!==f[s]&&hi(c,s,null==a?"":a)}}var _i={create:yi,update:yi},bi=/\s+/;function $i(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(bi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function wi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(bi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function xi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&T(e,Ci(t.name||"v")),T(e,t),e}return"string"==typeof t?Ci(t):void 0}}var Ci=b((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),ki=J&&!Z,Si="transition",Oi="animation",Ti="transition",Ai="transitionend",ji="animation",Ei="animationend";ki&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ti="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ji="WebkitAnimation",Ei="webkitAnimationEnd"));var Ni=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Pi(t){Ni((function(){Ni(t)}))}function Di(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),$i(t,e))}function Mi(t,e){t._transitionClasses&&g(t._transitionClasses,e),wi(t,e)}function Ii(t,e,n){var r=Ri(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Si?Ai:Ei,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c<a&&u()}),i+1),t.addEventListener(s,l)}var Li=/\b(transform|all)(,|$)/;function Ri(t,e){var n,r=window.getComputedStyle(t),o=(r[Ti+"Delay"]||"").split(", "),i=(r[Ti+"Duration"]||"").split(", "),a=Fi(o,i),s=(r[ji+"Delay"]||"").split(", "),c=(r[ji+"Duration"]||"").split(", "),u=Fi(s,c),l=0,f=0;return e===Si?a>0&&(n=Si,l=a,f=i.length):e===Oi?u>0&&(n=Oi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Si:Oi:null)?n===Si?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Si&&Li.test(r[Ti+"Property"])}}function Fi(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return Hi(e)+Hi(t[n])})))}function Hi(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Bi(t,e){var o=t.elm;r(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var i=xi(t.data.transition);if(!n(i)&&!r(o._enterCb)&&1===o.nodeType){for(var c=i.css,u=i.type,l=i.enterClass,f=i.enterToClass,d=i.enterActiveClass,v=i.appearClass,h=i.appearToClass,m=i.appearActiveClass,g=i.beforeEnter,y=i.enter,_=i.afterEnter,b=i.enterCancelled,$=i.beforeAppear,w=i.appear,x=i.afterAppear,C=i.appearCancelled,k=i.duration,S=Ie,O=Ie.$vnode;O&&O.parent;)S=O.context,O=O.parent;var T=!S._isMounted||!t.isRootInsert;if(!T||w||""===w){var A=T&&v?v:l,j=T&&m?m:d,E=T&&h?h:f,N=T&&$||g,P=T&&a(w)?w:y,D=T&&x||_,I=T&&C||b,L=p(s(k)?k.enter:k),R=!1!==c&&!Z,F=Vi(P),H=o._enterCb=M((function(){R&&(Mi(o,E),Mi(o,j)),H.cancelled?(R&&Mi(o,A),I&&I(o)):D&&D(o),o._enterCb=null}));t.data.show||Zt(t,"insert",(function(){var e=o.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),P&&P(o,H)})),N&&N(o),R&&(Di(o,A),Di(o,j),Pi((function(){Mi(o,A),H.cancelled||(Di(o,E),F||(zi(L)?setTimeout(H,L):Ii(o,u,H)))}))),t.data.show&&(e&&e(),P&&P(o,H)),R||F||H()}}}function Ui(t,e){var o=t.elm;r(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var i=xi(t.data.transition);if(n(i)||1!==o.nodeType)return e();if(!r(o._leaveCb)){var a=i.css,c=i.type,u=i.leaveClass,l=i.leaveToClass,f=i.leaveActiveClass,d=i.beforeLeave,v=i.leave,h=i.afterLeave,m=i.leaveCancelled,g=i.delayLeave,y=i.duration,_=!1!==a&&!Z,b=Vi(v),$=p(s(y)?y.leave:y),w=o._leaveCb=M((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),_&&(Mi(o,l),Mi(o,f)),w.cancelled?(_&&Mi(o,u),m&&m(o)):(e(),h&&h(o)),o._leaveCb=null}));g?g(x):x()}function x(){w.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),d&&d(o),_&&(Di(o,u),Di(o,f),Pi((function(){Mi(o,u),w.cancelled||(Di(o,l),b||(zi($)?setTimeout(w,$):Ii(o,c,w)))}))),v&&v(o,w),_||b||w())}}function zi(t){return"number"==typeof t&&!isNaN(t)}function Vi(t){if(n(t))return!1;var e=t.fns;return r(e)?Vi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Ki(t,e){!0!==e.data.show&&Bi(e)}var Ji=function(t){var a,s,c={},u=t.modules,l=t.nodeOps;for(a=0;a<ao.length;++a)for(c[ao[a]]=[],s=0;s<u.length;++s)r(u[s][ao[a]])&&c[ao[a]].push(u[s][ao[a]]);function f(t){var e=l.parentNode(t);r(e)&&l.removeChild(e,t)}function d(t,e,n,i,a,s,u){if(r(t.elm)&&r(s)&&(t=s[u]=pt(t)),t.isRootInsert=!a,!function(t,e,n,i){var a=t.data;if(r(a)){var s=r(t.componentInstance)&&a.keepAlive;if(r(a=a.hook)&&r(a=a.init)&&a(t,!1),r(t.componentInstance))return p(t,e),h(n,t.elm,i),o(s)&&function(t,e,n,o){var i,a=t;for(;a.componentInstance;)if(r(i=(a=a.componentInstance._vnode).data)&&r(i=i.transition)){for(i=0;i<c.activate.length;++i)c.activate[i](io,a);e.push(a);break}h(n,t.elm,o)}(t,e,n,i),!0}}(t,e,n,i)){var f=t.data,d=t.children,v=t.tag;r(v)?(t.elm=t.ns?l.createElementNS(t.ns,v):l.createElement(v,t),_(t),m(t,d,e),r(f)&&y(t,e),h(n,t.elm,i)):o(t.isComment)?(t.elm=l.createComment(t.text),h(n,t.elm,i)):(t.elm=l.createTextNode(t.text),h(n,t.elm,i))}}function p(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,g(t)?(y(t,e),_(t)):(ro(t),e.push(t))}function h(t,e,n){r(t)&&(r(n)?l.parentNode(n)===t&&l.insertBefore(t,e,n):l.appendChild(t,e))}function m(t,n,r){if(e(n))for(var o=0;o<n.length;++o)d(n[o],r,t.elm,null,!0,n,o);else i(t.text)&&l.appendChild(t.elm,l.createTextNode(String(t.text)))}function g(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function y(t,e){for(var n=0;n<c.create.length;++n)c.create[n](io,t);r(a=t.data.hook)&&(r(a.create)&&a.create(io,t),r(a.insert)&&e.push(t))}function _(t){var e;if(r(e=t.fnScopeId))l.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e),n=n.parent;r(e=Ie)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&l.setStyleScope(t.elm,e)}function b(t,e,n,r,o,i){for(;r<=o;++r)d(n[r],i,t,e,!1,n,r)}function $(t){var e,n,o=t.data;if(r(o))for(r(e=o.hook)&&r(e=e.destroy)&&e(t),e=0;e<c.destroy.length;++e)c.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)$(t.children[n])}function w(t,e,n){for(;e<=n;++e){var o=t[e];r(o)&&(r(o.tag)?(x(o),$(o)):f(o.elm))}}function x(t,e){if(r(e)||r(t.data)){var n,o=c.remove.length+1;for(r(e)?e.listeners+=o:e=function(t,e){function n(){0==--n.listeners&&f(t)}return n.listeners=e,n}(t.elm,o),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&x(n,e),n=0;n<c.remove.length;++n)c.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else f(t.elm)}function C(t,e,n,o){for(var i=n;i<o;i++){var a=e[i];if(r(a)&&so(t,a))return i}}function k(t,e,i,a,s,u){if(t!==e){r(e.elm)&&r(a)&&(e=a[s]=pt(e));var f=e.elm=t.elm;if(o(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?T(t.elm,e,i):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var p,v=e.data;r(v)&&r(p=v.hook)&&r(p=p.prepatch)&&p(t,e);var h=t.children,m=e.children;if(r(v)&&g(e)){for(p=0;p<c.update.length;++p)c.update[p](t,e);r(p=v.hook)&&r(p=p.update)&&p(t,e)}n(e.text)?r(h)&&r(m)?h!==m&&function(t,e,o,i,a){for(var s,c,u,f=0,p=0,v=e.length-1,h=e[0],m=e[v],g=o.length-1,y=o[0],_=o[g],$=!a;f<=v&&p<=g;)n(h)?h=e[++f]:n(m)?m=e[--v]:so(h,y)?(k(h,y,i,o,p),h=e[++f],y=o[++p]):so(m,_)?(k(m,_,i,o,g),m=e[--v],_=o[--g]):so(h,_)?(k(h,_,i,o,g),$&&l.insertBefore(t,h.elm,l.nextSibling(m.elm)),h=e[++f],_=o[--g]):so(m,y)?(k(m,y,i,o,p),$&&l.insertBefore(t,m.elm,h.elm),m=e[--v],y=o[++p]):(n(s)&&(s=co(e,f,v)),n(c=r(y.key)?s[y.key]:C(y,e,f,v))?d(y,i,t,h.elm,!1,o,p):so(u=e[c],y)?(k(u,y,i,o,p),e[c]=void 0,$&&l.insertBefore(t,u.elm,h.elm)):d(y,i,t,h.elm,!1,o,p),y=o[++p]);f>v?b(t,n(o[g+1])?null:o[g+1].elm,o,p,g,i):p>g&&w(e,f,v)}(f,h,m,i,u):r(m)?(r(t.text)&&l.setTextContent(f,""),b(f,null,m,0,m.length-1,i)):r(h)?w(h,0,h.length-1):r(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),r(v)&&r(p=v.hook)&&r(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var O=v("attrs,class,staticClass,staticStyle,key");function T(t,e,n,i){var a,s=e.tag,c=e.data,u=e.children;if(i=i||c&&c.pre,e.elm=t,o(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(c)&&(r(a=c.hook)&&r(a=a.init)&&a(e,!0),r(a=e.componentInstance)))return p(e,n),!0;if(r(s)){if(r(u))if(t.hasChildNodes())if(r(a=c)&&r(a=a.domProps)&&r(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var l=!0,f=t.firstChild,d=0;d<u.length;d++){if(!f||!T(f,u[d],n,i)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else m(e,u,n);if(r(c)){var v=!1;for(var h in c)if(!O(h)){v=!0,y(e,n);break}!v&&c.class&&Bn(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,i,a){if(!n(e)){var s,u=!1,f=[];if(n(t))u=!0,d(e,f);else{var p=r(t.nodeType);if(!p&&so(t,e))k(t,e,f,null,null,a);else{if(p){if(1===t.nodeType&&t.hasAttribute(L)&&(t.removeAttribute(L),i=!0),o(i)&&T(t,e,f))return S(e,f,!0),t;s=t,t=new lt(l.tagName(s).toLowerCase(),{},[],void 0,s)}var v=t.elm,h=l.parentNode(v);if(d(e,f,v._leaveCb?null:h,l.nextSibling(v)),r(e.parent))for(var m=e.parent,y=g(e);m;){for(var _=0;_<c.destroy.length;++_)c.destroy[_](m);if(m.elm=e.elm,y){for(var b=0;b<c.create.length;++b)c.create[b](io,m);var x=m.data.hook.insert;if(x.merged)for(var C=1;C<x.fns.length;C++)x.fns[C]()}else ro(m);m=m.parent}r(h)?w([t],0,0):r(t.tag)&&$(t)}}return S(e,f,u),e.elm}r(t)&&$(t)}}({nodeOps:eo,modules:[bo,To,ii,ci,_i,J?{create:Ki,activate:Ki,remove:function(t,e){!0!==t.data.show?Ui(t,e):e()}}:{}].concat(mo)});Z&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ta(t,"input")}));var qi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Zt(n,"postpatch",(function(){qi.componentUpdated(t,e,n)})):Wi(t,e,n.context),t._vOptions=[].map.call(t.options,Xi)):("textarea"===n.tag||Qr(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Yi),t.addEventListener("compositionend",Qi),t.addEventListener("change",Qi),Z&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Wi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Xi);if(o.some((function(t,e){return!P(t,r[e])})))(t.multiple?e.value.some((function(t){return Gi(t,o)})):e.value!==e.oldValue&&Gi(e.value,o))&&ta(t,"change")}}};function Wi(t,e,n){Zi(t,e),(W||G)&&setTimeout((function(){Zi(t,e)}),0)}function Zi(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],o)i=D(r,Xi(a))>-1,a.selected!==i&&(a.selected=i);else if(P(Xi(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Gi(t,e){return e.every((function(e){return!P(e,t)}))}function Xi(t){return"_value"in t?t._value:t.value}function Yi(t){t.target.composing=!0}function Qi(t){t.target.composing&&(t.target.composing=!1,ta(t.target,"input"))}function ta(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function ea(t){return!t.componentInstance||t.data&&t.data.transition?t:ea(t.componentInstance._vnode)}var na={bind:function(t,e,n){var r=e.value,o=(n=ea(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Bi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=ea(n)).data&&n.data.transition?(n.data.show=!0,r?Bi(n,(function(){t.style.display=t.__vOriginalDisplay})):Ui(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},ra={model:qi,show:na},oa={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ia(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ia(Ee(e.children)):t}function aa(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[w(r)]=o[r];return e}function sa(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ca=function(t){return t.tag||_e(t)},ua=function(t){return"show"===t.name},la={name:"transition",props:oa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ca)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var a=ia(o);if(!a)return o;if(this._leaving)return sa(t,o);var s="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=aa(this),u=this._vnode,l=ia(u);if(a.data.directives&&a.data.directives.some(ua)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!_e(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,Zt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),sa(t,o);if("in-out"===r){if(_e(a))return u;var d,p=function(){d()};Zt(c,"afterEnter",p),Zt(c,"enterCancelled",p),Zt(f,"delayLeave",(function(t){d=t}))}}return o}}},fa=T({tag:String,moveClass:String},oa);delete fa.mode;var da={props:fa,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Le(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=aa(this),s=0;s<o.length;s++){(l=o[s]).tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(i.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(r){var c=[],u=[];for(s=0;s<r.length;s++){var l;(l=r[s]).data.transition=a,l.data.pos=l.elm.getBoundingClientRect(),n[l.key]?c.push(l):u.push(l)}this.kept=t(e,null,c),this.removed=u}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(pa),t.forEach(va),t.forEach(ha),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;Di(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ai,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ai,t),n._moveCb=null,Mi(n,e))})}})))},methods:{hasMove:function(t,e){if(!ki)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){wi(n,t)})),$i(n,e),n.style.display="none",this.$el.appendChild(n);var r=Ri(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function pa(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function va(t){t.data.newPos=t.elm.getBoundingClientRect()}function ha(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var ma={Transition:la,TransitionGroup:da};Cr.config.mustUseProp=Mr,Cr.config.isReservedTag=Gr,Cr.config.isReservedAttr=Pr,Cr.config.getTagNamespace=Xr,Cr.config.isUnknownElement=function(t){if(!J)return!0;if(Gr(t))return!1;if(t=t.toLowerCase(),null!=Yr[t])return Yr[t];var e=document.createElement(t);return t.indexOf("-")>-1?Yr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Yr[t]=/HTMLUnknownElement/.test(e.toString())},T(Cr.options.directives,ra),T(Cr.options.components,ma),Cr.prototype.__patch__=J?Ji:j,Cr.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=ft),Be(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Vn(t,r,j,{before:function(){t._isMounted&&!t._isDestroyed&&Be(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i<o.length;i++)o[i].run();return null==t.$vnode&&(t._isMounted=!0,Be(t,"mounted")),t}(this,t=t&&J?to(t):void 0,e)},J&&setTimeout((function(){H.devtools&&ot&&ot.emit("init",Cr)}),0);var ga=/\{\{((?:.|\r?\n)+?)\}\}/g,ya=/[-.*+?^${}()|[\]\/\\]/g,_a=b((function(t){var e=t[0].replace(ya,"\\$&"),n=t[1].replace(ya,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var ba={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Bo(t,"class");n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));var r=Ho(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:".concat(t.staticClass,",")),t.classBinding&&(e+="class:".concat(t.classBinding,",")),e}};var $a,wa={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Bo(t,"style");n&&(t.staticStyle=JSON.stringify(ui(n)));var r=Ho(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:".concat(t.staticStyle,",")),t.styleBinding&&(e+="style:(".concat(t.styleBinding,"),")),e}},xa=function(t){return($a=$a||document.createElement("div")).innerHTML=t,$a.textContent},Ca=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ka=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Sa=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Oa=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ta=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Aa="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(B.source,"]*"),ja="((?:".concat(Aa,"\\:)?").concat(Aa,")"),Ea=new RegExp("^<".concat(ja)),Na=/^\s*(\/?)>/,Pa=new RegExp("^<\\/".concat(ja,"[^>]*>")),Da=/^<!DOCTYPE [^>]+>/i,Ma=/^<!\--/,Ia=/^<!\[/,La=v("script,style,textarea",!0),Ra={},Fa={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Ha=/&(?:lt|gt|quot|amp|#39);/g,Ba=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Ua=v("pre,textarea",!0),za=function(t,e){return t&&Ua(t)&&"\n"===e[0]};function Va(t,e){var n=e?Ba:Ha;return t.replace(n,(function(t){return Fa[t]}))}function Ka(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||E,s=e.canBeLeftOpenTag||E,c=0,u=function(){if(n=t,r&&La(r)){var u=0,d=r.toLowerCase(),p=Ra[d]||(Ra[d]=new RegExp("([\\s\\S]*?)(</"+d+"[^>]*>)","i"));w=t.replace(p,(function(t,n,r){return u=r.length,La(d)||"noscript"===d||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),za(d,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-w.length,t=w,f(d,c-u,c)}else{var v=t.indexOf("<");if(0===v){if(Ma.test(t)){var h=t.indexOf("--\x3e");if(h>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,h),c,c+h+3),l(h+3),"continue"}if(Ia.test(t)){var m=t.indexOf("]>");if(m>=0)return l(m+2),"continue"}var g=t.match(Da);if(g)return l(g[0].length),"continue";var y=t.match(Pa);if(y){var _=c;return l(y[0].length),f(y[1],_,c),"continue"}var b=function(){var e=t.match(Ea);if(e){var n={tagName:e[1],attrs:[],start:c};l(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Na))&&(o=t.match(Ta)||t.match(Oa));)o.start=c,l(o[0].length),o.end=c,n.attrs.push(o);if(r)return n.unarySlash=r[1],l(r[0].length),n.end=c,n}}();if(b)return function(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&Sa(n)&&f(r),s(n)&&r===n&&f(n));for(var u=a(n)||!!c,l=t.attrs.length,d=new Array(l),p=0;p<l;p++){var v=t.attrs[p],h=v[3]||v[4]||v[5]||"",m="a"===n&&"href"===v[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;d[p]={name:v[1],value:Va(h,m)}}u||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:t.start,end:t.end}),r=n);e.start&&e.start(n,d,u,t.start,t.end)}(b),za(b.tagName,t)&&l(1),"continue"}var $=void 0,w=void 0,x=void 0;if(v>=0){for(w=t.slice(v);!(Pa.test(w)||Ea.test(w)||Ma.test(w)||Ia.test(w)||(x=w.indexOf("<",1))<0);)v+=x,w=t.slice(v);$=t.substring(0,v)}v<0&&($=t),$&&l($.length),e.chars&&$&&e.chars($,c-$.length,c)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===u())break}function l(e){c+=e,t=t.substring(e)}function f(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}f()}var Ja,qa,Wa,Za,Ga,Xa,Ya,Qa,ts=/^@|^v-on:/,es=/^v-|^@|^:|^#/,ns=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,rs=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,os=/^\(|\)$/g,is=/^\[.*\]$/,as=/:(.*)$/,ss=/^:|^\.|^v-bind:/,cs=/\.[^.\]]+(?=[^\]]*$)/g,us=/^v-slot(:|$)|^#/,ls=/[\r\n]/,fs=/[ \f\t\r\n]+/g,ds=b(xa),ps="_empty_";function vs(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:$s(e),rawAttrsMap:{},parent:n,children:[]}}function hs(t,e){Ja=e.warn||No,Xa=e.isPreTag||E,Ya=e.mustUseProp||E,Qa=e.getTagNamespace||E,e.isReservedTag,Wa=Po(e.modules,"transformNode"),Za=Po(e.modules,"preTransformNode"),Ga=Po(e.modules,"postTransformNode"),qa=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=ms(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&ys(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),u&&u.if&&ys(u,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,u;t.children=t.children.filter((function(t){return!t.slotScope})),l(t),t.pre&&(s=!1),Xa(t.tag)&&(c=!1);for(var f=0;f<Ga.length;f++)Ga[f](t,e)}function l(t){if(!c)for(var e=void 0;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return Ka(t,{warn:Ja,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,a,l,f){var d=r&&r.ns||Qa(t);W&&"svg"===d&&(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];ws.test(r.name)||(r.name=r.name.replace(xs,""),e.push(r))}return e}(i));var p,v=vs(t,i,r);d&&(v.ns=d),"style"!==(p=v).tag&&("script"!==p.tag||p.attrsMap.type&&"text/javascript"!==p.attrsMap.type)||rt()||(v.forbidden=!0);for(var h=0;h<Za.length;h++)v=Za[h](v,e)||v;s||(!function(t){null!=Bo(t,"v-pre")&&(t.pre=!0)}(v),v.pre&&(s=!0)),Xa(v.tag)&&(c=!0),s?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),o=0;o<n;o++)r[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(r[o].start=e[o].start,r[o].end=e[o].end);else t.pre||(t.plain=!0)}(v):v.processed||(gs(v),function(t){var e=Bo(t,"v-if");if(e)t.if=e,ys(t,{exp:e,block:t});else{null!=Bo(t,"v-else")&&(t.else=!0);var n=Bo(t,"v-else-if");n&&(t.elseif=n)}}(v),function(t){null!=Bo(t,"v-once")&&(t.once=!0)}(v)),n||(n=v),a?u(v):(r=v,o.push(v))},end:function(t,e,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],u(i)},chars:function(t,e,n){if(r&&(!W||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var o,u=r.children;if(t=c||t.trim()?"script"===(o=r).tag||"style"===o.tag?t:ds(t):u.length?a?"condense"===a&&ls.test(t)?"":" ":i?" ":"":""){c||"condense"!==a||(t=t.replace(fs," "));var l=void 0,f=void 0;!s&&" "!==t&&(l=function(t,e){var n=e?_a(e):ga;if(n.test(t)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(o=r.index)>c&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=jo(r[1].trim());a.push("_s(".concat(u,")")),s.push({"@binding":u}),c=o+r[0].length}return c<t.length&&(s.push(i=t.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}(t,qa))?f={type:2,expression:l.expression,tokens:l.tokens,text:t}:" "===t&&u.length&&" "===u[u.length-1].text||(f={type:3,text:t}),f&&u.push(f)}}},comment:function(t,e,n){if(r){var o={type:3,text:t,isComment:!0};r.children.push(o)}}}),n}function ms(t,e){var n,r;(r=Ho(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Ho(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Bo(t,"scope"),t.slotScope=e||Bo(t,"slot-scope")):(e=Bo(t,"slot-scope"))&&(t.slotScope=e);var n=Ho(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Mo(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){if(a=Uo(t,us)){var r=_s(a),o=r.name,i=r.dynamic;t.slotTarget=o,t.slotTargetDynamic=i,t.slotScope=a.value||ps}}else{var a;if(a=Uo(t,us)){var s=t.scopedSlots||(t.scopedSlots={}),c=_s(a),u=c.name,l=(i=c.dynamic,s[u]=vs("template",[],t));l.slotTarget=u,l.slotTargetDynamic=i,l.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=l,!0})),l.slotScope=a.value||ps,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Ho(t,"name"))}(t),function(t){var e;(e=Ho(t,"is"))&&(t.component=e);null!=Bo(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<Wa.length;o++)t=Wa[o](t,e)||t;return function(t){var e,n,r,o,i,a,s,c,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=o=u[e].name,i=u[e].value,es.test(r))if(t.hasBindings=!0,(a=bs(r.replace(es,"")))&&(r=r.replace(cs,"")),ss.test(r))r=r.replace(ss,""),i=jo(i),(c=is.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!c&&"innerHtml"===(r=w(r))&&(r="innerHTML"),a.camel&&!c&&(r=w(r)),a.sync&&(s=Ko(i,"$event"),c?Fo(t,'"update:"+('.concat(r,")"),s,null,!1,0,u[e],!0):(Fo(t,"update:".concat(w(r)),s,null,!1,0,u[e]),k(r)!==w(r)&&Fo(t,"update:".concat(k(r)),s,null,!1,0,u[e])))),a&&a.prop||!t.component&&Ya(t.tag,t.attrsMap.type,r)?Do(t,r,i,u[e],c):Mo(t,r,i,u[e],c);else if(ts.test(r))r=r.replace(ts,""),(c=is.test(r))&&(r=r.slice(1,-1)),Fo(t,r,i,a,!1,0,u[e],c);else{var l=(r=r.replace(es,"")).match(as),f=l&&l[1];c=!1,f&&(r=r.slice(0,-(f.length+1)),is.test(f)&&(f=f.slice(1,-1),c=!0)),Lo(t,r,o,i,f,c,a,u[e])}else Mo(t,r,JSON.stringify(i),u[e]),!t.component&&"muted"===r&&Ya(t.tag,t.attrsMap.type,r)&&Do(t,r,"true",u[e])}(t),t}function gs(t){var e;if(e=Bo(t,"v-for")){var n=function(t){var e=t.match(ns);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(os,""),o=r.match(rs);o?(n.alias=r.replace(rs,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(e);n&&T(t,n)}}function ys(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function _s(t){var e=t.name.replace(us,"");return e||"#"!==t.name[0]&&(e="default"),is.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'.concat(e,'"'),dynamic:!1}}function bs(t){var e=t.match(cs);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function $s(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var ws=/^xmlns:NS\d+/,xs=/^NS\d+:/;function Cs(t){return vs(t.tag,t.attrsList.slice(),t.parent)}var ks=[ba,wa,{preTransformNode:function(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r=void 0;if((n[":type"]||n["v-bind:type"])&&(r=Ho(t,"type")),n.type||r||!n["v-bind"]||(r="(".concat(n["v-bind"],").type")),r){var o=Bo(t,"v-if",!0),i=o?"&&(".concat(o,")"):"",a=null!=Bo(t,"v-else",!0),s=Bo(t,"v-else-if",!0),c=Cs(t);gs(c),Io(c,"type","checkbox"),ms(c,e),c.processed=!0,c.if="(".concat(r,")==='checkbox'")+i,ys(c,{exp:c.if,block:c});var u=Cs(t);Bo(u,"v-for",!0),Io(u,"type","radio"),ms(u,e),ys(c,{exp:"(".concat(r,")==='radio'")+i,block:u});var l=Cs(t);return Bo(l,"v-for",!0),Io(l,":type",r),ms(l,e),ys(c,{exp:o,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Ss,Os,Ts={model:function(t,e,n){var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return Vo(t,r,o),!1;if("select"===i)!function(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(r?"_n(val)":"val","})"),i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",a="var $$selectedVal = ".concat(o,";");a="".concat(a," ").concat(Ko(e,i)),Fo(t,"change",a,null,!0)}(t,r,o);else if("input"===i&&"checkbox"===a)!function(t,e,n){var r=n&&n.number,o=Ho(t,"value")||"null",i=Ho(t,"true-value")||"true",a=Ho(t,"false-value")||"false";Do(t,"checked","Array.isArray(".concat(e,")")+"?_i(".concat(e,",").concat(o,")>-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),Fo(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(a,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Ko(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Ko(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Ko(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Ho(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Do(t,"checked","_q(".concat(e,",").concat(o,")")),Fo(t,"change",Ko(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?Yo:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n(".concat(l,")"));var f=Ko(e,l);c&&(f="if($event.target.composing)return;".concat(f));Do(t,"value","(".concat(e,")")),Fo(t,u,f,null,!0),(s||a)&&Fo(t,"blur","$forceUpdate()")}(t,r,o);else if(!H.isReservedTag(i))return Vo(t,r,o),!1;return!0},text:function(t,e){e.value&&Do(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Do(t,"innerHTML","_s(".concat(e.value,")"),e)}},As={expectHTML:!0,modules:ks,directives:Ts,isPreTag:function(t){return"pre"===t},isUnaryTag:Ca,mustUseProp:Mr,canBeLeftOpenTag:ka,isReservedTag:Gr,getTagNamespace:Xr,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(ks)},js=b((function(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Es(t,e){t&&(Ss=js(e.staticKeys||""),Os=e.isReservedTag||E,Ns(t),Ps(t,!1))}function Ns(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||h(t.tag)||!Os(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Ss)))}(t),1===t.type){if(!Os(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Ns(r),r.static||(t.static=!1)}if(t.ifConditions)for(e=1,n=t.ifConditions.length;e<n;e++){var o=t.ifConditions[e].block;Ns(o),o.static||(t.static=!1)}}}function Ps(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ps(t.children[n],e||!!t.for);if(t.ifConditions)for(n=1,r=t.ifConditions.length;n<r;n++)Ps(t.ifConditions[n].block,e)}}var Ds=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Ms=/\([^)]*?\);*$/,Is=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ls={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Rs={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Fs=function(t){return"if(".concat(t,")return null;")},Hs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Fs("$event.target !== $event.currentTarget"),ctrl:Fs("!$event.ctrlKey"),shift:Fs("!$event.shiftKey"),alt:Fs("!$event.altKey"),meta:Fs("!$event.metaKey"),left:Fs("'button' in $event && $event.button !== 0"),middle:Fs("'button' in $event && $event.button !== 1"),right:Fs("'button' in $event && $event.button !== 2")};function Bs(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=Us(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(a,","):r+='"'.concat(i,'":').concat(a,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function Us(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return Us(t)})).join(","),"]");var e=Is.test(t.value),n=Ds.test(t.value),r=Is.test(t.value.replace(Ms,""));if(t.modifiers){var o="",i="",a=[],s=function(e){if(Hs[e])i+=Hs[e],Ls[e]&&a.push(e);else if("exact"===e){var n=t.modifiers;i+=Fs(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else a.push(e)};for(var c in t.modifiers)s(c);a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(zs).join("&&"),")return null;")}(a)),i&&(o+=i);var u=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(u,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function zs(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Ls[t],r=Rs[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var Vs={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:j},Ks=function(t){this.options=t,this.warn=t.warn||No,this.transforms=Po(t.modules,"transformCode"),this.dataGenFns=Po(t.modules,"genData"),this.directives=T(T({},Vs),t.directives);var e=t.isReservedTag||E;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Js(t,e){var n=new Ks(e),r=t?"script"===t.tag?"null":qs(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function qs(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Ws(t,e);if(t.once&&!t.onceProcessed)return Zs(t,e);if(t.for&&!t.forProcessed)return Ys(t,e);if(t.if&&!t.ifProcessed)return Gs(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=nc(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?ic((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=",".concat(i));a&&(o+="".concat(i?"":",null",",").concat(a));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:nc(e,n,!0);return"_c(".concat(t,",").concat(Qs(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,o=e.maybeComponent(t);(!t.plain||t.pre&&o)&&(r=Qs(t,e));var i=void 0,a=e.options.bindings;o&&a&&!1!==a.__isScriptSetup&&(i=function(t,e){var n=w(e),r=x(n),o=function(o){return t[e]===o?e:t[n]===o?n:t[r]===o?r:void 0},i=o("setup-const")||o("setup-reactive-const");if(i)return i;var a=o("setup-let")||o("setup-ref")||o("setup-maybe-ref");if(a)return a}(a,t.tag)),i||(i="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:nc(t,e,!0);n="_c(".concat(i).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var c=0;c<e.transforms.length;c++)n=e.transforms[c](t,n);return n}return nc(t,e)||"void 0"}function Ws(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return ".concat(qs(t,e),"}")),e.pre=n,"_m(".concat(e.staticRenderFns.length-1).concat(t.staticInFor?",true":"",")")}function Zs(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Gs(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o(".concat(qs(t,e),",").concat(e.onceId++,",").concat(n,")"):qs(t,e)}return Ws(t,e)}function Gs(t,e,n,r){return t.ifProcessed=!0,Xs(t.ifConditions.slice(),e,n,r)}function Xs(t,e,n,r){if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"(".concat(o.exp,")?").concat(i(o.block),":").concat(Xs(t,e,n,r)):"".concat(i(o.block));function i(t){return n?n(t,e):t.once?Zs(t,e):qs(t,e)}}function Ys(t,e,n,r){var o=t.for,i=t.alias,a=t.iterator1?",".concat(t.iterator1):"",s=t.iterator2?",".concat(t.iterator2):"";return t.forProcessed=!0,"".concat(r||"_l","((").concat(o,"),")+"function(".concat(i).concat(a).concat(s,"){")+"return ".concat((n||qs)(t,e))+"})"}function Qs(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=e.directives[i.name];u&&(a=!!u(t,i,e.warn)),a&&(c=!0,s+='{name:"'.concat(i.name,'",rawName:"').concat(i.rawName,'"').concat(i.value?",value:(".concat(i.value,"),expression:").concat(JSON.stringify(i.value)):"").concat(i.arg?",arg:".concat(i.isDynamicArg?i.arg:'"'.concat(i.arg,'"')):"").concat(i.modifiers?",modifiers:".concat(JSON.stringify(i.modifiers)):"","},"))}if(c)return s.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:".concat(t.key,",")),t.ref&&(n+="ref:".concat(t.ref,",")),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'.concat(t.tag,'",'));for(var o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+="attrs:".concat(ic(t.attrs),",")),t.props&&(n+="domProps:".concat(ic(t.props),",")),t.events&&(n+="".concat(Bs(t.events,!1),",")),t.nativeEvents&&(n+="".concat(Bs(t.nativeEvents,!0),",")),t.slotTarget&&!t.slotScope&&(n+="slot:".concat(t.slotTarget,",")),t.scopedSlots&&(n+="".concat(function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||tc(n)})),o=!!t.if;if(!r)for(var i=t.parent;i;){if(i.slotScope&&i.slotScope!==ps||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}var a=Object.keys(e).map((function(t){return ec(e[t],n)})).join(",");return"scopedSlots:_u([".concat(a,"]").concat(r?",null,true":"").concat(!r&&o?",null,false,".concat(function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(a)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Js(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(ic(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function tc(t){return 1===t.type&&("slot"===t.tag||t.children.some(tc))}function ec(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Gs(t,e,ec,"null");if(t.for&&!t.forProcessed)return Ys(t,e,ec);var r=t.slotScope===ps?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(nc(t,e)||"undefined",":undefined"):nc(t,e)||"undefined":qs(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function nc(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return"".concat((r||qs)(a,e)).concat(s)}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var o=t[r];if(1===o.type){if(rc(o)||o.ifConditions&&o.ifConditions.some((function(t){return rc(t.block)}))){n=2;break}(e(o)||o.ifConditions&&o.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(i,e.maybeComponent):0,u=o||oc;return"[".concat(i.map((function(t){return u(t,e)})).join(","),"]").concat(c?",".concat(c):"")}}function rc(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function oc(t,e){return 1===t.type?qs(t,e):3===t.type&&t.isComment?function(t){return"_e(".concat(JSON.stringify(t.text),")")}(t):function(t){return"_v(".concat(2===t.type?t.expression:ac(JSON.stringify(t.text)),")")}(t)}function ic(t){for(var e="",n="",r=0;r<t.length;r++){var o=t[r],i=ac(o.value);o.dynamic?n+="".concat(o.name,",").concat(i,","):e+='"'.concat(o.name,'":').concat(i,",")}return e="{".concat(e.slice(0,-1),"}"),n?"_d(".concat(e,",[").concat(n.slice(0,-1),"])"):e}function ac(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function sc(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),j}}function cc(t){var e=Object.create(null);return function(n,r,o){(r=T({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(e[i])return e[i];var a=t(n,r),s={},c=[];return s.render=sc(a.render,c),s.staticRenderFns=a.staticRenderFns.map((function(t){return sc(t,c)})),e[i]=s}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var uc,lc,fc=(uc=function(t,e){var n=hs(t.trim(),e);!1!==e.optimize&&Es(n,e);var r=Js(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),o=[],i=[];if(n)for(var a in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=T(Object.create(t.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(t,e,n){(n?i:o).push(t)};var s=uc(e.trim(),r);return s.errors=o,s.tips=i,s}return{compile:e,compileToFunctions:cc(e)}}),dc=fc(As).compileToFunctions;function pc(t){return(lc=lc||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',lc.innerHTML.indexOf("&#10;")>0}var vc=!!J&&pc(!1),hc=!!J&&pc(!0),mc=b((function(t){var e=to(t);return e&&e.innerHTML})),gc=Cr.prototype.$mount;return Cr.prototype.$mount=function(t,e){if((t=t&&to(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=mc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=dc(r,{outputSourceRange:!1,shouldDecodeNewlines:vc,shouldDecodeNewlinesForHref:hc,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return gc.call(this,t,e)},Cr.compile=dc,T(Cr,Fn),Cr.effect=function(t,e){var n=new Vn(ct,t,j,{sync:!0});e&&(n.update=function(){e((function(){return n.run()}))})},Cr}));
src/main/webapp/views/wcsmap/wcsmap.css
New file
@@ -0,0 +1,5 @@
* {
    margin: 0;
    padding: 0;
    overflow: hidden;
}
src/main/webapp/views/wcsmap/wcsmap.html
New file
@@ -0,0 +1,286 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>wcs监控图</title>
    <link rel="stylesheet" href="wcsmap.css">
    <script type="text/javascript" src="mapData.json"></script>
    <script src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
    <script src="pixijs.js"></script>
    <script src="vue.min.js"></script>
    <style>
        .tooltip {
            position: absolute;
            display: block;
            padding: 10px;
            color: #fff;
            background-color: #000;
            border-radius: 5px;
            left: 200px;
            top: 200px;
        }
    </style>
</head>
<body>
<div id="app">
    <div id="pixiView">
    </div>
    <!--输出操作和FPS-->
    <div style="position: absolute;top: 20px;right: 50px;">
        <div>FPS:{{mapFps}}</div>
    </div>
    <div id="tooltip" class="tooltip">111</div>
    <p style="position: absolute;top: 20px;right: 100px;" data-tooltip="1232131">666666666</p>
</div>
</div>
</body>
</html>
<script>
    let objectsContainer;
    var tooltip = document.getElementById('tooltip');
    var app = new Vue({
        el: '#app',
        data: {
            mapFps: 0,
        },
        created(){
            console.log(mapData);
        },
    })
    let pixiApp = new PIXI.Application({
        resizeTo: window,
        backgroundColor: 0x1f3366
    })
    $("#pixiView").append(pixiApp.view)
    // 加载位图资源
    PIXI.Loader.shared.add('ChillRoundF','./image_font.xml.fnt').load();
    function onAssetsLoaded() {
        createText();
    }
    function createText() {
        // let text = new PIXI.BitmapText('123',{
        //     fontName: 'font',
        //     fontSize: 16,
        //     tint: 0xffffff
        // })
        // text.x = 100;
        // text.y = 100;
        // pixiApp.stage.addChild(text)
    }
    //*******************拖动画布*******************
    let stageOriginalPos;
    let mouseDownPoint;
    let touchBlank = false;
    let touchOver = false;
    pixiApp.renderer.plugins.interaction.on(
        'pointerdown',
        (event) => {
            const globalPos = event.data.global;
            // 记录下stage原来的位置
            stageOriginalPos = [pixiApp.stage.position._x, pixiApp.stage.position._y];
            // 记录下mouse down的位置
            mouseDownPoint = [globalPos.x, globalPos.y];
            if (!event.target) {
                // 点到了画布的空白位置
                touchBlank = true;
            }
        }
    );
    pixiApp.renderer.plugins.interaction.on(
        'pointermove',
        (event) => {
            const globalPos = event.data.global;
            if (touchBlank) {
                // 拖拽画布
                const dx = globalPos.x - mouseDownPoint[0];
                const dy = globalPos.y - mouseDownPoint[1];
                pixiApp.stage.position.set(
                    stageOriginalPos[0] + dx,
                    stageOriginalPos[1] + dy
                );
            }
        }
    );
    pixiApp.renderer.plugins.interaction.on(
        'pointerup',
        (event) => {
            touchBlank = false;
        }
    );
    // pixiApp.renderer.plugins.interaction.on(
    //     'mouseover',
    //     (event) => {
    //         const globalPos = event.data.global;
    //             console.log(globalPos);
    //     }
    // );
    //*******************拖动画布*******************
    //*******************缩放画布*******************
    pixiApp.view.addEventListener('wheel', (event) => {
        event.stopPropagation();
        event.preventDefault();
        // 因为画布是充满视窗的,所以clientX等于mouse point在renderer上的x坐标
        const globalPos = [event.clientX, event.clientY];
        const delta = event.deltaY;
        const oldZoom = pixiApp.stage.scale.x;
        let newZoom = oldZoom * 0.999 ** delta;
        // const oldStageMatrix = app.stage.localTransform.clone();
        // const oldStagePos = oldStageMatrix.applyInverse(pointerGlobalPos);
        const oldStagePos = globalPos;
        const dx = oldStagePos[0] * oldZoom - oldStagePos[0] * newZoom;
        const dy = oldStagePos[1] * oldZoom - oldStagePos[1] * newZoom;
        pixiApp.stage.setTransform(
            pixiApp.stage.position.x + dx,
            pixiApp.stage.position.y + dy,
            newZoom,
            newZoom,
            0,
            0,
            0,
            0,
            0
        );
    });
    //*******************缩放画布*******************
    // 创建一个容器来管理大批量的显示对象
    objectsContainer = new PIXI.Container();
    pixiApp.stage.addChild(objectsContainer);
    //*******************FPS*******************
    var g_Time=0;
    pixiApp.ticker.add((delta) => {
        var timeNow = (new Date()).getTime();
        var timeDiff = timeNow - g_Time;
        g_Time = timeNow;
        var fps = 1000 / timeDiff;
        this.mapFps = parseInt(fps)
    });
    //*******************FPS*******************
    for (let k of mapData.plant) {
        let rectangle = new PIXI.Graphics();
        rectangle.beginFill(k.background);
        rectangle.originColor = k.background;
        rectangle.drawRect(0, 0, k.width, k.height);
        rectangle.x = k.x;
        rectangle.y = k.y;
        objectsContainer.addChild(rectangle);
    }
    for (let k of mapData.conveyor) {
        let rectangle = new PIXI.Graphics();
        rectangle.beginFill(k.background);
        rectangle.originColor = k.background;
        rectangle.alpha=k.alpha ? k.alpha : 1
        rectangle.drawRect(0, 0, k.width, k.height);
        rectangle.x = k.x;
        rectangle.y = k.y;
        rectangle.interactive = true
        rectangle.cursor = "pointer"
        rectangle.on('mouseover', onMouseOver)
        function onMouseOver(event) {
            console.log(event);
            // 创建内容框
            let tooltip = new PIXI.Graphics();
            tooltip.beginFill(0xFFFFFF); // 内容框背景颜色
            tooltip.lineStyle(1, 0x000000); // 内容框边框样式
            tooltip.drawRect(0, 0, 100, 40); // 绘制内容框
            tooltip.x = event.data.global.x; // 根据鼠标位置调整内容框位置
            tooltip.y = event.data.global.y;
            pixiApp.stage.addChild(tooltip);
            // 计算内容框的位置,使其在鼠标右下角偏移10像素处
            tooltip.x = event.currentTarget.x + event.currentTarget.width + 10;
            tooltip.y = event.currentTarget.y + event.currentTarget.height + 10;
            // 添加文本到内容框
            var hel = `站点编号:${k.title}`
            let text = new PIXI.BitmapText(hel,{
                fontName: 'ChillRoundF',
                fontSize: 16,
                tint: 0xffffff
            })
            // text.x = 100;
            // text.y = 100;
            // pixiApp.stage.addChild(text)
            // let text = new PIXI.Text('Hello!', { fontFamily: 'Arial', fontSize: 20, fill: 0x000000 ,resolution: pixiApp.renderer.resolution,antialias: true});
            text.x = tooltip.x;
            text.y = tooltip.y;
            text.resolution = pixiApp.renderer.resolution;
            pixiApp.stage.addChild(text);
            // 监听鼠标移出事件,移除内容框
            rectangle.on('mouseout', () => {
                pixiApp.stage.removeChild(tooltip);
                pixiApp.stage.removeChild(text);
            });
        }
        objectsContainer.addChild(rectangle);
    }
    let shelf1 = mapData.shelf1
    for (let j in shelf1) {
        let k = shelf1[j]
        let y = k.y
        for (let i = 0; i < k.anfme; i++) {
            let rectangle = new PIXI.Graphics();
            rectangle.beginFill(0xffffff);
            // rectangle.lineStyle(1, 0xffffff);
            rectangle.drawRect(0, 0, k.unitX-2, k.unitY-2);
            rectangle.x = k.x + k.unitX * i;
            rectangle.y = y;
            objectsContainer.addChild(rectangle);
        }
    }
    let shelf2 = mapData.shelf2
    for (let j in shelf2) {
        let k = shelf2[j]
        let y = k.y
        for (let i = 0; i < k.anfme; i++) {
            let rectangle = new PIXI.Graphics();
            rectangle.beginFill(0xffffff);
            // rectangle.lineStyle(1, 0xffffff);
            rectangle.drawRect(0, 0, k.unitX-2, k.unitY);
            rectangle.x = k.x + k.unitX * i;
            rectangle.y = y;
            objectsContainer.addChild(rectangle);
        }
    }
    // window.addEventListener('DOMContentLoaded',function() {
    //     var tooltip = document.getElementById('tooltip');
    //     document.addEventListener('mouseover',function(event) {
    //         var target = event.target
    //         var tooltipText = target.getAttribute('data-tooltip')
    //         if (tooltipText) {
    //             tooltip.innerHTML = tooltipText
    //             tooltip.style.display = 'block'
    //             tooltip.style.left = (event.clientX + 10) + 'px'
    //             tooltip.style.top = (event.clientY + 10) + 'px'
    //         }
    //     })
    //     document.addEventListener('mouseout',function() {
    //         tooltip.style.display = 'none'
    //     })
    // })
</script>