diff --git a/README.md b/README.md index 1b803fc63870..798bc0aa3a69 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,12 @@ -

+

Label Studio

-Label Studio is an open-source, configurable data annotation tool. Its purpose is to enable you to label different types of data using the most convenient interface with a standardized output format. +Label Studio is an open-source, configurable data annotation tool. -
+Its purpose is to enable you to label different types of data using the most convenient interface with a standardized output format. -![GitHub](https://img.shields.io/github/license/heartexlabs/label-studio?logo=heartex) -[![Build Status](https://travis-ci.com/heartexlabs/label-studio.svg?branch=master)](https://travis-ci.com/heartexlabs/label-studio) -[![codecov](https://codecov.io/gh/heartexlabs/label-studio/branch/master/graph/badge.svg)](https://codecov.io/gh/heartexlabs/label-studio) -![GitHub release](https://img.shields.io/github/v/release/heartexlabs/label-studio?include_prereleases) -[![Gitter](https://badges.gitter.im/label-studio/community.svg)](https://gitter.im/label-studio/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -
+![GitHub](https://img.shields.io/github/license/heartexlabs/label-studio?logo=heartex) [![Build Status](https://travis-ci.com/heartexlabs/label-studio.svg?branch=master)](https://travis-ci.com/heartexlabs/label-studio) [![codecov](https://codecov.io/gh/heartexlabs/label-studio/branch/master/graph/badge.svg)](https://codecov.io/gh/heartexlabs/label-studio) ![GitHub release](https://img.shields.io/github/v/release/heartexlabs/label-studio?include_prereleases) [![Gitter](https://badges.gitter.im/label-studio/community.svg)](https://gitter.im/label-studio/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) ![Label Studio](./images/label-studio-examples.gif) @@ -24,12 +18,12 @@ Label Studio is an open-source, configurable data annotation tool. Its purpose i - [Classify audio](https://labelstud.io/templates/audio_classification.html) - [Conversational modeling & chatbots](https://labelstud.io/templates/dialogue_analysis.html) - [Image object detection](https://labelstud.io/templates/image_bbox.html) -- [Audio regions](https://labelstud.io/templates/audio_regions.html)New +- [Audio regions](https://labelstud.io/templates/audio_regions.html) +- [Image KeyPoints](https://labelstud.io/templates/image_keypoints.html)New +- [Image Polygons](https://labelstud.io/templates/image_polygons.html)New Coming Soon: -- Image keypoints (screenshot) -- Image polygons - Time series - Video diff --git a/build/asset-manifest.json b/build/asset-manifest.json index a77cca4596fd..f06c15177f44 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,12 +1,12 @@ { - "main.css": "/static/css/main.f5b8907f.chunk.css", - "main.js": "/static/js/main.e16f17f7.chunk.js", - "static/css/1.47956429.chunk.css": "/static/css/1.47956429.chunk.css", - "static/js/1.0c48412c.chunk.js": "/static/js/1.0c48412c.chunk.js", + "main.css": "/static/css/main.01c074ef.chunk.css", + "main.js": "/static/js/main.c46eec5a.chunk.js", + "static/css/1.31ca5cfe.chunk.css": "/static/css/1.31ca5cfe.chunk.css", + "static/js/1.a5f03387.chunk.js": "/static/js/1.a5f03387.chunk.js", "runtime~main.js": "/static/js/runtime~main.229c360f.js", "static/media/semantic.min.css": "/static/media/brand-icons.a1a749e8.svg", "static/media/config.xml": "/static/media/config.c5233796.xml", "index.html": "/index.html", - "precache-manifest.370322865dee12930a1efa06c0ad02c8.js": "/precache-manifest.370322865dee12930a1efa06c0ad02c8.js", + "precache-manifest.6c61062d8e7bff61bd13852151b097df.js": "/precache-manifest.6c61062d8e7bff61bd13852151b097df.js", "service-worker.js": "/service-worker.js" } \ No newline at end of file diff --git a/build/index.html b/build/index.html index fd6b8f49414f..5be69d7ead94 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Label Studio
\ No newline at end of file +Label Studio
\ No newline at end of file diff --git a/build/precache-manifest.370322865dee12930a1efa06c0ad02c8.js b/build/precache-manifest.6c61062d8e7bff61bd13852151b097df.js similarity index 88% rename from build/precache-manifest.370322865dee12930a1efa06c0ad02c8.js rename to build/precache-manifest.6c61062d8e7bff61bd13852151b097df.js index 8b4f999d1496..ecaf1872d7e0 100644 --- a/build/precache-manifest.370322865dee12930a1efa06c0ad02c8.js +++ b/build/precache-manifest.6c61062d8e7bff61bd13852151b097df.js @@ -1,19 +1,19 @@ self.__precacheManifest = [ { - "revision": "cd6c777f1945164224dee082abaea03a", - "url": "/static/media/outline-icons.cd6c777f.woff2" + "revision": "ef60a4f6c25ef7f39f2d25a748dbecfe", + "url": "/static/media/outline-icons.ef60a4f6.woff" }, { - "revision": "e16f17f7bd25e2642970", - "url": "/static/css/main.f5b8907f.chunk.css" + "revision": "c46eec5a4343c914a267", + "url": "/static/css/main.01c074ef.chunk.css" }, { "revision": "a1a749e89f578a49306ec2b055c073da", "url": "/static/media/brand-icons.a1a749e8.svg" }, { - "revision": "0c48412c1efcf71a601a", - "url": "/static/js/1.0c48412c.chunk.js" + "revision": "a5f03387825f3eeb4379", + "url": "/static/js/1.a5f03387.chunk.js" }, { "revision": "229c360febb4351a89df", @@ -64,12 +64,12 @@ self.__precacheManifest = [ "url": "/static/media/config.1890026d.xml" }, { - "revision": "e16f17f7bd25e2642970", - "url": "/static/js/main.e16f17f7.chunk.js" + "revision": "c46eec5a4343c914a267", + "url": "/static/js/main.c46eec5a.chunk.js" }, { - "revision": "ef60a4f6c25ef7f39f2d25a748dbecfe", - "url": "/static/media/outline-icons.ef60a4f6.woff" + "revision": "cd6c777f1945164224dee082abaea03a", + "url": "/static/media/outline-icons.cd6c777f.woff2" }, { "revision": "701ae6abd4719e9c2ada3535a497b341", @@ -103,10 +103,6 @@ self.__precacheManifest = [ "revision": "8e3c7f5520f5ae906c6cf6d7f3ddcd19", "url": "/static/media/icons.8e3c7f55.eot" }, - { - "revision": "13db00b7a34fee4d819ab7f9838cc428", - "url": "/static/media/brand-icons.13db00b7.eot" - }, { "revision": "b87b9ba532ace76ae9f6edfe9f72ded2", "url": "/static/media/icons.b87b9ba5.ttf" @@ -115,6 +111,10 @@ self.__precacheManifest = [ "revision": "c5ebe0b32dc1b5cc449a76c4204d13bb", "url": "/static/media/brand-icons.c5ebe0b3.ttf" }, + { + "revision": "13db00b7a34fee4d819ab7f9838cc428", + "url": "/static/media/brand-icons.13db00b7.eot" + }, { "revision": "82f60bd0b94a1ed68b1e6e309ce2e8c3", "url": "/static/media/outline-icons.82f60bd0.svg" @@ -124,11 +124,11 @@ self.__precacheManifest = [ "url": "/static/media/icons.962a1bf3.svg" }, { - "revision": "0c48412c1efcf71a601a", - "url": "/static/css/1.47956429.chunk.css" + "revision": "a5f03387825f3eeb4379", + "url": "/static/css/1.31ca5cfe.chunk.css" }, { - "revision": "66ef6f2c625fc2d3e3601dd5160f6c25", + "revision": "f82f901504581ca022f2cdaa7955a936", "url": "/index.html" } ]; \ No newline at end of file diff --git a/build/service-worker.js b/build/service-worker.js index e66ba47e6362..2b75cb9a44a8 100644 --- a/build/service-worker.js +++ b/build/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); importScripts( - "/precache-manifest.370322865dee12930a1efa06c0ad02c8.js" + "/precache-manifest.6c61062d8e7bff61bd13852151b097df.js" ); workbox.clientsClaim(); diff --git a/build/static/css/1.47956429.chunk.css b/build/static/css/1.31ca5cfe.chunk.css similarity index 100% rename from build/static/css/1.47956429.chunk.css rename to build/static/css/1.31ca5cfe.chunk.css diff --git a/build/static/css/main.f5b8907f.chunk.css b/build/static/css/main.01c074ef.chunk.css similarity index 73% rename from build/static/css/main.f5b8907f.chunk.css rename to build/static/css/main.01c074ef.chunk.css index 83fb2c44ca74..f271a296b32c 100644 --- a/build/static/css/main.f5b8907f.chunk.css +++ b/build/static/css/main.01c074ef.chunk.css @@ -1 +1 @@ -.Completions_buttons__2YII_{margin:10px 0;display:flex;justify-content:space-between;align-items:center}.Completions_completion__oF0zk{padding:1em!important}.Completions_completion_selected__yEozY{background:rgba(0,0,0,.05)}.Completions_title__mo6gq{display:flex;justify-content:space-between;align-items:center}.Completions_title__mo6gq h3{margin:0 1em 0 0}.Hint_main__2bVzl{font-size:9px}.Controls_skip__10Js5{margin-bottom:10px}.Controls_task__15i-O{opacity:.4}.Controls_container__3DhBP{margin-bottom:10px}.Controls_container__3DhBP>button{margin:0 10px}.Controls_container__3DhBP>button:first-child{margin-left:0}@media (max-width:760px){.Controls_container__3DhBP>button{margin-left:0;margin-bottom:5px}}.Controls_container__3DhBP:first-child{margin-left:0}.Controls_container__3DhBP:last-child{margin-right:0}@media (max-width:760px){.Controls_container__3DhBP{display:flex;justify-content:flex-start;align-items:flex-start;flex-flow:column}}.Controls_block__1OeQq{clear:both}.Controls_wrapper__GzSbP{display:flex;justify-content:space-between;align-items:center;margin-top:20px}@media (max-width:760px){.Controls_wrapper__GzSbP{flex-flow:column;align-items:flex-start}}.Controls_rewrite__3zE7C{background:#73d13d;border-color:#73d13d}.Controls_rewrite__3zE7C:hover{background:#95de64;border-color:#95de64}.Panel_container__1UbGz{display:flex;justify-content:space-between;margin-bottom:2rem}@media (max-width:760px){.Panel_container__1UbGz{flex-direction:column}}.Panel_block__35uxJ{max-width:320px}.Panel_block__controls__386dF{width:940px;max-width:940px}@media screen and (max-width:1400px){.Panel_block__controls__386dF{max-width:800px}}@media screen and (max-width:1280px){.Panel_block__controls__386dF{max-width:750px}}@media (max-width:760px){.Panel_block__controls__386dF{width:100%}}.Panel_block__35uxJ>button{margin:0 5px}.Panel_block__35uxJ>button:first-child{margin-left:0}.Panel_block__35uxJ>button:last-child{margin-right:0}@media (max-width:760px){.Panel_block__35uxJ>button{margin:0 2px 10px}}.Segment_block__1srue{position:relative;max-width:1280px;width:940px;margin-right:20px;background:#fff;padding:1em;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15);margin-bottom:1em}@media screen and (max-width:1600px){.Segment_block__1srue{max-width:900px}}@media screen and (max-width:1400px){.Segment_block__1srue{max-width:800px}}@media screen and (max-width:1280px){.Segment_block__1srue{max-width:750px}}@media (max-width:760px){.Segment_block__1srue{width:100%}}.Node_node__31C16{color:#262626}.Node_node__31C16:hover{color:#1890ff}.Relations_block__3ojdZ{display:flex;align-items:center;margin-bottom:1em}.Relations_section__3MAqx{width:100%;display:block;position:relative;background:#fff;padding:1em;border:1px solid rgba(0,0,0,.2);border-radius:.2rem}.Relations_section__3MAqx:before{position:absolute;top:0;left:0;right:0;margin:0 auto;height:100%;width:1px;background:rgba(0,0,0,.05);content:""}.Relations_section__blocks__26CLV{display:flex;justify-content:space-around;align-items:center}.Relations_delete__3qe_f{margin-left:10px}.Entities_item__215D0{color:get-color(error);font-size:14px}.Entities_item__215D0:hover{cursor:pointer;color:#f5222d}.Entity_block__2XspI{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.Entity_button__bWlfa{margin-bottom:10px;margin-right:10px}.Entity_labels__tjrgz{margin-bottom:10px}.Entity_tag__35G8T{margin-bottom:5px}.Dialog_block__1YBml{position:relative;border:1px solid #f2f3f4;background-color:#f8f9f9;border-radius:5px;padding:7px 20px;margin:10px 0;display:flex;flex-flow:column}.Dialog_block__1YBml:last-of-type{margin-bottom:20px}.Dialog_block_selected__3zZ50{border:2px solid #ff4d4f}.Dialog_name__3tjId{font-weight:700}.Dialog_tag__1SHCG{margin-top:10px}.Dialog_date__1mcxh{font-style:italic;font-size:.8rem}.Waveform_progress__3BwkI{color:#ff5630}.Waveform_wave__3tQFG{position:relative}.Waveform_menu__ToCwx{margin:2em 0}.AudioPlus_play__3_Ds7{background:#52c41a;border:1px solid #52c41a}.AudioPlus_play__3_Ds7:hover{background:#73d13d;border:1px solid #73d13d}.TextHighlight_block__2-3wy{border:1px solid #e8e8e8;background:rgba(0,0,0,.01);margin-bottom:.5em;border-radius:3px;padding:20px 10px;word-break:break-word}.TextRegion_state__1J2X6{color:#00f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:2px 0;font-size:100%;top:0}.App_editor__ZA0wp{min-width:320px;max-width:1280px;margin:0 auto}@media screen and (max-width:1400px){.App_editor__ZA0wp{max-width:1000px}}@media (max-width:760px){.App_editor__ZA0wp{width:300px;min-width:300px}}.App_menu__3cWjU{width:320px;display:flex;flex-flow:column}.App_menu__3cWjU>div{margin-bottom:20px}.App_menu__3cWjU>div:last-child{margin-bottom:0}@media (max-width:760px){.App_menu__3cWjU{margin-left:0;margin-top:20px}}.App_content__F7bhJ{border:1px solid #e8e8e8;padding:10px 20px}@media (max-width:640px){.App_content__F7bhJ{padding:0;border:0}}.App_common__2vqlZ{display:flex;justify-content:flex-start;align-items:flex-start}@media only screen and (max-width:768px){.App_common__2vqlZ{display:inline!important;display:initial!important}} \ No newline at end of file +.Completions_buttons__2YII_{margin:10px 0;display:flex;justify-content:space-between;align-items:center}.Completions_completion__oF0zk{padding:1em!important}.Completions_completion_selected__yEozY{background:rgba(0,0,0,.05)}.Completions_title__mo6gq{display:flex;justify-content:space-between;align-items:center}.Completions_title__mo6gq h3{margin:0 1em 0 0}.Hint_main__2bVzl{font-size:9px}.Controls_skip__10Js5{margin-bottom:10px}.Controls_task__15i-O{opacity:.4}.Controls_container__3DhBP{margin-bottom:10px}.Controls_container__3DhBP>button{margin:0 10px}.Controls_container__3DhBP>button:first-child{margin-left:0}@media (max-width:760px){.Controls_container__3DhBP>button{margin-left:0;margin-bottom:5px}}.Controls_container__3DhBP:first-child{margin-left:0}.Controls_container__3DhBP:last-child{margin-right:0}@media (max-width:760px){.Controls_container__3DhBP{display:flex;justify-content:flex-start;align-items:flex-start;flex-flow:column}}.Controls_block__1OeQq{clear:both}.Controls_wrapper__GzSbP{display:flex;justify-content:space-between;align-items:center;margin-top:20px}@media (max-width:760px){.Controls_wrapper__GzSbP{flex-flow:column;align-items:flex-start}}.Controls_rewrite__3zE7C{background:#73d13d;border-color:#73d13d}.Controls_rewrite__3zE7C:hover{background:#95de64;border-color:#95de64}.Panel_container__1UbGz{display:flex;justify-content:space-between;margin-bottom:2rem}@media (max-width:760px){.Panel_container__1UbGz{flex-direction:column}}.Panel_block__35uxJ{max-width:320px}.Panel_block__controls__386dF{width:940px;max-width:940px}@media screen and (max-width:1400px){.Panel_block__controls__386dF{max-width:800px}}@media screen and (max-width:1280px){.Panel_block__controls__386dF{max-width:750px}}@media (max-width:760px){.Panel_block__controls__386dF{width:100%}}.Panel_block__35uxJ>button{margin:0 5px}.Panel_block__35uxJ>button:first-child{margin-left:0}.Panel_block__35uxJ>button:last-child{margin-right:0}@media (max-width:760px){.Panel_block__35uxJ>button{margin:0 2px 10px}}.Segment_block__1srue{position:relative;max-width:1280px;width:940px;margin-right:20px;background:#fff;padding:1em;border-radius:.28571429rem;border:1px solid rgba(34,36,38,.15);margin-bottom:1em}@media screen and (max-width:1600px){.Segment_block__1srue{max-width:900px}}@media screen and (max-width:1400px){.Segment_block__1srue{max-width:800px}}@media screen and (max-width:1280px){.Segment_block__1srue{max-width:750px}}@media (max-width:760px){.Segment_block__1srue{width:100%}}.Node_node__31C16{color:#262626}.Node_node__31C16:hover{color:#1890ff}.Relations_block__3ojdZ{display:flex;align-items:center;margin-bottom:1em}.Relations_section__3MAqx{width:100%;display:block;position:relative;background:#fff;padding:1em;border:1px solid rgba(0,0,0,.2);border-radius:.2rem}.Relations_section__3MAqx:before{position:absolute;top:0;left:0;right:0;margin:0 auto;height:100%;width:1px;background:rgba(0,0,0,.05);content:""}.Relations_section__blocks__26CLV{display:flex;justify-content:space-around;align-items:center}.Relations_delete__3qe_f{margin-left:10px}.Entities_item__215D0{color:get-color(error);font-size:14px}.Entities_item__215D0:hover{cursor:pointer;color:#f5222d}.Entity_block__2XspI{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.Entity_button__bWlfa{margin-bottom:10px;margin-right:10px}.Entity_labels__tjrgz{margin-bottom:10px}.Entity_tag__35G8T{margin-bottom:5px}.Dialog_block__1YBml{position:relative;border:1px solid #f2f3f4;background-color:#f8f9f9;border-radius:5px;padding:7px 20px;margin:10px 0;display:flex;flex-flow:column}.Dialog_block__1YBml:last-of-type{margin-bottom:20px}.Dialog_block_selected__3zZ50{border:2px solid #ff4d4f}.Dialog_name__3tjId{font-weight:700}.Dialog_tag__1SHCG{margin-top:10px}.Dialog_date__1mcxh{font-style:italic;font-size:.8rem}.Waveform_progress__3BwkI{color:#ff5630}.Waveform_wave__3tQFG{position:relative}.Waveform_menu__ToCwx{margin:2em 0}.AudioPlus_play__3_Ds7{background:#52c41a;border:1px solid #52c41a}.AudioPlus_play__3_Ds7:hover{background:#73d13d;border:1px solid #73d13d}.ImageControls_block__7t7JQ{display:flex;flex-flow:column;align-items:center;border:1px solid rgba(34,36,38,.15);border-radius:.28571429rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:.5em}.ImageControls_divider__1R3Vo{margin:12px 0}.ImageControls_button__3Z3R3{margin:.3rem 0}.TextHighlight_block__2-3wy{border:1px solid #e8e8e8;background:rgba(0,0,0,.01);margin-bottom:.5em;border-radius:3px;padding:20px 10px;word-break:break-word}.TextRegion_state__1J2X6{color:#00f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:2px 0;font-size:100%;top:0}.App_editor__ZA0wp{min-width:320px;max-width:1280px;margin:0 auto}@media screen and (max-width:1400px){.App_editor__ZA0wp{max-width:1000px}}@media (max-width:760px){.App_editor__ZA0wp{width:300px;min-width:300px}}.App_menu__3cWjU{width:320px;display:flex;flex-flow:column}.App_menu__3cWjU>div{margin-bottom:20px}.App_menu__3cWjU>div:last-child{margin-bottom:0}@media (max-width:760px){.App_menu__3cWjU{margin-left:0;margin-top:20px}}.App_content__F7bhJ{border:1px solid #e8e8e8;padding:10px 20px}@media (max-width:640px){.App_content__F7bhJ{padding:0;border:0}}.App_common__2vqlZ{display:flex;justify-content:flex-start;align-items:flex-start}@media only screen and (max-width:768px){.App_common__2vqlZ{display:inline!important;display:initial!important}} \ No newline at end of file diff --git a/build/static/js/1.0c48412c.chunk.js b/build/static/js/1.0c48412c.chunk.js deleted file mode 100644 index 4305cba79ad4..000000000000 --- a/build/static/js/1.0c48412c.chunk.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(364)},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return g}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return w}),n.d(t,"d",function(){return Ve}),n.d(t,"e",function(){return k}),n.d(t,"f",function(){return T}),n.d(t,"g",function(){return E}),n.d(t,"h",function(){return _}),n.d(t,"i",function(){return b}),n.d(t,"j",function(){return v}),n.d(t,"k",function(){return S}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return C}),n.d(t,"n",function(){return Ut});var i,o=n(11),a="warn";function c(){return a}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(i||(i={}));var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;c--)(i=e[c])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function f(e){var t="function"===typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(c){i={error:c}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var e=[],t=0;t";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")},t.prototype.die=function(){this.isAlive&&this.state!==ne.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.finalizeCreation=function(){this.baseFinalizeCreation()},t.prototype.aboutToDie=function(){this.baseAboutToDie()},t.prototype.finalizeDeath=function(){this.baseFinalizeDeath()},t.prototype.fireHook=function(e){this.fireInternalHook(e)},h([o.h],t.prototype,"die",null),t}(A),D=1,P={onError:function(e){throw e}},N=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;if(a.nodeId=++D,a.isProtectionEnabled=!0,a._autoUnbox=!0,a._isRunningAction=!1,a._hasSnapshotReaction=!1,a._observableInstanceState=0,a._cachedInitialSnapshotCreated=!1,a.unbox=a.unbox.bind(a),a._initialSnapshot=Oe(o),a.identifierAttribute=t.identifierAttribute,n||(a.identifierCache=new ie),a._childNodes=t.initializeChildNodes(a,a._initialSnapshot),a.identifier=null,a.unnormalizedIdentifier=null,a.identifierAttribute&&a._initialSnapshot){var c=a._initialSnapshot[a.identifierAttribute];if(void 0===c){var s=a._childNodes[a.identifierAttribute];s&&(c=s.value)}if("string"!==typeof c&&"number"!==typeof c)throw ge("Instance identifier '"+a.identifierAttribute+"' for type '"+a.type.name+"' must be a string or a number");a.identifier=It(c),a.unnormalizedIdentifier=c}return n?n.root.identifierCache.addNodeToCache(a):a.identifierCache.addNodeToCache(a),a}return l(t,e),t.prototype.applyPatches=function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)},t.prototype.applySnapshot=function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)},t.prototype.createObservableInstanceIfNeeded=function(){var e,t;if(0===this._observableInstanceState){0,this._observableInstanceState=1;for(var n=[],r=this.parent;r&&0===r._observableInstanceState;)n.unshift(r),r=r.parent;try{for(var a=f(n),c=a.next();!c.done;c=a.next()){c.value.createObservableInstanceIfNeeded()}}catch(h){e={error:h}}finally{try{c&&!c.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}var s,l,u=this.type;try{this.storedValue=u.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,u.finalizeNewInstance(this,this.storedValue)}catch(d){throw this.state=ne.DEAD,d}finally{this._isRunningAction=!1}this._observableInstanceState=2,s=this,l="snapshot",Object(o.m)(s,l).trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=me,this.state=ne.CREATED,this.fireHook(i.afterCreate),this.finalizeCreation()}},Object.defineProperty(t.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!0,configurable:!0}),t.prototype.clearParent=function(){if(this.parent){this.fireHook(i.beforeDetach);var e=this.state;this.state=ne.DETACHING;var t=this.root,n=t.environment,r=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=e}}},t.prototype.setParent=function(e,t){var n=e!==this.parent,r=t!==this.subpath;(n||r)&&(n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(i.afterAttach)):r&&this.baseSetParent(this.parent,t))},t.prototype.fireHook=function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"===typeof this.storedValue&&this.storedValue[e];"function"===typeof n&&(o.e?Object(o.e)(function(){n.apply(t.storedValue)}):n.apply(this.storedValue))},Object.defineProperty(t.prototype,"snapshot",{get:function(){return Oe(this.getSnapshot())},enumerable:!0,configurable:!0}),t.prototype.getSnapshot=function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath},t.prototype._getActualSnapshot=function(){return this.type.getSnapshot(this)},t.prototype._getCachedInitialSnapshot=function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot},t.prototype.isRunningAction=function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()},t.prototype.assertAlive=function(e){var t=c();if(!this.isAlive&&"ignore"!==t){var n=this._getAssertAliveError(e);switch(t){case"error":throw ge(n);case"warn":Pe(n)}}},t.prototype._getAssertAliveError=function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&je(e.subpath)||"",r=e.actionContext||B();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var i,o="";r&&null!=r.name&&(o=(r&&r.context&&(se(i=r.context,1),le(i).path)||t)+"."+r.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+o+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."},t.prototype.getChildNode=function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}},t.prototype.getChildren=function(){this.assertAlive(me),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):pe(this._childNodes)}finally{this._autoUnbox=!0}},t.prototype.getChildType=function(e){return this.type.getChildType(e)},Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!0,configurable:!0}),t.prototype.assertWritable=function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw ge("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")},t.prototype.removeChild=function(e){this.type.removeChild(this,e)},t.prototype.unbox=function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e},t.prototype.toString=function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")},t.prototype.finalizeCreation=function(){var e=this;this.baseFinalizeCreation(function(){var t,n;try{for(var r=f(e.getChildren()),o=r.next();!o.done;o=r.next()){o.value.finalizeCreation()}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.fireInternalHook(i.afterCreationFinalization)})},t.prototype.detach=function(){if(!this.isAlive)throw ge("Error while detaching, node is not alive.");this.clearParent()},t.prototype.preboot=function(){var e=this;this._applyPatches=Y(this.storedValue,"@APPLY_PATCHES",function(t){t.forEach(function(t){var n=Ke(t.path);de(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)})}),this._applySnapshot=Y(this.storedValue,"@APPLY_SNAPSHOT",function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)}),Me(this.storedValue,"$treenode",this),Me(this.storedValue,"toJSON",he)},t.prototype.die=function(){this.isAlive&&this.state!==ne.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.aboutToDie=function(){0!==this._observableInstanceState&&(this.getChildren().forEach(function(e){e.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))},t.prototype.finalizeDeath=function(){this.getChildren().forEach(function(e){e.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()},t.prototype.onSnapshot=function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)},t.prototype.emitSnapshot=function(e){this._internalEventsEmit("snapshot",e)},t.prototype.onPatch=function(e){return this._internalEventsRegister("patch",e)},t.prototype.emitPatch=function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=d(function(e){if(!("oldValue"in e))throw ge("Patches without `oldValue` field cannot be inversed");return[Ie(e),Fe(e)]}(function(e){for(var t=[],n=1;n=0&&this.middlewares.splice(t,1)}},t.prototype.addMiddleWare=function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}},t.prototype.applyPatchLocally=function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)},t.prototype._addSnapshotReaction=function(){var e=this;if(!this._hasSnapshotReaction){var t=Object(o.w)(function(){return e.snapshot},function(t){return e.emitSnapshot(t)},P);this.addDisposer(t),this._hasSnapshotReaction=!0}},t.prototype._internalEventsHasSubscribers=function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)},t.prototype._internalEventsRegister=function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new xe),this._internalEvents.register(e,t,n)},t.prototype._internalEventsHas=function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)},t.prototype._internalEventsUnregister=function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)},t.prototype._internalEventsEmit=function(e){for(var t,n=[],r=1;r0},enumerable:!0,configurable:!0})}();var j,U=1;function B(){return j}function K(){return U++}function G(e,t){var n=le(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var r=n._isRunningAction;n._isRunningAction=!0;var a=j;j=e;try{return function(e,t,n){var r=new q(e,n);if(r.isEmpty)return Object(o.h)(n).apply(null,t.args);var a=null;return function e(t){var c=r.getNextMiddleware();var s=c&&c.handler;if(!s)return Object(o.h)(n).apply(null,t.args);if(!c.includeHooks&&i[t.name])return e(t);function l(t,n){!0,a=e(t),n&&(a=n(a))}s(t,function l(e,t){!0,a=function e(t){var c=r.getNextMiddleware();var s=c&&c.handler;if(!s)return Object(o.h)(n).apply(null,t.args);if(!c.includeHooks&&i[t.name])return e(t);function l(t,n){!0,a=e(t),n&&(a=n(a))}s(t,l,function(e){!0,a=e});return a}(e),t&&(a=t(a))},function(e){!0,a=e});return a}(t)}(n,e,t)}finally{j=a,n._isRunningAction=r}}function W(e){if(e)return"action"===e.type?e:e.parentActionEvent}function Y(e,t,n){var r=function(){var r=K(),i=j,o=W(i);return G({type:"action",name:t,id:r,args:Ae(arguments),context:e,tree:_(e),rootId:i?i.rootId:r,parentId:i?i.id:0,allParentIds:i?p(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},n)};return r._isMSTAction=!0,r}var q=function(){function e(e,t){this.arrayIndex=0,this.inArrayIndex=0,this.middlewares=[],t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!0,configurable:!0}),e.prototype.getNextMiddleware=function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}},e}();function X(e){return"function"===typeof e?"":ce(e)?"<"+e+">":"`"+function(e){try{return JSON.stringify(e)}catch(t){return""}}(e)+"`"}function Q(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map(function(e){return e.path}).filter(function(e){return e.length>0}).join("/"),i=r.length>0?'at path "/'+r+'" ':"",o=ce(t)?"value of type "+le(t).type.name+":":we(t)?"value":"snapshot",a=n&&ce(t)&&n.is(le(t).snapshot);return""+i+o+" "+X(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?function(e){return I(e)&&(e.flags&(x.String|x.Number|x.Integer|x.Boolean|x.Date))>0}(n)||we(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function $(e,t,n){return e.concat([{path:t,type:n}])}function Z(){return ve}function J(e,t,n){return[{context:e,value:t,message:n}]}function ee(e){return e.reduce(function(e,t){return e.concat(t)},[])}function te(t,n){"undefined"!==typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:""})&&"true"===Object({NODE_ENV:"production",PUBLIC_URL:""}).ENABLE_TYPE_CHECK&&function(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw ge(function(e,t,n){if(0===n.length)return;return"Error while converting "+(r=X(t),r.length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `"+e.name+"`:\n\n "+n.map(Q).join("\n ");var r}(e,t,n))}(t,n)}var ne,re=0,ie=function(){function e(){this.cacheId=re++,this.cache=o.u.map(),this.lastCacheModificationPerId=o.u.map()}return e.prototype.updateLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)},e.prototype.getLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t},e.prototype.addNodeToCache=function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,o.u.array([],ye));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw ge("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}},e.prototype.mergeCache=function(e){var t=this;Object(o.B)(e.identifierCache.cache).forEach(function(e){return e.forEach(function(e){t.addNodeToCache(e)})})},e.prototype.notifyDied=function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}},e.prototype.splitCache=function(t){var n=this,r=new e,i=t.path;return Object(o.l)(this.cache).forEach(function(e){for(var t=d(e,2),o=t[0],a=t[1],c=!1,s=a.length-1;s>=0;s--)0===a[s].path.indexOf(i)&&(r.addNodeToCache(a[s],!1),a.splice(s,1),c=!0);c&&n.updateLastCacheModificationPerId(o)}),r},e.prototype.has=function(e,t){var n=this.cache.get(t);return!!n&&n.some(function(t){return e.isAssignableFrom(t.type)})},e.prototype.resolve=function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter(function(t){return e.isAssignableFrom(t.type)});switch(r.length){case 0:return null;case 1:return r[0];default:throw ge("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map(function(e){return e.path}).join(", "))}},e}();function oe(e,t,n,r,i){var o=ue(i);if(o){if(o.parent)throw ge("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,n),o}return new N(e,t,n,r,i)}function ae(e,t,n,r,i){return new z(e,t,n,r,i)}function ce(e){return!(!e||!e.$treenode)}function se(e,t){Ne(e,ce,"mobx-state-tree node",t)}function le(e){if(!ce(e))throw ge("Value "+e+" is no MST Node");return e.$treenode}function ue(e){return e&&e.$treenode||null}function he(){return le(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(ne||(ne={}));function fe(e,t,n){return void 0===n&&(n=!0),de(e,Ke(t),n)}function de(e,t,n){void 0===n&&(n=!0);for(var r=e,i=0;i0},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}},e.prototype.has=function(e){return this.handlers.indexOf(e)>=0},e.prototype.unregister=function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)},e.prototype.clear=function(){this.handlers.length=0},e.prototype.emit=function(){for(var e=[],t=0;t"},t.prototype.getChildren=function(e){return Object(o.B)(e.storedValue)},t.prototype.getChildNode=function(e,t){var n=e.storedValue.get(""+t);if(!n)throw ge("Not a child "+t);return n},t.prototype.willChange=function(e){var t=le(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,i=r._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(n))return null;te(i,o),e.newValue=i.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":te(i,e.newValue),e.newValue=i.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e},t.prototype.processIdentifier=function(e,t){if(this.identifierMode===We.YES&&t instanceof N){var n=t.identifier;if(n!==e)throw ge("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}},t.prototype.getSnapshot=function(e){var t={};return e.getChildren().forEach(function(e){t[e.subpath]=e.snapshot}),t},t.prototype.processInitialSnapshot=function(e){var t={};return Object.keys(e).forEach(function(n){t[n]=e[n].getSnapshot()}),t},t.prototype.didChange=function(e){var t=le(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:je(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:je(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:je(e.name),oldValue:n},t)}},t.prototype.applyPatchLocally=function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}},t.prototype.applySnapshot=function(e,t){te(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach(function(e){r[e]=!1}),t)for(var i in t)n.set(i,t[i]),r[""+i]=!0;Object.keys(r).forEach(function(e){!1===r[e]&&n.delete(e)})},t.prototype.getChildType=function(){return this._subType},t.prototype.isValidSnapshot=function(e,t){var n=this;return Ce(e)?ee(Object.keys(e).map(function(r){return n._subType.validate(e[r],$(t,r,n._subType))})):J(t,e,"Value is not a plain object")},t.prototype.getDefaultSnapshot=function(){return me},t.prototype.removeChild=function(e,t){e.storedValue.delete(t)},h([o.h],t.prototype,"applySnapshot",null),t}(R);var Qe=function(e){function t(t,n){var r=e.call(this,t)||this;return r._subType=n,r.flags=x.Array,r}return l(t,e),t.prototype.instantiate=function(e,t,n,r){return oe(this,e,t,n,r)},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach(function(t,i){var o=""+i;r[o]=n.instantiate(e,o,void 0,t)}),r},t.prototype.createNewInstance=function(e){return o.u.array(pe(e),ye)},t.prototype.finalizeNewInstance=function(e,t){Object(o.f)(t).dehancer=e.unbox,Object(o.o)(t,this.willChange),Object(o.v)(t,this.didChange)},t.prototype.describe=function(){return this._subType.describe()+"[]"},t.prototype.getChildren=function(e){return e.storedValue.slice()},t.prototype.getChildNode=function(e,t){var n=Number(t);if(n=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n0}var ot=function(e){function t(t,n,r,i){void 0===i&&(i=be);var o=e.call(this,t)||this;return o.flags=n,o.checker=r,o.initializer=i,o.flags=n,o}return l(t,e),t.prototype.describe=function(){return this.name},t.prototype.instantiate=function(e,t,n,r){return ae(this,e,t,n,r)},t.prototype.createNewInstance=function(e){return this.initializer(e)},t.prototype.isValidSnapshot=function(e,t){return we(e)&&this.checker(e)?Z():J(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))},t}(V),at=new ot("string",x.String,function(e){return"string"===typeof e}),ct=new ot("number",x.Number,function(e){return"number"===typeof e}),st=new ot("integer",x.Integer,function(e){return Te(e)}),lt=new ot("boolean",x.Boolean,function(e){return"boolean"===typeof e}),ut=new ot("null",x.Null,function(e){return null===e}),ht=new ot("undefined",x.Undefined,function(e){return void 0===e}),ft=new ot("Date",x.Date,function(e){return"number"===typeof e||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});ft.getSnapshot=function(e){return e.storedValue.getTime()};var dt=ft;var pt=function(e){function t(t){var n=e.call(this,JSON.stringify(t))||this;return n.flags=x.Literal,n.value=t,n}return l(t,e),t.prototype.instantiate=function(e,t,n,r){return ae(this,e,t,n,r)},t.prototype.describe=function(){return JSON.stringify(this.value)},t.prototype.isValidSnapshot=function(e,t){return we(e)&&e===this.value?Z():J(t,e,"Value is not a literal "+JSON.stringify(this.value))},t}(V);function vt(e){return Ne(),new pt(e)}var mt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o._subtype=n,o._predicate=r,o._message=i,o}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|x.Refinement},enumerable:!0,configurable:!0}),t.prototype.describe=function(){return this.name},t.prototype.instantiate=function(e,t,n,r){return this._subtype.instantiate(e,t,n,r)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){var n=this._subtype.validate(e,t);if(n.length>0)return n;var r=ce(e)?le(e).snapshot:e;return this._predicate(r)?Z():J(t,e,this._message(e))},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)},t.prototype.getSubTypes=function(){return this._subtype},t}(H);var yt=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i._types=n,i._eager=!0,r=u({eager:!0,dispatcher:void 0},r),i._dispatcher=r.dispatcher,r.eager||(i._eager=!1),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=x.Union;return this._types.forEach(function(t){e|=t.flags}),e},enumerable:!0,configurable:!0}),t.prototype.isAssignableFrom=function(e){return this._types.some(function(t){return t.isAssignableFrom(e)})},t.prototype.describe=function(){return"("+this._types.map(function(e){return e.describe()}).join(" | ")+")"},t.prototype.instantiate=function(e,t,n,r){var i=this.determineType(r,void 0);if(!i)throw ge("No matching type for union "+this.describe());return i.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){var i=this.determineType(t,e.type);if(!i)throw ge("No matching type for union "+this.describe());return i.reconcile(e,t,n,r)},t.prototype.determineType=function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter(function(e){return e!==t}).find(function(t){return t.is(e)}):this._types.find(function(t){return t.is(e)})},t.prototype.isValidSnapshot=function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,i=0;i=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,i)}return this._subtype.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)},t.prototype.getDefaultInstanceOrSnapshot=function(){var e="function"===typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"===typeof this._defaultValue&&te(this,e),e},t.prototype.isValidSnapshot=function(e,t){return this.optionalValues.indexOf(e)>=0?Z():this._subtype.validate(e,t)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.getSubTypes=function(){return this._subtype},t}(H);function Tt(e,t,n){return function(e,t){if("function"!==typeof t&&ce(t))throw ge("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");F(e,1)}(e,t),new bt(e,t,n||Et)}var Et=[void 0];var _t=Tt(ht,void 0),Ct=Tt(ut,null);function St(e){return F(e,1),gt(e,_t)}var wt=function(e){function t(t,n){var r=e.call(this,t)||this;return r._definition=n,r}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|x.Late},enumerable:!0,configurable:!0}),t.prototype.getSubType=function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(n){if(!(n instanceof ReferenceError))throw n;t=void 0}if(e&&void 0===t)throw ge("Late type seems to be used too early, the definition (still) returns undefined");t&&(this._subType=t)}return this._subType},t.prototype.instantiate=function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)},t.prototype.describe=function(){var e=this.getSubType(!1);return e?e.name:""},t.prototype.isValidSnapshot=function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):Z()},t.prototype.isAssignableFrom=function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)},t.prototype.getSubTypes=function(){var e=this.getSubType(!1);return e||L},t}(H);var Ot=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return n.subType=t,n.flags=x.Frozen,n}return l(t,e),t.prototype.describe=function(){return""},t.prototype.instantiate=function(e,t,n,r){return ae(this,e,t,n,function(e){return e}(r))},t.prototype.isValidSnapshot=function(e,t){return function(e){return"function"!==typeof e}(e)?this.subType?this.subType.validate(e,t):Z():J(t,e,"Value is not serializable and cannot be frozen")},t}(V),Mt=new Ot;var kt=function(){function e(e,t){if(this.targetType=t,Ft(e))this.identifier=e;else{if(!ce(e))throw ge("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=le(e);if(!n.identifierAttribute)throw ge("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null===r||void 0===r)throw ge("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return e.prototype.updateResolvedReference=function(e){var t=It(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var i=this.targetType,o=n.identifierCache.resolve(i,t);if(!o)throw new xt("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:r}}},Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!0,configurable:!0}),e}(),xt=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return l(t,e),t}(Error),At=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return r.targetType=t,r.onInvalidated=n,r.flags=x.Reference,r}return l(t,e),t.prototype.describe=function(){return this.name},t.prototype.isAssignableFrom=function(e){return this.targetType.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){return Ft(e)?Z():J(t,e,"Value is not a valid identifier, which is a string or a number")},t.prototype.fireInvalidated=function(e,t,n,r){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){y(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){it(i.type)?this.replaceRef(void 0):y(t.root.storedValue,{op:"remove",path:t.path})}})}},t.prototype.addTargetNodeWatcher=function(e,t){var n=this,r=this.getValue(e);if(r){var o=le(r),a=function(r,a){var c=function(e){switch(e){case i.beforeDestroy:return"destroy";case i.beforeDetach:return"detach";default:return}}(a);c&&n.fireInvalidated(c,e,t,o)},c=o.registerHook(i.beforeDetach,a),s=o.registerHook(i.beforeDestroy,a);return function(){c(),s()}}},t.prototype.watchTargetNodeForInvalidations=function(e,t,n){var r=this;if(this.onInvalidated){var o;e.registerHook(i.beforeDestroy,function(){o&&o()});var a=function(i){o&&o();var a=e.parent,c=a&&a.storedValue;if(a&&a.isAlive&&c){(n?!!n.get(t,c):e.root.identifierCache.has(r.targetType,It(t)))?o=r.addTargetNodeWatcher(e,t):i||r.fireInvalidated("invalidSnapshotReference",e,t,null)}};e.state===ne.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(i.afterCreationFinalization,function(){e.parent&&e.parent.createObservableInstanceIfNeeded()}),e.registerHook(i.afterAttach,function(){a(!1)}))}},t}(V),zt=function(e){function t(t,n){return e.call(this,t,n)||this}return l(t,e),t.prototype.getValue=function(e){if(e.isAlive)return e.storedValue.resolvedValue},t.prototype.getSnapshot=function(e){return e.storedValue.identifier},t.prototype.instantiate=function(e,t,n,r){var i,o=ce(r)?(se(i=r,1),le(i).identifier):r,a=new kt(r,this.targetType),c=ae(this,e,t,n,a);return a.node=c,this.watchTargetNodeForInvalidations(c,o,void 0),c},t.prototype.reconcile=function(e,t,n,r){if(!e.isDetaching&&e.type===this){var i=ce(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a},t}(At),Dt=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.options=n,i}return l(t,e),t.prototype.getValue=function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)},t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.instantiate=function(e,t,n,r){var i=ce(r)?this.options.set(r,e?e.storedValue:null):r,o=ae(this,e,t,n,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o},t.prototype.reconcile=function(e,t,n,r){var i=ce(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(n,r),e;var o=this.instantiate(n,r,void 0,i);return e.die(),o},t}(At);function Pt(e,t){F(e,1);var n=t||void 0,r=t?t.onInvalidated:void 0;return n&&(n.get||n.set)?new Dt(e,{get:n.get,set:n.set},r):new zt(e,r)}var Nt=function(e){function t(t,n){var r=e.call(this,t)||this;return r.validType=n,r.flags=x.Identifier,r}return l(t,e),t.prototype.instantiate=function(e,t,n,r){if(!e||!(e.type instanceof rt))throw ge("Identifier types can only be instantiated as direct child of a model type");return ae(this,e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){if(e.storedValue!==t)throw ge("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e},t.prototype.isValidSnapshot=function(e,t){return typeof e!==this.validType?J(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):Z()},t}(V),Lt=function(e){function t(){var t=e.call(this,"identifier","string")||this;return t.flags=x.Identifier,t}return l(t,e),t.prototype.describe=function(){return"identifier"},t}(Nt),Ht=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return l(t,e),t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.describe=function(){return"identifierNumber"},t}(Nt),Rt=new Lt,Vt=new Ht;function It(e){return""+e}function Ft(e){return"string"===typeof e||"number"===typeof e}var jt=function(e){function t(t){var n=e.call(this,t.name)||this;return n.options=t,n.flags=x.Custom,n}return l(t,e),t.prototype.describe=function(){return this.name},t.prototype.isValidSnapshot=function(e,t){if(this.options.isTargetType(e))return Z();var n=this.options.getValidationMessage(e);return n?J(t,e,"Invalid value for type '"+this.name+"': "+n):Z()},t.prototype.getSnapshot=function(e){return this.options.toSnapshot(e.storedValue)},t.prototype.instantiate=function(e,t,n,r){return ae(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r))},t.prototype.reconcile=function(e,t,n,r){var i=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(i?t===e.snapshot:t===e.storedValue)))return e.setParent(n,r),e;var o=i?this.options.fromSnapshot(t):t,a=this.instantiate(n,r,void 0,o);return e.die(),a},t}(V),Ut={enumeration:function(e,t){var n="string"===typeof e?t:e,r=gt.apply(void 0,p(n.map(function(e){return vt(""+e)})));return"string"===typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t",e)},array:function(e){return F(e,1),new Qe(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?Mt:I(e)?new Ot(e):Tt(Mt,e)},identifier:Rt,identifierNumber:Vt,late:function(e,t){var n="string"===typeof e?e:"late("+e.toString()+")",r="string"===typeof e?t:e;return new wt(n,r)},undefined:ht,null:ut,snapshotProcessor:function(e,t,n){return F(e,1),new Ge(e,t,n)}}}).call(this,n(114),n(391).setImmediate)},function(e,t,n){e.exports=n(394)()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t6?s-6:0),u=6;u>",c=c||i,null==n[i]){if(t){var r=null===n[i]?"null":"undefined";return new Error("The "+a+" `"+c+"` is marked as required in `"+o+"`, but its value is `"+r+"`.")}return null}return e.apply(void 0,[n,i,o,a,c].concat(l))})}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function D(e){var t=c(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function P(e,t){return z(function(n,i,o,a,c){return Object(r.A)(function(){if(e&&D(n[i])===t.toLowerCase())return null;var a;switch(t){case"Array":a=r.q;break;case"Object":a=r.s;break;case"Map":a=r.r;break;default:throw new Error("Unexpected mobxType: ".concat(t))}var s=n[i];if(!a(s)){var l=function(e){var t=D(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}(s),u=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+c+"` of type `"+l+"` supplied to `"+o+"`, expected `mobx.Observable"+t+"`"+u+".")}return null})})}function N(e,t){return z(function(n,i,o,a,c){for(var s=arguments.length,l=new Array(s>5?s-5:0),u=5;u2?r-2:0),o=2;o2?r-2:0),o=2;o",a=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID||this._reactInternalInstance&&this._reactInternalInstance._debugID||this._reactInternalFiber&&this._reactInternalFiber._debugID;ie(this,te,!1),ie(this,ne,!1);var c=e.bind(this),s=!1,l=new r.c("".concat(o,"#").concat(a,".render()"),function(){if(!s&&(s=!0,"function"===typeof t.componentWillReact&&t.componentWillReact(),!0!==t[X])){var e=!0;try{ie(t,ne,!0),t[te]||i.Component.prototype.forceUpdate.call(t),e=!1}finally{ie(t,ne,!1),e&&l.dispose()}}});return l.reactComponent=this,n[q]=l,this.render=n,n.call(this)}.call(this,m)},n}var de=fe(function(e){var t=e.children,n=e.inject,r=e.render,i=t||r;if("undefined"===typeof i)return null;if(!n)return i();console.warn(" is no longer supported. Please use inject on the enclosing component instead");var a=Y(n)(i);return o.a.createElement(a,null)});de.displayName="Observer";var pe=function(e,t,n,r,i){var o="children"===t?"render":"children";return"function"===typeof e[t]&&"function"===typeof e[o]?new Error("Invalid prop,do not use children and render in the same time in`"+n):"function"!==typeof e[t]&&"function"!==typeof e[o]?new Error("Invalid prop `"+i+"` of type `"+c(e[t])+"` supplied to `"+n+"`, expected `function`."):void 0};function ve(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function me(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function ye(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}de.propTypes={render:pe,children:pe},ve.__suppressDeprecationWarning=!0,me.__suppressDeprecationWarning=!0,ye.__suppressDeprecationWarning=!0;var ge={children:!0,key:!0,ref:!0},be=function(e){function t(e,n){var r;return s(this,t),(r=v(this,d(t).call(this,e,n))).state={},Te(e,r.state),r}return f(t,i["Component"]),u(t,[{key:"render",value:function(){return i.Children.only(this.props.children)}},{key:"getChildContext",value:function(){var e={};return Te(this.context.mobxStores,e),Te(this.props,e),{mobxStores:e}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(!e)return null;if(!t)return e;if(Object.keys(e).filter(Ee).length!==Object.keys(t).filter(Ee).length&&console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!e.suppressChangedStoreWarning)for(var n in e)Ee(n)&&t[n]!==e[n]&&console.warn("MobX Provider: Provided store '"+n+"' has changed. Please avoid replacing stores as the change might not propagate to all children");return e}}]),t}();function Te(e,t){if(e)for(var n in e)Ee(n)&&(t[n]=e[n])}function Ee(e){return!ge[e]&&"suppressChangedStoreWarning"!==e}be.contextTypes={mobxStores:L},be.childContextTypes={mobxStores:L.isRequired},function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,i=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?i="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==i){var o=e.displayName||e.name,a="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+o+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=ve,t.componentWillReceiveProps=me),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=ye;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}}(be);V("disposeOnUnmount");if(!i.Component)throw new Error("mobx-react requires React to be available");if(!r.z)throw new Error("mobx-react requires mobx to be available");"function"===typeof a.unstable_batchedUpdates&&Object(r.j)({reactionScheduler:a.unstable_batchedUpdates});if("object"===("undefined"===typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":c(__MOBX_DEVTOOLS_GLOBAL_HOOK__))){var _e={spy:r.z,extras:{getDebugName:r.n}},Ce={renderReporter:ee,componentByNodeRegistry:J,componentByNodeRegistery:J,trackComponents:function(){if("undefined"===typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");Q||(Q=!0)}};__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(Ce,_e)}},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"someByType",function(){return l}),n.d(r,"findByType",function(){return u}),n.d(r,"isNil",function(){return h});var i=n(151),o=n.n(i),a=n(79),c=n.n(a),s=n(0),l=function(e,t){return c()(s.Children.toArray(e),{type:t})},u=function(e,t){return o()(s.Children.toArray(e),{type:t})},h=function(e){return null===e||void 0===e||Array.isArray(e)&&0===e.length};n.d(t,"a",function(){return r})},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(396),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default||function(e){for(var t=1;t=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function c(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(c){i={error:c}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var s="An invariant failed, however the error is obfuscated because this is an production build.",l=[];Object.freeze(l);var u={};function h(){return++Se.mobxGuid}function f(e){throw d(!1,e),"X"}function d(e,t){if(!e)throw new Error("[mobx] "+(t||s))}Object.freeze(u);function p(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function m(e){return null!==e&&"object"===typeof e}function y(e){if(null===e||"object"!==typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function g(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function b(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return m(e)&&!0===e[n]}}function T(e){return e instanceof Map}function E(e){return e instanceof Set}function _(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function C(e){return e&&e.toString?e.toString():new String(e).toString()}function S(e){return null===e?null:"object"===typeof e?""+e:e}var w=Symbol("mobx administration"),O=function(){function e(e){void 0===e&&(e="Atom@"+h()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=oe.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return ze(this)},e.prototype.reportChanged=function(){xe(),function(e){if(e.lowestObserverState===oe.STALE)return;e.lowestObserverState=oe.STALE,e.observers.forEach(function(t){t.dependenciesState===oe.UP_TO_DATE&&(t.isTracing!==ae.NONE&&De(t,e),t.onBecomeStale()),t.dependenciesState=oe.STALE})}(this),Ae()},e.prototype.toString=function(){return this.name},e}(),M=b("Atom",O);function k(e,t,n){void 0===t&&(t=v),void 0===n&&(n=v);var r,i=new O(e);return t!==v&&Je("onBecomeObserved",i,t,r),n!==v&&Ze(i,n),i}var x={identity:function(e,t){return e===t},structural:function(e,t){return $t(e,t)},default:function(e,t){return Object.is(e,t)}},A=Symbol("mobx did run lazy initializers"),z=Symbol("mobx pending decorators"),D={},P={};function N(e){if(!0!==e[A]){var t=e[z];if(t)for(var n in g(e,A,!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function L(e,t){return function(){var n,r,i=function(r,i,a,c){if(!0===c)return t(r,i,a,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,z)){var s=r[z];g(r,z,o({},s))}return r[z][i]={prop:i,propertyCreator:t,descriptor:a,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?D:P;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return N(this),this[e]},set:function(t){N(this),this[e]=t}})}(i,e)};return(2===(r=arguments).length||3===r.length)&&"string"===typeof r[1]||4===r.length&&!0===r[3]?(n=l,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function H(e,t,n){return ut(e)?e:Array.isArray(e)?Y.array(e,{name:n}):y(e)?Y.object(e,void 0,{name:n}):T(e)?Y.map(e,{name:n}):E(e)?Y.set(e,{name:n}):e}function R(e){return e}function V(t){d(t);var n=L(!0,function(e,n,r,i,o){var a=r?r.initializer?r.initializer.call(e):r.value:void 0;jt(e).addObservableProp(n,a,t)}),r=("undefined"!==typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:""}),n);return r.enhancer=t,r}var I={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function F(e){return null===e||void 0===e?I:"string"===typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(I);var j=V(H),U=V(function(e,t,n){return void 0===e||null===e?e:Wt(e)||Dt(e)||Ht(e)||It(e)?e:Array.isArray(e)?Y.array(e,{name:n,deep:!1}):y(e)?Y.object(e,void 0,{name:n,deep:!1}):T(e)?Y.map(e,{name:n,deep:!1}):E(e)?Y.set(e,{name:n,deep:!1}):f(!1)}),B=V(R),K=V(function(e,t,n){return $t(e,t)?t:e});function G(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?R:H}var W={box:function(e,t){arguments.length>2&&q("box");var n=F(t);return new ce(e,G(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&q("array");var n=F(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+h());void 0===r&&(r=!1);var i=new kt(n,t,r);o=i.values,a=w,c=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:c});var o,a,c;var s=new Proxy(i.values,Mt);if(i.proxy=s,e&&e.length){var l=ne(!0);i.spliceWithArray(0,0,e),re(l)}return s}(e,G(n),n.name)},map:function(e,t){arguments.length>2&&q("map");var n=F(t);return new Lt(e,G(n),n.name)},set:function(e,t){arguments.length>2&&q("set");var n=F(t);return new Vt(e,G(n),n.name)},object:function(e,t,n){"string"===typeof arguments[1]&&q("object");var r=F(n);if(!1===r.proxy)return tt({},e,t,r);var i=nt(r),o=function(e){var t=new Proxy(e,Tt);return e[w].proxy=t,t}(tt({},void 0,void 0,r));return rt(o,e,t,i),o},ref:B,shallow:U,deep:j,struct:K},Y=function(e,t,n){if("string"===typeof arguments[1])return j.apply(null,arguments);if(ut(e))return e;var r=y(e)?Y.object(e,t,n):Array.isArray(e)?Y.array(e,t):T(e)?Y.map(e,t):E(e)?Y.set(e,t):e;if(r!==e)return r;f(!1)};function q(e){f("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(W).forEach(function(e){return Y[e]=W[e]});var X=L(!1,function(e,t,n,r,i){var a=n.get,c=n.set,s=i[0]||{};jt(e).addComputedProp(e,t,o({get:a,set:c,context:e},s))}),Q=X({equals:x.structural}),$=function(e,t,n){if("string"===typeof t)return X.apply(null,arguments);if(null!==e&&"object"===typeof e&&1===arguments.length)return X.apply(null,arguments);var r="object"===typeof t?t:{};return r.get=e,r.set="function"===typeof t?t:r.set,r.name=r.name||e.name||"",new le(r)};function Z(e,t,n){var r=function(){return J(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function J(e,t,n,r){var i=function(e,t,n,r){var i=Fe()&&!!e,o=0;var a=ge();xe();var c=ne(!0);return{prevDerivation:a,prevAllowStateChanges:c,notifySpy:i,startTime:o}}(e),o=!0;try{var a=t.apply(n,r);return o=!1,a}finally{o?(Se.suppressReactionErrors=o,ee(i),Se.suppressReactionErrors=!1):ee(i)}}function ee(e){re(e.prevAllowStateChanges),Ae(),be(e.prevDerivation),e.notifySpy}function te(e,t){var n,r=ne(e);try{n=t()}finally{re(r)}return n}function ne(e){var t=Se.allowStateChanges;return Se.allowStateChanges=e,t}function re(e){Se.allowStateChanges=e}function ie(e){var t,n=Se.computationDepth;Se.computationDepth=0;try{t=e()}finally{Se.computationDepth=n}return t}$.struct=Q;var oe,ae,ce=function(e){function t(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+h()),void 0===i&&(i=!0),void 0===o&&(o=x.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),i&&Fe(),a}return function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==Se.UNCHANGED){Fe();0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(pe(this),Et(this)){var t=Ct(this,{object:this,type:"update",newValue:e});if(!t)return Se.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Se.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),St(this)&&Ot(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return _t(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),wt(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(O),se=b("ObservableValue",ce),le=function(){function e(e){this.dependenciesState=oe.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=oe.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+h(),this.value=new he(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ae.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+h(),e.set&&(this.setter=Z(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?x.structural:x.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==oe.UP_TO_DATE)return;e.lowestObserverState=oe.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===oe.UP_TO_DATE&&(t.dependenciesState=oe.POSSIBLY_STALE,t.isTracing!==ae.NONE&&De(t,e),t.onBecomeStale())})}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&f("Cycle detected in computation "+this.name+": "+this.derivation),0!==Se.inBatch||0!==this.observers.size||this.keepAlive?(ze(this),de(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===oe.STALE)return;e.lowestObserverState=oe.STALE,e.observers.forEach(function(t){t.dependenciesState===oe.POSSIBLY_STALE?t.dependenciesState=oe.STALE:t.dependenciesState===oe.UP_TO_DATE&&(e.lowestObserverState=oe.UP_TO_DATE)})}(this)):de(this)&&(this.warnAboutUntrackedRead(),xe(),this.value=this.computeValue(!1),Ae());var e=this.value;if(fe(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(fe(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){d(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else d(!1,!1)},e.prototype.trackAndCompute=function(){Fe();var e=this.value,t=this.dependenciesState===oe.NOT_TRACKING,n=this.computeValue(!0),r=t||fe(e)||fe(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Se.computationDepth++,e)t=ve(this,this.derivation,this.scope);else if(!0===Se.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(n){t=new he(n)}return Se.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(me(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return qe(function(){var o=n.get();if(!r||t){var a=ge();e({type:"update",object:n,newValue:o,oldValue:i}),be(a)}r=!1,i=o})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return S(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),ue=b("ComputedValue",le);!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(oe||(oe={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(ae||(ae={}));var he=function(){return function(e){this.cause=e}}();function fe(e){return e instanceof he}function de(e){switch(e.dependenciesState){case oe.UP_TO_DATE:return!1;case oe.NOT_TRACKING:case oe.STALE:return!0;case oe.POSSIBLY_STALE:for(var t=ge(),n=e.observing,r=n.length,i=0;i0;Se.computationDepth>0&&t&&f(!1),Se.allowStateChanges||!t&&"strict"!==Se.enforceActions||f(!1)}function ve(e,t,n){Te(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Se.runId;var r,i=Se.trackingDerivation;if(Se.trackingDerivation=e,!0===Se.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(o){r=new he(o)}return Se.trackingDerivation=i,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=oe.UP_TO_DATE,i=0,o=e.unboundDepsCount,a=0;ar&&(r=c.dependenciesState)}n.length=i,e.newObserving=null,o=t.length;for(;o--;){var c=t[o];0===c.diffValue&&Me(c,e),c.diffValue=0}for(;i--;){var c=n[i];1===c.diffValue&&(c.diffValue=0,Oe(c,e))}r!==oe.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function me(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Me(t[n],e);e.dependenciesState=oe.NOT_TRACKING}function ye(e){var t=ge();try{return e()}finally{be(t)}}function ge(){var e=Se.trackingDerivation;return Se.trackingDerivation=null,e}function be(e){Se.trackingDerivation=e}function Te(e){if(e.dependenciesState!==oe.UP_TO_DATE){e.dependenciesState=oe.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=oe.UP_TO_DATE}}var Ee=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),_e=!0,Ce=!1,Se=function(){var e=we();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(_e=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ee).version&&(_e=!1),_e?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ee):(setTimeout(function(){Ce||f("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ee)}();function we(){return"undefined"!==typeof window?window:r}function Oe(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Me(e,t){e.observers.delete(t),0===e.observers.size&&ke(e)}function ke(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Se.pendingUnobservations.push(e))}function xe(){Se.inBatch++}function Ae(){if(0===--Se.inBatch){He();for(var e=Se.pendingUnobservations,t=0;t0&&ke(e),!1)}function De(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ae.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}((r=e,it(Yt(r,i))),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof le?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r,i}var Pe=function(){function e(e,t,n){void 0===e&&(e="Reaction@"+h()),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.observing=[],this.newObserving=[],this.dependenciesState=oe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+h(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ae.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Se.pendingReactions.push(this),He())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(xe(),this._isScheduled=!1,de(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Fe()}catch(e){this.reportExceptionInDerivation(e)}}Ae()}},e.prototype.track=function(e){if(!this.isDisposed){xe();Fe();0,this._isRunning=!0;var t=ve(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&me(this),fe(t)&&this.reportExceptionInDerivation(t.cause),Ae()}},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Se.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Se.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Fe()&&je({type:"error",name:this.name,message:n,error:""+e}),Se.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(xe(),me(this),Ae()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[w]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t0||Se.isRunningReactions||Le(Re)}function Re(){Se.isRunningReactions=!0;for(var e=Se.pendingReactions,t=0;e.length>0;){++t===Ne&&(console.error("Reaction doesn't converge to a stable state after "+Ne+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r",e):2===arguments.length&&"function"===typeof t?Z(e,t):1===arguments.length&&"string"===typeof e?Ke(e):!0!==r?Ke(t).apply(null,arguments):void g(e,t,Z(e.name||t,n.value,this))};function We(e,t){return J("string"===typeof e?e:e.name||"","function"===typeof e?e:t,this,void 0)}function Ye(e,t,n){g(e,t,Z(t,n.bind(e)))}function qe(e,t){void 0===t&&(t=u);var n,r=t&&t.name||e.name||"Autorun@"+h();if(!t.scheduler&&!t.delay)n=new Pe(r,function(){this.track(a)},t.onError);else{var i=Qe(t),o=!1;n=new Pe(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError)}function a(){e(n)}return n.schedule(),n.getDisposer()}Ge.bound=function(e,t,n,r){return!0===r?(Ye(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ye(this,t,n.value||n.initializer.call(this)),this[t]},set:Be}:{enumerable:!1,configurable:!0,set:function(e){Ye(this,t,e)},get:function(){}}};var Xe=function(e){return e()};function Qe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Xe}function $e(e,t,n){void 0===n&&(n=u);var r,i,o,a=n.name||"Reaction@"+h(),c=Ge(a,n.onError?(r=n.onError,i=t,function(){try{return i.apply(this,arguments)}catch(e){r.call(this,e)}}):t),s=!n.scheduler&&!n.delay,l=Qe(n),f=!0,d=!1,p=n.compareStructural?x.structural:n.equals||x.default,v=new Pe(a,function(){f||s?m():d||(d=!0,l(m))},n.onError);function m(){if(d=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=f||!p(o,n),o=n}),f&&n.fireImmediately&&c(o,v),f||!0!==t||c(o,v),f&&(f=!1)}}return v.schedule(),v.getDisposer()}function Ze(e,t,n){return Je("onBecomeUnobserved",e,t,n)}function Je(e,t,n,r){var i="string"===typeof n?Yt(t,n):Yt(t),o="string"===typeof n?r:n,a=e+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!==typeof i[e]?f(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function et(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,i=e.disableErrorBoundaries,o=e.reactionScheduler;if(!0===e.isolateGlobalState&&((Se.pendingReactions.length||Se.inBatch||Se.isRunningReactions)&&f("isolateGlobalState should be called before MobX is running any reactions"),Ce=!0,_e&&(0===--we().__mobxInstanceCount&&(we().__mobxGlobals=void 0),Se=new Ee)),void 0!==t){var a=void 0;switch(t){case!0:case"observed":a=!0;break;case!1:case"never":a=!1;break;case"strict":case"always":a="strict";break;default:f("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Se.enforceActions=a,Se.allowStateChanges=!0!==a&&"strict"!==a}void 0!==n&&(Se.computedRequiresReaction=!!n),void 0!==r&&(Se.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Se.disableErrorBoundaries=!!i),o&&Ie(o)}function tt(e,t,n,r){var i=nt(r=F(r));return N(e),jt(e,r.name,i.enhancer),t&&rt(e,t,n,i),e}function nt(e){return e.defaultDecorator||(!1===e.deep?B:j)}function rt(e,t,n,r){var i,o;xe();try{var c=_(t);try{for(var s=a(c),l=s.next();!l.done;l=s.next()){var u=l.value,h=Object.getOwnPropertyDescriptor(t,u);0;var f=(n&&u in n?n[u]:h.get?X:r)(e,u,h,!0);f&&Object.defineProperty(e,u,f)}}catch(d){i={error:d}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}finally{Ae()}}function it(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=function(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}(e.observing).map(it)),t}function ot(e,t,n){var r;if(Ht(e)||Dt(e)||se(e))r=qt(e);else{if(!Wt(e))return f(!1);if("string"!==typeof t)return f(!1);r=qt(e,t)}return void 0!==r.dehancer?f(!1):(r.dehancer="function"===typeof t?t:n,function(){r.dehancer=void 0})}function at(e,t,n){return"function"===typeof n?function(e,t,n){return qt(e,t).intercept(n)}(e,t,n):function(e,t){return qt(e).intercept(t)}(e,t)}function ct(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===Wt(e))return!1;if(!e[w].values.has(t))return!1;var n=Yt(e,t);return ue(n)}return ue(e)}function st(e,t){return"string"!==typeof t?f(!1):ct(e,t)}function lt(e,t){return null!==e&&void 0!==e&&(void 0!==t?!!Wt(e)&&e[w].values.has(t):Wt(e)||!!e[w]||M(e)||Ve(e)||ue(e))}function ut(e){return 1!==arguments.length&&f(!1),lt(e)}function ht(e,t){return"string"!==typeof t?f(!1):lt(e,t)}function ft(e){return Wt(e)?e[w].getKeys():Ht(e)?Array.from(e.keys()):It(e)?Array.from(e.keys()):Dt(e)?e.map(function(e,t){return t}):f(!1)}function dt(e){return Wt(e)?ft(e).map(function(t){return e[t]}):Ht(e)?ft(e).map(function(t){return e.get(t)}):It(e)?Array.from(e.values()):Dt(e)?e.slice():f(!1)}function pt(e){return Wt(e)?ft(e).map(function(t){return[t,e[t]]}):Ht(e)?ft(e).map(function(t){return[t,e.get(t)]}):It(e)?Array.from(e.entries()):Dt(e)?e.map(function(e,t){return[t,e]}):f(!1)}function vt(e,t,n){if(2!==arguments.length||It(e))if(Wt(e)){var r=e[w];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Ht(e))e.set(t,n);else if(It(e))e.add(t);else{if(!Dt(e))return f(!1);"number"!==typeof t&&(t=parseInt(t,10)),d(t>=0,"Not a valid index: '"+t+"'"),xe(),t>=e.length&&(e.length=t+1),e[t]=n,Ae()}else{xe();var i=t;try{for(var o in i)vt(e,o,i[o])}finally{Ae()}}}function mt(e,t,n,r){return"function"===typeof n?function(e,t,n,r){return qt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return qt(e).observe(t,n)}(e,t,n)}function yt(e,t){void 0===t&&(t=void 0),xe();try{return e.apply(t)}finally{Ae()}}function gt(e){return e[w]}function bt(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e}var Tt={has:function(e,t){if(t===w||"constructor"===t||t===A)return!0;var n=gt(e);return bt(t)?n.has(t):t in e},get:function(e,t){if(t===w||"constructor"===t||t===A)return e[t];var n=gt(e),r=n.values.get(t);if(r instanceof O){var i=r.get();return void 0===i&&n.has(t),i}return bt(t)&&n.has(t),e[t]},set:function(e,t,n){return!!bt(t)&&(vt(e,t,n),!0)},deleteProperty:function(e,t){return!!bt(t)&&(gt(e).remove(t),!0)},ownKeys:function(e){return gt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return f("Dynamic observable objects cannot be frozen"),!1}};function Et(e){return void 0!==e.interceptors&&e.interceptors.length>0}function _t(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ct(e,t){var n=ge();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i0}function wt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ot(e,t){var n=ge(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return _t(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),wt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!==typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;ri?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=l),Et(this)){var o=Ct(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return l;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,function(){for(var e=[],t=0;t-1&&(this.splice(n,1),!0)},get:function(e){var t=this[w];if(t){if(e=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigation.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=n(0),i=n(5),o=n.n(i),a=n(207),c=n(16),s=n.n(c),l=n(9),u=n.n(l),h=n(34),f=n.n(h),d=n(13),p=n.n(d),v=n(25),m=n.n(v),y=n(12),g=n.n(y),b=n(14),T=n.n(b),E=n(82),_={primaryColor:"#333",secondaryColor:"#E6E6E6"},C=function(e){function t(){return p()(this,t),g()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return T()(t,e),m()(t,[{key:"render",value:function(){var e,n=this.props,r=n.type,i=n.className,o=n.onClick,a=n.style,c=n.primaryColor,l=n.secondaryColor,h=f()(n,["type","className","onClick","style","primaryColor","secondaryColor"]),d=void 0,p=_;if(c&&(p={primaryColor:c,secondaryColor:l||Object(E.c)(c)}),Object(E.d)(r))d=r;else if("string"===typeof r&&!(d=t.get(r,p)))return null;return d?(d&&"function"===typeof d.icon&&(d=u()({},d,{icon:d.icon(p.primaryColor,p.secondaryColor)})),Object(E.b)(d.icon,"svg-"+d.name,u()((e={className:i,onClick:o,style:a},s()(e,"data-icon",d.name),s()(e,"width","1em"),s()(e,"height","1em"),s()(e,"fill","currentColor"),s()(e,"aria-hidden","true"),s()(e,"focusable","false"),e),h))):(Object(E.e)("type should be string or icon definiton, but got "+r),null)}}],[{key:"add",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:_;if(e){var n=this.definitions.get(e);return n&&"function"===typeof n.icon&&(n=u()({},n,{icon:n.icon(t.primaryColor,t.secondaryColor)})),n}}},{key:"setTwoToneColors",value:function(e){var t=e.primaryColor,n=e.secondaryColor;_.primaryColor=t,_.secondaryColor=n||Object(E.c)(t)}},{key:"getTwoToneColors",value:function(){return u()({},_)}}]),t}(r.Component);C.displayName="IconReact",C.definitions=new E.a;var S=C;function w(){return(w=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,i=void 0===n?{}:n;if("undefined"!==typeof document&&"undefined"!==typeof window&&"function"===typeof document.createElement&&"string"===typeof t&&t.length&&!M.has(t)){var o=document.createElement("script");o.setAttribute("src",t),o.setAttribute("data-namespace",t),M.add(t),document.body.appendChild(o)}var a=function(e){var t=e.type,n=e.children,o=O(e,["type","children"]),a=null;return e.type&&(a=r.createElement("use",{xlinkHref:"#".concat(t)})),n&&(a=n),r.createElement(U,w({},o,i),a)};return a.displayName="Iconfont",a},j.getTwoToneColor=function(){return S.getTwoToneColors().primaryColor},j.setTwoToneColor=N;var U=t.a=j},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(107);function i(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"";if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&"equal"===e)return"equal width";var n=i()(e);return"string"!==n&&"number"!==n||!t?Object(o.a)(e):"".concat(Object(o.a)(e)," ").concat(t)}},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return l}),n.d(t,"c",function(){return u});var r=n(69),i=n.n(r),o=n(205),a=n.n(o),c=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","form","id","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],s=c.concat(["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"]),l=["alt","height","src","srcSet","width"],u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.htmlProps,r=void 0===n?s:n,o=t.includeAria,c=void 0===o||o,l={},u={};return a()(e,function(e,t){var n=c&&(/^aria-.*$/.test(t)||"role"===t);(i()(r,t)||n?l:u)[t]=e}),[l,u]}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},o=0;o<24;o+=1)i[112+o]="F"+(o+1);for(var a=0;a<26;a+=1){var c=a+65;i[c]=[String.fromCharCode(c+32),String.fromCharCode(c)]}var s={codes:i,getCode:function(e){return r(e)?e.keyCode||e.which||this[e.key]:this[e]},getKey:function(e){var t=r(e);if(t&&e.key)return e.key;var n=i[t?e.keyCode||e.which:e];return Array.isArray(n)&&(n=t?n[e.shiftKey?1:0]:n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};s.Spacebar=s[" "],s.Digit0=s[0],s.Digit1=s[1],s.Digit2=s[2],s.Digit3=s[3],s.Digit4=s[4],s.Digit5=s[5],s.Digit6=s[6],s.Digit7=s[7],s.Digit8=s[8],s.Digit9=s[9],s.Tilde=s["~"],s.GraveAccent=s["`"],s.ExclamationPoint=s["!"],s.AtSign=s["@"],s.PoundSign=s["#"],s.PercentSign=s["%"],s.Caret=s["^"],s.Ampersand=s["&"],s.PlusSign=s["+"],s.MinusSign=s["-"],s.EqualsSign=s["="],s.DivisionSign=s["/"],s.MultiplicationSign=s["*"],s.Comma=s[","],s.Decimal=s["."],s.Colon=s[":"],s.Semicolon=s[";"],s.Pipe=s["|"],s.BackSlash=s["\\"],s.QuestionMark=s["?"],s.SingleQuote=s["'"],s.DoubleQuote=s['"'],s.LeftCurlyBrace=s["{"],s.RightCurlyBrace=s["}"],s.LeftParenthesis=s["("],s.RightParenthesis=s[")"],s.LeftAngleBracket=s["<"],s.RightAngleBracket=s[">"],s.LeftSquareBracket=s["["],s.RightSquareBracket=s["]"],e.exports=s},,function(e,t){var n=Array.isArray;e.exports=n},,function(e,t,n){var r=n(101),i=n(88),o=n(496),a=n(43);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){var r=n(142);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(290),i=n.n(r),o=n(15),a=n.n(o);function c(e,t,n,r){var o=a.a.unstable_batchedUpdates?function(e){a.a.unstable_batchedUpdates(n,e)}:n;return i()(e,t,o,r)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){e.exports=n(605)},function(e,t){function n(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1,n=o++,r=t;return a[n]=i()(function t(){(r-=1)<=0?(e(),delete a[n]):a[n]=i()(t)}),n}c.cancel=function(e){void 0!==e&&(i.a.cancel(a[e]),delete a[e])},c.ids=a},function(e,t){var n=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),s=0;s-1:!!u&&r(e,t,n)>-1}},function(e,t,n){"use strict";var r=n(9),i=n.n(r),o=n(16),a=n.n(o),c=n(13),s=n.n(c),l=n(25),u=n.n(l),h=n(12),f=n.n(h),d=n(14),p=n.n(d),v=n(0),m=n.n(v),y=n(2),g=n.n(y);function b(e){var t=[];return m.a.Children.forEach(e,function(e){t.push(e)}),t}function T(e,t){var n=null;return e&&e.forEach(function(e){n||e&&e.key===t&&(n=e)}),n}function E(e,t,n){var r=null;return e&&e.forEach(function(e){if(e&&e.key===t&&e.props[n]){if(r)throw new Error("two child with same key for children");r=e}}),r}var _=n(15),C=n.n(_),S=n(209),w={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},O={enter:"transitionEnter",appear:"transitionAppear",leave:"transitionLeave"},M=function(e){function t(){return s()(this,t),f()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p()(t,e),u()(t,[{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillEnter",value:function(e){w.isEnterSupported(this.props)?this.transition("enter",e):e()}},{key:"componentWillAppear",value:function(e){w.isAppearSupported(this.props)?this.transition("appear",e):e()}},{key:"componentWillLeave",value:function(e){w.isLeaveSupported(this.props)?this.transition("leave",e):e()}},{key:"transition",value:function(e,t){var n=this,r=C.a.findDOMNode(this),i=this.props,o=i.transitionName,a="object"===typeof o;this.stop();var c=function(){n.stopper=null,t()};if((S.b||!i.animation[e])&&o&&i[O[e]]){var s=a?o[e]:o+"-"+e,l=s+"-active";a&&o[e+"Active"]&&(l=o[e+"Active"]),this.stopper=Object(S.a)(r,{name:s,active:l},c)}else this.stopper=i.animation[e](r,c)}},{key:"stop",value:function(){var e=this.stopper;e&&(this.stopper=null,e.stop())}},{key:"render",value:function(){return this.props.children}}]),t}(m.a.Component);M.propTypes={children:g.a.any,animation:g.a.any,transitionName:g.a.any};var k=M,x="rc_animate_"+Date.now();function A(e){var t=e.children;return m.a.isValidElement(t)&&!t.key?m.a.cloneElement(t,{key:x}):t}function z(){}var D=function(e){function t(e){s()(this,t);var n=f()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return P.call(n),n.currentlyAnimatingKeys={},n.keysToEnter=[],n.keysToLeave=[],n.state={children:b(A(e))},n.childrenRefs={},n}return p()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.showProp,n=this.state.children;t&&(n=n.filter(function(e){return!!e.props[t]})),n.forEach(function(t){t&&e.performAppear(t.key)})}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.nextProps=e;var n=b(A(e)),r=this.props;r.exclusive&&Object.keys(this.currentlyAnimatingKeys).forEach(function(e){t.stop(e)});var i=r.showProp,o=this.currentlyAnimatingKeys,c=r.exclusive?b(A(r)):this.state.children,s=[];i?(c.forEach(function(e){var t=e&&T(n,e.key),r=void 0;(r=t&&t.props[i]||!e.props[i]?t:m.a.cloneElement(t||e,a()({},i,!0)))&&s.push(r)}),n.forEach(function(e){e&&T(c,e.key)||s.push(e)})):s=function(e,t){var n=[],r={},i=[];return e.forEach(function(e){e&&T(t,e.key)?i.length&&(r[e.key]=i,i=[]):i.push(e)}),t.forEach(function(e){e&&Object.prototype.hasOwnProperty.call(r,e.key)&&(n=n.concat(r[e.key])),n.push(e)}),n=n.concat(i)}(c,n),this.setState({children:s}),n.forEach(function(e){var n=e&&e.key;if(!e||!o[n]){var r=e&&T(c,n);if(i){var a=e.props[i];if(r)!E(c,n,i)&&a&&t.keysToEnter.push(n);else a&&t.keysToEnter.push(n)}else r||t.keysToEnter.push(n)}}),c.forEach(function(e){var r=e&&e.key;if(!e||!o[r]){var a=e&&T(n,r);if(i){var c=e.props[i];if(a)!E(n,r,i)&&c&&t.keysToLeave.push(r);else c&&t.keysToLeave.push(r)}else a||t.keysToLeave.push(r)}})}},{key:"componentDidUpdate",value:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)}},{key:"isValidChildByKey",value:function(e,t){var n=this.props.showProp;return n?E(e,t,n):T(e,t)}},{key:"stop",value:function(e){delete this.currentlyAnimatingKeys[e];var t=this.childrenRefs[e];t&&t.stop()}},{key:"render",value:function(){var e=this,t=this.props;this.nextProps=t;var n=this.state.children,r=null;n&&(r=n.map(function(n){if(null===n||void 0===n)return n;if(!n.key)throw new Error("must set key for children");return m.a.createElement(k,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)}));var o=t.component;if(o){var a=t;return"string"===typeof o&&(a=i()({className:t.className,style:t.style},t.componentProps)),m.a.createElement(o,a,r)}return r[0]||null}}]),t}(m.a.Component);D.isAnimate=!0,D.propTypes={className:g.a.string,style:g.a.object,component:g.a.any,componentProps:g.a.object,animation:g.a.object,transitionName:g.a.oneOfType([g.a.string,g.a.object]),transitionEnter:g.a.bool,transitionAppear:g.a.bool,exclusive:g.a.bool,transitionLeave:g.a.bool,onEnd:g.a.func,onEnter:g.a.func,onLeave:g.a.func,onAppear:g.a.func,showProp:g.a.string,children:g.a.node},D.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:z,onEnter:z,onLeave:z,onAppear:z};var P=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var i=b(A(r));e.isValidChildByKey(i,t)?"appear"===n?w.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):w.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r=b(A(n));if(e.isValidChildByKey(r,t))e.performEnter(t);else{var i=function(){w.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};!function(e,t,n){var r=e.length===t.length;return r&&e.forEach(function(e,i){var o=t[i];e&&o&&(e&&!o||!e&&o?r=!1:e.key!==o.key?r=!1:n&&e.props[n]!==o.props[n]&&(r=!1))}),r}(e.state.children,r,n.showProp)?e.setState({children:r},i):i()}}}};t.a=D},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(w)}}]),e}();function w(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function O(e,t){return Object.keys(e).reduce(function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n},{})}var M={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},k=function(){if("undefined"===typeof window||"undefined"===typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];switch(t){case"ms":return"ms";default:return t&&t.length?t[0].toUpperCase()+t.substr(1):""}}();function x(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function A(e,t){e.style["".concat(k,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function z(e,t){e.style["".concat(k,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function D(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function P(e,t,n){return Math.max(e,Math.min(n,t))}function N(e){return"px"===e.substr(-2)?parseFloat(e):0}function L(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function H(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function R(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:V(e.parentNode,t,r)}}function I(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,o=t,a="px";if("string"===typeof t){var c=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);_()(null!==c,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),i=parseFloat(t),o=parseFloat(t),a=c[1]}return _()(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===a&&(i=i*n/100,o=o*r/100),{x:i,y:o}}function F(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find(function(e){return n.test(t[e])})}(e)?e:F(e.parentNode):null}var j=27,U=32,B=37,K=38,G=39,W=40,Y={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function q(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return c(this,n),d(this,p(n).apply(this,arguments))}return m(n,y["Component"]),l(n,[{key:"componentDidMount",value:function(){Object(T.findDOMNode)(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return _()(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=i.withRef?"wrappedInstance":null;return Object(y.createElement)(e,r({ref:t},this.props))}}]),n}(),o(t,"displayName",L("sortableHandle",e)),n}function X(e){return null!=e.sortableHandle}var Q=function(){function e(t,n){c(this,e),this.container=t,this.onScrollCallback=n}return l(e,[{key:"clear",value:function(){clearInterval(this.interval),this.interval=null}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,i=e.maxTranslate,o=e.width,a=e.height,c={x:0,y:0},s={x:1,y:1},l=10,u=10,h=this.container,f=h.scrollTop,d=h.scrollLeft,p=h.scrollHeight,v=h.scrollWidth,m=0===f,y=p-f-h.clientHeight===0,g=0===d,b=v-d-h.clientWidth===0;n.y>=i.y-a/2&&!y?(c.y=1,s.y=u*Math.abs((i.y-a/2-n.y)/a)):n.x>=i.x-o/2&&!b?(c.x=1,s.x=l*Math.abs((i.x-o/2-n.x)/o)):n.y<=r.y+a/2&&!m?(c.y=-1,s.y=u*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+o/2&&!g&&(c.x=-1,s.x=l*Math.abs((n.x-o/2-r.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===c.x&&0===c.y||(this.interval=setInterval(function(){t.isAutoScrolling=!0;var e={left:s.x*c.x,top:s.y*c.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)},5))}}]),e}();var $={axis:b.a.oneOf(["x","y","xy"]),contentWindow:b.a.any,disableAutoscroll:b.a.bool,distance:b.a.number,getContainer:b.a.func,getHelperDimensions:b.a.func,helperClass:b.a.string,helperContainer:b.a.oneOfType([b.a.func,"undefined"===typeof HTMLElement?b.a.any:b.a.instanceOf(HTMLElement)]),hideSortableGhost:b.a.bool,keyboardSortingTransitionDuration:b.a.number,lockAxis:b.a.string,lockOffset:b.a.oneOfType([b.a.number,b.a.string,b.a.arrayOf(b.a.oneOfType([b.a.number,b.a.string]))]),lockToContainerEdges:b.a.bool,onSortEnd:b.a.func,onSortMove:b.a.func,onSortOver:b.a.func,onSortStart:b.a.func,pressDelay:b.a.number,pressThreshold:b.a.number,keyCodes:b.a.shape({lift:b.a.arrayOf(b.a.number),drop:b.a.arrayOf(b.a.number),cancel:b.a.arrayOf(b.a.number),up:b.a.arrayOf(b.a.number),down:b.a.arrayOf(b.a.number)}),shouldCancelStart:b.a.func,transitionDuration:b.a.number,updateBeforeSortStart:b.a.func,useDragHandle:b.a.bool,useWindowAsScrollContainer:b.a.bool},Z={lift:[U],drop:[U],cancel:[j],up:[K,B],down:[W,G]},J={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:Z,shouldCancelStart:function(e){return-1!==[Y.Input,Y.Textarea,Y.Select,Y.Option,Y.Button].indexOf(e.target.tagName)||!!D(e.target,function(e){return"true"===e.contentEditable})},transitionDuration:300,useWindowAsScrollContainer:!1},ee=Object.keys($);function te(e){var t,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;return c(this,n),o(f(f(t=d(this,p(n).call(this,e)))),"state",{}),o(f(f(t)),"handleStart",function(e){var n=t.props,r=n.distance,i=n.shouldCancelStart;if(2!==e.button&&!i(e)){t.touched=!0,t.position=R(e);var o=D(e.target,function(e){return null!=e.sortableInfo});if(o&&o.sortableInfo&&t.nodeIsChild(o)&&!t.state.sorting){var a=t.props.useDragHandle,c=o.sortableInfo,s=c.index,l=c.collection;if(c.disabled)return;if(a&&!D(e.target,X))return;t.manager.active={collection:l,index:s},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==Y.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout(function(){return t.handlePress(e)},t.props.pressDelay))}}}),o(f(f(t)),"nodeIsChild",function(e){return e.sortableInfo.manager===t.manager}),o(f(f(t)),"handleMove",function(e){var n=t.props,r=n.distance,i=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var o=R(e),a={x:t.position.x-o.x,y:t.position.y-o.y},c=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||i&&!(c>=i)?r&&c>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}}),o(f(f(t)),"handleEnd",function(){t.touched=!1,t.cancel()}),o(f(f(t)),"cancel",function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)}),o(f(f(t)),"handlePress",function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n=d.sortableInfo.index,r=function(e){var t=window.getComputedStyle(e);return{bottom:N(t.marginBottom),left:N(t.marginLeft),right:N(t.marginRight),top:N(t.marginTop)}}(d),i=t.scrollContainer.getBoundingClientRect(),u=c({collection:p,index:n,node:d});if(t.node=d,t.margin=r,t.width=u.width,t.height=u.height,t.marginOffset={x:t.margin.left+t.margin.right,y:Math.max(t.margin.top,t.margin.bottom)},t.boundingClientRect=d.getBoundingClientRect(),t.containerBoundingRect=i,t.index=n,t.newIndex=n,t.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},t.offsetEdge=V(d,t.container),t.initialOffset=R(v?a({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(function(e){var t="input, textarea, select, canvas, [contenteditable]",n=e.querySelectorAll(t),r=e.cloneNode(!0);return C(r.querySelectorAll(t)).forEach(function(e,t){"file"!==e.type&&(e.value=n[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===Y.Canvas&&n[t].width>0&&n[t].height>0&&e.getContext("2d").drawImage(n[t],0,0)}),r}(d)),x(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-r.top,"px"),width:"".concat(t.width,"px")}),v&&t.helper.focus(),l&&(t.sortableGhost=d,x(d,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},v){var m=f?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,y=m.top,g=m.left,b=m.width,T=y+m.height,E=g+b;t.axis.x&&(t.minTranslate.x=g-t.boundingClientRect.left,t.maxTranslate.x=E-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=y-t.boundingClientRect.top,t.maxTranslate.y=T-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(f?0:i.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(f?t.contentWindow.innerWidth:i.left+i.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(f?0:i.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(f?t.contentWindow.innerHeight:i.top+i.height)-t.boundingClientRect.top-t.height/2);s&&s.split(" ").forEach(function(e){return t.helper.classList.add(e)}),t.listenerNode=e.touches?d:t.contentWindow,v?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(M.move.forEach(function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)}),M.end.forEach(function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)})),t.setState({sorting:!0,sortingIndex:n}),h&&h({node:d,index:n,collection:p,isKeySorting:v},e),v&&t.keyMove(0)},i=t.props,o=i.axis,c=i.getHelperDimensions,s=i.helperClass,l=i.hideSortableGhost,u=i.updateBeforeSortStart,h=i.onSortStart,f=i.useWindowAsScrollContainer,d=n.node,p=n.collection,v=t.manager.isKeySorting,m=function(){if("function"===typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=function(e,t){try{var n=e()}catch(r){return t(!0,r)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}(function(){var t=d.sortableInfo.index;return Promise.resolve(u({collection:p,index:t,node:d,isKeySorting:v},e)).then(function(){})},function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n});if(n&&n.then)return n.then(function(){})}}();return m&&m.then?m.then(r):r()}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(i){return Promise.reject(i)}}),o(f(f(t)),"handleSortMove",function(e){var n=t.props.onSortMove;"function"===typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)}),o(f(f(t)),"handleSortEnd",function(e){var n=t.props,r=n.hideSortableGhost,i=n.onSortEnd,o=t.manager,a=o.active.collection,c=o.isKeySorting,s=t.manager.refs[a];t.listenerNode&&(c?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(M.move.forEach(function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)}),M.end.forEach(function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)}))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&x(t.sortableGhost,{opacity:"",visibility:""});for(var l=0,u=s.length;lr)){t.prevIndex=o,t.newIndex=i;var a=function(e,t,n){return et?e-1:e>n&&em?m/2:this.height/2,width:this.width>v?v/2:this.width/2},g=l&&p>this.index&&p<=u,b=l&&p=u,T={x:0,y:0},E=a[h].edgeOffset;E||(E=V(d,this.container),a[h].edgeOffset=E,l&&(a[h].boundingClientRect=H(d,i)));var _=h0&&a[h-1];_&&!_.edgeOffset&&(_.edgeOffset=V(_.node,this.container),l&&(_.boundingClientRect=H(_.node,i))),p!==this.index?(t&&z(d,t),this.axis.x?this.axis.y?b||pthis.containerBoundingRect.width-y.width&&_&&(T.x=_.edgeOffset.left-E.left,T.y=_.edgeOffset.top-E.top),null===this.newIndex&&(this.newIndex=p)):(g||p>this.index&&(c+o.left+y.width>=E.left&&s+o.top+y.height>=E.top||s+o.top+y.height>=E.top+m))&&(T.x=-(this.width+this.marginOffset.x),E.left+T.xthis.index&&c+o.left+y.width>=E.left?(T.x=-(this.width+this.marginOffset.x),this.newIndex=p):(b||pthis.index&&s+o.top+y.height>=E.top?(T.y=-(this.height+this.marginOffset.y),this.newIndex=p):(b||p1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return c(this,n),d(this,p(n).apply(this,arguments))}return m(n,y["Component"]),l(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,i=Object(T.findDOMNode)(this);i.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=i,this.ref={node:i},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return _()(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=i.withRef?"wrappedInstance":null;return Object(y.createElement)(e,r({ref:t},O(this.props,re)))}}]),n}(),o(t,"displayName",L("sortableElement",e)),o(t,"contextTypes",{manager:b.a.object.isRequired}),o(t,"propTypes",ne),o(t,"defaultProps",{collection:0}),n}},function(e,t,n){"use strict";(function(e){n.d(t,"e",function(){return h}),n.d(t,"d",function(){return f}),n.d(t,"a",function(){return p}),n.d(t,"b",function(){return v}),n.d(t,"c",function(){return m}),n.d(t,"f",function(){return y});var r=n(9),i=n.n(r),o=n(13),a=n.n(o),c=n(25),s=n.n(c),l=n(282),u=n(0);function h(t){e&&Object({NODE_ENV:"production",PUBLIC_URL:""})||console.error("[@ant-design/icons-react]: "+t+".")}function f(e){return"object"===typeof e&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===typeof e.icon||"function"===typeof e.icon)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}var p=function(){function e(){a()(this,e),this.collection={}}return s()(e,[{key:"clear",value:function(){this.collection={}}},{key:"delete",value:function(e){return delete this.collection[e]}},{key:"get",value:function(e){return this.collection[e]}},{key:"has",value:function(e){return Boolean(this.collection[e])}},{key:"set",value:function(e,t){return this.collection[e]=t,this}},{key:"size",get:function(){return Object.keys(this.collection).length}}]),e}();function v(e,t,n){return n?u.createElement(e.tag,i()({key:t},d(e.attrs),n),(e.children||[]).map(function(n,r){return v(n,t+"-"+e.tag+"-"+r)})):u.createElement(e.tag,i()({key:t},d(e.attrs)),(e.children||[]).map(function(n,r){return v(n,t+"-"+e.tag+"-"+r)}))}function m(e){return Object(l.generate)(e)[0]}function y(e,t){switch(t){case"fill":return e+"-fill";case"outline":return e+"-o";case"twotone":return e+"-twotone";default:throw new TypeError("Unknown theme type: "+t+", name: "+e)}}}).call(this,n(114))},,function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,c],u=0;(s=new Error(t.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";var r,i,o,a,c=n(163),s=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var l=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS=(c(a={},s.HTML,(c(r={},l.ADDRESS,!0),c(r,l.APPLET,!0),c(r,l.AREA,!0),c(r,l.ARTICLE,!0),c(r,l.ASIDE,!0),c(r,l.BASE,!0),c(r,l.BASEFONT,!0),c(r,l.BGSOUND,!0),c(r,l.BLOCKQUOTE,!0),c(r,l.BODY,!0),c(r,l.BR,!0),c(r,l.BUTTON,!0),c(r,l.CAPTION,!0),c(r,l.CENTER,!0),c(r,l.COL,!0),c(r,l.COLGROUP,!0),c(r,l.DD,!0),c(r,l.DETAILS,!0),c(r,l.DIR,!0),c(r,l.DIV,!0),c(r,l.DL,!0),c(r,l.DT,!0),c(r,l.EMBED,!0),c(r,l.FIELDSET,!0),c(r,l.FIGCAPTION,!0),c(r,l.FIGURE,!0),c(r,l.FOOTER,!0),c(r,l.FORM,!0),c(r,l.FRAME,!0),c(r,l.FRAMESET,!0),c(r,l.H1,!0),c(r,l.H2,!0),c(r,l.H3,!0),c(r,l.H4,!0),c(r,l.H5,!0),c(r,l.H6,!0),c(r,l.HEAD,!0),c(r,l.HEADER,!0),c(r,l.HGROUP,!0),c(r,l.HR,!0),c(r,l.HTML,!0),c(r,l.IFRAME,!0),c(r,l.IMG,!0),c(r,l.INPUT,!0),c(r,l.LI,!0),c(r,l.LINK,!0),c(r,l.LISTING,!0),c(r,l.MAIN,!0),c(r,l.MARQUEE,!0),c(r,l.MENU,!0),c(r,l.META,!0),c(r,l.NAV,!0),c(r,l.NOEMBED,!0),c(r,l.NOFRAMES,!0),c(r,l.NOSCRIPT,!0),c(r,l.OBJECT,!0),c(r,l.OL,!0),c(r,l.P,!0),c(r,l.PARAM,!0),c(r,l.PLAINTEXT,!0),c(r,l.PRE,!0),c(r,l.SCRIPT,!0),c(r,l.SECTION,!0),c(r,l.SELECT,!0),c(r,l.SOURCE,!0),c(r,l.STYLE,!0),c(r,l.SUMMARY,!0),c(r,l.TABLE,!0),c(r,l.TBODY,!0),c(r,l.TD,!0),c(r,l.TEMPLATE,!0),c(r,l.TEXTAREA,!0),c(r,l.TFOOT,!0),c(r,l.TH,!0),c(r,l.THEAD,!0),c(r,l.TITLE,!0),c(r,l.TR,!0),c(r,l.TRACK,!0),c(r,l.UL,!0),c(r,l.WBR,!0),c(r,l.XMP,!0),r)),c(a,s.MATHML,(c(i={},l.MI,!0),c(i,l.MO,!0),c(i,l.MN,!0),c(i,l.MS,!0),c(i,l.MTEXT,!0),c(i,l.ANNOTATION_XML,!0),i)),c(a,s.SVG,(c(o={},l.TITLE,!0),c(o,l.FOREIGN_OBJECT,!0),c(o,l.DESC,!0),o)),a)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(232),i=n(170);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(438),i=n(489),o=n(120),a=n(43),c=n(494);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):c(e)}},function(e,t,n){var r=n(450),i=n(455);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(67),i=n(90),o="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",s="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==a||t==c||t==o||t==s}},function(e,t,n){var r=n(514),i=n(515),o=n(516);e.exports=function(e,t){return r(e)||i(e,t)||o()}},function(e,t,n){"use strict";function r(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,"a",function(){return r})},,,,function(e,t,n){var r=n(76),i=n(115);e.exports=n(77)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(99);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)},_parseUA:function(e){var t=e.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],i=!!e.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i),o=!!e.match(/IEMobile/i);return{browser:n[1]||"",version:n[2]||"0",isIE:r._detectIE(t),mobile:i,ieMobile:o}},UA:void 0},i="undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:{};r.UA=r._parseUA(i.navigator&&i.navigator.userAgent||""),i.Konva&&console.error("Konva instance is already exist in current eviroment. Please use only one instance."),i.Konva=r,r.global=i,r.window=i,r.document=i.document,e.exports=r}(),function(){"use strict";Konva.Collection=function(){var e=[].slice.call(arguments),t=e.length,n=0;for(this.length=t;n0?1:-1},createCanvasElement:function(){var e=Konva.isBrowser?Konva.document.createElement("canvas"):new Konva._nodeCanvas;try{e.style=e.style||{}}catch(t){}return e},_isInDocument:function(e){for(;e=e.parentNode;)if(e==Konva.document)return!0;return!1},_simplifyArray:function(e){var t,n,r=[],i=e.length,o=Konva.Util;for(t=0;t>16&255,g:t>>8&255,b:255&t}},getRandomColor:function(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e="0"+e;return"#"+e},get:function(e,t){return void 0===e?t:e},getRGB:function(e){var t;return e in n?{r:(t=n[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=r.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:function(e){return e=e||"black",Konva.Util._namedColorToRBA(e)||Konva.Util._hex3ColorToRGBA(e)||Konva.Util._hex6ColorToRGBA(e)||Konva.Util._rgbColorToRGBA(e)||Konva.Util._rgbaColorToRGBA(e)},_namedColorToRBA:function(e){var t=n[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA:function(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA:function(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA:function(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA:function(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_merge:function(e,t){var n=this._clone(t);for(var r in e)this._isObject(e[r])?n[r]=this._merge(e[r],n[r]):n[r]=e[r];return n},trimRight:function(e){return e.replace(/\s+$/,"")},trimLeft:function(e){return e.replace(/^\s+/,"")},haveIntersection:function(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,c=r,s=(n-i)*(n-i)+(r-o)*(r-o)):s=((a=e+u*(n-e))-i)*(a-i)+((c=t+u*(r-t))-o)*(c-o)}return[a,c,s]},_getProjectionToLine:function(e,t,n){var r=Konva.Util.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(n||a!==t.length-1){var c=t[(a+1)%t.length],s=Konva.Util._getProjectionToSegment(o.x,o.y,c.x,c.y,e.x,e.y),l=s[0],u=s[1],h=s[2];ht.length){var a=t;t=e,e=a}for(r=0;r=Konva.traceArrMax&&t.shift()},reset:function(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)},getCanvas:function(){return this.canvas},clear:function(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)},_applyLineCap:function(e){var t=e.getLineCap();t&&this.setAttr("lineCap",t)},_applyOpacity:function(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)},_applyLineJoin:function(e){var t=e.getLineJoin();t&&this.setAttr("lineJoin",t)},setAttr:function(e,t){this._context[e]=t},arc:function(){var e=arguments;this._context.arc(e[0],e[1],e[2],e[3],e[4],e[5])},beginPath:function(){this._context.beginPath()},bezierCurveTo:function(){var e=arguments;this._context.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5])},clearRect:function(){var e=arguments;this._context.clearRect(e[0],e[1],e[2],e[3])},clip:function(){this._context.clip()},closePath:function(){this._context.closePath()},createImageData:function(){var e=arguments;return 2===e.length?this._context.createImageData(e[0],e[1]):1===e.length?this._context.createImageData(e[0]):void 0},createLinearGradient:function(){var e=arguments;return this._context.createLinearGradient(e[0],e[1],e[2],e[3])},createPattern:function(){var e=arguments;return this._context.createPattern(e[0],e[1])},createRadialGradient:function(){var e=arguments;return this._context.createRadialGradient(e[0],e[1],e[2],e[3],e[4],e[5])},drawImage:function(){var e=arguments,t=this._context;3===e.length?t.drawImage(e[0],e[1],e[2]):5===e.length?t.drawImage(e[0],e[1],e[2],e[3],e[4]):9===e.length&&t.drawImage(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},isPointInPath:function(e,t){return this._context.isPointInPath(e,t)},fill:function(){this._context.fill()},fillRect:function(e,t,n,r){this._context.fillRect(e,t,n,r)},strokeRect:function(e,t,n,r){this._context.strokeRect(e,t,n,r)},fillText:function(){var e=arguments;this._context.fillText(e[0],e[1],e[2])},measureText:function(e){return this._context.measureText(e)},getImageData:function(){var e=arguments;return this._context.getImageData(e[0],e[1],e[2],e[3])},lineTo:function(){var e=arguments;this._context.lineTo(e[0],e[1])},moveTo:function(){var e=arguments;this._context.moveTo(e[0],e[1])},rect:function(){var e=arguments;this._context.rect(e[0],e[1],e[2],e[3])},putImageData:function(){var e=arguments;this._context.putImageData(e[0],e[1],e[2])},quadraticCurveTo:function(){var e=arguments;this._context.quadraticCurveTo(e[0],e[1],e[2],e[3])},restore:function(){this._context.restore()},rotate:function(){var e=arguments;this._context.rotate(e[0])},save:function(){this._context.save()},scale:function(){var e=arguments;this._context.scale(e[0],e[1])},setLineDash:function(){var e=arguments,t=this._context;this._context.setLineDash?t.setLineDash(e[0]):"mozDash"in t?t.mozDash=e[0]:"webkitLineDash"in t&&(t.webkitLineDash=e[0])},getLineDash:function(){return this._context.getLineDash()},setTransform:function(){var e=arguments;this._context.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])},stroke:function(){this._context.stroke()},strokeText:function(){var e=arguments;this._context.strokeText(e[0],e[1],e[2])},transform:function(){var e=arguments;this._context.transform(e[0],e[1],e[2],e[3],e[4],e[5])},translate:function(){var e=arguments;this._context.translate(e[0],e[1])},_enableTrace:function(){var t,n,r=this,i=e.length,o=Konva.Util._simplifyArray,a=this.setAttr,c=function(e){var t,i=r[e];r[e]=function(){return n=o(Array.prototype.slice.call(arguments,0)),t=i.apply(r,arguments),r._trace({method:e,args:n}),t}};for(t=0;t255?255:e<0?0:Math.round(e)},alphaComponent:function(e){return e>1?1:e<1e-4?1e-4:e},_formatValue:function(e){return Konva.Util._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)?e:Konva.Util._isBoolean(e)?e:Object.prototype.toString.call(e)},getNumberValidator:function(){if(Konva.isUnminified)return function(e,t){return Konva.Util._isNumber(e)||Konva.Util.warn(Konva.Validators._formatValue(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}},getNumberOrAutoValidator:function(){if(Konva.isUnminified)return function(e,t){return Konva.Util._isNumber(e)||"auto"===e||Konva.Util.warn(Konva.Validators._formatValue(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}},getStringValidator:function(){if(Konva.isUnminified)return function(e,t){return Konva.Util._isString(e)||Konva.Util.warn(Konva.Validators._formatValue(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}},getFunctionValidator:function(){if(Konva.isUnminified)return function(e,t){return Konva.Util._isFunction(e)||Konva.Util.warn(Konva.Validators._formatValue(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}},getNumberArrayValidator:function(){if(Konva.isUnminified)return function(e,t){return Konva.Util._isArray(e)?e.forEach(function(e){Konva.Util._isNumber(e)||Konva.Util.warn('"'+t+'" attribute has non numeric element '+e+". Make sure that all elements are numbers.")}):Konva.Util.warn(Konva.Validators._formatValue(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.'),e}},getBooleanValidator:function(){if(Konva.isUnminified)return function(e,t){return!0===e||!1===e||Konva.Util.warn(Konva.Validators._formatValue(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}}}(),function(e){"use strict";var t="Shape",n=["id"],r=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(" "),i=["scaleXChange.konva","scaleYChange.konva"].join(" ");e.Node=function(e){this._init(e)},e.Util.addMethods(e.Node,{_init:function(t){this._id=e.idCounter++,this.eventListeners={},this.attrs={},this._cache={},this._filterUpToDate=!1,this._isUnderCache=!1,this.setAttrs(t),this.on(r,function(){this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}),this.on(i,function(){this._clearSelfAndDescendantCache("absoluteScale")}),this.on("visibleChange.konva",function(){this._clearSelfAndDescendantCache("visible")}),this.on("listeningChange.konva",function(){this._clearSelfAndDescendantCache("listening")}),this.on("opacityChange.konva",function(){this._clearSelfAndDescendantCache("absoluteOpacity")})},_clearCache:function(e){e?delete this._cache[e]:this._cache={}},_getCache:function(e,t){return void 0===this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]},_clearSelfAndDescendantCache:function(e){this._clearCache(e),this._cache.canvas||this.children&&this.getChildren().each(function(t){t._clearSelfAndDescendantCache(e)})},clearCache:function(){return delete this._cache.canvas,this._filterUpToDate=!1,this._clearSelfAndDescendantCache(),this},cache:function(t){var n=t||{},r={};void 0!==n.x&&void 0!==n.y&&void 0!==n.width&&void 0!==n.height||(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=n.width||r.width,o=n.height||r.height,a=n.pixelRatio,c=void 0===n.x?r.x:n.x,s=void 0===n.y?r.y:n.y,l=n.offset||0,u=n.drawBorder||!1;if(i&&o){i+=2*l,o+=2*l,c-=l,s-=l;var h=new e.SceneCanvas({pixelRatio:a,width:i,height:o}),f=new e.SceneCanvas({pixelRatio:a,width:i,height:o}),d=new e.HitCanvas({pixelRatio:1,width:i,height:o}),p=h.getContext(),v=d.getContext();return d.isCache=!0,this.clearCache(),p.save(),v.save(),p.translate(-c,-s),v.translate(-c,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache("absoluteOpacity"),this._clearSelfAndDescendantCache("absoluteScale"),this.drawScene(h,this,!0),this.drawHit(d,this,!0),this._isUnderCache=!1,p.restore(),v.restore(),u&&(p.save(),p.beginPath(),p.rect(0,0,i,o),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.canvas={scene:h,filter:f,hit:d,x:c,y:s},this}e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")},getClientRect:function(){throw new Error('abstract "getClientRect" method call')},_transformedRect:function(e,t){var n,r,i,o,a=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],c=this.getAbsoluteTransform(t);return a.forEach(function(e){var t=c.point(e);void 0===n&&(n=i=t.x,r=o=t.y),n=Math.min(n,t.x),r=Math.min(r,t.y),i=Math.max(i,t.x),o=Math.max(o,t.y)}),{x:n,y:r,width:i-n,height:o-r}},_drawCachedSceneCanvas:function(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this),e.translate(this._cache.canvas.x,this._cache.canvas.y);var t=this._getCachedSceneCanvas(),n=t.pixelRatio;e.drawImage(t._canvas,0,0,t.width/n,t.height/n),e.restore()},_drawCachedHitCanvas:function(e){var t=this._cache.canvas.hit;e.save(),e.translate(this._cache.canvas.x,this._cache.canvas.y),e.drawImage(t._canvas,0,0),e.restore()},_getCachedSceneCanvas:function(){var t,n,r,i,o=this.filters(),a=this._cache.canvas,c=a.scene,s=a.filter,l=s.getContext();if(o){if(!this._filterUpToDate){var u=c.pixelRatio;try{for(t=o.length,l.clear(),l.drawImage(c._canvas,0,0,c.getWidth()/u,c.getHeight()/u),n=l.getImageData(0,0,s.getWidth(),s.getHeight()),r=0;r0&&e[0].getDepth()<=o&&s(e)}(a.getStage().getChildren()),c},getDepth:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},setPosition:function(e){return this.setX(e.x),this.setY(e.y),this},getPosition:function(){return{x:this.getX(),y:this.getY()}},getAbsolutePosition:function(t){var n=this.getAbsoluteTransform(t).getMatrix(),r=new e.Transform,i=this.offset();return r.m=n.slice(),r.translate(i.x,i.y),r.getTranslation()},setAbsolutePosition:function(e){var t,n=this._clearTransform();return this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,(t=this.getAbsoluteTransform()).invert(),t.translate(e.x,e.y),e={x:this.attrs.x+t.getTranslation().x,y:this.attrs.y+t.getTranslation().y},this.setPosition({x:e.x,y:e.y}),this._setTransform(n),this},_setTransform:function(e){var t;for(t in e)this.attrs[t]=e[t];this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")},_clearTransform:function(){var e={x:this.getX(),y:this.getY(),rotation:this.getRotation(),scaleX:this.getScaleX(),scaleY:this.getScaleY(),offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),skewX:this.getSkewX(),skewY:this.getSkewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform"),e},move:function(e){var t=e.x,n=e.y,r=this.getX(),i=this.getY();return void 0!==t&&(r+=t),void 0!==n&&(i+=n),this.setPosition({x:r,y:i}),this},_eachAncestorReverse:function(e,t){var n,r,i=[],o=this.getParent();if(t&&t._id===this._id)e(this);else{for(i.unshift(this);o&&(!t||o._id!==t._id);)i.unshift(o),o=o.parent;for(n=i.length,r=0;r0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)},moveToBottom:function(){if(!this.parent)return e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)},setZIndex:function(t){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),!1;var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this},getAbsoluteOpacity:function(){return this._getCache("absoluteOpacity",this._getAbsoluteOpacity)},_getAbsoluteOpacity:function(){var e=this.getOpacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=this.getParent().getAbsoluteOpacity()),e},moveTo:function(e){return this.getParent()!==e&&((this.__originalRemove||this.remove).call(this),e.add(this)),this},toObject:function(){var t,n,r,i,o={},a=this.getAttrs();for(t in o.attrs={},a)n=a[t],r="function"===typeof this[t]&&this[t],delete a[t],i=r?r.call(this):null,a[t]=n,i!==n&&(o.attrs[t]=n);return o.className=this.getClassName(),e.Util._prepareToStringify(o)},toJSON:function(){return JSON.stringify(this.toObject())},getParent:function(){return this.parent},findAncestors:function(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r},findAncestor:function(e,t,n){return this.findAncestors(e,t,n)[0]},_isMatch:function(t){if(!t)return!1;var n,r,i=t.replace(/ /g,"").split(","),o=i.length;for(n=0;n0&&function(e,i){var o,a,c,s,l,u,h,f,d,p,v,m,y,g,b,T,E,_,C,S,w,O,M,k,x=e.data,A=e.width,z=e.height,D=i+i+1,P=A-1,N=z-1,L=i+1,H=L*(L+1)/2,R=new t,V=null,I=R,F=null,j=null,U=n[i],B=r[i];for(c=1;c>B,0!==M?(M=255/M,x[u]=(f*U>>B)*M,x[u+1]=(d*U>>B)*M,x[u+2]=(p*U>>B)*M):x[u]=x[u+1]=x[u+2]=0,f-=m,d-=y,p-=g,v-=b,m-=F.r,y-=F.g,g-=F.b,b-=F.a,s=h+((s=o+i+1)>B,M>0?(M=255/M,x[s]=(f*U>>B)*M,x[s+1]=(d*U>>B)*M,x[s+2]=(p*U>>B)*M):x[s]=x[s+1]=x[s+2]=0,f-=m,d-=y,p-=g,v-=b,m-=F.r,y-=F.g,g-=F.b,b-=F.a,s=o+((s=a+L)=0&&d=0&&p=0&&d=0&&p=1020?255:0}return a}(r=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],c=0;c=0&&d=0&&p255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.RGBA=function(e){var t,n,r=e.data,i=r.length,o=this.red(),a=this.green(),c=this.blue(),s=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e})}(),function(){"use strict";Konva.Filters.HSV=function(e){var t,n,r,i,o,a=e.data,c=a.length,s=Math.pow(2,this.value()),l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,h=s*l*Math.cos(u*Math.PI/180),f=s*l*Math.sin(u*Math.PI/180),d=.299*s+.701*h+.167*f,p=.587*s-.587*h+.33*f,v=.114*s-.114*h-.497*f,m=.299*s-.299*h-.328*f,y=.587*s+.413*h+.035*f,g=.114*s-.114*h+.293*f,b=.299*s-.3*h+1.25*f,T=.587*s-.586*h-1.05*f,E=.114*s+.886*h-.2*f;for(t=0;tl&&(d=0);var p=(h-1+d)*s*4,v=s;do{var m=f+4*(v-1),y=a;v+y<1&&(y=0),v+y>s&&(y=0);var g=p+4*(v-1+y),b=c[m]-c[g],T=c[m+1]-c[g+1],E=c[m+2]-c[g+2],_=b,C=_>0?_:-_;if((T>0?T:-T)>C&&(_=T),(E>0?E:-E)>C&&(_=E),_*=t,i){var S=c[m]+_,w=c[m+1]+_,O=c[m+2]+_;c[m]=S>255?255:S<0?0:S,c[m+1]=w>255?255:w<0?0:w,c[m+2]=O>255?255:O<0?0:O}else{var M=n-_;M<0?M=0:M>255&&(M=255),c[m]=c[m+1]=c[m+2]=M}}while(--v)}while(--h)},Konva.Factory.addGetterSetter(Konva.Node,"embossStrength",.5,Konva.Validators.getNumberValidator(),Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossWhiteLevel",.5,Konva.Validators.getNumberValidator(),Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossDirection","top-left",null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossBlend",!1,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";function e(e,t,n,r,i){var o=n-t,a=i-r;return 0===o?r+a/2:0===a?r:a*((e-t)/o)+r}Konva.Filters.Enhance=function(t){var n,r,i,o,a=t.data,c=a.length,s=a[0],l=s,u=a[1],h=u,f=a[2],d=f,p=this.enhance();if(0!==p){for(o=0;ol&&(l=n),(r=a[o+1])h&&(h=r),(i=a[o+2])d&&(d=i);var v,m,y,g,b,T,E,_,C;for(l===s&&(l=255,s=0),h===u&&(h=255,u=0),d===f&&(d=255,f=0),p>0?(m=l+p*(255-l),y=s-p*(s-0),b=h+p*(255-h),T=u-p*(u-0),_=d+p*(255-d),C=f-p*(f-0)):(m=l+p*(l-(v=.5*(l+s))),y=s+p*(s-v),b=h+p*(h-(g=.5*(h+u))),T=u+p*(u-g),_=d+p*(d-(E=.5*(d+f))),C=f+p*(f-E)),o=0;o=m))for(n=u;n=y||(i+=e[(r=4*(m*n+t))+0],o+=e[r+1],a+=e[r+2],c+=e[r+3],p+=1);for(i/=p,o/=p,a/=p,c/=p,t=s;t=m))for(n=u;n=y||(e[(r=4*(m*n+t))+0]=i,e[r+1]=o,e[r+2]=a,e[r+3]=c)}},Konva.Factory.addGetterSetter(Konva.Node,"pixelSize",8,Konva.Validators.getNumberValidator(),Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,i=r.length;for(t=0;t255?255:c,u[r+1]=s>255?255:s,u[r+2]=l>255?255:l,u[r+3]=u[r+3]}while(--n)}while(--f)}}(),function(){"use strict";Konva.Filters.Solarize=function(e){var t=e.data,n=e.width,r=4*n,i=e.height;do{var o=(i-1)*r,a=n;do{var c=o+4*(a-1),s=t[c],l=t[c+1],u=t[c+2];s>127&&(s=255-s),l>127&&(l=255-l),u>127&&(u=255-u),t[c]=s,t[c+1]=l,t[c+2]=u}while(--a)}while(--i)}}(),function(){"use strict";Konva.Filters.Kaleidoscope=function(e){var t,n,r,i,o,a,c,s,l,u=e.width,h=e.height,f=Math.round(this.kaleidoscopePower()),d=Math.round(this.kaleidoscopeAngle()),p=Math.floor(u*(d%360)/360);if(!(f<1)){var v=Konva.Util.createCanvasElement();v.width=u,v.height=h;var m=v.getContext("2d").getImageData(0,0,u,h);!function(e,t,n){var r,i,o,a,c=e.data,s=t.data,l=e.width,u=e.height,h=n.polarCenterX||l/2,f=n.polarCenterY||u/2,d=0,p=0,v=0,m=0,y=Math.sqrt(h*h+f*f);i=l-h,o=u-f,y=(a=Math.sqrt(i*i+o*o))>y?a:y;var g,b,T,E,_=u,C=l,S=360/C*Math.PI/180;for(b=0;bu&&(b=g,T=0,E=-1),n=0;nb?s:b;var T,E,_,C=f,S=h,w=n.polarRotation||0;for(i=0;i255?255:o,a=(a*=255)<0?0:a>255?255:a,c=(c*=255)<0?0:c>255?255:c,r[t]=o,r[t+1]=a,r[t+2]=c},e.Factory.addGetterSetter(e.Node,"contrast",0,e.Validators.getNumberValidator(),e.Factory.afterSetFilter)}(Konva),function(){"use strict";Konva.Container=function(e){this.__init(e)},Konva.Util.addMethods(Konva.Container,{__init:function(e){this.children=new Konva.Collection,Konva.Node.call(this,e)},getChildren:function(e){if(!e)return this.children;var t=new Konva.Collection;return this.children.each(function(n){e(n)&&t.push(n)}),t},hasChildren:function(){return this.getChildren().length>0},removeChildren:function(){for(var e,t=Konva.Collection.toCollection(this.children),n=0;n1){for(var t=0;t0?t[0]:void 0},_generalFind:function(e,t){var n=[];return"string"===typeof e?n=this._findByString(e,t):"function"===typeof e&&(n=this._findByFunction(e,t)),Konva.Collection.toCollection(n)},_findByString:function(e){var t,n,r,i,o,a,c,s=[],l=e.replace(/ /g,"").split(","),u=l.length;for(t=0;t0)){var o=i.getChildren(),a=o.length;e(i)&&(n=n.concat(i));for(var c=0;c0},destroy:function(){return e.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],this},_useBufferCanvas:function(e){return!e&&this.perfectDrawEnabled()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()||this.perfectDrawEnabled()&&this.hasShadow()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()},getSelfRect:function(){var e=this.getSize();return{x:this._centroid?Math.round(-e.width/2):0,y:this._centroid?Math.round(-e.height/2):0,width:e.width,height:e.height}},getClientRect:function(e){var t=(e=e||{}).skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,o=r.width+i,a=r.height+i,c=!e.skipShadow&&this.hasShadow(),s=c?this.shadowOffsetX():0,l=c?this.shadowOffsetY():0,u=o+Math.abs(s),h=a+Math.abs(l),f=c&&this.shadowBlur()||0,d=u+2*f,p=h+2*f,v=0;Math.round(i/2)!==i/2&&(v=1);var m={width:d+v,height:p+v,x:-Math.round(i/2+f)+Math.min(s,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return t?m:this._transformedRect(m,n)},drawScene:function(e,t,n,r){var i,o,a=this.getLayer(),c=e||a.getCanvas(),s=c.getContext(),l=this._cache.canvas,u=this.sceneFunc(),h=this.hasShadow(),f=this.hasStroke();if(!this.isVisible()&&!n)return this;if(l)return s.save(),a._applyTransform(this,s,t),this._drawCachedSceneCanvas(s),s.restore(),this;if(!u)return this;if(s.save(),this._useBufferCanvas(n)&&!r){if((o=(i=this.getStage().bufferCanvas).getContext()).clear(),o.save(),o._applyLineJoin(this),!n)if(a)a._applyTransform(this,o,t);else{var d=this.getAbsoluteTransform(t).getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5])}u.call(this,o,this),o.restore();var p=i.pixelRatio;h&&!c.hitCanvas?(s.save(),s._applyShadow(this),s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(i._canvas,0,0,i.width/p,i.height/p),s.restore()):(s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(i._canvas,0,0,i.width/p,i.height/p))}else{if(s._applyLineJoin(this),!n)if(a)a._applyTransform(this,s,t);else{var v=this.getAbsoluteTransform(t).getMatrix();s.transform(v[0],v[1],v[2],v[3],v[4],v[5])}h&&f&&!c.hitCanvas?(s.save(),n||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),s._applyShadow(this),u.call(this,s,this),s.restore(),this.hasFill()&&this.getShadowForStrokeEnabled()&&u.call(this,s,this)):h&&!c.hitCanvas?(s.save(),n||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),s._applyShadow(this),u.call(this,s,this),s.restore()):(n||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),u.call(this,s,this))}return s.restore(),this},drawHit:function(e,t,n){var r=this.getLayer(),i=e||r.hitCanvas,o=i.getContext(),a=this.hitFunc()||this.sceneFunc(),c=this._cache.canvas,s=c&&c.hit;if(!this.shouldDrawHit(i)&&!n)return this;if(r&&r.clearHitCache(),s)return o.save(),r._applyTransform(this,o,t),this._drawCachedHitCanvas(o),o.restore(),this;if(!a)return this;if(o.save(),o._applyLineJoin(this),!n)if(r)r._applyTransform(this,o,t);else{var l=this.getAbsoluteTransform(t).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}return a.call(this,o,this),o.restore(),this},drawHitFromCache:function(t){var n,r,i,o,a,c=t||0,s=this._cache.canvas,l=this._getCachedSceneCanvas(),u=s.hit,h=u.getContext(),f=u.getWidth(),d=u.getHeight();h.clear(),h.drawImage(l._canvas,0,0,f,d);try{for(i=(r=(n=h.getImageData(0,0,f,d)).data).length,o=e.Util._hexToRgb(this.colorKey),a=0;ac?(r[a]=o.r,r[a+1]=o.g,r[a+2]=o.b,r[a+3]=255):r[a+3]=0;h.putImageData(n,0,0)}catch(p){e.Util.error("Unable to draw hit graph from cached scene canvas. "+p.message)}return this}}),e.Util.extend(e.Shape,e.Node),e.Factory.addGetterSetter(e.Shape,"stroke",void 0,e.Validators.getStringValidator()),e.Factory.addGetterSetter(e.Shape,"strokeWidth",2,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"strokeHitEnabled",!0,e.Validators.getBooleanValidator()),e.Factory.addGetterSetter(e.Shape,"perfectDrawEnabled",!0,e.Validators.getBooleanValidator()),e.Factory.addGetterSetter(e.Shape,"shadowForStrokeEnabled",!0,e.Validators.getBooleanValidator()),e.Factory.addGetterSetter(e.Shape,"lineJoin"),e.Factory.addGetterSetter(e.Shape,"lineCap"),e.Factory.addGetterSetter(e.Shape,"sceneFunc"),e.Factory.addGetterSetter(e.Shape,"hitFunc"),e.Factory.addGetterSetter(e.Shape,"dash"),e.Factory.addGetterSetter(e.Shape,"dashOffset",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"shadowColor",void 0,e.Validators.getStringValidator()),e.Factory.addGetterSetter(e.Shape,"shadowBlur",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"shadowOpacity",1,e.Validators.getNumberValidator()),e.Factory.addComponentsGetterSetter(e.Shape,"shadowOffset",["x","y"]),e.Factory.addGetterSetter(e.Shape,"shadowOffsetX",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"shadowOffsetY",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternImage"),e.Factory.addGetterSetter(e.Shape,"fill",void 0,e.Validators.getStringValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternX",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternY",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientColorStops"),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientColorStops"),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientStartRadius",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientEndRadius",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientColorStops"),e.Factory.addGetterSetter(e.Shape,"fillPatternRepeat","repeat"),e.Factory.addGetterSetter(e.Shape,"fillEnabled",!0),e.Factory.addGetterSetter(e.Shape,"strokeEnabled",!0),e.Factory.addGetterSetter(e.Shape,"shadowEnabled",!0),e.Factory.addGetterSetter(e.Shape,"dashEnabled",!0),e.Factory.addGetterSetter(e.Shape,"strokeScaleEnabled",!0),e.Factory.addGetterSetter(e.Shape,"fillPriority","color"),e.Factory.addComponentsGetterSetter(e.Shape,"fillPatternOffset",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillPatternOffsetX",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternOffsetY",0,e.Validators.getNumberValidator()),e.Factory.addComponentsGetterSetter(e.Shape,"fillPatternScale",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillPatternScaleX",1,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternScaleY",1,e.Validators.getNumberValidator()),e.Factory.addComponentsGetterSetter(e.Shape,"fillLinearGradientStartPoint",["x","y"]),e.Factory.addComponentsGetterSetter(e.Shape,"strokeLinearGradientStartPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientStartPointX",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientStartPointX",0),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientStartPointY",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientStartPointY",0),e.Factory.addComponentsGetterSetter(e.Shape,"fillLinearGradientEndPoint",["x","y"]),e.Factory.addComponentsGetterSetter(e.Shape,"strokeLinearGradientEndPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientEndPointX",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientEndPointX",0),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientEndPointY",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientEndPointY",0),e.Factory.addComponentsGetterSetter(e.Shape,"fillRadialGradientStartPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientStartPointX",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientStartPointY",0),e.Factory.addComponentsGetterSetter(e.Shape,"fillRadialGradientEndPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientEndPointX",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientEndPointY",0),e.Factory.addGetterSetter(e.Shape,"fillPatternRotation",0),e.Factory.backCompat(e.Shape,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"}),e.Collection.mapMethods(e.Shape)}(Konva),function(){"use strict";var e="_",t=["mousedown","mousemove","mouseup","mouseout","touchstart","touchmove","touchend","mouseover","wheel","contextmenu"],n=t.length;function r(t,n){t.content.addEventListener(n,function(r){t[e+n](r)},!1)}Konva.Stage=function(e){this.___init(e)},Konva.Util.addMethods(Konva.Stage,{___init:function(e){this.nodeType="Stage",Konva.Container.call(this,e),this._id=Konva.idCounter++,this._buildDOM(),this._bindContentEvents(),this._enableNestedTransforms=!1,Konva.stages.push(this)},_validateAdd:function(e){"Layer"!==e.getType()&&Konva.Util.throw("You may only add layers to the stage.")},setContainer:function(e){if("string"===typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=Konva.document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=Konva.document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this},shouldDrawHit:function(){return!0},draw:function(){return Konva.Node.prototype.draw.call(this),this},setHeight:function(e){return Konva.Node.prototype.setHeight.call(this,e),this._resizeDOM(),this},setWidth:function(e){return Konva.Node.prototype.setWidth.call(this,e),this._resizeDOM(),this},clear:function(){var e,t=this.children,n=t.length;for(e=0;e-1&&Konva.stages.splice(t,1),this},getPointerPosition:function(){return this.pointerPos},getStage:function(){return this},getContent:function(){return this.content},_toKonvaCanvas:function(e){var t=(e=e||{}).x||0,n=e.y||0,r=new Konva.SceneCanvas({width:e.width||this.getWidth(),height:e.height||this.getHeight(),pixelRatio:e.pixelRatio||1}),i=r.getContext()._context,o=this.children;return(t||n)&&i.translate(-1*t,-1*n),o.each(function(r){if(r.isVisible()){var o=r._toKonvaCanvas(e);i.drawImage(o._canvas,t,n,o.getWidth()/o.getPixelRatio(),o.getHeight()/o.getPixelRatio())}}),r},toImage:function(e){var t=e.callback;e.callback=function(e){Konva.Util._getImage(e,function(e){t(e)})},this.toDataURL(e)},getIntersection:function(e,t){var n,r,i=this.getChildren();for(n=i.length-1;n>=0;n--)if(r=i[n].getIntersection(e,t))return r;return null},_resizeDOM:function(){if(this.content){var e,t,n=this.getWidth(),r=this.getHeight(),i=this.getChildren(),o=i.length;for(this.content.style.width=n+"px",this.content.style.height=r+"px",this.bufferCanvas.setSize(n,r),this.bufferHitCanvas.setSize(n,r),e=0;e1){for(var t=0;t0){var i=e.touches[0];n=i.clientX-t.left,r=i.clientY-t.top}}else n=e.clientX-t.left,r=e.clientY-t.top;null!==n&&null!==r&&(this.pointerPos={x:n,y:r})},_getContentPosition:function(){var e=this.content.getBoundingClientRect?this.content.getBoundingClientRect():{top:0,left:0};return{top:e.top,left:e.left}},_buildDOM:function(){if(this.bufferCanvas=new Konva.SceneCanvas,this.bufferHitCanvas=new Konva.HitCanvas({pixelRatio:1}),Konva.isBrowser){var e=this.getContainer();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=Konva.document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}},_onContent:function(e,t){var n,r,i=e.split(" "),o=i.length;for(n=0;n0?{antialiased:!0}:{}},drawScene:function(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.getClearBeforeDraw()&&r.getContext().clear(),Konva.Container.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this},drawHit:function(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.getClearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Konva.Container.prototype.drawHit.call(this,r,t),this.imageData=null,this},clear:function(e){return Konva.BaseLayer.prototype.clear.call(this,e),this.getHitCanvas().getContext().clear(e),this.imageData=null,this},setVisible:function(e){return Konva.Node.prototype.setVisible.call(this,e),e?(this.getCanvas()._canvas.style.display="block",this.hitCanvas._canvas.style.display="block"):(this.getCanvas()._canvas.style.display="none",this.hitCanvas._canvas.style.display="none"),this},enableHitGraph:function(){return this.setHitGraphEnabled(!0),this},disableHitGraph:function(){return this.setHitGraphEnabled(!1),this},setSize:function(e,t){return Konva.BaseLayer.prototype.setSize.call(this,e,t),this.hitCanvas.setSize(e,t),this}}),Konva.Util.extend(Konva.Layer,Konva.BaseLayer),Konva.Factory.addGetterSetter(Konva.Layer,"hitGraphEnabled",!0),Konva.Collection.mapMethods(Konva.Layer)}(),function(){"use strict";Konva.FastLayer=function(e){this.____init(e)},Konva.Util.addMethods(Konva.FastLayer,{____init:function(e){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,Konva.BaseLayer.call(this,e)},_validateAdd:function(e){"Shape"!==e.getType()&&Konva.Util.throw("You may only add shapes to a fast layer.")},_setCanvasSize:function(e,t){this.canvas.setSize(e,t)},hitGraphEnabled:function(){return!1},getIntersection:function(){return null},drawScene:function(e){var t=this.getLayer(),n=e||t&&t.getCanvas();return this.getClearBeforeDraw()&&n.getContext().clear(),Konva.Container.prototype.drawScene.call(this,n),this},draw:function(){return this.drawScene(),this},setVisible:function(e){return Konva.Node.prototype.setVisible.call(this,e),this.getCanvas()._canvas.style.display=e?"block":"none",this}}),Konva.Util.extend(Konva.FastLayer,Konva.BaseLayer),Konva.Collection.mapMethods(Konva.FastLayer)}(),function(){"use strict";Konva.Group=function(e){this.___init(e)},Konva.Util.addMethods(Konva.Group,{___init:function(e){this.nodeType="Group",Konva.Container.call(this,e)},_validateAdd:function(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&Konva.Util.throw("You may only add groups and shapes to groups.")}}),Konva.Util.extend(Konva.Group,Konva.Container),Konva.Collection.mapMethods(Konva.Group)}(),function(e){"use strict";var t=e.global.performance&&e.global.performance.now?function(){return e.global.performance.now()}:function(){return(new Date).getTime()};function n(e){setTimeout(e,1e3/60)}var r=e.global.requestAnimationFrame||e.global.webkitRequestAnimationFrame||e.global.mozRequestAnimationFrame||e.global.oRequestAnimationFrame||e.global.msRequestAnimationFrame||n;function i(){return r.apply(e.global,arguments)}e.Animation=function(n,r){var i=e.Animation;this.func=n,this.setLayers(r),this.id=i.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t()}},e.Animation.prototype={setLayers:function(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this},getLayers:function(){return this.layers},addLayer:function(e){var t,n=this.layers,r=n.length;for(t=0;tthis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())},getTime:function(){return this._time},setPosition:function(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e},getPosition:function(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)},play:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")},reverse:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")},seek:function(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")},reset:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")},finish:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")},update:function(){this.setPosition(this.getPosition(this._time))},onEnterFrame:function(){var e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)},pause:function(){this.state=1,this.fire("onPause")},getTimer:function(){return(new Date).getTime()}},Konva.Tween=function(n){var i,o,a=this,c=n.node,s=c._id,l=n.easing||Konva.Easings.Linear,u=!!n.yoyo;i="undefined"===typeof n.duration?.3:0===n.duration?.001:n.duration,this.node=c,this._id=t++;var h=c.getLayer()||(c instanceof Konva.Stage?c.getLayers():null);for(o in h||Konva.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Konva.Animation(function(){a.tween.onEnterFrame()},h),this.tween=new r(o,function(e){a._tweenFunc(e)},l,0,1,1e3*i,u),this._addListeners(),Konva.Tween.attrs[s]||(Konva.Tween.attrs[s]={}),Konva.Tween.attrs[s][this._id]||(Konva.Tween.attrs[s][this._id]={}),Konva.Tween.tweens[s]||(Konva.Tween.tweens[s]={}),n)void 0===e[o]&&this._addAttr(o,n[o]);this.reset(),this.onFinish=n.onFinish,this.onReset=n.onReset},Konva.Tween.attrs={},Konva.Tween.tweens={},Konva.Tween.prototype={_addAttr:function(e,t){var r,i,o,a,c,s,l,u,h=this.node,f=h._id;if((o=Konva.Tween.tweens[f][e])&&delete Konva.Tween.attrs[f][o][e],r=h.getAttr(e),Konva.Util._isArray(t))if(i=[],c=Math.max(t.length,r.length),"points"===e&&t.length!==r.length&&(t.length>r.length?(l=r,r=Konva.Util._prepareArrayForTween(r,t,h.closed())):(s=t,t=Konva.Util._prepareArrayForTween(t,r,h.closed()))),0===e.indexOf("fill"))for(a=0;a1&&e.translate(0,i)}},_hitFunc:function(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)},setText:function(e){var t=Konva.Util._isString(e)?e:(e||"").toString();return this._setAttr("text",t),this},getWidth:function(){return"auto"===this.attrs.width||void 0===this.attrs.width?this.getTextWidth()+2*this.getPadding():this.attrs.width},getHeight:function(){return"auto"===this.attrs.height||void 0===this.attrs.height?this.getTextHeight()*this.textArr.length*this.getLineHeight()+2*this.getPadding():this.attrs.height},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},_getTextSize:function(e){var t,n=i(),r=this.getFontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{width:t.width,height:parseInt(r,10)}},_getContextFont:function(){return Konva.UA.isIE?this.getFontStyle()+" "+this.getFontSize()+"px "+this.getFontFamily():this.getFontStyle()+" "+this.getFontVariant()+" "+this.getFontSize()+"px "+this.getFontFamily()},_addTextLine:function(e){"justify"===this.align()&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t})},_getTextWidth:function(e){var t=this.getLetterSpacing(),n=e.length;return i().measureText(e).width+(n?t*(n-1):0)},_setTextData:function(){var e=this.getText().split("\n"),t=+this.getFontSize(),n=0,r=this.getLineHeight()*t,o=this.attrs.width,a=this.attrs.height,c="auto"!==o,s="auto"!==a,l=this.getPadding(),u=o-2*l,h=a-2*l,f=0,d=this.getWrap(),p="none"!==d,v="char"!==d&&p,m=this.getEllipsis()&&!p;this.textArr=[],i().font=this._getContextFont();for(var y=0,g=e.length;yu)for(;b.length>0;){for(var _=0,C=b.length,S="",w=0;_>>1,M=b.slice(0,O+1),k=this._getTextWidth(M)+T;k<=u?(_=O+1,S=M+(m?"\u2026":""),w=k):C=O}if(!S)break;if(v){var x,A=b[S.length];(x=(" "===A||"-"===A)&&w<=u?S.length:Math.max(S.lastIndexOf(" "),S.lastIndexOf("-"))+1)>0&&(_=x,S=S.slice(0,_),w=this._getTextWidth(S))}if(S=Konva.Util.trimRight(S),this._addTextLine(S),n=Math.max(n,w),f+=r,!p||s&&f+r>h)break;if(b=b.slice(_),(b=Konva.Util.trimLeft(b)).length>0&&(E=this._getTextWidth(b))<=u){this._addTextLine(b),f+=r,n=Math.max(n,E);break}}else this._addTextLine(b),f+=r,n=Math.max(n,E);if(s&&f+r>h)break}this.textHeight=t,this.textWidth=n}},Konva.Util.extend(Konva.Text,Konva.Shape),Konva.Factory.addSetter(Konva.Node,"width",Konva.Validators.getNumberOrAutoValidator()),Konva.Factory.addSetter(Konva.Node,"height",Konva.Validators.getNumberOrAutoValidator()),Konva.Factory.addGetterSetter(Konva.Text,"fontFamily","Arial"),Konva.Factory.addGetterSetter(Konva.Text,"fontSize",12,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Text,"fontStyle","normal"),Konva.Factory.addGetterSetter(Konva.Text,"fontVariant","normal"),Konva.Factory.addGetterSetter(Konva.Text,"padding",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Text,"align","left"),Konva.Factory.addGetterSetter(Konva.Text,"verticalAlign","top"),Konva.Factory.addGetterSetter(Konva.Text,"lineHeight",1,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Text,"wrap","word"),Konva.Factory.addGetterSetter(Konva.Text,"ellipsis",!1),Konva.Factory.addGetterSetter(Konva.Text,"letterSpacing",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetter(Konva.Text,"text",""),Konva.Factory.addOverloadedGetterSetter(Konva.Text,"text"),Konva.Factory.addGetterSetter(Konva.Text,"textDecoration",""),Konva.Collection.mapMethods(Konva.Text)}(),function(){"use strict";Konva.Line=function(e){this.___init(e)},Konva.Line.prototype={___init:function(e){Konva.Shape.call(this,e),this.className="Line",this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")}),this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){var t,n,r,i=this.getPoints(),o=i.length,a=this.getTension(),c=this.getClosed(),s=this.getBezier();if(o){if(e.beginPath(),e.moveTo(i[0],i[1]),0!==a&&o>4){for(n=(t=this.getTensionPoints()).length,r=c?0:4,c||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);rs?c:s,p=c>s?1:c/s,v=c>s?s/c:1;e.translate(o,a),e.rotate(h),e.scale(p,v),e.arc(0,0,d,l,l+u,1-f),e.scale(1/p,1/v),e.rotate(-h),e.translate(-o,-a);break;case"z":e.closePath()}}e.fillStrokeShape(this)},getSelfRect:function(){var e=[];this.dataArray.forEach(function(t){e=e.concat(t.points)});for(var t,n,r=e[0],i=e[0],o=e[1],a=e[1],c=0;cthis.dataArray[n].pathLength;)e-=this.dataArray[n].pathLength,++n;if(n===r)return{x:(t=this.dataArray[n-1].points.slice(-2))[0],y:t[1]};if(e<.01)return{x:(t=this.dataArray[n].points.slice(0,2))[0],y:t[1]};var i=this.dataArray[n],o=i.points;switch(i.command){case"L":return Konva.Path.getPointOnLine(e,i.start.x,i.start.y,o[0],o[1]);case"C":return Konva.Path.getPointOnCubicBezier(e/i.pathLength,i.start.x,i.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case"Q":return Konva.Path.getPointOnQuadraticBezier(e/i.pathLength,i.start.x,i.start.y,o[0],o[1],o[2],o[3]);case"A":var a=o[0],c=o[1],s=o[2],l=o[3],u=o[4],h=o[5],f=o[6];return u+=h*e/i.pathLength,Konva.Path.getPointOnEllipticalArc(a,c,s,l,u,f)}return null}},Konva.Util.extend(Konva.Path,Konva.Shape),Konva.Path.getLineLength=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},Konva.Path.getPointOnLine=function(e,t,n,r,i,o,a){void 0===o&&(o=t),void 0===a&&(a=n);var c=(i-n)/(r-t+1e-8),s=Math.sqrt(e*e/(1+c*c));r0&&!isNaN(d[0]);){var y,g,b,T,E,_,C,S,w,O,M=null,k=[],x=s,A=l;switch(f){case"l":s+=d.shift(),l+=d.shift(),M="L",k.push(s,l);break;case"L":s=d.shift(),l=d.shift(),k.push(s,l);break;case"m":var z=d.shift(),D=d.shift();if(s+=z,l+=D,M="M",a.length>2&&"z"===a[a.length-1].command)for(var P=a.length-2;P>=0;P--)if("M"===a[P].command){s=a[P].points[0]+z,l=a[P].points[1]+D;break}k.push(s,l),f="l";break;case"M":s=d.shift(),l=d.shift(),M="M",k.push(s,l),f="L";break;case"h":s+=d.shift(),M="L",k.push(s,l);break;case"H":s=d.shift(),M="L",k.push(s,l);break;case"v":l+=d.shift(),M="L",k.push(s,l);break;case"V":l=d.shift(),M="L",k.push(s,l);break;case"C":k.push(d.shift(),d.shift(),d.shift(),d.shift()),s=d.shift(),l=d.shift(),k.push(s,l);break;case"c":k.push(s+d.shift(),l+d.shift(),s+d.shift(),l+d.shift()),s+=d.shift(),l+=d.shift(),M="C",k.push(s,l);break;case"S":g=s,b=l,"C"===(y=a[a.length-1]).command&&(g=s+(s-y.points[2]),b=l+(l-y.points[3])),k.push(g,b,d.shift(),d.shift()),s=d.shift(),l=d.shift(),M="C",k.push(s,l);break;case"s":g=s,b=l,"C"===(y=a[a.length-1]).command&&(g=s+(s-y.points[2]),b=l+(l-y.points[3])),k.push(g,b,s+d.shift(),l+d.shift()),s+=d.shift(),l+=d.shift(),M="C",k.push(s,l);break;case"Q":k.push(d.shift(),d.shift()),s=d.shift(),l=d.shift(),k.push(s,l);break;case"q":k.push(s+d.shift(),l+d.shift()),s+=d.shift(),l+=d.shift(),M="Q",k.push(s,l);break;case"T":g=s,b=l,"Q"===(y=a[a.length-1]).command&&(g=s+(s-y.points[0]),b=l+(l-y.points[1])),s=d.shift(),l=d.shift(),M="Q",k.push(g,b,s,l);break;case"t":g=s,b=l,"Q"===(y=a[a.length-1]).command&&(g=s+(s-y.points[0]),b=l+(l-y.points[1])),s+=d.shift(),l+=d.shift(),M="Q",k.push(g,b,s,l);break;case"A":T=d.shift(),E=d.shift(),_=d.shift(),C=d.shift(),S=d.shift(),w=s,O=l,s=d.shift(),l=d.shift(),M="A",k=this.convertEndpointToCenterParameterization(w,O,s,l,C,S,T,E,_);break;case"a":T=d.shift(),E=d.shift(),_=d.shift(),C=d.shift(),S=d.shift(),w=s,O=l,s+=d.shift(),l+=d.shift(),M="A",k=this.convertEndpointToCenterParameterization(w,O,s,l,C,S,T,E,_)}a.push({command:M||f,points:k,start:{x:x,y:A},pathLength:this.calcLength(x,A,M||f,k)})}"z"!==f&&"Z"!==f||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a},Konva.Path.calcLength=function(e,t,n,r){var i,o,a,c,s=Konva.Path;switch(n){case"L":return s.getLineLength(e,t,r[0],r[1]);case"C":for(i=0,o=s.getPointOnCubicBezier(0,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),c=.01;c<=1;c+=.01)a=s.getPointOnCubicBezier(c,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case"Q":for(i=0,o=s.getPointOnQuadraticBezier(0,e,t,r[0],r[1],r[2],r[3]),c=.01;c<=1;c+=.01)a=s.getPointOnQuadraticBezier(c,e,t,r[0],r[1],r[2],r[3]),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case"A":i=0;var l=r[4],u=r[5],h=r[4]+u,f=Math.PI/180;if(Math.abs(l-h)h;c-=f)a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(c=l+f;c1&&(a*=Math.sqrt(f),c*=Math.sqrt(f));var d=Math.sqrt((a*a*(c*c)-a*a*(h*h)-c*c*(u*u))/(a*a*(h*h)+c*c*(u*u)));i===o&&(d*=-1),isNaN(d)&&(d=0);var p=d*a*h/c,v=d*-c*u/a,m=(e+n)/2+Math.cos(l)*p-Math.sin(l)*v,y=(t+r)/2+Math.sin(l)*p+Math.cos(l)*v,g=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(g(e)*g(t))},T=function(e,t){return(e[0]*t[1]=1&&(S=0),0===o&&S>0&&(S-=2*Math.PI),1===o&&S<0&&(S+=2*Math.PI),[m,y,a,c,E,S,l,o]},Konva.Factory.addGetterSetter(Konva.Path,"data"),Konva.Collection.mapMethods(Konva.Path)}(),function(){"use strict";function e(e){e.fillText(this.partialText,0,0)}function t(e){e.strokeText(this.partialText,0,0)}Konva.TextPath=function(e){this.___init(e)},Konva.TextPath.prototype={___init:function(n){var r=this;this.dummyCanvas=Konva.Util.createCanvasElement(),this.dataArray=[],Konva.Shape.call(this,n),this._fillFunc=e,this._strokeFunc=t,this._fillFuncHit=e,this._strokeFuncHit=t,this.className="TextPath",this.dataArray=Konva.Path.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){r.dataArray=Konva.Path.parsePathData(this.attrs.data),r._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva",r._setTextData),n&&n.getKerning&&(Konva.Util.warn('getKerning TextPath API is deprecated. Please use "kerningFunc" instead.'),this.setKerningFunc(n.getKerning)),r._setTextData(),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.getTextBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===t&&e.beginPath();for(var o=0;o=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r0&&(a+=e.dataArray[c].pathLength);var s=0;"center"===r&&(s=Math.max(0,a/2-o/2)),"right"===r&&(s=Math.max(0,a-o));for(var l,u,h,f=this.getText().split(""),d=this.getText().split(" ").length-1,p=-1,v=0,m=function(){v=0;for(var t=e.dataArray,n=p+1;n0)return p=n,t[n];"M"===t[n].command&&(l={x:t[n].points[0],y:t[n].points[1]})}return{}},y=function(t){var i=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(i+=(a-o)/d);var c=0,s=0;for(u=void 0;Math.abs(i-c)/i>.01&&s<25;){s++;for(var f=c;void 0===h;)(h=m())&&f+h.pathLengthi?u=Konva.Path.getPointOnLine(i,l.x,l.y,h.points[0],h.points[1],l.x,l.y):h=void 0;break;case"A":var y=h.points[4],g=h.points[5],b=h.points[4]+g;0===v?v=y+1e-8:i>c?v+=Math.PI/180*g/Math.abs(g):v-=Math.PI/360*g/Math.abs(g),(g<0&&v=0&&v>b)&&(v=b,p=!0),u=Konva.Path.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],v,h.points[6]);break;case"C":0===v?v=i>h.pathLength?1e-8:i/h.pathLength:i>c?v+=(i-c)/h.pathLength:v-=(c-i)/h.pathLength,v>1&&(v=1,p=!0),u=Konva.Path.getPointOnCubicBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3],h.points[4],h.points[5]);break;case"Q":0===v?v=i/h.pathLength:i>c?v+=(i-c)/h.pathLength:v-=(c-i)/h.pathLength,v>1&&(v=1,p=!0),u=Konva.Path.getPointOnQuadraticBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3])}void 0!==u&&(c=Konva.Path.getLineLength(l.x,l.y,u.x,u.y)),p&&(p=!1,h=void 0)}},g=e._getTextSize("C").width+n,b=0;b4;o&&(i=this.getTensionPoints());var a,c,s=r.length;o?(a=r[s-2]-i[s-2],c=r[s-1]-i[s-1]):(a=r[s-2]-r[s-4],c=r[s-1]-r[s-3]);var l=(Math.atan2(c,a)+n)%n,u=this.pointerLength(),h=this.pointerWidth();t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(l),t.moveTo(0,0),t.lineTo(-u,h/2),t.lineTo(-u,-h/2),t.closePath(),t.restore(),this.pointerAtBeginning()&&(t.save(),t.translate(r[0],r[1]),o?(a=i[0]-r[0],c=i[1]-r[1]):(a=r[2]-r[0],c=r[3]-r[1]),t.rotate((Math.atan2(-c,-a)+n)%n),t.moveTo(0,0),t.lineTo(-u,h/2),t.lineTo(-u,-h/2),t.closePath(),t.restore());var f=this.dashEnabled();f&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),f&&(this.attrs.dashEnabled=!0)}},e.Util.extend(e.Arrow,e.Line),e.Factory.addGetterSetter(e.Arrow,"pointerLength",10,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Arrow,"pointerWidth",10,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Arrow,"pointerAtBeginning",!1),e.Collection.mapMethods(e.Arrow)}(Konva),function(e){"use strict";var t=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].join(" "),n=["xChange.resizer","yChange.resizer","widthChange.resizer","heightChange.resizer","scaleXChange.resizer","scaleYChange.resizer","skewXChange.resizer","skewYChange.resizer","rotationChange.resizer","offsetXChange.resizer","offsetYChange.resizer","transformsEnabledChange.resizer"].join(" "),r=["widthChange.resizer","heightChange.resizer","scaleXChange.resizer","scaleYChange.resizer","skewXChange.resizer","skewYChange.resizer","rotationChange.resizer","offsetXChange.resizer","offsetYChange.resizer"].join(" "),i={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};e.Transformer=function(e){this.____init(e)};var o=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];e.Transformer.prototype={_centroid:!1,____init:function(n){e.Group.call(this,n),this.className="Transformer",this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(t,this.update),this.getNode()&&this.update()},attachTo:function(e){this.setNode(e)},setNode:function(e){return this._node&&this.detach(),this._node=e,this._resetTransformCache(),e.on(n,this._resetTransformCache.bind(this)),e.on(r,function(){this._transforming||this.update()}.bind(this)),!!this.findOne(".top-left")&&this.update(),this},getNode:function(){return this._node},detach:function(){this.getNode()&&(this.getNode().off(".resizer"),this._node=void 0),this._resetTransformCache()},_resetTransformCache:function(){this._clearCache("nodeRect"),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")},_getNodeRect:function(){return this._getCache("nodeRect",this.__getNodeRect)},__getNodeRect:function(){var t=this.getNode();if(!t)return{x:-Number.MAX_SAFE_INTEGER,y:-Number.MAX_SAFE_INTEGER,width:0,height:0,rotation:0};var n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=e.getAngle(t.rotation()),i=n.x*t.scaleX()-t.offsetX()*t.scaleX(),o=n.y*t.scaleY()-t.offsetY()*t.scaleY();return{x:t.x()+i*Math.cos(r)+o*Math.sin(-r),y:t.y()+o*Math.cos(r)+i*Math.sin(r),width:n.width*t.scaleX(),height:n.height*t.scaleY(),rotation:t.rotation()}},getX:function(){return this._getNodeRect().x},getY:function(){return this._getNodeRect().y},getRotation:function(){return this._getNodeRect().rotation},getWidth:function(){return this._getNodeRect().width},getHeight:function(){return this._getNodeRect().height},_createElements:function(){this._createBack(),o.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")},_createAnchor:function(t){var n=new e.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0}),r=this;n.on("mousedown touchstart",function(e){r._handleMouseDown(e)}),n.on("dragstart",function(e){e.cancelBubble=!0}),n.on("dragmove",function(e){e.cancelBubble=!0}),n.on("dragend",function(e){e.cancelBubble=!0}),n.on("mouseenter",function(){var r=this.getParent(),o=e.getAngle(r.rotation()),a=r.getNode().getAbsoluteScale(),c=a.y*a.x<0,s=function(t,n,r){if("rotater"===t)return"crosshair";n+=e.Util._degToRad(i[t]||0),r&&(n*=-1);var o=(e.Util._radToDeg(n)%360+360)%360;return e.Util._inRange(o,337.5,360)||e.Util._inRange(o,0,22.5)?"ns-resize":e.Util._inRange(o,22.5,67.5)?"nesw-resize":e.Util._inRange(o,67.5,112.5)?"ew-resize":e.Util._inRange(o,112.5,157.5)?"nwse-resize":e.Util._inRange(o,157.5,202.5)?"ns-resize":e.Util._inRange(o,202.5,247.5)?"nesw-resize":e.Util._inRange(o,247.5,292.5)?"ew-resize":e.Util._inRange(o,292.5,337.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+o),"pointer")}(t,o,c);n.getStage().content.style.cursor=s,r._cursorChange=!0}),n.on("mouseout",function(){n.getStage()&&this.getParent()&&(n.getStage().content.style.cursor="",this.getParent()._cursorChange=!1)}),this.add(n)},_createBack:function(){var t=new e.Shape({name:"back",width:0,height:0,listening:!1,sceneFunc:function(t){var n=this.getParent(),r=n.getPadding();t.beginPath(),t.rect(-r,-r,this.width()+2*r,this.height()+2*r),t.moveTo(this.width()/2,-r),n.rotateEnabled()&&t.lineTo(this.width()/2,-n.rotateAnchorOffset()*e.Util._sign(this.height())),t.fillStrokeShape(this)}});this.add(t)},_handleMouseDown:function(e){this.movingResizer=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=r/i,this.cos=n/i,window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0),this._transforming=!0,this._fire("transformstart",{evt:e}),this.getNode()._fire("transformstart",{evt:e})},_handleMouseMove:function(t){var n,r,i,o=this.findOne("."+this.movingResizer),a=o.getStage().getContent().getBoundingClientRect(),c=a.left,s=a.top,l={x:(void 0!==t.clientX?t.clientX:t.touches[0].clientX)-c,y:(void 0!==t.clientX?t.clientY:t.touches[0].clientY)-s};o.setAbsolutePosition(l);var u=this.keepRatio()||t.shiftKey;if("top-left"===this.movingResizer)u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".bottom-right").x()-o.x(),2)+Math.pow(this.findOne(".bottom-right").y()-o.y(),2)))*this.cos,r=i*this.sin,this.findOne(".top-left").x(this.findOne(".bottom-right").x()-n),this.findOne(".top-left").y(this.findOne(".bottom-right").y()-r));else if("top-center"===this.movingResizer)this.findOne(".top-left").y(o.y());else if("top-right"===this.movingResizer){u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".bottom-left").x()-o.x(),2)+Math.pow(this.findOne(".bottom-left").y()-o.y(),2)))*this.cos,r=i*this.sin,this.findOne(".top-right").x(n),this.findOne(".top-right").y(this.findOne(".bottom-left").y()-r));var h=o.position();this.findOne(".top-left").y(h.y),this.findOne(".bottom-right").x(h.x)}else if("middle-left"===this.movingResizer)this.findOne(".top-left").x(o.x());else if("middle-right"===this.movingResizer)this.findOne(".bottom-right").x(o.x());else if("bottom-left"===this.movingResizer)u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".top-right").x()-o.x(),2)+Math.pow(this.findOne(".top-right").y()-o.y(),2)))*this.cos,r=i*this.sin,this.findOne(".bottom-left").x(this.findOne(".top-right").x()-n),this.findOne(".bottom-left").y(r)),h=o.position(),this.findOne(".top-left").x(h.x),this.findOne(".bottom-right").y(h.y);else if("bottom-center"===this.movingResizer)this.findOne(".bottom-right").y(o.y());else if("bottom-right"===this.movingResizer)u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".bottom-right").x(),2)+Math.pow(this.findOne(".bottom-right").y(),2)))*this.cos,r=i*this.sin,this.findOne(".bottom-right").x(n),this.findOne(".bottom-right").y(r));else if("rotater"===this.movingResizer){var f=this.getPadding(),d=this._getNodeRect();n=o.x()-d.width/2,r=-o.y()+d.height/2;var p=Math.atan2(-r,n)+Math.PI/2;d.height<0&&(p-=Math.PI);for(var v=e.getAngle(this.rotation()),m=e.Util._radToDeg(v)+e.Util._radToDeg(p),y=e.getAngle(this.getNode().rotation()),g=e.Util._degToRad(m),b=this.rotationSnaps(),T=0;T=0}),this.findOne(".top-center").setAttrs({x:o/2,y:-l,scale:i,visible:s&&c.indexOf("top-center")>=0}),this.findOne(".top-right").setAttrs({x:o+l,y:-l,scale:i,visible:s&&c.indexOf("top-right")>=0}),this.findOne(".middle-left").setAttrs({x:-l,y:a/2,scale:i,visible:s&&c.indexOf("middle-left")>=0}),this.findOne(".middle-right").setAttrs({x:o+l,y:a/2,scale:i,visible:s&&c.indexOf("middle-right")>=0}),this.findOne(".bottom-left").setAttrs({x:-l,y:a+l,scale:i,visible:s&&c.indexOf("bottom-left")>=0}),this.findOne(".bottom-center").setAttrs({x:o/2,y:a+l,scale:i,visible:s&&c.indexOf("bottom-center")>=0}),this.findOne(".bottom-right").setAttrs({x:o+l,y:a+l,scale:i,visible:s&&c.indexOf("bottom-right")>=0});var h=-this.rotateAnchorOffset()*Math.abs(i.y);this.findOne(".rotater").setAttrs({x:o/2,y:h*e.Util._sign(a),scale:i,visible:this.rotateEnabled()}),this.findOne(".back").setAttrs({width:o*r.x,height:a*r.y,scale:i,visible:this.borderEnabled(),stroke:this.getBorderStroke(),strokeWidth:this.getBorderStrokeWidth(),dash:this.getBorderDash()})},isTransforming:function(){return this._transforming},stopTransform:function(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this.movingResizer);e&&e.stopDrag()}},destroy:function(){this.getStage()&&this._cursorChange&&(this.getStage().content.style.cursor=""),e.Group.prototype.destroy.call(this),this.detach(),this._removeEvents()},toObject:function(){return e.Node.prototype.toObject.call(this)}},e.Util.extend(e.Transformer,e.Group),e.Factory.addGetterSetter(e.Transformer,"enabledAnchors",o,function(t){return t instanceof Array||e.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===o.indexOf(t)&&e.Util.warn("Unknown anchor name: "+t+". Available names are: "+o.join(", "))}),t||[]}),e.Factory.addGetterSetter(e.Transformer,"resizeEnabled",!0),e.Factory.addGetterSetter(e.Transformer,"anchorSize",10,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"rotateEnabled",!0),e.Factory.addGetterSetter(e.Transformer,"rotationSnaps",[]),e.Factory.addGetterSetter(e.Transformer,"rotateAnchorOffset",50,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"borderEnabled",!0),e.Factory.addGetterSetter(e.Transformer,"anchorStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(e.Transformer,"anchorStrokeWidth",1,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"anchorFill","white"),e.Factory.addGetterSetter(e.Transformer,"anchorCornerRadius",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"borderStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(e.Transformer,"borderStrokeWidth",1,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"borderDash"),e.Factory.addGetterSetter(e.Transformer,"keepRatio",!0),e.Factory.addGetterSetter(e.Transformer,"centeredScaling",!1),e.Factory.addGetterSetter(e.Transformer,"ignoreStroke",!1),e.Factory.addGetterSetter(e.Transformer,"padding",0,e.Validators.getNumberValidator()),e.Factory.addOverloadedGetterSetter(e.Transformer,"node"),e.Factory.addGetterSetter(e.Transformer,"boundBoxFunc"),e.Factory.backCompat(e.Transformer,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),e.Collection.mapMethods(e.Transformer)}(Konva)}).call(this,n(59))},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(57),i=n.n(r),o={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function a(e){var t=i()(e);return"string"===t||"number"===t?o[e]||e:""}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(0)),i=o(n(435));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){var r=n(190),i=n(191),o=n(140),a=n(43),c=n(68),s=n(186),l=n(249),u=n(187),h="[object Map]",f="[object Set]",d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(c(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||u(e)||o(e)))return!e.length;var t=i(e);if(t==h||t==f)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(581),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1)for(var n=1;n=l.DIGIT_0&&e<=l.DIGIT_9}function v(e){return e>=l.LATIN_CAPITAL_A&&e<=l.LATIN_CAPITAL_Z}function m(e){return e>=l.LATIN_SMALL_A&&e<=l.LATIN_SMALL_Z}function y(e){return m(e)||v(e)}function g(e){return y(e)||p(e)}function b(e){return e>=l.LATIN_CAPITAL_A&&e<=l.LATIN_CAPITAL_F}function T(e){return e>=l.LATIN_SMALL_A&&e<=l.LATIN_SMALL_F}function E(e){return e+32}function _(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function C(e){return String.fromCharCode(E(e))}function S(e,t){for(var n=c[++e],r=++e,i=r+n-1;r<=i;){var o=r+i>>>1,a=c[o];if(at))return c[o+n];i=o-1}}return-1}var w=function(){function e(){r(this,e),this.preprocessor=new o,this.tokenQueue=[],this.allowCDATA=!1,this.state=f,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}return i(e,[{key:"_err",value:function(){}},{key:"_errOnNextCodePoint",value:function(e){this._consume(),this._err(e),this._unconsume()}},{key:"getNextToken",value:function(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;var e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}},{key:"write",value:function(e,t){this.active=!0,this.preprocessor.write(e,t)}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}},{key:"_ensureHibernation",value:function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:e.HIBERNATION_TOKEN}),!0}return!1}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}},{key:"_reconsumeInState",value:function(e){this.state=e,this._unconsume()}},{key:"_consumeSequenceIfMatch",value:function(e,t,n){for(var r=0,i=!0,o=e.length,a=0,c=t,s=void 0;a0&&(c=this._consume(),r++),c===l.EOF){i=!1;break}if(c!==(s=e[a])&&(n||c!==E(s))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}},{key:"_isTempBufferEqualToScriptString",value:function(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(var e=0;e0&&this._err(s.endTagWithAttributes),t.selfClosing&&this._err(s.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}},{key:"_emitCurrentCharacterToken",value:function(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}},{key:"_emitEOFToken",value:function(){this._createEOFToken(),this._emitCurrentToken()}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(t){var n=e.CHARACTER_TOKEN;d(t)?n=e.WHITESPACE_CHARACTER_TOKEN:t===l.NULL&&(n=e.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,_(t))}},{key:"_emitSeveralCodePoints",value:function(e){for(var t=0;t-1;){var i=c[r],o=i<7;o&&1&i&&(t=2&i?[c[++r],c[++r]]:[c[++r]],n=0);var a=this._consume();if(this.tempBuff.push(a),n++,a===l.EOF)break;r=o?4&i?S(r,a):-1:a===i?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}},{key:"_isCharacterReferenceInAttribute",value:function(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}},{key:"_isCharacterReferenceAttributeQuirk",value:function(e){if(!e&&this._isCharacterReferenceInAttribute()){var t=this._consume();return this._unconsume(),t===l.EQUALS_SIGN||g(t)}return!1}},{key:"_flushCodePointsConsumedAsCharacterReference",value:function(){if(this._isCharacterReferenceInAttribute())for(var e=0;e")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",value:function(e){e===l.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):y(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}},{key:"SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",value:function(e){y(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",value:function(e){e===l.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}},{key:"SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",value:function(e){d(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):v(e)?(this.tempBuff.push(E(e)),this._emitCodePoint(e)):m(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}},{key:"BEFORE_ATTRIBUTE_NAME_STATE",value:function(e){d(e)||(e===l.SOLIDUS||e===l.GREATER_THAN_SIGN||e===l.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===l.EQUALS_SIGN?(this._err(s.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}},{key:"ATTRIBUTE_NAME_STATE",value:function(e){d(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN||e===l.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===l.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):v(e)?this.currentAttr.name+=C(e):e===l.QUOTATION_MARK||e===l.APOSTROPHE||e===l.LESS_THAN_SIGN?(this._err(s.unexpectedCharacterInAttributeName),this.currentAttr.name+=_(e)):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.name+=a.REPLACEMENT_CHARACTER):this.currentAttr.name+=_(e)}},{key:"AFTER_ATTRIBUTE_NAME_STATE",value:function(e){d(e)||(e===l.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===l.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}},{key:"BEFORE_ATTRIBUTE_VALUE_STATE",value:function(e){d(e)||(e===l.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===l.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.missingAttributeValue),this.state=f,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}},{key:"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"ATTRIBUTE_VALUE_UNQUOTED_STATE",value:function(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.GREATER_THAN_SIGN?(this._leaveAttrValue(f),this._emitCurrentToken()):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.QUOTATION_MARK||e===l.APOSTROPHE||e===l.LESS_THAN_SIGN||e===l.EQUALS_SIGN||e===l.GRAVE_ACCENT?(this._err(s.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=_(e)):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",value:function(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===l.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===l.GREATER_THAN_SIGN?(this._leaveAttrValue(f),this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._err(s.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}},{key:"SELF_CLOSING_START_TAG_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._err(s.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}},{key:"BOGUS_COMMENT_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):this.currentToken.data+=_(e)}},{key:"MARKUP_DECLARATION_OPEN_STATE",value:function(e){this._consumeSequenceIfMatch(u.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(u.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(u.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(s.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(s.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}},{key:"COMMENT_START_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.abruptClosingOfEmptyComment),this.state=f,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_START_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.abruptClosingOfEmptyComment),this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===l.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=_(e)}},{key:"COMMENT_LESS_THAN_SIGN_STATE",value:function(e){e===l.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===l.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",value:function(e){e!==l.GREATER_THAN_SIGN&&e!==l.EOF&&this._err(s.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}},{key:"COMMENT_END_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_END_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===l.HYPHEN_MINUS?this.currentToken.data+="-":e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_END_BANG_STATE",value:function(e){e===l.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.incorrectlyClosedComment),this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}},{key:"DOCTYPE_STATE",value:function(e){d(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===l.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}},{key:"BEFORE_DOCTYPE_NAME_STATE",value:function(e){d(e)||(v(e)?(this._createDoctypeToken(C(e)),this.state="DOCTYPE_NAME_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this._createDoctypeToken(a.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(_(e)),this.state="DOCTYPE_NAME_STATE"))}},{key:"DOCTYPE_NAME_STATE",value:function(e){d(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):v(e)?this.currentToken.name+=C(e):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.name+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=_(e)}},{key:"AFTER_DOCTYPE_NAME_STATE",value:function(e){d(e)||(e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(u.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(u.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(s.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",value:function(e){d(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",value:function(e){d(e)||(e===l.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}},{key:"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}},{key:"AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",value:function(e){d(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",value:function(e){d(e)||(e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",value:function(e){d(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",value:function(e){d(e)||(e===l.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}},{key:"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}},{key:"AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",value:function(e){d(e)||(e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"BOGUS_DOCTYPE_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.NULL?this._err(s.unexpectedNullCharacter):e===l.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}},{key:"CDATA_SECTION_STATE",value:function(e){e===l.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===l.EOF?(this._err(s.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}},{key:"CDATA_SECTION_BRACKET_STATE",value:function(e){e===l.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}},{key:"CDATA_SECTION_END_STATE",value:function(e){e===l.GREATER_THAN_SIGN?this.state=f:e===l.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}},{key:"CHARACTER_REFERENCE_STATE",value:function(e){this.tempBuff=[l.AMPERSAND],e===l.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):g(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:"NAMED_CHARACTER_REFERENCE_STATE",value:function(e){var t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[l.AMPERSAND];else if(t){var n=this.tempBuff[this.tempBuff.length-1]===l.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(s.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}},{key:"AMBIGUOS_AMPERSAND_STATE",value:function(e){g(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=_(e):this._emitCodePoint(e):(e===l.SEMICOLON&&this._err(s.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}},{key:"NUMERIC_CHARACTER_REFERENCE_STATE",value:function(e){this.charRefCode=0,e===l.LATIN_SMALL_X||e===l.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}},{key:"HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",value:function(e){!function(e){return p(e)||b(e)||T(e)}(e)?(this._err(s.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}},{key:"DECIMAL_CHARACTER_REFERENCE_START_STATE",value:function(e){p(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(s.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:"HEXADEMICAL_CHARACTER_REFERENCE_STATE",value:function(e){b(e)?this.charRefCode=16*this.charRefCode+e-55:T(e)?this.charRefCode=16*this.charRefCode+e-87:p(e)?this.charRefCode=16*this.charRefCode+e-48:e===l.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(s.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}},{key:"DECIMAL_CHARACTER_REFERENCE_STATE",value:function(e){p(e)?this.charRefCode=10*this.charRefCode+e-48:e===l.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(s.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}},{key:"NUMERIC_CHARACTER_REFERENCE_END_STATE",value:function(){if(this.charRefCode===l.NULL)this._err(s.nullCharacterReference),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(s.characterReferenceOutsideUnicodeRange),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(a.isSurrogate(this.charRefCode))this._err(s.surrogateCharacterReference),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(a.isUndefinedCodePoint(this.charRefCode))this._err(s.noncharacterCharacterReference);else if(a.isControlCodePoint(this.charRefCode)||this.charRefCode===l.CARRIAGE_RETURN){this._err(s.controlCharacterReference);var e=h[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}]),e}();w.CHARACTER_TOKEN="CHARACTER_TOKEN",w.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",w.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",w.START_TAG_TOKEN="START_TAG_TOKEN",w.END_TAG_TOKEN="END_TAG_TOKEN",w.COMMENT_TOKEN="COMMENT_TOKEN",w.DOCTYPE_TOKEN="DOCTYPE_TOKEN",w.EOF_TOKEN="EOF_TOKEN",w.HIBERNATION_TOKEN="HIBERNATION_TOKEN",w.MODE={DATA:f,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},w.getTokenAttr=function(e,t){for(var n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=w},function(e,t,n){var r=n(231),i=n(174);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){e.exports=!0},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(440),i=n(441),o=n(442),a=n(443),c=n(444);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e=0)){var i=e.props.insertExtraNode;e.extraNode=document.createElement("div");var o=f(e).extraNode;o.className="ant-click-animating-node";var c=e.getAttributeName();t.setAttribute(c,"true"),r=r||document.createElement("style"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&function(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}(n)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(n)&&"transparent"!==n&&(e.csp&&e.csp.nonce&&(r.nonce=e.csp.nonce),o.style.borderColor=n,r.innerHTML="\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: ".concat(n,";\n }"),document.body.contains(r)||document.body.appendChild(r)),i&&t.appendChild(o),a.a.addStartEventListener(t,e.onTransitionStart),a.a.addEndEventListener(t,e.onTransitionEnd)}},e.onTransitionStart=function(t){if(!e.destroy){var n=Object(o.findDOMNode)(f(e));t&&t.target===n&&(e.animationStart||e.resetEffect(n))}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!(t.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName&&!p(n.target)){e.resetEffect(t);var r=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout(function(){return e.onClick(t,r)},0),c.a.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=Object(c.a)(function(){e.animationStart=!1},10)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.renderWave=function(t){var n=t.csp,r=e.props.children;return e.csp=n,r},e}var n,v,m;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,i["Component"]),n=t,(v=[{key:"componentDidMount",value:function(){var e=Object(o.findDOMNode)(this);e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroy=!0}},{key:"getAttributeName",value:function(){return this.props.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}},{key:"resetEffect",value:function(e){if(e&&e!==this.extraNode&&e instanceof Element){var t=this.props.insertExtraNode,n=this.getAttributeName();e.setAttribute(n,"false"),r&&(r.innerHTML=""),t&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),a.a.removeStartEventListener(e,this.onTransitionStart),a.a.removeEndEventListener(e,this.onTransitionEnd)}}},{key:"render",value:function(){return i.createElement(s.a,null,this.renderWave)}}])&&u(n.prototype,v),m&&u(n,m),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(51),i=Object(r.a)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")},function(e,t,n){var r=n(507)(n(203));e.exports=r},function(e,t,n){var r=n(67),i=n(509),o=n(63),a="[object Object]",c=Function.prototype,s=Object.prototype,l=c.toString,u=s.hasOwnProperty,h=l.call(Object);e.exports=function(e){if(!o(e)||r(e)!=a)return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==h}},function(e,t,n){var r=n(247),i=n(528),o=n(88),a=n(43);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(0),i=n.n(r),o=n(15),a=n.n(o),c=n(2),s=n.n(c);function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n=t||n<0||y&&e-v>=h}function E(){var e=i();if(T(e))return _(e);d=setTimeout(E,function(e){var n=t-(e-p);return y?s(n,h-(e-v)):n}(e))}function _(e){return d=void 0,g&&l?b(e):(l=u=void 0,f)}function C(){var e=i(),n=T(e);if(l=arguments,u=this,p=e,n){if(void 0===d)return function(e){return v=e,d=setTimeout(E,t),m?b(e):f}(p);if(y)return clearTimeout(d),d=setTimeout(E,t),b(p)}return void 0===d&&(d=setTimeout(E,t)),f}return t=o(t)||0,r(n)&&(m=!!n.leading,h=(y="maxWait"in n)?c(o(n.maxWait)||0,t):h,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),v=0,l=p=u=d=void 0},C.flush=function(){return void 0===d?f:_(i())},C}},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;s.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),C="undefined"!==typeof WeakMap?new WeakMap:new n,S=function(){return function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);C.set(this,r)}}();["observe","unobserve","disconnect"].forEach(function(e){S.prototype[e]=function(){var t;return(t=C.get(this))[e].apply(t,arguments)}});var w="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:S;t.a=w}).call(this,n(59))},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(0),i=n.n(r);function o(e){var t=[];return i.a.Children.forEach(e,function(e){t.push(e)}),t}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(575)),i=o(n(578));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t,n,o){null===t&&(t=Function.prototype);var a=(0,i.default)(t,n);if(void 0===a){var c=(0,r.default)(t);return null===c?void 0:e(c,n,o)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(o):void 0}},,function(e,t,n){!function(t){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o="all",a={"\u21e7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,command:91},c={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},s=function(e){return c[e]||e.toUpperCase().charCodeAt(0)},l=[];for(n=1;n<20;n++)c["f"+n]=111+n;function u(e,t){for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function h(e,t){if(e.length!=t.length)return!1;for(var n=0;n1&&(o=y(e),e=[e[e.length-1]]),e=e[0],(e=s(e))in r||(r[e]=[]),r[e].push({shortcut:i[a],scope:t,method:n,key:i[a],mods:o})}for(n in a)p[n]=!1;function v(){return o||"all"}function m(e){var t;return""==(t=(e=e.replace(/\s/g,"")).split(","))[t.length-1]&&(t[t.length-2]+=","),t}function y(e){for(var t=e.slice(0,e.length-1),n=0;n0,i)(!i[o]&&u(n.mods,+o)>-1||i[o]&&-1==u(n.mods,+o))&&(s=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!s||!1===n.method(e,n)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}(e)}),g(document,"keyup",function(e){var t,n=e.keyCode,r=u(l,n);if(r>=0&&l.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(t in i[n]=!1,a)a[t]==n&&(p[t]=!1)}),g(window,"focus",function(){for(n in i)i[n]=!1;for(n in a)p[n]=!1});var b=t.key;t.key=p,t.key.setScope=function(e){o=e||"all"},t.key.getScope=v,t.key.deleteScope=function(e){var t,n,i;for(t in r)for(n=r[t],i=0;i1&&(l=y(i),e=i[i.length-1]),e=s(e),void 0===t&&(t=v()),!r[e])return;for(o=0;o=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";var r=n(48),i=n(50),o=n(72),a=n(60),c=n(73),s=n(66),l=function(e){function t(e,n){var i;return r(this,t),(i=o(this,a(t).call(this,e))).posTracker=null,i.onParseError=n.onParseError,i}return c(t,s),i(t,[{key:"_setErrorLocation",value:function(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}},{key:"_reportError",value:function(e){var t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}},{key:"_getOverriddenMethods",value:function(e){return{_err:function(t){e._reportError(t)}}}}]),t}();e.exports=l},function(e,t,n){var r=n(399);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(99);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(173)("keys"),i=n(131);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(53),i=n(75),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(130)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(98),i=n(409),o=n(174),a=n(172)("IE_PROTO"),c=function(){},s=function(){var e,t=n(230)("iframe"),r=o.length;for(t.style.display="none",n(410).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("